Nodes/ComfyUI-ImageBatchUtils/🧩 Image Batch Unpack (List)
ComfyUI Node

🧩 Image Batch Unpack (List)

The batch-unpack node this pack is really about

By xuxiao305·Created 5 months ago·Updated 5 months ago· 0
🧩 Image Batch Unpack (List)
  • images
  • IMAGE

ComfyUI loves a batch. Almost every node hands you one big [B, H, W, C] tensor where B is however many images you asked for, and then you discover half the nodes you want to chain don't want a batch at all - they want one image at a time, or a list. The author of this pack calls the List unpacker "the most commonly useful node" in the set, and they're right. This is the one that fixes the actual workflow annoyance, not a theoretical one.

What it does

Feed it one input, images (type IMAGE), and it splits that batch into a list of individual images, each shaped [1, H, W, C]. Any batch size. Three images in, three single-image items out. Fifty in, fifty out. No slot limits, nothing to configure.

The mechanism is worth understanding because it's the pack's whole trick. Every node in ComfyUI-ImageBatchUtils sets INPUT_IS_LIST = True, which means it can accept either a normal batch tensor or a list of tensors from a node that outputs lists - think SEGSPreview or anything Impact-Pack-flavored that emits LIST[IMAGE]. Either way it flattens everything down and returns each item with its original spatial size intact. No padding, no resizing to match a common shape. That matters more than it sounds: when you're unpacking cropped segment images that are all different sizes, a node that silently resizes or zero-pads everything to fit is a silent bug factory.

Why you'd reach for it

The README's example is the classic one. SEGSPreview outputs a batch of cropped segment images, and some downstream nodes that process each image in the batch independently end up duplicating output - same image processed over and over because the batch semantics got tangled. Run this node in between and each segment is handled as its own single image. That's the fix in one wire.

More generally: any time you have "a batch of N" and need "each one, individually" - per-image upscaling, per-image save, feeding one branch of the graph per detected region - this is the bridge. ComfyUI core doesn't give you a native "unpack to list" node, which is exactly the gap this tiny pack exists to fill.

Install

No models, no pip dependencies beyond what ComfyUI already ships, MIT licensed. Two ways:

cd ComfyUI/custom_nodes
git clone https://github.com/xuxiao305/ComfyUI-ImageBatchUtils

then restart ComfyUI. Or skip the terminal entirely and search ComfyUI-ImageBatchUtils in ComfyUI Manager - it's in the registry, and Manager handles the clone, restart, and future updates for you. There's nothing heavy hiding in requirements.txt because there is no requirements.txt. That's rare in this ecosystem, and it's the whole reason the install never bites you.

Gotchas

The output is a LIST[IMAGE], and that comes with a ComfyUI law of gravity: a node that outputs a list can only feed a node that's declared it accepts lists (INPUT_IS_LIST). If you wire this straight into a node that expects a single batch and get a "got a list, expected a tensor" error, that's not this node misbehaving - that's the downstream node not speaking list. The fix is usually to find the list-compatible variant of what you're trying to do. It's the price of the flexibility, and it's a fair trade for the only real gap-filler in this pack.

Categoryimage/batch

Inputs (1)

NameTypeDefaultDescription
imagesIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE