From 7f64bcc3aee90985619cf002cbda02d123d611de Mon Sep 17 00:00:00 2001 From: bennykok Date: Mon, 31 Mar 2025 11:46:58 +0200 Subject: [PATCH] fix: ensure validate workflow --- web-plugin/index.js | 75 +++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 43 deletions(-) diff --git a/web-plugin/index.js b/web-plugin/index.js index 99843b6..f507a26 100644 --- a/web-plugin/index.js +++ b/web-plugin/index.js @@ -635,7 +635,7 @@ const ext = { "string", inputName, /* value=*/ "", - () => {}, + () => { }, { serialize: true }, ); @@ -716,7 +716,7 @@ const ext = { try { await window["app"].ui.settings.setSettingValueAsync( "Comfy.Validation.Workflows", - false, + true, ); } catch (error) { console.warning( @@ -920,10 +920,10 @@ function createDynamicUIHtml(data) {

Missing Nodes

These nodes are not found with any matching custom_nodes in the ComfyUI Manager Database

${data.missing_nodes - .map((node) => { - return `

${node}

`; - }) - .join("")} + .map((node) => { + return `

${node}

`; + }) + .join("")} `; } @@ -931,17 +931,14 @@ function createDynamicUIHtml(data) { Object.values(data.custom_nodes).forEach((node) => { html += `
- ${ - node.name - } + ${node.name + }

${node.hash}

- ${ - node.warning - ? `

${node.warning}

` - : "" - } + ${node.warning + ? `

${node.warning}

` + : "" + }
`; }); @@ -955,9 +952,8 @@ function createDynamicUIHtml(data) { Object.entries(data.models).forEach(([section, items]) => { html += `
-

${ - section.charAt(0).toUpperCase() + section.slice(1) - }

`; +

${section.charAt(0).toUpperCase() + section.slice(1) + }

`; items.forEach((item) => { html += `

${item.name}

`; }); @@ -973,9 +969,8 @@ function createDynamicUIHtml(data) { Object.entries(data.files).forEach(([section, items]) => { html += `
-

${ - section.charAt(0).toUpperCase() + section.slice(1) - }

`; +

${section.charAt(0).toUpperCase() + section.slice(1) + }

`; items.forEach((item) => { html += `

${item.name}

`; }); @@ -1493,14 +1488,12 @@ export class LoadingDialog extends ComfyDialog { showLoading(title, message) { this.show(`
-

${title} ${ - this.loadingIcon - }

- ${ - message - ? `` - : "" - } +

${title} ${this.loadingIcon + }

+ ${message + ? `` + : "" + }
`); } @@ -1766,21 +1759,17 @@ export class ConfigDialog extends ComfyDialog {
- API Key: User / Org - + API Key: User / Org +
@@ -1960,7 +1949,7 @@ async function loadWorkflowApi(versionId) { console.log("Workflow API loaded:", response); await window["app"].ui.settings.setSettingValueAsync( "Comfy.Validation.Workflows", - false, + true, ); app.loadGraphData(response.workflow); // You might want to update the UI or trigger some action in ComfyUI here