mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
feat: filter node with mode:0
This commit is contained in:
@@ -192,6 +192,7 @@ class NodeRegistry:
|
|||||||
"comfy_class": comfy_class,
|
"comfy_class": comfy_class,
|
||||||
"capabilities": capabilities,
|
"capabilities": capabilities,
|
||||||
"widget_names": widget_names,
|
"widget_names": widget_names,
|
||||||
|
"mode": node.get("mode"),
|
||||||
}
|
}
|
||||||
logger.debug("Registered %s nodes in registry", len(nodes))
|
logger.debug("Registered %s nodes in registry", len(nodes))
|
||||||
self._registry_updated.set()
|
self._registry_updated.set()
|
||||||
|
|||||||
@@ -510,6 +510,9 @@ export async function sendLoraToWorkflow(loraSyntax, replaceMode = false, syntax
|
|||||||
if (!node) {
|
if (!node) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (node.mode !== undefined && node.mode !== 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (node.capabilities && typeof node.capabilities === 'object') {
|
if (node.capabilities && typeof node.capabilities === 'object') {
|
||||||
if (node.capabilities.supports_lora === true) {
|
if (node.capabilities.supports_lora === true) {
|
||||||
return true;
|
return true;
|
||||||
@@ -569,6 +572,12 @@ export async function sendModelPathToWorkflow(modelPath, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const targetNodes = filterRegistryNodes(registry.nodes, (node) => {
|
const targetNodes = filterRegistryNodes(registry.nodes, (node) => {
|
||||||
|
if (!node) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (node.mode !== undefined && node.mode !== 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const widgetNames = getWidgetNames(node);
|
const widgetNames = getWidgetNames(node);
|
||||||
return widgetNames.includes(widgetName);
|
return widgetNames.includes(widgetName);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ app.registerExtension({
|
|||||||
title: node.title || node.comfyClass,
|
title: node.title || node.comfyClass,
|
||||||
type: node.comfyClass,
|
type: node.comfyClass,
|
||||||
comfy_class: node.comfyClass,
|
comfy_class: node.comfyClass,
|
||||||
|
mode: node.mode,
|
||||||
capabilities: {
|
capabilities: {
|
||||||
supports_lora: supportsLora,
|
supports_lora: supportsLora,
|
||||||
widget_names: widgetNames,
|
widget_names: widgetNames,
|
||||||
|
|||||||
Reference in New Issue
Block a user