Image Grid 4x4
Sixteen inputs, one contact sheet — the grid node with zero guesswork
- image_r1c1
- image_r1c2
- image_r1c3
- image_r1c4
- image_r2c1
- image_r2c2
- image_r2c3
- image_r2c4
- image_r3c1
- image_r3c2
- image_r3c3
- image_r3c4
- image_r4c1
- image_r4c2
- image_r4c3
- image_r4c4
- IMAGE
Some nodes exist to do clever things. Image Grid 4x4 exists to tile sixteen images into a single contact sheet, and it does exactly one thing, exactly as labeled. If you've ever wanted to eyeball sixteen variants, seeds, or LoRA weights side by side and then drag one result into a folder - this is the node. It's part of the Open Creative Studio Nodes pack and, per the README, it's a rework of Kijai's Image Grid Composite 3x3 from ComfyUI-KJNodes, expanded from nine slots to sixteen.
How it works
The mechanism is pure tensor math, no image library involved. Each of the sixteen inputs (image_r1c1 through image_r4c4 - row-column addresses) is an IMAGE tensor. The node concatenates each row's four images horizontally along the width dimension (torch.cat on dim 2), then stacks the four resulting rows vertically along the height dimension (dim 1). What comes out is one IMAGE tensor with the same channel count, four times the width of a single input, four times the height.
Because it's raw torch.cat, there's a constraint that matters: every image in a row has to share the same height, and every row has to share the same width, or the concatenation errors out. Feed it sixteen uniform images (say, sixteen 1024×1024 generations from the same sampler) and it's effortless. Feed it a mix of portrait and landscape and it will throw.
Inputs and output
All sixteen inputs are required - image_r1c1 through image_r4c4. There are no optional inputs and no widgets. You wire all sixteen or you don't use this node. The naming is self-documenting: r1c1 is top-left, r4c4 is bottom-right, and the pattern is obvious once you've wired the first row.
Output is a single IMAGE - the composed grid - which you can preview, save with the pack's Image Saver, or feed into any downstream image node.
Install
ComfyUI Manager → "Open Creative Studio Nodes" → install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/alessandroperilli/OCS_Nodes
No dependencies beyond ComfyUI's own stack, no models to download.
Where people get burned
- All sixteen are mandatory. A missing input breaks the workflow, and since there's no "optional" version, you can't build a 15-image grid. If you don't have exactly sixteen, you'll have to feed a duplicate or rethink.
- Mismatched sizes error out. torch.cat won't politely letterbox for you. If you're compositing outputs from different models or resolutions, normalize them (resize/crop) before they hit this node.
- It doesn't resize to fit. The grid is the literal sum of its parts, so sixteen 2MP images produce a 4K×4K monster that some viewers will choke on. For a lightweight comparison grid, generating at 1MP and letting the grid node make the contact sheet is the sane path.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| image_r1c1 | IMAGE | — | |
| image_r1c2 | IMAGE | — | |
| image_r1c3 | IMAGE | — | |
| image_r1c4 | IMAGE | — | |
| image_r2c1 | IMAGE | — | |
| image_r2c2 | IMAGE | — | |
| image_r2c3 | IMAGE | — | |
| image_r2c4 | IMAGE | — | |
| image_r3c1 | IMAGE | — | |
| image_r3c2 | IMAGE | — | |
| image_r3c3 | IMAGE | — | |
| image_r3c4 | IMAGE | — | |
| image_r4c1 | IMAGE | — | |
| image_r4c2 | IMAGE | — | |
| image_r4c3 | IMAGE | — | |
| image_r4c4 | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |