Nodes/Image Filter/Image List From Batch
ComfyUI Node

Image List From Batch

Take a Batch Apart, One Image per Wire

By chrisgoringe·Created 2 years ago·Updated 2 months ago· 132
Image List From Batch
  • images
  • image

Here's the imbalance that drives people crazy in ComfyUI: a sampler hands you a batch of 16 images as one tensor, and then the node you actually want - a mask editor, a caption editor, a per-image saver - wants them one at a time. Image List From Batch is the un-stacker. It takes a batch, splits it into individual images, and outputs them as a list so you can iterate over them instead of fighting the batch.

It's a core piece of the cg-image-filter pack's workflow grammar. The filter nodes are single-image tools: Mask Image Filter and Text Image Filter both take one image and pause for you to act on it. So when you generate a batch and want to mask or caption each frame, the README's prescribed path is: batch → Image List From Batch → the filter node → repeat. The filters step through your images one by one, each time giving you the pause to do the human bit.

How it works

One input, one output, no knobs. Feed it a batch - say a tensor shaped [16, 1024, 1024, 3] - and it splits off each frame (unsqueeze to keep each one a valid single-image tensor) and returns them as a list of 16 individual images. Downstream, anything that accepts a list of images can now walk through them, and the single-image filter nodes get exactly the one frame they want.

Installing it

Part of chrisgoringe/cg-image-filter. ComfyUI Manager, search "cg-image-filter" or "Image Filter":

cd ComfyUI/custom_nodes
git clone https://github.com/chrisgoringe/cg-image-filter

Restart ComfyUI. No dependencies, no models.

Gotchas

Direction matters, and it's the mirror image of the pack's Batch from Image List node. If your images are already a list, don't feed them here - this node wants a batch tensor. And once you've split a batch into a list, some downstream nodes will want it re-batched; the pairing exists precisely so you can go both ways. The other thing to remember is that the single-image filters don't show all your images at once - they walk through them sequentially, each with its own pause. If you'd rather eyeball everything and pick in one screen, that's the Image Filter node's job instead.

Categoryimage_filter/helpers

Inputs (1)

NameTypeDefaultDescription
imagesIMAGE

Outputs (1)

NameTypeDescription
imageIMAGE