mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-04 20:50:06 +00:00
fix: SaveImage node not updating outputs during batch runs (vue-nodes) (#8862)
## Summary
Fix vue-node outputs not updating during batch runs by creating a new
object reference on merge.
## Changes
- **What**: Spread merged output object in `setOutputsByLocatorId` so
Vue detects the assignment as a change. Adds regression test asserting
reference identity changes on merge.
## Review Focus
One-line fix at `imagePreviewStore.ts:155`: `{ ...existingOutput }`
instead of `existingOutput`. This matches the spread pattern already
used in `restoreOutputs` (line 368).
The root cause: Vue skips reactivity triggers for same-reference
assignments. The merge path mutated `existingOutput` in-place then
reassigned the same object, so `nodeMedia` computed in `LGraphNode.vue`
never re-evaluated.
> Notion:
https://www.notion.so/comfy-org/3066d73d36508165873fcbb9673dece7
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8862-fix-SaveImage-node-not-updating-outputs-during-batch-runs-vue-nodes-3076d73d36508133b1faeae66dcccf01)
by [Unito](https://www.unito.io)
Co-authored-by: Terry Jia <terryjia88@gmail.com>
This commit is contained in:
@@ -152,7 +152,7 @@ export const useNodeOutputStore = defineStore('nodeOutput', () => {
|
||||
existingOutput[k] = newValue
|
||||
}
|
||||
}
|
||||
nodeOutputs.value[nodeLocatorId] = existingOutput
|
||||
nodeOutputs.value[nodeLocatorId] = { ...existingOutput }
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user