Image Concat Advanced
Stitch a batch into a grid without leaving ComfyUI
- images
- IMAGE
You've got 20 generated images sitting in a batch and you want them on one canvas - a comparison grid, a contact sheet, a "10 seeds side by side" post. ComfyUI's core concat nodes will happily stack two images, but a grid that wraps at a set column count is a different animal. Image Concat Advanced is the node that takes an image batch and lays it out in a directional grid, wrapping when a row (or column) fills up.
If you've ever hand-assembled a grid in an image editor after a run, this removes the entire chore. It's also the natural visual complement to the pack's Load Image Batch: load a folder, process each image, concat the results into one sheet.
How it works
Feed it an images batch and pick direction - left_to_right, right_to_left, top_to_bottom, bottom_to_top (plus shorthand aliases like right/down). max_images_per_line sets how many cells fit before the layout wraps to the next row or column. Default 3 = a 3-wide grid.
Two behaviors make it less fiddly than a DIY grid:
- Resizing: every cell is matched to the first image's size; the rest are resized to fit while keeping aspect ratio, using the
interpolationmethod you choose (bicubic default). No manual "make everything 512×512 first" step. - Blank fill: an incomplete final row or column gets padded with blank cells, so the grid stays rectangular instead of ending in a ragged edge.
output_channels controls the final channel layout - rgb (default), rgba, or auto (preserve whatever the source needs). If any input has an alpha channel, rgba is the option that doesn't silently drop it.
One output: IMAGE, the finished grid, ready for a Save Image or a preview.
Install
It's part of ComfyUI Text Processor:
cd ComfyUI/custom_nodes
git clone https://github.com/rookiestar28/ComfyUI_Text_Processor.git
pip install -r requirements.txt
Restart, or install via ComfyUI Manager by searching "ComfyUI Text Processor". No extra dependencies beyond the pack's standard trio.
Gotchas
Aspect-ratio behavior means your cells can end up slightly different effective sizes - the first image dictates the cell size, so if your batch mixes landscape and portrait shots, expect letterboxing-like gaps. That's the trade-off for "resize to fit without distortion." Also, if you're concatenating images of wildly different sizes and want exact uniformity, resize them yourself first and this becomes purely a layout node. For the common case - a batch of same-size outputs becoming a tidy grid - it's a three-knob node that just works.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | One or more image batches to arrange into a grid. | |
| direction | COMBO | left_to_right | Ordering direction and primary axis used to place images. |
| max_images_per_line | INT | 31–255 | Maximum images in each row or column before wrapping. |
| interpolation | COMBO | bicubic | Sampling method used when images are resized to align in the grid. |
| output_channels | COMBO | rgb | Force RGB, force RGBA, or preserve an automatically selected channel count. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | Concatenated image grid. |