|
|
@ -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) {
|
|
|
|