Nodes/ImagesGrid/ImageCombine
ComfyUI Node

ImageCombine

It Glues Batches, Not Images Side by Side

By LEv145·Created 3 years ago·Updated 2 years ago· 206
ImageCombine
  • image_1
  • image_2
  • IMAGE

The name sounds like it stitches two images into one picture. It doesn't. ImageCombine takes image_1 and image_2, runs torch.cat along the batch dimension, and returns a single IMAGE tensor that's just both batches stacked. No resizing, no side-by-side compositing, no blending. If you were hoping for a montage, this is the wrong tool - it's a "merge two batches into one" node. Understand that and it becomes obvious when it's useful.

Why you'd reach for it

ComfyUI's grid nodes (ImagesGridByColumns / ImagesGridByRows) only grid one batch. If you've got two separate pipelines producing images - say, a positive-prompt branch and a negative-prompt branch, or two different img2img strengths - you have two IMAGE tensors and no easy way to view them together. ImageCombine fuses them into one batch of N+M, and then a single grid node can lay all of them out on one canvas. That's the whole use case, and it's why the pack ships it: the README's own mini workflow feeds two loaded images through ImageCombine and into ImagesGridByColumns.

How it works

There is no real mechanism to explain. It concatenates the tensors along dimension 0 - the batch axis - and returns the result. Feed it two single images and you get a batch of 2. Feed it a batch of 3 and a batch of 4 and you get a batch of 7. That's the entire node, which is also its virtue: nothing to tune, nothing to get subtly wrong.

Two honest caveats. It does no size checking, so if the two images have different resolutions you'll carry that mixed-size batch downstream and the grid node will trip over it (grids assume uniform tile sizes). And it's strictly a batch merge - if you actually want to glue images next to each other into one canvas, you want a spatial concatenation node, not this. The reason this node exists at all is batch management, not compositing.

The inputs

  • image_1 (IMAGE)
  • image_2 (IMAGE)

Both required, both IMAGE tensors. Output is a single IMAGE - the combined batch - typically wired into ImagesGridByColumns/ByRows or a save node.

Installing the pack

ImageCombine lives in ImagesGrid (LEv145/images-grid-comfy-plugin). Install via ComfyUI Manager (search "ImagesGrid") or:

cd ComfyUI/custom_nodes
git clone https://github.com/LEv145/images-grid-comfy-plugin ImagesGrid

then restart ComfyUI. No dependencies beyond torch (already present), no model files, no keys.

Where people get burned

The naming trap is the big one - people expect a montage and get a batch stack, and then wonder why nothing visually "combined." The honest community take on this pack is that it's solid for the simple stuff and fiddly for the ambitious stuff; ImageCombine is firmly in the "simple stuff" bucket, so it behaves. The real trap is downstream: whatever resolution mismatch you merge here, you must resolve before it hits a grid node. If your two branches produced different sizes, add a resize/upscale before combining, not after - the grid won't save you.

CategoryImagesGrid

Inputs (2)

NameTypeDefaultDescription
image_1IMAGE
image_2IMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE