mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
Sync 2666 Execution Model Inversion (#312)
* Sync 2666 Execution Model Inversion * Fix unittest * Fallback compatible
This commit is contained in:
@@ -171,7 +171,9 @@ class ComfyApi extends EventTarget {
|
||||
break
|
||||
case 'executing':
|
||||
this.dispatchEvent(
|
||||
new CustomEvent('executing', { detail: msg.data.node })
|
||||
new CustomEvent('executing', {
|
||||
detail: msg.data.display_node || msg.data.node
|
||||
})
|
||||
)
|
||||
break
|
||||
case 'executed':
|
||||
|
||||
@@ -1627,7 +1627,7 @@ export class ComfyApp {
|
||||
this.workflowManager.activeWorkflow
|
||||
)
|
||||
return
|
||||
const output = this.nodeOutputs[detail.node]
|
||||
const output = this.nodeOutputs[detail.display_node || detail.node]
|
||||
if (detail.merge && output) {
|
||||
for (const k in detail.output ?? {}) {
|
||||
const v = output[k]
|
||||
@@ -1638,9 +1638,9 @@ export class ComfyApp {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.nodeOutputs[detail.node] = detail.output
|
||||
this.nodeOutputs[detail.display_node || detail.node] = detail.output
|
||||
}
|
||||
const node = this.graph.getNodeById(detail.node)
|
||||
const node = this.graph.getNodeById(detail.display_node || detail.node)
|
||||
if (node) {
|
||||
// @ts-expect-error
|
||||
if (node.onExecuted)
|
||||
|
||||
@@ -272,7 +272,11 @@ class ComfyList {
|
||||
false
|
||||
)
|
||||
if ('outputs' in item) {
|
||||
app.nodeOutputs = item.outputs
|
||||
app.nodeOutputs = {}
|
||||
for (const [key, value] of Object.entries(item.outputs)) {
|
||||
const realKey = item['meta']?.[key]?.display_node ?? key
|
||||
app.nodeOutputs[realKey] = value
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user