type_Image_List2Batch
Stack single images back into one batch — sizes auto-fixed
- images
- IMAGE
The mirror image of the batch-to-list node: you've got individual images on a list wire and a node downstream that wants them all in one batch tensor. type_Image_List2Batch stacks them together into a single IMAGE. And it does the annoying housekeeping for you - if the images have mismatched dimensions, it quietly upscales the strays to match the first image so torch.cat doesn't throw.
It's part of ComfyUI-Apt_Preset's data/list|Batch drawer, and it's the natural return leg of the batch ↔ list round trip.
How it works
Input is declared INPUT_IS_LIST - it receives a Python list of images. If there's one image, you get it back unchanged. Otherwise it walks the list and concatenates every image onto the first along the batch axis.
The size-mismatch handling is the detail worth knowing: when image 2 has different H/W than image 1, it's resized with lanczos interpolation to match the first image's dimensions before stacking. That's a real convenience - most stackers just crash on mismatched sizes - but it's also a silent transformation. If your images are different sizes and you didn't mean for them to be squished to match, this node will happily do it and never mention it.
Note the direction: it expects a list on the wire. If a node hands you a batch tensor and you want to merge it with others, the pack's advanced variant (type_Image_List2Batch_adv) gives you explicit control; this one is the simple list → batch tool.
Inputs and outputs
- images - list of IMAGE tensors.
- Output: IMAGE - one concatenated batch.
Use it after per-image processing (per-frame upscale, per-item edits) to hand everything back to a batch-operating node, a VAE, or a Save Image that expects one wire.
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. Nothing extra - this is a torch cat with a resize helper.
Common issues
The silent upscale is the gotcha to internalize: mismatched sizes get lanczos-resized to the first image's dimensions, which distorts or softens them. If your images must keep their native resolution, normalize sizes yourself first (crop/pad) or use the advanced node with explicit mode controls. Second, the wire must carry a list - feeding it a plain batch tensor connects wrong or behaves unexpectedly; route through a list-producing node first. And a single-element list just passes through, so if you expected "a list of one becomes a batch of one," it does, but check that's what downstream wanted.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |