Skip to content

Commit 955c703

Browse files
authored
Still load workflow even validation fails (#453)
1 parent ef8b952 commit 955c703

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/scripts/app.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2188,8 +2188,14 @@ export class ComfyApp {
21882188
this.vueAppReady &&
21892189
useSettingStore().get('Comfy.Validation.Workflows')
21902190
) {
2191-
graphData = await validateComfyWorkflow(graphData, /* onError=*/ alert)
2192-
if (!graphData) return
2191+
// TODO: Show validation error in a dialog.
2192+
const validatedGraphData = await validateComfyWorkflow(
2193+
graphData,
2194+
/* onError=*/ alert
2195+
)
2196+
// If the validation failed, use the original graph data.
2197+
// Ideally we should not block users from loading the workflow.
2198+
graphData = validatedGraphData ?? graphData
21932199
}
21942200

21952201
const missingNodeTypes = []

0 commit comments

Comments
 (0)