From 955c703fdee0620cc5a4892fe6aea1191ffc82d1 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Thu, 15 Aug 2024 23:55:20 -0400 Subject: [PATCH] Still load workflow even validation fails (#453) --- src/scripts/app.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/scripts/app.ts b/src/scripts/app.ts index de78a7319..674d76053 100644 --- a/src/scripts/app.ts +++ b/src/scripts/app.ts @@ -2188,8 +2188,14 @@ export class ComfyApp { this.vueAppReady && useSettingStore().get('Comfy.Validation.Workflows') ) { - graphData = await validateComfyWorkflow(graphData, /* onError=*/ alert) - if (!graphData) return + // TODO: Show validation error in a dialog. + const validatedGraphData = await validateComfyWorkflow( + graphData, + /* onError=*/ alert + ) + // If the validation failed, use the original graph data. + // Ideally we should not block users from loading the workflow. + graphData = validatedGraphData ?? graphData } const missingNodeTypes = []