Collage
A contact sheet in one node, no layout math required
- input_images
- background_image
- image
Every so often you want all the images from a run on one canvas - a contact sheet, a storyboard grid, a batch preview you can actually look at instead of scrolling 40 preview windows. The pack's Collage node does exactly that: images in, one grid on a canvas out, and the layout math (cell sizes, rows, spacing) handled for you.
The source can be either a wired input_images batch or, if nothing is connected, every image in a folder_path (natural-sorted, so img2 sorts before img10 - the classic filename trap dodged). Each image is fit into its grid cell with its aspect ratio preserved, letterboxed rather than squashed. The nice detail: the letterbox border is filled with the image's own top-left pixel color, so a dark image on a dark background blends in instead of showing white bars.
The inputs that matter:
output_width/output_height- the canvas size in px. The defaults (2480×3508) are roughly A4 portrait; change to taste.cols- column count; rows are derived from the image count.gap/margin- spacing between cells and the outer frame, in px.background_color- canvas color (used when no background image is connected).input_images- the batch to arrange. If not connected, it loads fromfolder_pathinstead.background_image- optional; stretched to the output size and overrides the solid color (first frame only).
The output:
image- the collage as an IMAGE, ready for a preview or save node.
One decision you should make up front: the canvas is fixed-size and the cells derive from it, so a batch of portrait images in a portrait canvas fills more evenly than mixed orientations. That's not a bug - it's the grid doing what you asked. If you want a different feel, change cols, not the images.
Where people get burned: connect nothing to input_images and leave folder_path empty, and the node raises a clear error telling you exactly that. Feed it an empty batch and it returns the bare background rather than crashing. It also skips unreadable files in a folder with a console note instead of dying mid-load, which is the kind of robustness that saves a long run.
Install via ComfyUI Manager (search "Kinburg-Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/Kinburg/Kinburg-Nodes
then restart. No extra dependencies - Pillow, numpy and torch all ship with ComfyUI (the README explicitly calls this out), so there's nothing to download beyond the pack. One-author personal collection, per-package docs, and a 1395-check test suite.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| output_width | INT | 24801–16384 | Width of the output collage, in px. |
| output_height | INT | 35081–16384 | Height of the output collage, in px. |
| cols | INT | 31–100 | Number of columns; the row count is derived from the image count. |
| gap | INT | 100–2000 | Spacing between cells, in px. |
| margin | INT | 200–2000 | Outer margin around the grid, in px. |
| background_color | STRING | #FFFFFF | Canvas color as HEX (#RRGGBB), used when no background_image is connected. |
| input_imagesopt | IMAGE | Images to arrange. If not connected, images are loaded from folder_path instead. | |
| background_imageopt | IMAGE | Optional background, stretched to the output size. Overrides background_color (first frame only). | |
| folder_pathopt | STRING | Fallback source: load every image in this folder (natural-sorted) when input_images isn't connected. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |