ImageBatchToImageList
Split a Batch of Images Into a List You Can Iterate
- image
- IMAGE
ComfyUI likes to talk about images in batches - one tensor with a [B, H, W, C] shape where B is how many images are stacked inside. Some nodes want to process the whole batch at once, and some stubbornly want one image at a time. Image Batch to Image List is the translator between the two: it splits a batched IMAGE tensor into a list of individual images.
What it does
Feed it a batched IMAGE tensor (say, four frames from a video loader, or the batch output of an Empty Latent Batch after decode) and it returns a list of single-image tensors plus a count. That's the entire job, and it's one of those "you'll know you need it when you hit the error" nodes - the error being a node that tells you it expected one image but got four.
The shape math is worth knowing: images in ComfyUI are [batch, height, width, channels], so splitting a [4, 512, 512, 3] tensor yields four [1, 512, 512, 3] tensors. The count output tells you how many came out, which is handy if you're wiring a loop or building a UI that shows progress.
Inputs and outputs
- images - the batched IMAGE tensor.
Outputs: images (a list, marked as a list output so downstream nodes that consume lists know to expect them) and count (INT).
Where it fits
It shines when a workflow mixes batch generation with per-image processing: generate a batch for prompt comparison, split it, then run each image through a per-image node (a captioner, a detailer, an individual face fix) before recombining. This node is the first half of that story - the pack's other nodes (Latent List to Latent Batch, and its ImageListToImageBatch sibling) handle the return trip.
Installing it
Part of the ComfyUI-KikoTools pack. ComfyUI Manager → search "ComfyUI-KikoTools" → Install → restart, then find it under ComfyAssets → Latents. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ComfyAssets/ComfyUI-KikoTools.git
cd ComfyUI-KikoTools
pip install -r requirements.txt
Restart ComfyUI. Nothing else to install.
Gotchas
The one confusion people hit: a list output is not the same as a batch. If the next node in your graph can't accept a list, you need the batch back - that's what the pack's list-to-batch node is for. And if count comes back as 1, your input wasn't actually batched; you fed it a single image. Also note this splits on the batch dimension, it doesn't crop or slice - every output image is the full frame, just separated from its neighbors.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |