Nodes/ComfyUI-Apt_Preset/type_Image_Batch2List
ComfyUI Node

type_Image_Batch2List

Explode an image batch into individual images

By cardenluo·Created 2 years ago·Updated a day ago· 324
type_Image_Batch2List
  • image
  • IMAGE

ComfyUI treats a batch of images as one tensor - 16 frames in a single IMAGE object. That's efficient until a node only wants one image, or wants them as a Python list. type_Image_Batch2List is the split: one IMAGE batch in, a list of single images out, each still a proper IMAGE you can wire into per-frame operations.

It's from ComfyUI-Apt_Preset's data/list|Batch drawer, the pack's answer to the persistent "is this a list or a batch?" confusion that trips up every ComfyUI newcomer.

How it works

The node counts frames in the batch axis (B in [B, H, W, 3]) and slices each one into its own [1, H, W, 3] tensor, collected into a Python list. Every frame keeps its full image-ness - dimensions, color space, everything - so each element can be fed straight into a node that expects an IMAGE. Nothing is resized, cropped, or reordered: it's a pure split, and the batch order is preserved.

The output is flagged OUTPUT_IS_LIST, so ComfyUI knows the wire carries a list - which is the whole reason this node exists. Some downstream nodes accept lists natively; others don't, and the pack pairs this with type_Image_List2Batch (and the advanced variant) to go back the other way. Batch → list → per-item processing → list → batch is a complete round trip.

Inputs and outputs

  • image - an IMAGE tensor (any batch size; a single-image batch just becomes a one-element list).
  • Output: IMAGE (list).

Typical use: video workflows where you need to touch individual frames (save every 5th, apply a per-frame node that doesn't support batches, compare frames), or any "process each image separately" scenario.

Installing it

Part of ComfyUI-Apt_Preset. ComfyUI Manager → search ComfyUI-Apt_Preset, or:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset

Restart; install.bat on Windows for the pack's requirements. Pure tensor slicing - nothing extra needed.

Common issues

The failure modes are mostly downstream. Because the output is a list, plugging it into a node that only accepts single images may refuse the wire - that's the type system working as intended, and you'll want to iterate the list with a list-capable node rather than fight it. If you feed it a tensor that isn't actually batched (a single [1, H, W, 3]), you get a one-element list, which can silently change behavior in a node that expected a batch. And don't expect any frame reordering - it's a straight split, so if the order looks wrong, the batch you fed in was already wrong.

CategoryApt_Preset/data/list|Batch

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE