Nodes/Mickmumpitz-Nodes/Image Batch Multi (Skip Empty)
ComfyUI Node

Image Batch Multi (Skip Empty)

Batch images like Kijai's, minus the black frames

By mickmumpitz·Created 8 months ago·Updated 10 days ago· 47
Image Batch Multi (Skip Empty)
  • image_1
  • image_2
  • images
inputcount2

Image Batch Multi (Skip Empty) does exactly what the name promises: it stacks several images or image batches into one IMAGE batch, and if you've left some inputs unconnected, it skips them instead of filling the gap with a black frame. If you've ever used Kijai's Image Batch Multi, you know the pain this solves - that node concatenates whatever you give it and quietly inserts black frames for empty slots, which then poison your sampler as random dark rectangles in the batch.

The workflow story is batch-driven generation: you have 6 reference images, or 6 prompt-conditioned renders, and you want them sampled as one batch. You type 6 in inputcount, hit Update Inputs, wire your images, and out comes a single stacked tensor.

How it works

The node builds its image_1, image_2, ... slots dynamically based on inputcount, then at run time collects only the inputs that are actually connected, in slot order. Empty slots are dropped, so a 6-slot setup with 4 images wired produces a batch of 4, not 6. The interesting part is normalization: when images differ in resolution, each is upscaled (bilinear, center) to match the first image's width and height, so you don't get a shape error halfway through. And when channel counts differ - say RGB plus an RGBA - the narrower ones are padded with alpha=1.0, keeping transparency opaque rather than black. If nothing at all is connected, it returns a single 1x1 black pixel so the downstream graph still has a valid tensor to chew on.

This auto-normalization is the real reason to use this node over a hand-rolled concatenate: it absorbs the "my images aren't all the same size" problem instead of throwing it back at you.

The inputs and outputs

  • inputcount (default 2) - how many image slots to create. Change it and hit Update Inputs to re-skin the node.
  • image_1, image_2, ... - the optional inputs, in stack order.

The single output, images, is the concatenated IMAGE batch. Wire it into anything that wants a batch: a batch-aware sampler, a VAE encode, a save node, or an iterative-video loop input.

Installing it

Part of the Mickmumpitz pack. ComfyUI Manager → search "Mickmumpitz" → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/mickmumpitz/ComfyUI-Mickmumpitz-Nodes.git

Pure tensor work plus comfy.utils.common_upscale; no models, no extra installs.

Common issues

Two things to keep in mind. First, resizing is upscale-only in spirit: everything is matched to the first image's dimensions, so if your first input is tiny, everything gets shrunk up to it (or down to it - it's bilinear either way). Order your inputs with the largest or target size first. Second, because empty slots are skipped, the output count is not predictable from inputcount - if your downstream logic assumes "I asked for 6, I got 6," you'll be wrong. That's the feature, but build your loop's stop conditions around the actual output rather than the slot count.

CategoryMickmumpitz/Image

Inputs (3)

NameTypeDefaultDescription
inputcountINT21–1000
image_1optIMAGE
image_2optIMAGE

Outputs (1)

NameTypeDescription
imagesIMAGE