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.

Fixed crash removing nodes due to output link is still being set but not valid

pythongosssss52e74a2bb239
diff --git a/web/extensions/core/rerouteNode.js b/web/extensions/core/rerouteNode.js
index 0dc9ad37e..7188dfd26 100644
--- a/web/extensions/core/rerouteNode.js
+++ b/web/extensions/core/rerouteNode.js
@@ -107,12 +107,18 @@ app.registerExtension({
node.size = node.computeSize();
for (const l of node.outputs[0].links || []) {
- app.graph.links[l].color = color;
+ const link = app.graph.links[l];
+ if (link) {
+ link.color = color;
+ }
}
}
if (inputNode) {
- app.graph.links[inputNode.inputs[0].link].color = color;
+ const link = app.graph.links[inputNode.inputs[0].link];
+ if (link) {
+ link.color = color;
+ }
}
};