Nodes/zhangp365/ComfyUI-utils-nodes/Images Concanate To Grid
ComfyUI Node

Images Concanate To Grid

Turn a batch of images into one contact sheet

By zhangp365·Created 2 years ago·Updated 5 months ago· 135
Images Concanate To Grid
  • image1
  • IMAGE
directionright
dimension_number2

If you've ever run a batch of ten seeds or a LoRA-weight sweep and ended up with ten separate PNGs you have to open one by one to compare, this node is the fix. ImagesConcanateToGrid takes a batch of images and tiles them into a single grid image - one PNG, all your variants laid out side by side, ready to screenshot into a Discord message or a comparison post.

What it's for

Grids are the default way this community compares outputs - checkpoint bake-offs, sampler comparisons, seed variance checks, LoRA weight sweeps. Normally you'd build that grid by hand in an image editor, or reach for a heavier "XY plot" node built specifically for parameter sweeps. This one is simpler and more general: hand it any batch of same-sized images, however you produced it, and it stitches them into a grid. No sweep logic, no labels, just layout.

How it works

The name's a typo (it's "concatenate," not "concanate") but the mechanism is exactly what it sounds like: it walks through your image batch and places each one next to the last, wrapping to a new row or column once it hits your configured count.

The inputs and outputs that matter

  • image1 (IMAGE) - this is your whole batch, not a single frame. Feed it a batch of N same-sized images and the node lays out all N.
  • direction (right or down, default right) - which way the grid grows. right fills a row left-to-right before wrapping to a new row below; down fills a column top-to-bottom before wrapping to a new column beside it.
  • dimension_number (default 2, 1–20) - how many tiles go in each row (or column, depending on direction) before it wraps. Set it to match how many variants you're comparing - e.g. 4 for a 2×2 grid of four seeds, or leave it at the batch size for one long strip.

Output is a single IMAGE - the assembled grid - which you can drop straight into a Save Image node or a Preview Image node to look at.

How to install it

Easiest path is ComfyUI Manager: open it, search for "ComfyUI-utils-nodes," hit install, restart. If you're doing it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/zhangp365/ComfyUI-utils-nodes

Restart ComfyUI afterward. There's nothing to download - no models, no weights, this is pure image-tensor math, so install is genuinely just "clone and restart." The pack does carry a heads-up in its README about a different node (the deepface attribute analyzer) needing TensorFlow manually - that doesn't touch this node at all, so don't let it scare you off installing the pack for this one.

Common issues & troubleshooting

The one thing that'll actually bite you: all the images in the batch need to be the same size. This node concatenates tensors along width or height, and ComfyUI's IMAGE batches are already required to share dimensions to exist as one batch in the first place - so if you're building your batch by combining outputs of different resolutions (say, mixing a 1024×1024 render with a 768×1344 one), you'll want to resize them to match before they hit this node, not after. If your batch comes straight out of a single KSampler run with a fixed size, you won't hit this at all.

Beyond that, keep dimension_number sane relative to your batch size - if you set it higher than the number of images you actually have, you'll just get a grid with empty/short rows rather than an error, which is easy to miss if you're not looking closely at the output.

Categoryutils/image

Inputs (3)

NameTypeDefaultDescription
image1IMAGE
directionCOMBOright2 options: right, down
dimension_numberINT21–20

Outputs (1)

NameTypeDescription
IMAGEIMAGE