From 6ae6a05b1433d8324ecd7b09be634213bae46907 Mon Sep 17 00:00:00 2001 From: AustinMroz Date: Sun, 6 Jul 2025 08:01:56 -0500 Subject: [PATCH] Add fallback for virtual nodes that redirect links (#1102) --- src/subgraph/ExecutableNodeDTO.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/subgraph/ExecutableNodeDTO.ts b/src/subgraph/ExecutableNodeDTO.ts index e802e2d7f..36fd851d9 100644 --- a/src/subgraph/ExecutableNodeDTO.ts +++ b/src/subgraph/ExecutableNodeDTO.ts @@ -194,6 +194,17 @@ export class ExecutableNodeDTO implements ExecutableLGraphNode { if (node.isVirtualNode) { if (this.inputs.at(slot)) return this.resolveInput(slot, visited) + // Fallback check for nodes performing link redirection + const virtualLink = this.node.getInputLink(slot) + if (virtualLink) { + const outputNode = this.graph.getNodeById(virtualLink.origin_id) + if (!outputNode) throw new InvalidLinkError(`Virtual node failed to resolve parent [${this.id}] slot [${slot}]`) + + const outputNodeDto = new ExecutableNodeDTO(outputNode, this.subgraphNodePath, this.subgraphNode) + + return outputNodeDto.resolveOutput(virtualLink.origin_slot, type, visited) + } + // Virtual nodes without a matching input should be discarded. return }