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.

Fix reroute nodes not working with bypassed nodes.

comfyanonymous19fbab6ce3af
diff --git a/web/scripts/app.js b/web/scripts/app.js
index 8b273f626..75dc0fd69 100644
--- a/web/scripts/app.js
+++ b/web/scripts/app.js
@@ -1351,9 +1351,17 @@ export class ComfyApp {
let parent = node.getInputNode(i);
if (parent) {
let link = node.getInputLink(i);
- while (parent.mode === 4) {
+ while (parent.mode === 4 || parent.isVirtualNode) {
let found = false;
- if (link) {
+ if (parent.isVirtualNode) {
+ link = parent.getInputLink(link.origin_slot);
+ if (link) {
+ parent = parent.getInputNode(link.origin_slot);
+ if (parent) {
+ found = true;
+ }
+ }
+ } else if (link && parent.mode === 4) {
let all_inputs = [link.origin_slot].concat(parent.inputs)
for (let parent_input in all_inputs) {
if (parent.inputs[parent_input].type === node.inputs[i].type) {
@@ -1366,20 +1374,13 @@ export class ComfyApp {
}
}
}
+
+
if (!found) {
break;
}
}
- while (parent && parent.isVirtualNode) {
- link = parent.getInputLink(link.origin_slot);
- if (link) {
- parent = parent.getInputNode(link.origin_slot);
- } else {
- parent = null;
- }
- }
-
if (link) {
inputs[node.inputs[i].name] = [String(link.origin_id), parseInt(link.origin_slot)];
}