Accumulation Tail | Deforum
Pop the last item off an accumulation
- accumulation
- ACCUMULATION
- *
The mirror image of Accumulation Head: this node pops the last item off the end of an ACCUMULATION, handing you both the item and the shortened list. list.pop() in node form, and honestly the more natural of the two - appended data usually comes out the end it went in.
What it gives you
From one accumulation input you get two outputs:
ACCUMULATION- the rest of the list with the final item removed.*- the popped item itself, in whatever type it was stored as.
Feed the ACCUMULATION back into the same node and you consume a stack from the back, one item per pass. That's the pattern for draining a collection in reverse order - last frame first - which is occasionally exactly what you want, like replaying a generated sequence back to front for a ping-pong loop.
Empty accumulation? No crash. It outputs None for the item and passes the empty bundle through, which is the same graceful behavior as Accumulation Head. That None output is the thing to branch on (or to feed a fallback switch like Any Switch | Deforum) when your collection is exhausted.
Head vs tail
Head= front of the line, consumes forward.Tail= end of the line, consumes backward.
The one that trips people is the order of the outputs on this node: the ACCUMULATION (the rest) comes first, the popped item second. It's consistent with the other accumulation nodes - bundle first, item second - but if you're wiring by muscle memory from Head you'll occasionally grab the wrong one. The item you actually want is the second output.
Like the rest of the family, this is a thin accessor: nothing mutates the input, you get a new bundle back, and an out-of-range operation is impossible here by construction (it only ever touches the last element).
Installing it
Part of deforum-comfy-nodes, the official Deforum ComfyUI pack. ComfyUI Manager: search "deforum" (comfyui-deforum), install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/deforum-art/deforum-comfy-nodes
Restart ComfyUI after. No extra dependencies, no model downloads - plain Python over what ComfyUI ships. Load errors after an upgrade usually trace to an orphaned deforum pip package; pip uninstall deforum and a restart clears it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| accumulation | ACCUMULATION | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| ACCUMULATION | ACCUMULATION | — |
| * | * | — |