FL Image Batch To Grid
FL_ImageBatchToGrid — lay a batch of images out into one contact-sheet grid
- images
- IMAGE
You generated a batch of eight variations and you want to see them all at once, side by side, in a single image. FL_ImageBatchToGrid does that: it takes a batch of images and arranges them into a grid - so many per row - producing one composite "contact sheet." It's the fastest way to compare a bunch of seeds, prompts, or settings without squinting at a filmstrip.
Dead simple, and quietly one of the more useful little utilities when you're iterating. Instead of scrubbing through a batch one image at a time, you get the whole set laid out. Great for XY-style comparisons, for picking the best of a batch, or just for making a tidy preview to share.
How it works
It reads your image batch and packs the images left-to-right, top-to-bottom into a grid with your chosen number of images per row. When the batch doesn't fill the last row completely, the empty cells get filled with black so the grid stays rectangular. The result is a single image containing all of them.
The inputs and outputs
There are only two inputs, which is the whole appeal:
images- the batch to lay out.images_per_row(1–20, default 5) - how many columns. The node figures out the number of rows from the batch size. Five per row is a sensible default; drop it to compare a small set at larger size, raise it for a dense overview.
Output is a single IMAGE - the grid - ready to preview or save.
How to install it
Part of filliptm's Fill-Nodes pack. ComfyUI Manager → search ComfyUI_Fill-Nodes → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
pip install -r ComfyUI_Fill-Nodes/requirements.txt
No model, no special dependencies.
Common issues & troubleshooting
The grid looks misaligned or images are cut off. The grid assumes uniform cell sizes, so it works cleanest when every image in the batch is the same dimensions - which they usually are, coming straight out of a sampler. If you've combined images of different sizes into one batch upstream, normalize them to a common size first, or the layout gets awkward.
Black cells at the end. That's by design - when the batch count doesn't divide evenly by images_per_row, the leftover cells fill black to keep the grid rectangular. If you want it to fill perfectly, pick an images_per_row that divides your batch size (e.g. 4 per row for a batch of 8 or 12).
The output image is enormous. A big batch at full resolution makes a big grid - twenty 1024px images is a lot of pixels. If it's unwieldy, downscale the images before gridding them, since a contact sheet is for glancing, not for detail.
I want a list, not a batch, going in. This wants a batched tensor. If your upstream node emits a list of images instead (ComfyUI distinguishes the two), convert it to a batch first - the pack's own FL_ImageListToImageBatch does exactly that.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| images_per_row | INT | 51–20 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |