List Accumulator To List
Cashing Out Your Accumulator at the End of the Loop
- accumulator
- items
Every loop has a last step where the collecting stops and the doing begins. You have been stuffing images into an accumulator for twelve iterations, and now you want to upscale them, save them, or hand them to a node that was written before anybody thought about loops. This is the two-line node that ends that phase. It takes the opaque accumulator and hands back a genuine Comfy list.
How it works
List Accumulator To List unwraps the frozen tuple inside the accumulator and returns it as a real list, with the output socket flagged as a list. That flag is the entire semantic change: before it, you had one value the engine treats as a single object; after it, you have N values, so every node downstream is executed once per item and its outputs are gathered back into lists of their own.
It validates the input type, so feeding it something that is not an accumulator raises with the type it actually received. There is nothing else to it - no parameters, no widgets, no filtering, no deduplication, no sorting. Whatever order you appended in is the order you get out.
Why the conversion is the interesting decision
Everything after this node is multiplied. If the list has eighty images and you wire it into a save node, you get eighty files. Into a sampler, eighty sampling passes. That is the point - per-item work is what lists are for - but it is also the moment where a workflow that took two minutes takes forty, and ComfyUI will not warn you. Convert as late as you reasonably can: inside a loop, keep the accumulator opaque and cheap, and switch to a list only when the collected items genuinely need individual treatment.
There is a second, subtler use. Converting is how you hand off between loop constructs. Some packs consume a list and iterate it; some produce a list; a converted accumulator is a normal list to all of them, so this is the adapter that lets an accumulator-based loop feed a list-based node without a bespoke bridge.
The reverse trip works too, by the way - you can always take a converted list and feed it back into the accumulator's items input on the next pass, because that socket accepts any list. What you cannot do is append into a plain list and have it behave like an accumulator; that mutation problem is exactly what the accumulator exists to avoid.
Inputs and outputs
accumulator in, items out - a list, of whatever type you were collecting, untyped on the canvas because it is a * socket. Nothing type-checks the items for you: if you appended masks and SEGS into the same bag, you get a list of mixed things and the first node downstream will tell you about it, loudly and late.
Install
Part of ComfyUI-Utility-Suite. ComfyUI Manager → search ComfyUI-Utility-Suite → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/tom-m-2020/ComfyUI-Utility-Suite
Restart ComfyUI. Nothing to download, no models, and the pack's declared opencv-python-headless dependency plays no part in this node. It is written against ComfyUI's newer V3 node API, so an older backend shows you nothing at all from the pack.
Traps
An empty accumulator gives you an empty list, and silence. Nothing errors and nothing runs - there is simply nothing to iterate, so downstream nodes never execute. If a workflow "does nothing" at the end of a loop, check the loop actually put something in the bag before you debug anything else.
The count is invisible until you convert. Drop List / Batch Inspector on the items output for a kind and a count before you wire something expensive behind it. That two-second check has saved a lot of accidental 80-image renders.
Your order is your order. No sorting, no stable re-ordering by filename or seed. If your output files come out in an unexpected sequence, the answer is in the append order inside the loop.
Do not expect it to merge or flatten. A list of lists stays a list of lists; if each iteration appended a batch of four images, you get N items that are batches of four, and a save node will handle that in whatever way it handles a nested structure - usually not the way you want. Flatten by converting to batches first, or append individual items one at a time.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| accumulator | UTILITY_ANY_LIST | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| items | * | — |