Nodes/FlowNodes/πŸ“ƒ Batch to List
ComfyUI Node

πŸ“ƒ Batch to List

The batch-to-list node that changes nothing and everything

By gitmyloΒ·Created 2 years agoΒ·Updated about a year agoΒ· 13
πŸ“ƒ Batch to List
  • Batch
  • List

It looks like the most pointless node in ComfyUI, and on the surface it is. Feed a batch into πŸ“ƒ Batch to List and you get the same batch back - the entire Python implementation is return (Batch,). No conversion, no slicing, no math. So why does it exist, and why would anybody wire it in? Because the point isn't what it does to your data. It's what it tells ComfyUI to do with your data afterward.

What "batch" and "list" actually mean here

ComfyUI has two ways to hand a chunk of data to a node: all at once, or one item at a time. A "batch" means everything arrives in one call - great for speed, useless when the next node only handles a single item. A "list" means the engine expands execution, so whatever is wired downstream runs once per element. FlowNodes calls the pair "Batch to List" and "List to Batch", and the README spells the difference out: a list is "items are executed separately when put into another node", a batch is "items are all given at once".

The trick is a node-level flag named OUTPUT_IS_LIST. When ComfyUI's executor sees it, it treats the output as a Python list and stretches the consumer across it - one call per item. That flag, not the function body, is the whole node. "Unmerge batch" is really "tell the engine to unmerge the execution", and it's why you can write return (Batch,) and still change behavior.

The trap: it will not split your image batch

This is where people get burned, and it's worth saying loudly: this node does not turn an 8-frame image tensor into eight images. Its input is the * wildcard (any type), which means it can't know how to slice anything - a [8, H, W, C] tensor passes through as one single item in the list. Real frame-splitting needs a type-specific splitter (the WAS Node Suite "Batch to List" family is the one people usually mean), which actually iterates the tensor and slices frames out.

What FlowNodes' version does work on is genuine Python lists. Feed it a real list of values and each one travels downstream as its own item. That's its honest job, and it's a "programming logic" pack, not an image-utility pack, so don't expect it to be the other thing.

Inputs, outputs, and where you'd use it

  • Batch (required, any type) - whatever list you want expanded into per-item execution.
  • List output - the same data, but marked as a list so downstream runs once per item.

In practice you reach for it alongside FlowNodes' own list-makers: πŸ“ƒ Create batch (builds a real list from up to 20 inputs), πŸ” Regex match (returns an array), or 🐍 Execute python, whose output can be any list. The README's own framing is "most useful for reading/writing individual batch items using operation nodes, or to give it as an input for a script node." The classic shape - and it works, people confirm it on Reddit - is VAEDecode β†’ Batch to List β†’ one-item-at-a-time node β†’ List to Batch β†’ Video Combine, unwrapping for the middle step and bundling back up after.

Its sibling πŸ“ƒ List to Batch (Merge batch, INPUT_IS_LIST) does the reverse: it collects the per-item stream and hands everything downstream in a single call. If you use one, you'll almost certainly use the other - they're the two halves of a round trip.

Install

This is a small pack with zero dependencies - no requirements.txt, nothing to download.

cd ComfyUI/custom_nodes
git clone https://github.com/gitmylo/FlowNodes

Restart ComfyUI and it shows up under FlowNodes/convert. ComfyUI Manager works too: search "FlowNodes". One heads-up from the README: the author calls it "very WIP and early in development", so expect rough edges and check the issues tab if something misbehaves.

Troubleshooting

  • Downstream still gets everything at once. Check that the input is actually a Python list, not a single tensor or string - a single value becomes a one-item list and "runs once" either way. If you're feeding raw image frames, you need a splitter, not this node.
  • Which direction is which? πŸ“ƒ Batch to List = unwrap to per-item execution. πŸ“ƒ List to Batch = collect back into one call. Even people who use these every day have to think for a second; the Reddit answer to "is it Batch first or List first?" is literally "swap them if it's wrong."
  • Nothing seems to happen at all. Correct - the data is unchanged by design. If your workflow behaves identically, it's probably because your list had one item. That's not a bug; it's the node being honest about being a control-flow hint.
CategoryπŸ”‚ FlowNodes/convert

Inputs (1)

NameTypeDefaultDescription
Batch*β€”

Outputs (1)

NameTypeDescription
List*β€”