Skip to content

Commit d6c3046

Browse files
authored
Allow skipping workflow validation (#355)
1 parent e1bc270 commit d6c3046

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/scripts/app.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import {
4444
import { Vector2 } from '@comfyorg/litegraph'
4545
import _ from 'lodash'
4646
import { showLoadWorkflowWarning } from '@/services/dialogService'
47+
import { useSettingStore } from '@/stores/settingStore'
4748

4849
export const ANIM_PREVIEW_WIDGET = '$$comfy_animation_preview'
4950

@@ -2178,8 +2179,13 @@ export class ComfyApp {
21782179
console.error(error)
21792180
}
21802181

2181-
graphData = await validateComfyWorkflow(graphData, /* onError=*/ alert)
2182-
if (!graphData) return
2182+
if (
2183+
this.vueAppReady &&
2184+
useSettingStore().get<boolean>('Comfy.Validation.Workflows')
2185+
) {
2186+
graphData = await validateComfyWorkflow(graphData, /* onError=*/ alert)
2187+
if (!graphData) return
2188+
}
21832189

21842190
const missingNodeTypes = []
21852191
await this.#invokeExtensionsAsync(

src/stores/settingStore.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ export const useSettingStore = defineStore('setting', {
5656
this.settingValues[id] = value
5757
}
5858
this.settings = settings.settingsParamLookup
59+
60+
app.ui.settings.addSetting({
61+
id: 'Comfy.Validation.Workflows',
62+
name: 'Validate workflows',
63+
type: 'boolean',
64+
defaultValue: true
65+
})
5966
},
6067

6168
set(key: string, value: any) {

0 commit comments

Comments
 (0)