Fix broken links on bypass prior to reroute (#5237)

This commit is contained in:
AustinMroz
2025-08-29 21:57:48 -07:00
committed by GitHub
parent 8eef1b727e
commit b515ef0a5b

View File

@@ -141,7 +141,8 @@ export class ExecutableNodeDTO implements ExecutableLGraphNode {
*/
resolveInput(
slot: number,
visited = new Set<string>()
visited = new Set<string>(),
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)