Merge branch 'comfyanonymous:master' into fix/secure-combo

This commit is contained in:
Dr.Lt.Data 2023-08-03 16:25:15 +09:00 committed by GitHub
commit 61e1f01cd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1352,11 +1352,22 @@ export class ComfyApp {
let parent = node.getInputNode(i); let parent = node.getInputNode(i);
if (parent) { if (parent) {
let link = node.getInputLink(i); let link = node.getInputLink(i);
while (parent.mode === 4) { while (parent.mode === 4 || parent.isVirtualNode) {
let found = false; let found = false;
if (parent.isVirtualNode) {
link = parent.getInputLink(link.origin_slot);
if (link) { if (link) {
let all_inputs = [link.origin_slot].concat(parent.inputs) parent = parent.getInputNode(link.origin_slot);
if (parent) {
found = true;
}
}
} else if (link && parent.mode === 4) {
let all_inputs = [link.origin_slot];
if (parent.inputs) {
all_inputs = all_inputs.concat(Object.keys(parent.inputs))
for (let parent_input in all_inputs) { for (let parent_input in all_inputs) {
parent_input = all_inputs[parent_input];
if (parent.inputs[parent_input].type === node.inputs[i].type) { if (parent.inputs[parent_input].type === node.inputs[i].type) {
link = parent.getInputLink(parent_input); link = parent.getInputLink(parent_input);
if (link) { if (link) {
@ -1367,17 +1378,10 @@ export class ComfyApp {
} }
} }
} }
if (!found) {
break;
}
} }
while (parent && parent.isVirtualNode) { if (!found) {
link = parent.getInputLink(link.origin_slot); break;
if (link) {
parent = parent.getInputNode(link.origin_slot);
} else {
parent = null;
} }
} }