Fix execution output & previews not displayed (#4506)

This commit is contained in:
filtered
2025-07-23 22:12:30 +10:00
committed by GitHub
parent 4cd0c270bf
commit f81b191fae
3 changed files with 42 additions and 7 deletions

View File

@@ -14,6 +14,7 @@ import type {
ComfyApiWorkflow,
ComfyWorkflowJSON
} from '@/schemas/comfyWorkflowSchema'
import { useExecutionStore } from '@/stores/executionStore'
import { ExecutableGroupNodeDTO, isGroupNode } from './executableGroupNodeDto'
import { compressWidgetInputSlots } from './litegraphUtil'
@@ -58,6 +59,8 @@ export const graphToPrompt = async (
options: { sortNodes?: boolean; queueNodeIds?: NodeId[] } = {}
): Promise<{ workflow: ComfyWorkflowJSON; output: ComfyApiWorkflow }> => {
const { sortNodes = false, queueNodeIds } = options
const executionStore = useExecutionStore()
executionStore.locatorIdToExecutionIdMap.clear()
for (const node of graph.computeExecutionOrder(false)) {
const innerNodes = node.getInnerNodes
@@ -159,6 +162,13 @@ export const graphToPrompt = async (
]
}
// Temporary workaround for Subgraph phase 1. Overwrites the ID, but keeps the image.
const baseNodeId = node.id.split(':').at(-1)
executionStore.locatorIdToExecutionIdMap.set(
`${node.subgraphId}:${baseNodeId}`,
node.id
)
output[String(node.id)] = {
inputs,
// TODO(huchenlei): Filter out all nodes that cannot be mapped to a