Image+Text Grid
Contact Sheets With Captions, in One Node
- images
- layout
When you generate a batch of variations, the fastest way to review them is a contact sheet: everything on one grid, captioned so you know which prompt or seed made which. Assembling that by hand - resize, tile, draw text, add borders - is exactly the kind of busywork ComfyUI should absorb. Image+Text Grid does it in one node: a batch of up to 9 images becomes a clean grid with a caption under each.
It's the review/QC node for batch generation, comparison grids, and anything where "put these side by side with labels" is the deliverable. The README even calls out the intended pairing: contact sheets, comparison grids, and captioned galleries.
How it works
Feed it images (up to 9 frames in the batch). Layout is controlled by:
images_per_row- your column count, or0for auto-fit, which picks the best columns viaceil(sqrt(n))(9 images → 3×3, 4 images → 2×2). Auto-fit is the right default for most contact sheets.image_size(default 256) - max dimension per image cell; images keep their aspect ratio.caption_height(default 64),font_size(default 12),padding,background_color(white/black/gray) - the chrome around the images.
Captions are the part worth explaining. Each image has a matching optional input - caption_1 through caption_9 - so cell N shows caption_N. With caption_prefix you can prepend bold text to every caption (e.g. the run name, with per-image labels coming from the caption inputs). Wire the pack's text utilities or per-image metadata in and you get labelled sheets automatically.
Captions are forceInput sockets, so they want wires, not typed values - but a plain string node or the pack's String List Cowboy feeds them fine. One important README note: if your images come from a list-based node (like StringListCowboy-style outputs or a list producer), collect them into a single batch with an ImageListToImageBatch node upstream first - this node expects a real batch, not a list.
Single output: layout, the finished grid as one IMAGE. Preview it, save it, or feed it into a video node - it's a normal image like any other.
Honest positioning: for "I need to eyeball 9 generations at once," it's the nicest one-node answer in the pack. The caption machinery is the differentiator over a plain grid tiler - a labelled contact sheet is genuinely more useful than an unlabelled one when you're A/B-ing prompts or tracking seeds.
Install
Search "Trent Nodes" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/TrentHunter82/TrentNodes.git
cd TrentNodes
pip install -r requirements.txt
Pure PIL/tensor composition - no models. Restart ComfyUI after installing. (The author has flagged Manager install flakiness on this pack from an early repo rename; manual clone is the reliable fallback.)
Common issues
- Captions landed on the wrong cells. Each
caption_Nis positional - caption_1 labels image 1, and so on. Wire them in matching order. - "It only shows one image." If you're feeding a list rather than a batch, it collapses. Collect the list into a batch first (ImageListToImageBatch upstream), per the README.
- Text is cramped or overflowing. Raise
caption_heightor dropfont_size; long captions need headroom. - More than 9 images? The node caps at 9. Split the batch or run it twice.
For a captioned contact sheet in one node, this is the one. Batch in, labelled grid out - the review loop gets a lot less tedious.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| images_per_row | INT | 00–10 | Images per row (0 = auto-fit) |
| image_size | INT | 25664–1024 | Max dimension for each image cell |
| caption_height | INT | 640–256 | Height reserved for caption text |
| font_size | INT | 128–48 | Font size for caption text |
| padding | INT | 00–100 | Padding between images |
| background_color | COMBO | white | Background color of the layout |
| caption_prefix | STRING | Bold text prepended before each caption | |
| caption_1opt | STRING | — | |
| caption_2opt | STRING | — | |
| caption_3opt | STRING | — | |
| caption_4opt | STRING | — | |
| caption_5opt | STRING | — | |
| caption_6opt | STRING | — | |
| caption_7opt | STRING | — | |
| caption_8opt | STRING | — | |
| caption_9opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| layout | IMAGE | — |