Nodes/ImagesGrid/ImagesGridByColumns
ComfyUI Node

ImagesGridByColumns

Turn It Into One Grid Image

By LEv145·Created 3 years ago·Updated 2 years ago· 206
ImagesGridByColumns
  • images
  • annotation
  • IMAGE
gap0
max_columns1

You queued a batch of six and ComfyUI's preview only shows you one image at a time. ImagesGridByColumns fixes that the obvious way: it takes the whole batch, pastes the images side by side onto one canvas, and hands you back a single grid image you can actually look at. It's the same "see everything at once" idea as A1111's XYZ plot, minus the automation. The pack's own metadata describes it as exactly that - a viewer node for checking multiple outputs in a grid, "similar to the X/Y Plot extension."

How it works

The mechanism is pleasantly boring. The node pulls each image out of your batch tensor, converts it to a PIL image, and pastes it onto a white canvas left-to-right, wrapping down to the next row once it hits max_columns. The row count is just whatever's left over: with 7 images and 4 columns you get 2 rows. Then it converts the finished canvas back to a tensor and returns it as one IMAGE.

Two consequences fall out of that. First, every image in the batch must be the same resolution - the node reads the size from the first image and uses it for all the layout math, so a mixed-size batch comes out misaligned or clipped. Second, you get one big image, not a batch: wire the output into SaveImage and you get a single PNG of the whole grid, which is exactly what you want for sharing or archiving a comparison run.

The inputs that matter

Only three are required, and you'll set two of them:

  • images (IMAGE) - your batch. Feed it a VAEDecode output, a batch you assembled with ImageCombine or LatentCombine (both from this same pack), or the output of an XY Plot node from the Efficiency pack, which the README explicitly showcases.
  • max_columns (INT, default 1) - how many tiles per row. The whole game is in this number: set it to 3 for a 3×N grid, 4 for a 4×N grid.
  • gap (INT, default 0) - pixels of white space between tiles. Zero is fine; a gap of 8–16 makes a dense grid much easier to scan.
  • annotation (GRID_ANNOTATION, optional) - plug a GridAnnotation output in here and each row and column gets a text label. Worth it the moment you're comparing checkpoints or seeds and can't remember which cell is which.

The output is a single IMAGE - the grid - that goes straight into PreviewImage or SaveImage.

Installing the pack

The pack is called ImagesGrid (repo LEv145/images-grid-comfy-plugin). Easiest path is ComfyUI Manager: search "ImagesGrid" and install. Or do it by hand:

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

then restart ComfyUI. The README's official instructions are the zip version - download the main branch archive and unpack it into custom_nodes/ImagesGrid/ - but clone or Manager amounts to the same thing. There are no extra Python dependencies, no model downloads, no API keys: it runs on the torch/Pillow/numpy ComfyUI already ships, plus a bundled Roboto font for the annotation labels.

Where people get burned

The honest reputation of this pack is that the simple grid part is great and the workflow-scale stuff is fiddly. On reddit, the recurring take from people who tried it: the grid nodes themselves are fine, but building the big XYZ-plot-style workflows around them means duplicating samplers everywhere, and a one-off "let me tweak this comparison" becomes more node-wrangling than the comparison is worth. That's a workflow-design problem, not a bug in this node - keep the scope to "I already have a batch, show it to me" and it behaves.

Other real traps: all tiles must share a resolution (see above), and there's no downscaling - six 1024² images on one canvas is a roughly 3k-pixel-wide image, which gets heavy in the preview. And if you wire in an annotation whose text fields are both empty, the node raises "Column text and row text is empty." Give it at least one label and it's happy.

CategoryImagesGrid

Inputs (4)

NameTypeDefaultDescription
imagesIMAGE
gapINT0
max_columnsINT1
annotationoptGRID_ANNOTATION

Outputs (1)

NameTypeDescription
IMAGEIMAGE