Fix inconsistent subgraphNode usage (#4688)

This commit is contained in:
AustinMroz
2025-08-05 15:39:13 -05:00
committed by GitHub
parent 1bf2470f8f
commit a8bd66b18f

View File

@@ -3,11 +3,7 @@ import type {
ExecutionId, ExecutionId,
LGraph LGraph
} from '@comfyorg/litegraph' } from '@comfyorg/litegraph'
import { import { ExecutableNodeDTO, LGraphEventMode } from '@comfyorg/litegraph'
ExecutableNodeDTO,
LGraphEventMode,
SubgraphNode
} from '@comfyorg/litegraph'
import type { import type {
ComfyApiWorkflow, ComfyApiWorkflow,
@@ -63,12 +59,7 @@ export const graphToPrompt = async (
for (const node of graph.computeExecutionOrder(false)) { for (const node of graph.computeExecutionOrder(false)) {
const dto: ExecutableLGraphNode = isGroupNode(node) const dto: ExecutableLGraphNode = isGroupNode(node)
? new ExecutableGroupNodeDTO(node, [], nodeDtoMap) ? new ExecutableGroupNodeDTO(node, [], nodeDtoMap)
: new ExecutableNodeDTO( : new ExecutableNodeDTO(node, [], nodeDtoMap)
node,
[],
nodeDtoMap,
node instanceof SubgraphNode ? node : undefined
)
for (const innerNode of dto.getInnerNodes()) { for (const innerNode of dto.getInnerNodes()) {
nodeDtoMap.set(innerNode.id, innerNode) nodeDtoMap.set(innerNode.id, innerNode)