ComfyUI Node Runs on cloud

Image Batch

Merge multiple image batches into one

By WASasquatch·Created 3 years ago·Updated 2 days ago· 1,839
Image Batch
  • images_a
  • images_b
  • images_c
  • images_d
  • images_e
  • images_f
  • images_g
  • images_h
  • images_i
  • images_j
  • images_k
  • images_l
  • images_m
  • images_n
  • images_o
  • images_p
  • images_q
  • images_r
  • images_s
  • images_t
  • images_u
  • images_v
  • images_w
  • images_x
  • images_y
  • images_z
  • image
  • count

The README describes this one in a single line: "Create one batch out of multiple batched tensors." It sounds trivial until you've actually needed it - this is for combining two (or more) already-batched sets of images into one bigger batch, not for turning a handful of loose single images into a batch. If you've got, say, one batch of 4 generations from one seed run and another batch of 4 from a different run, and you want all 8 as a single batch for a grid save or a shared downstream step, this is the node that does it.

Why "batched tensors," not "images"

In ComfyUI, a batch of images is one tensor with a batch dimension - not a list of separate image objects. Image Batch works at that tensor level: it concatenates batches along the batch dimension, so the output is one bigger batch rather than a Python list of images glued together. That's a meaningfully different operation from something like "combine these individual pictures," and it's why the images going in need to already share the same width and height - you're stacking tensors, and tensors in a batch have to match shape.

How it works

Feed it two or more IMAGE batch inputs and it concatenates them along the batch axis, handing back a single IMAGE output containing every frame from every input batch, in order. That combined batch behaves exactly like any other ComfyUI image batch downstream - feed it to Save Image, a grid node, Tensor Batch to Image to pull one frame back out, whatever you'd normally do with a batch.

Where it's actually useful

Merging outputs from parallel generation branches before a shared post-process step, combining a batch you generated with a batch you loaded from disk, or building up a bigger batch incrementally across a few nodes instead of one giant generation call. It's plumbing, not a creative effect - the value is entirely in not having to hand-manage separate batches through the rest of your graph.

How to install it

ComfyUI Manager: search "WAS Node Suite," install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui

then, from inside that folder, install requirements - path/to/ComfyUI/python_embeded/python.exe -s -m pip install -r requirements.txt on portable, pip install -r requirements.txt on system Python. Restart ComfyUI; it's under WAS Suite.

Common issues & troubleshooting

The one error you're actually likely to hit with this specific node is a shape mismatch - if the batches you're feeding it don't share the same width and height, concatenation fails, because you can't stack tensors of different sizes into one batch. Resize everything to a common resolution first (WAS's own Image Resize, or ComfyUI's native one) if your batches came from different generation settings.

Otherwise, this is about as low-risk a node as the pack has - no external model, no heavy dependency - so the failure mode to actually watch for is the pack-wide one: WAS Node Suite has had no active development since the author retired it in December 2023, and the recurring complaint since then is the whole suite failing to import after a ComfyUI update. That's typically a shared-dependency version clash, not anything this node does specifically. If it hits you, reinstall the requirements using your embedded Python interpreter rather than a system one - that's the fix that's worked for people who got stuck.

CategoryWAS Suite/Image

Inputs (26)

NameTypeDefaultDescription
images_aoptIMAGEFirst image or batch. Every connected slot has to share the same width, height and channel count, and at least one slot must be connected.
images_boptIMAGESecond image or batch. Leave it disconnected to skip it.
images_coptIMAGEThird image or batch. Leave it disconnected to skip it.
images_doptIMAGEFourth image or batch. Leave it disconnected to skip it.
images_eoptIMAGEImage 5, joined on after the one before it. Unconnected is skipped.
images_foptIMAGEImage 6, joined on after the one before it. Unconnected is skipped.
images_goptIMAGEImage 7, joined on after the one before it. Unconnected is skipped.
images_hoptIMAGEImage 8, joined on after the one before it. Unconnected is skipped.
images_ioptIMAGEImage 9, joined on after the one before it. Unconnected is skipped.
images_joptIMAGEImage 10, joined on after the one before it. Unconnected is skipped.
images_koptIMAGEImage 11, joined on after the one before it. Unconnected is skipped.
images_loptIMAGEImage 12, joined on after the one before it. Unconnected is skipped.
images_moptIMAGEImage 13, joined on after the one before it. Unconnected is skipped.
images_noptIMAGEImage 14, joined on after the one before it. Unconnected is skipped.
images_ooptIMAGEImage 15, joined on after the one before it. Unconnected is skipped.
images_poptIMAGEImage 16, joined on after the one before it. Unconnected is skipped.
images_qoptIMAGEImage 17, joined on after the one before it. Unconnected is skipped.
images_roptIMAGEImage 18, joined on after the one before it. Unconnected is skipped.
images_soptIMAGEImage 19, joined on after the one before it. Unconnected is skipped.
images_toptIMAGEImage 20, joined on after the one before it. Unconnected is skipped.
images_uoptIMAGEImage 21, joined on after the one before it. Unconnected is skipped.
images_voptIMAGEImage 22, joined on after the one before it. Unconnected is skipped.
images_woptIMAGEImage 23, joined on after the one before it. Unconnected is skipped.
images_xoptIMAGEImage 24, joined on after the one before it. Unconnected is skipped.
images_yoptIMAGEImage 25, joined on after the one before it. Unconnected is skipped.
images_zoptIMAGEImage 26, the last slot. Unconnected is skipped.

Outputs (2)

NameTypeDescription
imageIMAGEOne batch holding every connected input end to end, in slot order. A slot holding a batch contributes all of its frames.
countINTHow many frames the batch holds, which is the total across the slots rather than the number of slots.