Nodes/ComfyUI-Practical-Tools/Image List to Image Batch
ComfyUI Node

Image List to Image Batch

The other half of the batch-to-list round trip

By wenchengxiang·Created about a month ago·Updated a day ago· 1
Image List to Image Batch
  • 图像
  • 图像

This node is the return trip. Image Batch to Image List splits a batch into frames so you can process each one differently; Image List to Image Batch gathers a list of loose images back into a single batch. If you've spent an afternoon iterating frames through a per-image node - upscaling each one, fixing each one, whatever - this is the node that turns the results back into something a Save Image or a grid node can swallow whole.

The mechanism is worth knowing because it does a little more than just stack. It walks the list, and for every element that's a single image (3D tensor) it adds back the batch dimension first. Then it checks sizes: any image whose H×W doesn't match the first one gets resized with lanczos to the first image's dimensions, and if channel counts differ it truncates to the smaller one. So it won't error on a ragged list - it will quietly homogenize it. That's convenient, and it's also the thing to keep an eye on, because silent resizing can soften or skew an image you weren't planning to resize.

The output is a plain IMAGE batch, so it plugs into everything normal: Save Image, VAE Encode, the pack's Image Grid Table for a contact sheet, you name it. And note the sockets are labeled in Chinese (图像, "image") - the same quirk as its sibling, so don't be startled when the port doesn't read "image."

Inputs and outputs that matter

  • 图像 (in, list) - a list of IMAGE tensors. Elements can be single images or small batches; the node flattens them into frames.
  • 图像 (out) - one IMAGE batch, all frames homogenized to the first image's size and channel count.

Installing it

Part of wenchengxiang/ComfyUI-Practical-Tools. ComfyUI Manager → Custom Nodes Manager → search "ComfyUI-Practical-Tools" → Install → restart. Or clone:

cd ComfyUI/custom_nodes
git clone https://github.com/wenchengxiang/ComfyUI-Practical-Tools

and restart. No pip install, no requirements file, no model downloads - pure Python.

Issues and gotchas

The big one is the silent resize: it's helpful when you feed it a slightly-ragged list, but it will happily downscale a 2048px frame to match a 1024px first frame without telling you. If you want guaranteed fidelity, homogenize the list before this node - resize or pad everything to a common size upstream - and let this node just stack. Also remember an empty list returns nothing, so keep the upstream list populated. It's a boring node that does exactly one thing, and once you've iterated a batch frame-by-frame, you'll be glad it exists.

CategoryPractical-Tools/Image

Inputs (1)

NameTypeDefaultDescription
图像IMAGE

Outputs (1)

NameTypeDescription
图像IMAGE