lay_ImageGrid
Turn a batch of images into one contact-sheet grid
- batch_img
- image
If you've batch-generated a dozen variations and want to eyeball them all at once instead of clicking through a filmstrip, lay_ImageGrid is the node that turns a batch into a single contact sheet. It's about as simple as this pack's layout tools get, which is exactly its appeal.
What it does
lay_ImageGrid is part of cardenluo's ComfyUI-Apt_Preset, a big utility pack organized around simplifying dense ComfyUI graphs. This node lives in the imgEffect group next to the pack's other grid and collage tools, and does the most literal version of the job: take a batch of images, arrange them into a rows × cols tile layout, output one flat image. No labels, no borders, no styling options - just tiling.
That minimalism is the point. If you want row/column captions, gaps, or background color, reach for the sibling node lay_image_grid_note instead - it takes the same core idea and adds annotation on top. lay_ImageGrid is for when you just want a quick visual comparison sheet with zero setup.
Inputs and outputs
batch_img- the IMAGE batch to tile (this is a batch input, so feed it the output of a sampler/loader running multiple seeds, or an image-batching node).rows/cols- grid dimensions, each 1–16, defaulting to 2×2.
It has a single image output: the assembled grid as one image. Wire that straight into a Preview Image or Save Image node.
Worth knowing: rows × cols needs to be at least the number of images in your batch, or you'll lose images off the end of the grid; if it's more than your batch size, expect empty cells. There's no auto-fit here - you pick the grid shape yourself.
Where this fits
This is the node you reach for after an X/Y seed sweep, a batch of LoRA weight tests, or any time you generate N variants and want a single glanceable comparison instead of scrolling the image history. It's the ComfyUI equivalent of a contact sheet in traditional photo workflows - one image, easy to screenshot, easy to share for feedback.
Installing it
Through ComfyUI Manager: search ComfyUI-Apt_Preset and install. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
Run install.bat on Windows (or install requirements.txt yourself elsewhere) and restart ComfyUI. lay_ImageGrid doesn't need any external models - it's pure image compositing, so once the pack imports cleanly you're set.
Troubleshooting
ComfyUI-Apt_Preset is a sprawling pack with a lot of nodes and dependencies bundled together, and that combination is the one place packs like this tend to break: a Reddit thread from a user debugging an unrelated custom node shows ComfyUI-Apt_Preset itself throwing IMPORT FAILED in their console. If the pack (and therefore this node) doesn't show up after install, check the terminal output on ComfyUI startup for the actual missing-package error rather than guessing, and re-run the install script.
For the node itself, the main gotcha is batch-size mismatch: if your rows×cols doesn't match your batch count, you'll either lose images or get blank cells, so count your batch before setting the grid. And remember batch_img wants a genuine batch tensor - if you're combining images from separate, disconnected branches of your graph rather than one batched generation, you'll likely need a batch-combining node first to merge them into a single IMAGE batch before this one will treat them as a set.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| batch_img | IMAGE | — | |
| rows | INT | 21–16 | — |
| cols | INT | 21–16 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |