emit_cached_output at execution.py:818 doesn't pass merge flag for intermediate-output nodes
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Read the two emit_cached_output call sites in execution.py, especially the end-of-loop cleanup path around line 818 and the direct cache-hit path around line 445. Done means the cleanup path derives and passes the merge flag the same way as the direct cache-hit path.
Written by the indexing model from the issue text.
Description
Follow-up from PR https://github.com/Comfy-Org/ComfyUI/pull/16304 (accumulate/merge flag on cached SaveImage/PreviewImage outputs), flagged by CodeRabbit review.
execution.py has two call sites for emit_cached_output:
- Line 445 (per-node direct cache-hit path, fires for any node): correctly passes
merge=mergederived frominputs.get('accumulate') is True. - Line 818 (end-of-loop cleanup pass, only for nodes with
HAS_INTERMEDIATE_OUTPUTthat weren't executed this run): does NOT passmerge.
Today this doesn't affect SaveImage/PreviewImage since neither sets HAS_INTERMEDIATE_OUTPUT, so #16304's fix is correct for its target case. But any node type that both sets HAS_INTERMEDIATE_OUTPUT and adopts an accumulate-style merge flag in the future would hit this same missing-flag bug via the 818 path instead.
Fix: derive and pass merge at line 818 the same way line 445 does.
- Dominant language
- Python
- Stars
- 134k
- Forks
- 15.9k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 161
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Comfy-Org/ComfyUI
-
Feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Potential Bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Potential Bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in Comfy-Org/ComfyUI
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100