mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-06 22:10:14 -03:00
fix(workflow): include Create Hook LoRA in lora_code_update handler
This commit is contained in:
@@ -37,22 +37,28 @@ app.registerExtension({
|
|||||||
|
|
||||||
// Handle broadcast mode (for Desktop/non-browser support)
|
// Handle broadcast mode (for Desktop/non-browser support)
|
||||||
if (numericNodeId === -1) {
|
if (numericNodeId === -1) {
|
||||||
// Find all Lora Loader nodes in the current graph
|
// Find all compatible nodes in the current graph
|
||||||
const loraLoaderNodes = getAllGraphNodes(app.graph)
|
const compatibleClasses = new Set([
|
||||||
|
"Lora Loader (LoraManager)",
|
||||||
|
"Lora Stacker (LoraManager)",
|
||||||
|
"WanVideo Lora Select (LoraManager)",
|
||||||
|
"Create Hook LoRA (LoraManager)",
|
||||||
|
]);
|
||||||
|
const targetNodes = getAllGraphNodes(app.graph)
|
||||||
.map(({ node }) => node)
|
.map(({ node }) => node)
|
||||||
.filter((node) => node?.comfyClass === "Lora Loader (LoraManager)");
|
.filter((node) => compatibleClasses.has(node?.comfyClass));
|
||||||
|
|
||||||
// Update each Lora Loader node found
|
// Update each node found
|
||||||
if (loraLoaderNodes.length > 0) {
|
if (targetNodes.length > 0) {
|
||||||
loraLoaderNodes.forEach((node) => {
|
targetNodes.forEach((node) => {
|
||||||
this.updateNodeLoraCode(node, loraCode, mode);
|
this.updateNodeLoraCode(node, loraCode, mode);
|
||||||
});
|
});
|
||||||
console.log(
|
console.log(
|
||||||
`Updated ${loraLoaderNodes.length} Lora Loader nodes in broadcast mode`
|
`Updated ${targetNodes.length} nodes in broadcast mode`
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
console.warn(
|
console.warn(
|
||||||
"No Lora Loader nodes found in the workflow for broadcast update"
|
"No compatible LoRA nodes found in the workflow for broadcast update"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,10 +71,11 @@ app.registerExtension({
|
|||||||
!node ||
|
!node ||
|
||||||
(node.comfyClass !== "Lora Loader (LoraManager)" &&
|
(node.comfyClass !== "Lora Loader (LoraManager)" &&
|
||||||
node.comfyClass !== "Lora Stacker (LoraManager)" &&
|
node.comfyClass !== "Lora Stacker (LoraManager)" &&
|
||||||
node.comfyClass !== "WanVideo Lora Select (LoraManager)")
|
node.comfyClass !== "WanVideo Lora Select (LoraManager)" &&
|
||||||
|
node.comfyClass !== "Create Hook LoRA (LoraManager)")
|
||||||
) {
|
) {
|
||||||
console.warn(
|
console.warn(
|
||||||
"Node not found or not a LoraLoader:",
|
"Node not found or not a compatible LoRA node:",
|
||||||
graphId ?? "root",
|
graphId ?? "root",
|
||||||
nodeId
|
nodeId
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user