Image concatenate(V1.2 QQ2540968810)
Turn a folder of images into labeled contact sheets — no Photoshop, no grid math
- a0_images
- b1_concat_images
- b2_page_count
- b3_size_per_title
- b4_valid_image_count
- b5_title_save_path
- b6_help_info
You know that moment where you've generated 40 variations and need to actually look at them side by side, in order, at a consistent size? ComfyUI's default preview shows one tensor at a time, and hand-assembling a grid in Photoshop is a slow afternoon of copy-paste. That's the gap this node closes: point it at a folder (or feed it an image batch from elsewhere in your graph) and it lays everything out onto fixed-aspect-ratio "pages" - contact sheets with margins, borders, filename labels, and true alpha-channel transparency. The full display name is literally "Image concatenate(V1.2 QQ2540968810)" - the author's QQ number lives in the title, which tells you everything about who built this. One-person tool, v1.2 in name while the README still says v1.1, and it works.
It's also secretly a batch image resizer: one fill mode plus "save single image" and you've resized a whole folder to a uniform width without touching a single-image node.
How it works
Under the hood it's pure PIL + numpy + torch - no model files, no extra pip dependencies, nothing to download. It reads your folder, filters to known image extensions (PNG, JPG, JPEG, BMP, GIF, WEBP, TIFF), sorts them, then computes a grid across pages sized from a2_page_width and a3_page_aspect_ratio. Page height is auto-calculated from the ratio; you never set it. Each image scales to fit its block per the draw mode, and the finished pages come out stacked as a batch tensor on b1_concat_images - multi-page output, previewed or saved like any other batch.
The nice touch: this is true 4-channel RGBA. Set the background to Transparent and you get real alpha through the whole pipeline, ready for compositing or editing in Photoshop. Alpha only survives if your sources are PNGs - a JPEG has no alpha to preserve.
The inputs that actually matter
Yes, the node has a wall of widgets (19 of them). Resist the urge to panic - almost everything has a sane default and most are cosmetic. The handful you'll set:
a1_image_dir- absolute path to the folder of images. Required, unless you connecta0_imagesfrom another node instead, in which case the folder is silently ignored. That's the one input that trips people up, so remember it:a0_imageswins.a2_page_width+a3_page_aspect_ratio- your canvas. Width in px (default 4000, max 50000), ratio picks 3:2 by default; use something like 9:16 for a vertical layout.a4_cols_rows_per_page- columns per row for modes 1–5, rows per page for mode 6. Default 3.a7_title_draw_mode- the six fill modes. The default,3.zoom by long side, is the recommended one and it's a safe choice for normal images. Stretch will distort; crop-square-by-short-side is for when you want uniform square-ish tiles.a14_filename_position/a15_filename_color- show the source filename on each block. Set tononeif you just want clean grids.a97_title_save_mode/a98_title_save_dir- save each individual block as its own PNG (with or without the border/title).
On the output side, wire b1_concat_images into a Preview or Save node, and if you ever wonder what a parameter does, connect b6_help_info to a Preview Any / string-preview node - the author packed the whole usage guide into that output, which is a neat trick.
Installing it
Standard two ways, and this is the rare pack where installation is truly trivial - no requirements.txt, no model downloads, nothing:
cd ComfyUI/custom_nodes
git clone https://github.com/shmbatom/Comfyui-Image-Concat.git
Then restart ComfyUI. Or open ComfyUI Manager → Install Custom Nodes → search "Comfyui-Image-Concat" and click install. Once it's loaded, find it by double-clicking and searching concat - it lives under Image Processing/concat. It also ships a little JS extension that adds a "Select Folder" button right on the a1_image_dir widget, so you don't have to type paths.
Gotchas and troubleshooting
- Connected
a0_images? Your folder is ignored. Disconnect it to fall back to directory mode. - Missing or empty folder doesn't crash - the source returns a red 100×100 error image and a
b2_page_countof 0. If your preview is a red square, checkb4_valid_image_count(the count of images it actually read) instead of staring at the canvas. - Version drift: display name says V1.2, README documents v1.1. A few port names changed along the way (
a4_n_per_rowsbecamea4_cols_rows_per_page,a8_draw_modebecamea7_title_draw_mode), so older saved workflows need re-wiring. - Alpha caveat: transparency survives the output (save as PNG), but only PNG sources carry alpha in.
- It's a small, quiet pack - no community footprint to lean on if something odd happens. Your docs are the built-in
b6_help_infooutput and theimages/one_port.pngstarter workflow in the repo.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| a1_image_dir | STRING | Absolute path to the folder containing images to concatenate. Ignored if 'a0_images' are connected via input. | |
| a2_page_width | INT | 4000100–50000 | Total width of the output canvas (px). Height is auto-calculated based on aspect ratio. |
| a3_page_aspect_ratio | COMBO | 3:2 | Select the overall aspect ratio of the canvas. |
| a4_cols_rows_per_page | INT | 31–20 | Layout parameter: Columns per row for Mode 1-5, or Rows per page for Mode 6. |
| a5_page_margin | INT | 500–500 | Margin space around the canvas border (px). |
| a6_title_padding | INT | 300–200 | Padding space between image title blocks (px). |
| a7_title_draw_mode | COMBO | 3.zoom by long side (recommended) | Choose how images fit into their blocks (e.g., Scale, Stretch, Crop, Equal Width/Height). |
| a8_title_first_position | COMBO | start_from margin | Alignment for the first image block (e.g., Top-left alignment, Vertical Centering). |
| a9_background_style | COMBO | Light (white) | Set the canvas background style (White, Black, or Transparent). |
| a10_title_border | COMBO | Rounded (radius=10px) | Border shape for individual image blocks. |
| a11_title_border_style | COMBO | Solid | Line style for the image block borders (Solid, Dashed, Dotted, etc.). |
| a12_page_border | COMBO | Rounded (radius=30px) | Border shape for the whole page. |
| a13_page_border_style | COMBO | Solid | Line style for the page border. |
| a14_filename_position | COMBO | none | Position to display the filename (Above, Top, Middle, Bottom, Below, or None). |
| a15_filename_color | COMBO | black | Select the text color for the filename. |
| a97_title_save_mode | COMBO | none | Select whether to save individual blocks (with padding/title or original image only). |
| a98_title_save_dir | STRING | ./output/concat_titles | Directory path to save the individual titles/images. |
| a99_title_save_filename | COMBO | source file name | Select the naming rule for saved files (Index, Original Name, or Page+Index). |
| a0_imagesopt | IMAGE | select image(s) from other node. If 'a0_images' are connected via input, `a1_image_dir` will be IGNORE. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| b1_concat_images | IMAGE | — |
| b2_page_count | INT | — |
| b3_size_per_title | STRING | — |
| b4_valid_image_count | INT | — |
| b5_title_save_path | STRING | — |
| b6_help_info | STRING | — |