Compare commits

...

1 Commits

Author SHA1 Message Date
bymyself
fab04e6c2c 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
2026-02-27 21:11:53 -08:00

View File

@@ -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)
}