DP Image Grid To Image
Turn a batch of images into one contact-sheet
- image
- image
When you've got a batch of images - say, four seed variations of the same prompt, or the four outputs of a comparison node - clicking through them one at a time to compare is annoying. This node tiles a batch into a single grid image, so you get one contact sheet instead of a stack of individual previews. Feed it a batch and a grid size, get one combined image back.
How it works
Given a batched image input, the node arranges it into a grid_size-based layout as a single output image. Optionally, it draws divider lines between the tiles using stroke_size and stroke_color, which is what actually makes a dense grid readable - without a stroke, tiles that are visually similar can blur together at the seams and you lose track of where one image ends and the next begins. Bump the stroke color to something that contrasts with your content (white on dark subjects, black on light ones) and the grid boundaries become obvious at a glance.
This is the natural companion to anything in the pack that produces multiple images from one node - the effect processors' four output slots, the color effect's all_colors_batch, a batch of seed variations - collapse them into one grid here before you preview or save, instead of eyeballing four separate image nodes side by side in the graph.
Inputs and outputs
Required:
image- the batch to arrange into a grid.grid_size- 1 to 10, default 2. This controls how many tiles the grid holds per dimension; match it to the size of your actual batch so you're not leaving empty cells or clipping images that don't fit.
Optional:
stroke_size- 0 to 100, default 0 (no border). Turn this up to get visible dividers between tiles.stroke_color- one of eight choices (black, white, red, green, blue, cyan, magenta, yellow), default white.
One output:
image- the composited grid, ready for a preview or save node.
How to install it
ComfyUI Manager: search ComfyUI-Desert-Pixel-Nodes. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/DesertPixelAi/ComfyUI-Desert-Pixel-Nodes
Restart, find it under DP/Image. No models or extra dependencies - pure image compositing.
Common issues & troubleshooting
Grid has empty tiles, or images look cut off. grid_size needs to roughly match your batch count. If you've got a batch of 4 and set grid_size to 10, you'll get a mostly-empty grid; too low, and images can get clipped or squeezed to fit. Set it to match (or closely bracket) your actual batch size.
Stroke lines aren't showing up. stroke_size defaults to 0, which is a genuine no-border state - you have to explicitly raise it before stroke_color has anything to draw. If dividers are invisible, that's almost certainly the reason.
Stroke color is invisible against your images. The eight preset colors are basic and don't adapt to your content - white dividers on a mostly-white image, or black on a mostly-black one, will disappear. Pick a color that contrasts with the bulk of what you're gridding, or use a mid-tone like cyan or magenta if your content spans both light and dark.
Only getting one image in the "grid" instead of a tiled layout. Make sure the upstream node is actually producing a batch (multiple images in one IMAGE tensor) rather than a single image - this node arranges an existing batch into a grid, it doesn't generate multiple images from a single input.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| grid_size | INT | 21–10 | — |
| stroke_sizeopt | INT | 00–100 | — |
| stroke_coloropt | COMBO | white | 8 options: black, white, red, green, blue, cyan, +2 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |