mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-08-04 07:52:46 +08:00
Merge branch 'reroute-rewrite' of https://github.com/pythongosssss/ComfyUI
This commit is contained in:
@@ -678,24 +678,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) {
|
||||
|
Reference in New Issue
Block a user