"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "af022947be382a2dd64d96083f878a950bc5579e"
Commit aff1e393 authored by pythongosssss's avatar pythongosssss
Browse files

Simplify and fix bug with following virtual nodes

courtesy of someanon
parent 37b70d79
...@@ -606,24 +606,10 @@ class ComfyApp { ...@@ -606,24 +606,10 @@ class ComfyApp {
for (let i in node.inputs) { for (let i in node.inputs) {
let parent = node.getInputNode(i); let parent = node.getInputNode(i);
if (parent) { if (parent) {
let link; let link = node.getInputLink(i);
if (parent.isVirtualNode) { while (parent && parent.isVirtualNode) {
// Follow the path of virtual nodes until we reach the first real one link = parent.getInputLink(link.origin_slot);
while (parent != null) { parent = parent.getInputNode(link.origin_slot);
link = parent.getInputLink(0);
if (link) {
const from = graph.getNodeById(link.origin_id);
if (from.isVirtualNode) {
parent = from;
} else {
parent = null;
}
} else {
parent = null;
}
}
} else {
link = node.getInputLink(i);
} }
if (link) { if (link) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment