Nodes/comfyui-AGSoft/AGSoft Image Concatenate From Batch
ComfyUI Node

AGSoft Image Concatenate From Batch

Turn an image batch into a grid, without a single resize node

By Art-xmaster·Created 12 months ago·Updated a day ago· 23
AGSoft Image Concatenate From Batch
  • images
  • image
  • width
  • height
columns1
fill_directionrow_by_row
background_colorblack
gap_colorwhite
gap0

If you've ever generated a batch of 12 variants and wanted one image showing all of them at once, you already know the problem: ComfyUI hands you a single batched tensor, and there's no built-in "make me a contact sheet" node. This node is that node. It takes an image batch and lays it out into a grid with a number of columns you choose.

It's the kind of utility that sounds boring until you've spent an afternoon stacking four copies of ImageBatch and ImageConcatenate to compare seeds. For comparing prompts, checking consistency across a batch, or prepping a reference grid for a VAE, this is a one-node replacement for that pile of workarounds.

How it works

You feed it a batch of images - the tensor that most loaders and samplers already produce, where frame 0 through frame N live in a single IMAGE object. The node reads how many images are in that batch, carves the canvas into rows and columns, and drops each image into its cell.

The knobs:

  • columns - how many images across the grid. Rows are implied by however many images the batch actually contains. 1 column means a vertical strip, which doubles as a poor-man's image-list-to-image converter.
  • fill_direction - row_by_row fills left-to-right, top-to-bottom (the normal reading order); column_by_column fills top-to-bottom first, which matters if your batch is chronological and you want time running down a column.
  • gap - spacing in pixels between cells. Zero for a tight sheet, or a bit of breathing room so the grid is actually readable.
  • background_color / gap_color - the canvas behind the images and the strip between them. Black canvas + white gaps is the classic variant-comparison look.

One thing to know: every image in the batch is placed into a same-size cell, so feed it images that already share dimensions. If you're coming from an Image Resize node that kept things uniform, you're fine. If your batch has mixed sizes, normalize it first - the node won't stretch things to match for you.

Outputs

  • image - the finished grid as a single IMAGE.
  • width / height - the grid's dimensions, which you'll want the moment you route this into an Empty Latent or a Save Image with a resolution label.

Installation

It ships in the comfyui-AGSoft pack:

cd ComfyUI/custom_nodes
git clone https://github.com/Art-xmaster/comfyui-AGSoft.git
# restart ComfyUI

Or in ComfyUI Manager, search "comfyui-AGSoft" and install. Standard numpy/opencv dependencies, no model downloads.

Where it fits

This is a quality-of-life node in the best sense - it doesn't add capability so much as remove a whole tangle of nodes from your graph. Grab it when you're tired of hand-stitching comparison grids, and pair it with a batch from any sampler output. The one honest caveat: it's grid-only. For true 2D image stitching with spacing and alignment control, the same pack's AGSoft Image Stitch is the heavier tool.

CategoryAGSoft/Image

Inputs (6)

NameTypeDefaultDescription
imagesIMAGE
columnsINT11–100
fill_directionCOMBOrow_by_row2 options: row_by_row, column_by_column
background_colorCOMBOblack3 options: black, white, gray
gap_colorCOMBOwhite7 options: white, black, gray, red, green, blue, +1
gapINT00–100

Outputs (3)

NameTypeDescription
imageIMAGE
widthINT
heightINT