"...git@developer.sourcefind.cn:OpenDAS/torch-scatter.git" did not exist on "969712920c254d6cf1aa465a8af3c5fe5f0f65a7"
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 {
for (let i in node.inputs) {
let parent = node.getInputNode(i);
if (parent) {
let link;
if (parent.isVirtualNode) {
// Follow the path of virtual nodes until we reach the first real one
while (parent != null) {
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);
let link = node.getInputLink(i);
while (parent && parent.isVirtualNode) {
link = parent.getInputLink(link.origin_slot);
parent = parent.getInputNode(link.origin_slot);
}
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