Commit b0edcfdc authored by comfyanonymous's avatar comfyanonymous
Browse files

Merge branch 'missing-node-warning' of https://github.com/pythongosssss/ComfyUI

parents e07f8eab 92e912c0
...@@ -864,9 +864,15 @@ class ComfyApp { ...@@ -864,9 +864,15 @@ class ComfyApp {
graphData = structuredClone(defaultGraph); graphData = structuredClone(defaultGraph);
} }
// Patch T2IAdapterLoader to ControlNetLoader since they are the same node now const missingNodeTypes = [];
for (let n of graphData.nodes) { for (let n of graphData.nodes) {
// Patch T2IAdapterLoader to ControlNetLoader since they are the same node now
if (n.type == "T2IAdapterLoader") n.type = "ControlNetLoader"; if (n.type == "T2IAdapterLoader") n.type = "ControlNetLoader";
// Find missing node types
if (!(n.type in LiteGraph.registered_node_types)) {
missingNodeTypes.push(n.type);
}
} }
this.graph.configure(graphData); this.graph.configure(graphData);
...@@ -893,6 +899,14 @@ class ComfyApp { ...@@ -893,6 +899,14 @@ class ComfyApp {
this.#invokeExtensions("loadedGraphNode", node); this.#invokeExtensions("loadedGraphNode", node);
} }
if (missingNodeTypes.length) {
this.ui.dialog.show(
`When loading the graph, the following node types were not found: <ul>${Array.from(new Set(missingNodeTypes)).map(
(t) => `<li>${t}</li>`
).join("")}</ul>Nodes that have failed to load will show as red on the graph.`
);
}
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment