Disable node def validation by default (#1190)

* Add setting

* Make node def validation optional
This commit is contained in:
Chenlei Hu
2024-10-09 16:02:27 -04:00
committed by GitHub
parent f6466d7062
commit f94bdc358b
3 changed files with 22 additions and 3 deletions

View File

@@ -1968,7 +1968,9 @@ export class ComfyApp {
*/
async registerNodes() {
// Load node definitions from the backend
const defs = await api.getNodeDefs()
const defs = await api.getNodeDefs({
validate: useSettingStore().get('Comfy.Validation.NodeDefs')
})
await this.registerNodesFromDefs(defs)
await this.#invokeExtensionsAsync('registerCustomNodes')
if (this.vueAppReady) {
@@ -2911,7 +2913,9 @@ export class ComfyApp {
useModelStore().clearCache()
}
const defs = await api.getNodeDefs()
const defs = await api.getNodeDefs({
validate: useSettingStore().get('Comfy.Validation.NodeDefs')
})
for (const nodeId in defs) {
this.registerNodeDef(nodeId, defs[nodeId])