Skip to content

Commit 5528ead

Browse files
christian-byrnegithub-actions
andcommitted
[fix] Preserve subgraph structure when clearing workflow (#4567)
Co-authored-by: github-actions <github-actions@github.com>
1 parent 74aadf0 commit 5528ead

File tree

15 files changed

+569
-1
lines changed

15 files changed

+569
-1
lines changed

cherry-pick-commits-list.txt

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Or one by one (IN ORDER):
2+
git cherry-pick eb63b5c53610943051f89bfb221ba9a62994a49b # 1. Add Traditional Chinese language
3+
git cherry-pick 43f73f88560884d6e989b0963396e2d68d664770 # 2. Correct the translation for 'Credits' in
4+
git cherry-pick 5c119fcbda7f3e195b480c79619b7afc2e5f442f # 3. Improve execution logic / Fix group node
5+
git cherry-pick ef9b6252080ee7d663425570b01480f4ab099735 # 4. Fix DTO return type to allow clean test/
6+
git cherry-pick 19eaf6ecdc078679eed96ea0f38b51ccbe3e3c43 # 5. Fix SubgraphNode widget values ignored (
7+
git cherry-pick 01c735d94316eb34b031e5436aaae2bb09805edf # 6. Fix cannot check widget value if undefin
8+
git cherry-pick a70d69cbd26be18ef0626e75b9b32870a50f1902 # 7. Sync subgraph node title changes w
9+
git cherry-pick 1200c07fcd6e14a4c3a8734468bd6cf694c23205 # 8. Add support for Feature Flags (#4439)
10+
git cherry-pick 11eff4981febe5ed790ec21269b8ec9217c77b30 # 9. Fix Help Center changelog toast overflow
11+
git cherry-pick ed1d944e0e4f851cfd1d90c8b2c68bda0fd9cdbb # 10. [3d] remove unnecessary uploadTexture (#
12+
git cherry-pick a39f6e676364fa419b65a4e541b70be6643710c0 # 11. DOM widget promotion for subgraph
13+
git cherry-pick 61611fb0cba3fa14e57081a0c502df232465c1c8 # 12. Add pricing for new API nodes (#4
14+
git cherry-pick 7b32a2fb6e9da5194f7877694fe56762373092e5 # 13. Add browser tests for subgraph f
15+
git cherry-pick 280131d33dddfe672de03b7a2e4478894faa9d44 # 14. Node Definition Filter Registry S
16+
git cherry-pick ff68c421628b3aafe9bad09ed7f8a97aa45f623a # 15. Hide subgraph nodes from node lib
17+
git cherry-pick 7eb3eb24737cc0634c0b85025010927d5e597b7d # 16. Update the frontend to support async nod
18+
git cherry-pick b0968509f9b33a647107b710189bb137628a0436 # 17. Fix progress stuck after execution inter
19+
git cherry-pick c06bc63c6fcc5043a59a7198db33f04f28662391 # 18. Update node output system to use
20+
git cherry-pick 4d0ba197a83edf2dc6c66d84c94ed5f7fc0ab974 # 19. [Cleanup] Remove deprecated: node def va
21+
git cherry-pick 271643aa936c0f400811c0903237e31a32404717 # 20. Fix failing test case that uses o
22+
git cherry-pick 344afa21a7b6b6694608540b291595ed065d187a # 21. minimap (#4520)
23+
git cherry-pick b1436a068b663ce8d070407d2fee99b052cf9a3c # 22. sync subgraph node titles with br
24+
git cherry-pick 7fe4c07a9c8964a7dee25ecc6bfdc06f2d850fd3 # 23. Preserve subgraph structure when c
25+
git cherry-pick 680c09a5847bf0f98f06f9be3881b59abf23d295 # 24. Detect missing nodes in subgraphs
26+
git cherry-pick b1fc8846a3e532cd272e8d23caa82367a7934d74 # 25. Update API node pricing for multip
27+
git cherry-pick 98d694f7e3c3c2ad6eeb8bae28b768f6e33dd732 # 26. Prevent incorrect 'frontend_only'
28+
git cherry-pick dd14144f47a4dd1b1ce20fe5ac44eadd071f0a28 # 27. Update Search & Replace to support
29+
git cherry-pick 4b75528c39351abd1e14bcce9d7708b45acbb352 # 28. Fix graph configuration callbacks
30+
git cherry-pick cf072b84209550cc3771012ff60872869e1725d3 # 29. Fix link input slots not being upd
31+
git cherry-pick 5c71854a96714bb112b045ab58644e2488752212 # 30. Enable CI tests for all feature bra
32+
git cherry-pick 516eb26d3e6f3278f9774f8879d23c7e67a0efb0 # 31. Add custom icon system with workf
33+
git cherry-pick b370b6387dd44d872821f3a3bef88c21139da38d # 32. DOM widgets lose correct positioni
34+
git cherry-pick f987cf9dbdc8eabf4c5e7eed65473d48c316783d # 33. Improve SubgraphNode badge with s
35+
git cherry-pick 2c84ecbf6ef01a18e54da18be7c3ad1568e11ed2 # 34. Make minimap reactive to subgraph
36+
git cherry-pick b2b50ac0125db8e4f12fa80794b89f0dddb1ef82 # 35. [Style] Update "convert to subgraph" ico
37+
git cherry-pick aabea4b78dcd258086f5c9c1fb008cf0683808f1 # 36. Viewport persistence for subgraph
38+
git cherry-pick b125e0aa3a3fbf2235e241f3fb9992ba495a7109 # 37. Move partial execution to the bac
39+
git cherry-pick baea47c49355fca241233e3c157fea6adebeae9c # 38. Extract selection filtering logic to use
40+
git cherry-pick eae4b954d0e576866fe1bf6e24525a7fcea3f21f # 39. Preserve per-workflow subgraph nav
41+
git cherry-pick 47e18088611f905588deb6912524ea233daab491 # 40. Toggle bypass/mute of subgraph nod
42+
git cherry-pick 61c9341450f56f892cc7673b33de8a1fb799df3e # 41. Add type guard for SubgraphDefinit
43+
git cherry-pick dc395f5d6d3fbd2c457dce566b299a21ac02a4aa # 42. Fix viewport sync in minimap and s
44+
git cherry-pick 4c6e7f106bbfcde18c3aa63150f5841506901f60 # 43. Detect missing nodes in subgraphs
45+
git cherry-pick f1aba23ee1c9716d5e8a89a9e666fd7c825ddac4 # 44. Update litegraph to 0.17.0 (#465
46+

src/composables/useCoreCommands.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { useBottomPanelStore } from '@/stores/workspace/bottomPanelStore'
2828
import { useColorPaletteStore } from '@/stores/workspace/colorPaletteStore'
2929
import { useSearchBoxStore } from '@/stores/workspace/searchBoxStore'
3030
import { useWorkspaceStore } from '@/stores/workspaceStore'
31+
import { getAllNonIoNodesInSubgraph } from '@/utils/graphTraversalUtil'
3132

3233
const moveSelectedNodesVersionAdded = '1.22.2'
3334

@@ -169,7 +170,16 @@ export function useCoreCommands(): ComfyCommand[] {
169170
confirm('Clear workflow?')
170171
) {
171172
app.clean()
172-
app.graph.clear()
173+
if (app.canvas.subgraph) {
174+
// `clear` is not implemented on subgraphs and the parent class's
175+
// (`LGraph`) `clear` breaks the subgraph structure. For subgraphs,
176+
// just clear the nodes but preserve input/output nodes and structure
177+
const subgraph = app.canvas.subgraph
178+
const nonIoNodes = getAllNonIoNodesInSubgraph(subgraph)
179+
nonIoNodes.forEach((node) => subgraph.remove(node))
180+
} else {
181+
app.graph.clear()
182+
}
173183
api.dispatchCustomEvent('graphCleared')
174184
}
175185
}

