Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Adds warning when loading graph with nodes you dont have

pythongossssscceb53039574
diff --git a/web/scripts/app.js b/web/scripts/app.js
index a687eb5c2..695d4a5d0 100644
--- a/web/scripts/app.js
+++ b/web/scripts/app.js
@@ -864,9 +864,15 @@ class ComfyApp {
graphData = structuredClone(defaultGraph);
}
- // Patch T2IAdapterLoader to ControlNetLoader since they are the same node now
+ let missingNodeTypes = [];
for (let n of graphData.nodes) {
+ // Patch T2IAdapterLoader to ControlNetLoader since they are the same node now
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);
@@ -893,6 +899,14 @@ class ComfyApp {
this.#invokeExtensions("loadedGraphNode", node);
}
+
+ if (missingNodeTypes.length) {
+ this.ui.dialog.show(
+ `When loading the graph, the following node types were not found: <ul>${missingNodeTypes.map(
+ (t) => `<li>${t}</li>`
+ )}</ul>Nodes that have failed to load will show as red on the graph.`
+ );
+ }
}
/**