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)