src/locales/es/main.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@
290290
"devices": "Dispositivos",
291291
"disableAll": "Deshabilitar todo",
292292
"disabling": "Deshabilitando",
293+
"dismiss": "Descartar",
293294
"download": "Descargar",
294295
"edit": "Editar",
295296
"empty": "Vacío",
@@ -304,6 +305,8 @@
304305
"filter": "Filtrar",
305306
"findIssues": "Encontrar problemas",
306307
"firstTimeUIMessage": "Esta es la primera vez que usas la nueva interfaz. Elige \"Menú > Usar nuevo menú > Desactivado\" para restaurar la antigua interfaz.",
308+
"frontendNewer": "La versión del frontend {frontendVersion} puede no ser compatible con la versión del backend {backendVersion}.",
309+
"frontendOutdated": "La versión del frontend {frontendVersion} está desactualizada. El backend requiere la versión {requiredVersion} o superior.",
307310
"goToNode": "Ir al nodo",
308311
"help": "Ayuda",
309312
"icon": "Icono",
@@ -379,11 +382,14 @@
379382
"unknownError": "Error desconocido",
380383
"update": "Actualizar",
381384
"updateAvailable": "Actualización Disponible",
385+
"updateFrontend": "Actualizar frontend",
382386
"updated": "Actualizado",
383387
"updating": "Actualizando",
384388
"upload": "Subir",
385389
"usageHint": "Sugerencia de uso",
386390
"user": "Usuario",
391+
"versionMismatchWarning": "Advertencia de compatibilidad de versión",
392+
"versionMismatchWarningMessage": "{warning}: {detail} Visita https://docs.comfy.org/installation/update_comfyui#common-update-issues para obtener instrucciones de actualización.",
387393
"videoFailedToLoad": "Falló la carga del video",
388394
"workflow": "Flujo de trabajo"
389395
},
@@ -1482,6 +1488,13 @@
14821488
"prefix": "Debe comenzar con {prefix}",
14831489
"required": "Requerido"
14841490
},
1491+
"versionMismatchWarning": {
1492+
"dismiss": "Descartar",
1493+
"frontendNewer": "La versión del frontend {frontendVersion} puede no ser compatible con la versión del backend {backendVersion}.",
1494+
"frontendOutdated": "La versión del frontend {frontendVersion} está desactualizada. El backend requiere la versión {requiredVersion} o superior.",
1495+
"title": "Advertencia de compatibilidad de versión",
1496+
"updateFrontend": "Actualizar frontend"
1497+
},
14851498
"welcome": {
14861499
"getStarted": "Empezar",
14871500
"title": "Bienvenido a ComfyUI"

src/locales/fr/main.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@
290290
"devices": "Appareils",
291291
"disableAll": "Désactiver tout",
292292
"disabling": "Désactivation",
293+
"dismiss": "Fermer",
293294
"download": "Télécharger",
294295
"edit": "Modifier",
295296
"empty": "Vide",
@@ -304,6 +305,8 @@
304305
"filter": "Filtrer",
305306
"findIssues": "Trouver des problèmes",
306307
"firstTimeUIMessage": "C'est la première fois que vous utilisez la nouvelle interface utilisateur. Choisissez \"Menu > Utiliser le nouveau menu > Désactivé\" pour restaurer l'ancienne interface utilisateur.",
308+
"frontendNewer": "La version du frontend {frontendVersion} peut ne pas être compatible avec la version du backend {backendVersion}.",
309+
"frontendOutdated": "La version du frontend {frontendVersion} est obsolète. Le backend requiert la version {requiredVersion} ou supérieure.",
307310
"goToNode": "Aller au nœud",
308311
"help": "Aide",
309312
"icon": "Icône",
@@ -379,11 +382,14 @@
379382
"unknownError": "Erreur inconnue",
380383
"update": "Mettre à jour",
381384
"updateAvailable": "Mise à jour disponible",
385+
"updateFrontend": "Mettre à jour le frontend",
382386
"updated": "Mis à jour",
383387
"updating": "Mise à jour",
384388
"upload": "Téléverser",
385389
"usageHint": "Conseil d'utilisation",
386390
"user": "Utilisateur",
391+
"versionMismatchWarning": "Avertissement de compatibilité de version",
392+
"versionMismatchWarningMessage": "{warning} : {detail} Consultez https://docs.comfy.org/installation/update_comfyui#common-update-issues pour les instructions de mise à jour.",
387393
"videoFailedToLoad": "Échec du chargement de la vidéo",
388394
"workflow": "Flux de travail"
389395
},
@@ -1482,6 +1488,13 @@
14821488
"prefix": "Doit commencer par {prefix}",
14831489
"required": "Requis"
14841490
},
1491+
"versionMismatchWarning": {
1492+
"dismiss": "Ignorer",
1493+
"frontendNewer": "La version du frontend {frontendVersion} peut ne pas être compatible avec la version du backend {backendVersion}.",
1494+
"frontendOutdated": "La version du frontend {frontendVersion} est obsolète. Le backend nécessite la version {requiredVersion} ou supérieure.",
1495+
"title": "Avertissement de compatibilité de version",
1496+
"updateFrontend": "Mettre à jour le frontend"
1497+
},
14851498
"welcome": {
14861499
"getStarted": "Commencer",
14871500
"title": "Bienvenue sur ComfyUI"

src/locales/ja/main.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@
290290
"devices": "デバイス",
291291
"disableAll": "すべて無効にする",
292292
"disabling": "無効化",
293+
"dismiss": "閉じる",
293294
"download": "ダウンロード",
294295
"edit": "編集",
295296
"empty": "",
@@ -304,6 +305,8 @@
304305
"filter": "フィルタ",
305306
"findIssues": "問題を見つける",
306307
"firstTimeUIMessage": "新しいUIを初めて使用しています。「メニュー > 新しいメニューを使用 > 無効」を選択することで古いUIに戻すことが可能です。",
308+
"frontendNewer": "フロントエンドのバージョン {frontendVersion} はバックエンドのバージョン {backendVersion} と互換性がない可能性があります。",
309+
"frontendOutdated": "フロントエンドのバージョン {frontendVersion} は古くなっています。バックエンドは {requiredVersion} 以上が必要です。",
307310
"goToNode": "ノードに移動",
308311
"help": "ヘルプ",
309312
"icon": "アイコン",
@@ -379,11 +382,14 @@
379382
"unknownError": "不明なエラー",
380383
"update": "更新",
381384
"updateAvailable": "更新が利用可能",
385+
"updateFrontend": "フロントエンドを更新",
382386
"updated": "更新済み",
383387
"updating": "更新中",
384388
"upload": "アップロード",
385389
"usageHint": "使用ヒント",
386390
"user": "ユーザー",
391+
"versionMismatchWarning": "バージョン互換性の警告",
392+
"versionMismatchWarningMessage": "{warning}: {detail} 更新手順については https://docs.comfy.org/installation/update_comfyui#common-update-issues をご覧ください。",
387393
"videoFailedToLoad": "ビデオの読み込みに失敗しました",
388394
"workflow": "ワークフロー"
389395
},
@@ -1482,6 +1488,13 @@
14821488
"prefix": "{prefix}で始める必要があります",
14831489
"required": "必須"
14841490
},
1491+
"versionMismatchWarning": {
1492+
"dismiss": "閉じる",
1493+
"frontendNewer": "フロントエンドのバージョン {frontendVersion} は、バックエンドのバージョン {backendVersion} と互換性がない可能性があります。",
1494+
"frontendOutdated": "フロントエンドのバージョン {frontendVersion} は古くなっています。バックエンドはバージョン {requiredVersion} 以上が必要です。",
1495+
"title": "バージョン互換性の警告",
1496+
"updateFrontend": "フロントエンドを更新"
1497+
},
14851498
"welcome": {
14861499
"getStarted": "はじめる",
14871500
"title": "ComfyUIへようこそ"

src/locales/ko/main.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@
290290
"devices": "장치",
291291
"disableAll": "모두 비활성화",
292292
"disabling": "비활성화 중",
293+
"dismiss": "닫기",
293294
"download": "다운로드",
294295
"edit": "편집",
295296
"empty": "비어 있음",
@@ -304,6 +305,8 @@
304305
"filter": "필터",
305306
"findIssues": "문제 찾기",
306307
"firstTimeUIMessage": "새 UI를 처음 사용합니다. \"메뉴 > 새 메뉴 사용 > 비활성화\"를 선택하여 이전 UI로 복원하세요.",
308+
"frontendNewer": "프론트엔드 버전 {frontendVersion}이(가) 백엔드 버전 {backendVersion}과(와) 호환되지 않을 수 있습니다.",
309+
"frontendOutdated": "프론트엔드 버전 {frontendVersion}이(가) 오래되었습니다. 백엔드는 {requiredVersion} 이상이 필요합니다.",
307310
"goToNode": "노드로 이동",
308311
"help": "도움말",
309312
"icon": "아이콘",
@@ -379,11 +382,14 @@
379382
"unknownError": "알 수 없는 오류",
380383
"update": "업데이트",
381384
"updateAvailable": "업데이트 가능",
385+
"updateFrontend": "프론트엔드 업데이트",
382386
"updated": "업데이트 됨",
383387
"updating": "업데이트 중",
384388
"upload": "업로드",
385389
"usageHint": "사용 힌트",
386390
"user": "사용자",
391+
"versionMismatchWarning": "버전 호환성 경고",
392+
"versionMismatchWarningMessage": "{warning}: {detail} 업데이트 지침은 https://docs.comfy.org/installation/update_comfyui#common-update-issues 를 방문하세요.",
387393
"videoFailedToLoad": "비디오를 로드하지 못했습니다.",
388394
"workflow": "워크플로"
389395
},
@@ -1482,6 +1488,13 @@
14821488
"prefix": "{prefix}(으)로 시작해야 합니다",
14831489
"required": "필수"
14841490
},
1491+
"versionMismatchWarning": {
1492+
"dismiss": "닫기",
1493+
"frontendNewer": "프론트엔드 버전 {frontendVersion}이(가) 백엔드 버전 {backendVersion}과(와) 호환되지 않을 수 있습니다.",
1494+
"frontendOutdated": "프론트엔드 버전 {frontendVersion}이(가) 오래되었습니다. 백엔드는 {requiredVersion} 이상 버전을 필요로 합니다.",
1495+
"title": "버전 호환성 경고",
1496+
"updateFrontend": "프론트엔드 업데이트"
1497+
},
14851498
"welcome": {
14861499
"getStarted": "시작하기",
14871500
"title": "ComfyUI에 오신 것을 환영합니다"

src/locales/ru/main.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@
290290
"devices": "Устройства",
291291
"disableAll": "Отключить все",
292292
"disabling": "Отключение",
293+
"dismiss": "Закрыть",
293294
"download": "Скачать",
294295
"edit": "Редактировать",
295296
"empty": "Пусто",
@@ -304,6 +305,8 @@
304305
"filter": "Фильтр",
305306
"findIssues": "Найти проблемы",
306307
"firstTimeUIMessage": "Вы впервые используете новый интерфейс. Выберите \"Меню > Использовать новое меню > Отключено\", чтобы восстановить старый интерфейс.",
308+
"frontendNewer": "Версия интерфейса {frontendVersion} может быть несовместима с версией сервера {backendVersion}.",
309+
"frontendOutdated": "Версия интерфейса {frontendVersion} устарела. Требуется версия не ниже {requiredVersion} для работы с сервером.",
307310
"goToNode": "Перейти к ноде",
308311
"help": "Помощь",
309312
"icon": "Иконка",
@@ -379,11 +382,14 @@
379382
"unknownError": "Неизвестная ошибка",
380383
"update": "Обновить",
381384
"updateAvailable": "Доступно обновление",
385+
"updateFrontend": "Обновить интерфейс",
382386
"updated": "Обновлено",
383387
"updating": "Обновление",
384388
"upload": "Загрузить",
385389
"usageHint": "Подсказка по использованию",
386390
"user": "Пользователь",
391+
"versionMismatchWarning": "Предупреждение о несовместимости версий",
392+
"versionMismatchWarningMessage": "{warning}: {detail} Посетите https://docs.comfy.org/installation/update_comfyui#common-update-issues для инструкций по обновлению.",
387393
"videoFailedToLoad": "Не удалось загрузить видео",
388394
"workflow": "Рабочий процесс"
389395
},
@@ -1482,6 +1488,13 @@
14821488
"prefix": "Должно начинаться с {prefix}",
14831489
"required": "Обязательно"
14841490
},
1491+
"versionMismatchWarning": {
1492+
"dismiss": "Закрыть",
1493+
"frontendNewer": "Версия интерфейса {frontendVersion} может быть несовместима с версией сервера {backendVersion}.",
1494+
"frontendOutdated": "Версия интерфейса {frontendVersion} устарела. Для работы с сервером требуется версия {requiredVersion} или новее.",
1495+
"title": "Предупреждение о несовместимости версий",
1496+
"updateFrontend": "Обновить интерфейс"
1497+
},
14851498
"welcome": {
14861499
"getStarted": "Начать",
14871500
"title": "Добро пожаловать в ComfyUI"

src/locales/zh-TW/main.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@
290290
"devices": "裝置",
291291
"disableAll": "全部停用",
292292
"disabling": "停用中",
293+
"dismiss": "關閉",
293294
"download": "下載",
294295
"edit": "編輯",
295296
"empty": "",
@@ -304,6 +305,8 @@
304305
"filter": "篩選",
305306
"findIssues": "尋找問題",
306307
"firstTimeUIMessage": "這是您第一次使用新介面。若要返回舊介面,請前往「選單」>「使用新介面」>「關閉」。",
308+
"frontendNewer": "前端版本 {frontendVersion} 可能與後端版本 {backendVersion} 不相容。",
309+
"frontendOutdated": "前端版本 {frontendVersion} 已過時。後端需要 {requiredVersion} 或更高版本。",
307310
"goToNode": "前往節點",
308311
"help": "說明",
309312
"icon": "圖示",
@@ -379,11 +382,14 @@
379382
"unknownError": "未知錯誤",
380383
"update": "更新",
381384
"updateAvailable": "有可用更新",
385+
"updateFrontend": "更新前端",
382386
"updated": "已更新",
383387
"updating": "更新中",
384388
"upload": "上傳",
385389
"usageHint": "使用提示",
386390
"user": "使用者",
391+
"versionMismatchWarning": "版本相容性警告",
392+
"versionMismatchWarningMessage": "{warning}:{detail} 請參閱 https://docs.comfy.org/installation/update_comfyui#common-update-issues 以取得更新說明。",
387393
"videoFailedToLoad": "無法載入影片",
388394
"workflow": "工作流程"
389395
},
@@ -1482,6 +1488,13 @@
14821488
"prefix": "必須以 {prefix} 開頭",
14831489
"required": "必填"
14841490
},
1491+
"versionMismatchWarning": {
1492+
"dismiss": "關閉",
1493+
"frontendNewer": "前端版本 {frontendVersion} 可能與後端版本 {backendVersion} 不相容。",
1494+
"frontendOutdated": "前端版本 {frontendVersion} 已過時。後端需要版本 {requiredVersion} 或更高版本。",
1495+
"title": "版本相容性警告",
1496+
"updateFrontend": "更新前端"
1497+
},
14851498
"welcome": {
14861499
"getStarted": "開始使用",
14871500
"title": "歡迎使用 ComfyUI"

0 commit comments

Comments
 (0)