From fe8de94ed7ea227b160060182c33c2a70a400b99 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Fri, 8 Dec 2023 10:18:05 +0900 Subject: [PATCH] feat: Recognize missing nodes used within the group node and add functionality. --- __init__.py | 2 +- js/custom-nodes-downloader.js | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index 5cb54b29..ce51cbb2 100644 --- a/__init__.py +++ b/__init__.py @@ -17,7 +17,7 @@ import http.client import re import signal -version = "V1.7.2" +version = "V1.8" print(f"### Loading: ComfyUI-Manager ({version})") diff --git a/js/custom-nodes-downloader.js b/js/custom-nodes-downloader.js index 6ad0ab44..49e6ca78 100644 --- a/js/custom-nodes-downloader.js +++ b/js/custom-nodes-downloader.js @@ -177,9 +177,20 @@ export class CustomNodesInstaller extends ComfyDialog { } const missing_nodes = new Set(); - const nodes = app.graph.serialize().nodes; + const workflow = app.graph.serialize(); + const group_nodes = workflow.extra && workflow.extra.groupNodes ? workflow.extra.groupNodes : []; + let nodes = workflow.nodes; + + for (let i in group_nodes) { + let group_node = group_nodes[i]; + nodes = nodes.concat(group_node.nodes); + } + for (let i in nodes) { const node_type = nodes[i].type; + if(node_type.startsWith('workflow/')) + continue; + if (!registered_nodes.has(node_type)) { const url = name_to_url[node_type.trim()]; if(url)