ComfyUI Node

NO8D-Image Grid

A contact sheet without the photo editor

By no8d·Created 2 months ago·Updated 14 days ago· 271
NO8D-Image Grid
  • images
  • background_color
  • image
layout横向
crop_modenone
columns0
spacing4

You generated eight variations of the same prompt and you want to look at them together. You could open them one at a time, or you could do what everyone actually does and combine them into a single grid - comparison sheets, model previews, before/after side-by-sides. NO8D-Image Grid is that node: it takes multiple image inputs and stitches them into one output image, horizontally, vertically, or in an automatic grid.

The first image is the boss. The node uses the first input as the size reference, and everything else is arranged and, if needed, cropped to match its dimensions. That's the key design decision - a grid where every cell is the same size and the combined output reads cleanly, rather than a mosaic of mismatched rectangles.

What you set

  • images - autogrow inputs, one per image or image batch. Drag more ports out as needed.
  • layout - 横向 (horizontal), 纵向 (vertical), or 网格 (grid). Pick the direction the combined image grows.
  • crop_mode - none, or standard/left/center/right cropping. Crop modes fit each image's content to the first image's size. The direction detail matters: in a horizontal layout, crops split left/right; in vertical and one-column grids, they split top/bottom.
  • columns - for grid layout, how many columns (0 = auto, let the node decide).
  • spacing - the gap between cells (default 4px). In crop modes the same value becomes the outer margin and the center spacing, keeping everything even.
  • background_color - default #2563EB (the pack's accent blue). Fills the added margins; in grid padding mode it's darkened automatically so seams read as padding.

Output is image - one combined IMAGE, ready for a preview or save.

How it works

Under the hood it's a straightforward composition: resize/crop each input to the reference cell, place them on a canvas with the requested spacing, and fill the gaps with the background color. The crop modes are the interesting part because they preserve image content - instead of squashing a portrait into a square, they crop to fit, which keeps the content at the first image's aspect. That's the difference between a usable comparison sheet and a set of distorted thumbnails.

Where it fits

The obvious home is end-of-pipeline: gather the outputs of several generation branches (or a batch) and grid them before a final preview or save, so one file represents the whole run. It's also the natural companion to NO8D-A/B preview when you're comparing more than two - A/B for the pair you care about, the grid for the whole spread.

Install and gotchas

Standard pack install:

cd ComfyUI/custom_nodes
git clone https://github.com/no8d/ComfyUI-NO8D-controls.git
python -m pip install -r requirements.txt

ComfyUI Manager → "NO8D-controls". No models, no downloads. Two things to watch: the node is written against ComfyUI's newer backend node API, so it needs a reasonably current ComfyUI to show up at all; and if your grid looks off, it's almost always the crop mode - leave it on none and the node keeps each image at its own dimensions rather than forcing everything to the first image's size.

CategoryNO8D-control

Inputs (6)

NameTypeDefaultDescription
imagesCOMFY_AUTOGROW_V3
layoutCOMBO横向3 options: 横向, 纵向, 网格
crop_modeCOMBOnone5 options: none, 标准裁切, 居左裁切, 居中裁切, 居右裁切
columnsINT00–50
spacingINT40–1024
background_colorCOLOR#2563EB

Outputs (1)

NameTypeDescription
imageIMAGE