From 60324c129965b403bfd91c84e25238ae14cd5a8e Mon Sep 17 00:00:00 2001 From: K1einB1ue <56420335+RanKaze@users.noreply.github.com> Date: Sun, 22 Feb 2026 07:19:08 +0800 Subject: [PATCH] feat: filter node with mode:0 --- py/routes/handlers/misc_handlers.py | 1 + static/js/utils/uiHelpers.js | 9 +++++++++ web/comfyui/workflow_registry.js | 1 + 3 files changed, 11 insertions(+) diff --git a/py/routes/handlers/misc_handlers.py b/py/routes/handlers/misc_handlers.py index 548c2b09..581ea24d 100644 --- a/py/routes/handlers/misc_handlers.py +++ b/py/routes/handlers/misc_handlers.py @@ -192,6 +192,7 @@ class NodeRegistry: "comfy_class": comfy_class, "capabilities": capabilities, "widget_names": widget_names, + "mode": node.get("mode"), } logger.debug("Registered %s nodes in registry", len(nodes)) self._registry_updated.set() diff --git a/static/js/utils/uiHelpers.js b/static/js/utils/uiHelpers.js index 2c6c75d5..b897ea70 100644 --- a/static/js/utils/uiHelpers.js +++ b/static/js/utils/uiHelpers.js @@ -510,6 +510,9 @@ export async function sendLoraToWorkflow(loraSyntax, replaceMode = false, syntax if (!node) { return false; } + if (node.mode !== undefined && node.mode !== 0) { + return false; + } if (node.capabilities && typeof node.capabilities === 'object') { if (node.capabilities.supports_lora === true) { return true; @@ -569,6 +572,12 @@ export async function sendModelPathToWorkflow(modelPath, options) { } const targetNodes = filterRegistryNodes(registry.nodes, (node) => { + if (!node) { + return false; + } + if (node.mode !== undefined && node.mode !== 0) { + return false; + } const widgetNames = getWidgetNames(node); return widgetNames.includes(widgetName); }); diff --git a/web/comfyui/workflow_registry.js b/web/comfyui/workflow_registry.js index 9f200c5e..f8c5dad7 100644 --- a/web/comfyui/workflow_registry.js +++ b/web/comfyui/workflow_registry.js @@ -62,6 +62,7 @@ app.registerExtension({ title: node.title || node.comfyClass, type: node.comfyClass, comfy_class: node.comfyClass, + mode: node.mode, capabilities: { supports_lora: supportsLora, widget_names: widgetNames,