Nodes/Klinter_nodes/Flexible Batch Image - klinter
ComfyUI Node

Flexible Batch Image - klinter

Stack up to 6 images without the aspect-ratio massacre

By klinter007·Created 3 years ago·Updated 9 months ago· 19
Flexible Batch Image - klinter
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • images

Here's a ComfyUI annoyance you've almost certainly hit: you want to feed several images into a batch - a few reference shots, a couple of masks, whatever - and the moment you merge two image tensors, ComfyUI forces them all to the first image's aspect ratio and silently crops or squashes the rest. That's the standard ImageBatch behavior, and it destroys composition. Flexible Batch Image - klinter is built to dodge that.

The node accepts up to six optional IMAGE inputs (image_1 through image_6) and outputs them as a single images tensor, processing each one separately so the original dimensions survive. The author's docstring is refreshingly honest about what it's for: "solving ComfyUI's tensor batching limitation that crops images to match the first image's aspect ratio." That's the whole pitch.

The honest caveat, and you should hear it before you get excited: this preserves each image's dimensions while stacking them into one tensor, which means downstream nodes still have to deal with a batch where frames differ in size. Whether that's a problem depends on what you feed it into. If the target node expects a uniform batch (many samplers do), you'll hit the same wall further downstream - this node just moves it. Where it genuinely shines is as a routing/collection point: gather up to six images, run a per-frame operation that tolerates varied sizes, or pipe them into a node that only looks at the first few frames.

There are no required inputs - every image input is optional, and it handles an all-empty input gracefully rather than crashing, which is more than some ComfyUI nodes can claim. One output: images, an IMAGE tensor.

Install is the pack standard: search "Klinter_nodes" in ComfyUI Manager, or cd ComfyUI/custom_nodes && git clone https://github.com/klinter007/klinter_nodes then restart. No requirements.txt, no models, nothing heavy. Like every node in this pack it rides the newer comfy_api framework, so keep ComfyUI updated or the node won't appear.

The verdict: if you've been bitten by silent aspect-ratio cropping, this is a clean way to keep your images intact through the batch step. Just don't expect it to make a sampler happy about a mixed-size batch - that problem lives a few nodes later.

Categoryklinter

Inputs (6)

NameTypeDefaultDescription
image_1optIMAGE
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE
image_5optIMAGE
image_6optIMAGE

Outputs (1)

NameTypeDescription
imagesIMAGE