From b515ef0a5b8e3144b5ad0c49b77b04c4ee86a37f Mon Sep 17 00:00:00 2001 From: AustinMroz Date: Fri, 29 Aug 2025 21:57:48 -0700 Subject: [PATCH] Fix broken links on bypass prior to reroute (#5237) --- src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts b/src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts index e432b7f256..fd7a99a2b4 100644 --- a/src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts +++ b/src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts @@ -141,7 +141,8 @@ export class ExecutableNodeDTO implements ExecutableLGraphNode { */ resolveInput( slot: number, - visited = new Set() + visited = new Set(), + type?: ISlotType ): ResolvedInput | undefined { const uniqueId = `${this.subgraphNode?.subgraph.id}:${this.node.id}[I]${slot}` if (visited.has(uniqueId)) { @@ -232,7 +233,11 @@ export class ExecutableNodeDTO implements ExecutableLGraphNode { `No output node DTO found for id [${outputNodeExecutionId}]` ) - return outputNodeDto.resolveOutput(link.origin_slot, input.type, visited) + return outputNodeDto.resolveOutput( + link.origin_slot, + type ?? input.type, + visited + ) } /** @@ -284,7 +289,7 @@ export class ExecutableNodeDTO implements ExecutableLGraphNode { // Upstreamed: Other virtual nodes are bypassed using the same input/output index (slots must match) if (node.isVirtualNode) { - if (this.inputs.at(slot)) return this.resolveInput(slot, visited) + if (this.inputs.at(slot)) return this.resolveInput(slot, visited, type) // Fallback check for nodes performing link redirection const virtualLink = this.node.getInputLink(slot)