ComfyUI Node

Merge Image Grid

Merge Image Grid

By antrobot1234·Created 3 years ago·Updated about a year ago· 28
Merge Image Grid
  • images
  • image
columns1
rows1

merge is the other half of split. It takes a batch of images and lays them out into a single grid - you set the columns and rows, and it tiles the images into one composite. If split cuts a picture into tiles, merge stitches tiles back into a picture.

Why you'd reach for it

The headline use is reassembly: you split an image into tiles, processed each one, and now you need them back as a single image. merge with the same grid dimensions you split with does exactly that.

But it's also handy on its own as a contact-sheet maker. Got a batch of variations - a seed sweep, a few prompt tweaks, a set of upscaler comparisons - and want them side by side in one image for a quick eyeball or to post somewhere? Feed the batch in, pick a grid that fits the count, and you get a tidy montage without opening an image editor. It's the quiet utility you end up using more than you'd expect once it's in your pack.

How it works

It arranges the incoming batch of images into a columns x rows grid, filling the cells in order, and outputs one combined image. It's the literal inverse of Split Image Grid: split slices a frame into a list of tiles, merge takes a batch and reconstitutes the frame.

The inputs and outputs

  • images - the batch of images to arrange. In a tiling workflow this is the (processed) list that came out of split.
  • columns - number of columns in the output grid (default 1).
  • rows - number of rows (default 1).

The output is a single image: the assembled grid.

Installing it

ComfyUI Manager → search antrobots ComfyUI Nodepack, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/antrobot1234/antrobots-comfyUI-nodepack

No downloads beyond the pack.

Common issues

The number-one problem is a grid that doesn't match the batch. If columns x rows doesn't equal the number of images you're feeding in, the layout comes out wrong - cells missing, or images in unexpected positions. When you're reassembling after a split, the fix is simple: use the exact same columns and rows you split with.

Second, the seam issue carries over from tiling. If you split an image, did generative work per tile, and merged it back, you may see hard edges where the tiles meet - that's the hard-boundary nature of grid tiling, not a flaw in merge. For seamless results you want an overlap-and-blend upscaler rather than a raw grid split/merge.

Third, mismatched tile sizes. merge expects the images to tile cleanly; if your per-tile processing changed some tiles' dimensions but not others (for instance an upscale that rounded differently), the grid can come out ragged. Keep the tile sizes consistent through your processing chain.

Categoryantrobots-ComfyUI-nodepack/image-handling

Inputs (3)

NameTypeDefaultDescription
imagesIMAGE
columnsINT11–9223372036854776000
rowsINT11–9223372036854776000

Outputs (1)

NameTypeDescription
imageIMAGE