mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
feat: support accumulate toggle for SaveImage/PreviewImage nodes
Read the accumulate widget value in the executed event handler and pass merge: true to the output store, so outputs accumulate across runs. Amp-Thread-ID: https://ampcode.com/threads/T-019c98ab-5e7d-72fe-84d2-20e551f5ac10
This commit is contained in:
@@ -717,11 +717,15 @@ export class ComfyApp {
|
||||
const nodeOutputStore = useNodeOutputStore()
|
||||
const executionId = String(detail.display_node || detail.node)
|
||||
|
||||
const node = getNodeByExecutionId(this.rootGraph, executionId)
|
||||
const accumulate = node?.widgets?.find(
|
||||
(w) => w.name === 'accumulate'
|
||||
)?.value
|
||||
|
||||
nodeOutputStore.setNodeOutputsByExecutionId(executionId, detail.output, {
|
||||
merge: detail.merge
|
||||
merge: detail.merge || !!accumulate
|
||||
})
|
||||
|
||||
const node = getNodeByExecutionId(this.rootGraph, executionId)
|
||||
if (node && node.onExecuted) {
|
||||
node.onExecuted(detail.output)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user