mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-21 06:49:37 +00:00
Fix inconsistent subgraphNode usage (#4688)
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user