Fix bypassed nodes with no inputs.

This commit is contained in:
comfyanonymous 2023-08-03 02:57:40 -04:00
parent 19fbab6ce3
commit 077617e8c9
1 changed files with 12 additions and 9 deletions

View File

@ -1362,20 +1362,23 @@ export class ComfyApp {
} }
} }
} else if (link && parent.mode === 4) { } else if (link && parent.mode === 4) {
let all_inputs = [link.origin_slot].concat(parent.inputs) let all_inputs = [link.origin_slot];
for (let parent_input in all_inputs) { if (parent.inputs) {
if (parent.inputs[parent_input].type === node.inputs[i].type) { all_inputs = all_inputs.concat(Object.keys(parent.inputs))
link = parent.getInputLink(parent_input); for (let parent_input in all_inputs) {
if (link) { parent_input = all_inputs[parent_input];
parent = parent.getInputNode(parent_input); if (parent.inputs[parent_input].type === node.inputs[i].type) {
link = parent.getInputLink(parent_input);
if (link) {
parent = parent.getInputNode(parent_input);
}
found = true;
break;
} }
found = true;
break;
} }
} }
} }
if (!found) { if (!found) {
break; break;
} }