Nodes/Kinburg-Nodes/Unlim Image Batch
ComfyUI Node

Unlim Image Batch

Stack an unlimited pile of images into one batch

By Kinburg·Created 3 months ago·Updated 6 days ago· 1
Unlim Image Batch
  • image_1
  • image_2
  • images
modeas is
pad_color#000000
skip_emptytrue

Every "compare these five generations" workflow hits the same wall: ComfyUI's core image concatenation nodes give you a fixed number of inputs, and when you want a sixth image you're suddenly restructuring the graph. Unlim Image Batch is the fix - it grows inputs on demand and stacks everything into a single batch tensor. The "Unlim" in the name is doing real work: it starts with two slots, and a new empty one appears every time you connect the last.

How it works

ComfyUI IMAGE tensors are [B, H, W, C] floats in 0..1. A single batch needs every frame at the same size, which is why blindly stacking different-sized images errors. This node reconciles the mismatch without resampling - no quality loss - via the mode dropdown:

  • as is - stacks pixels untouched and errors if sizes differ. Right choice when everything's already the same resolution.
  • crop to smallest - center-crops every input down to the smallest width/height. Best for sloppy batches where you just want a uniform comparison grid.
  • pad to largest - center-pads everything up to the largest, filling borders with pad_color (a HEX string, default black). No content lost - you just get letterbox bars.

It also handles the RGB-vs-RGBA mismatch by padding missing channels with opaque alpha, and each input can itself already be a batch - they all concatenate. skip_empty (on by default) drops empty or unconnected inputs, so bypassing a branch doesn't nuke the batch and desync it from the rest of your comparison.

Inputs and output

The image_1 through image_N slots are the whole show - no other wiring. mode, pad_color and skip_empty are the only knobs, and you'll typically set mode once and forget the rest. The single images output is a stacked IMAGE batch you can feed into anything that expects one - an Image Compare node, a grid maker, a batch-aware sampler, or a save node.

Install

Part of the Kinburg-Nodes pack: ComfyUI Manager (search "Kinburg-Nodes") or cd ComfyUI/custom_nodes && git clone https://github.com/Kinburg/Kinburg-Nodes then restart. Zero extra dependencies - just torch, which ships with ComfyUI.

Where people get burned

The as is mode's error message is the most common trip-up - it's easy to feed mixed resolutions and wonder why it throws. That's the mode working as designed; switch to crop or pad. The subtler trap: this node is the workhorse underneath the pack's Get Accumulator (images), so if you use the accumulator system, its mode settings carry over here. And remember the batch-size reality - stacking 40 images at 1024×1024 is fine as a tensor, but whatever you feed it to has to actually handle a batch that big.

CategoryKinburg-Nodes/image

Inputs (5)

NameTypeDefaultDescription
image_1IMAGE
modeCOMBOas isHow to reconcile inputs of different sizes (no resampling): 'as is' keeps pixels and errors on a size mismatch; 'crop to smallest' center-crops down; 'pad to largest' center-pads up with pad_color.
pad_colorSTRING#000000Fill color (HEX) for the borders added in 'pad to largest' mode. Ignored otherwise.
skip_emptyBOOLEANtrueSkip empty / unconnected inputs (e.g. a bypassed branch) instead of failing, so the batch stays aligned with the rest of the comparison.
image_2optIMAGE

Outputs (1)

NameTypeDescription
imagesIMAGE