Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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
)
}

/**
Expand Down Expand Up @@ -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)
Expand Down
Loading