Auto Grid / Stitch Advanced (multi-image)
Stitch a 4×4 grid, then regenerate just one cell of it
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- image_7
- image_8
- image_9
- image_10
- image_11
- image_12
- image_13
- image_14
- image_15
- image_16
- grid
- width
- height
- mask
If this pack has a flagship, this is it. You feed it up to 16 images - image_1 is top-left, row-major from there - it stitches them into a clean R×C grid at a target total size, and then it does the thing the other stitch nodes don't: it hands you a mask that lines up exactly with the grid, so you can regenerate one cell and leave the other fifteen pixel-identical. That last capability is a workflow people genuinely build around, and it's why you'd pick this over ComfyUI's built-in Stitch Images.
Auto vs. manual
The two modes cover the two ways people actually want grids to look:
auto- preserve every image, no cropping. This is exactly ComfyUI's built-in Stitch Images withmatch_image_size: each image is resized to share its neighbor's edge, aspect preserved, lanczos, no padding. Your inputs are different sizes and ratios? Doesn't matter - you still get one clean filled rectangle. Use this when content is king and you don't want to lose a single pixel of it.manual- pick one targetratio(1:1, 3:4, 4:3, 2:3, 3:2, 4:5, 9:16, 16:9) and every image is center-cropped to it first, then tiled into a uniform grid. Cropping is always a center crop - it trims the long side, never distorts. Use this when you want every cell to be exactly the same shape, like a tidy 3:4 contact sheet. Theratiodropdown only exists in manual mode, which trips up exactly no one after the first five minutes.
The picker and the ports
Rows and columns are set with a 4×4 picker drawn inside the node: hover to preview a block, click to lock the layout. On this node, choosing a layout also adds or removes the image_i input ports to match - pick 2×1 and you get two inputs, pick 3×3 and you get nine, max 4×4 = 16. Leave a port empty and that cell renders as black, so a 2×2 grid with only three images just shows one black square instead of erroring out.
The mask: the reason to pick this node
Alongside grid, width, and height, the outputs include a mask. Encode the grid to a latent, pipe this mask into SetLatentNoiseMask, and a partial-denoise KSampler will regenerate only the cells you select while everything else stays exactly as it was. The mask_cells string decides which cells DENOISE - row-major, 1-indexed, e.g. 2,4-6 - and you can set it from the picker's mask toggle or type it by hand. Empty means "denoise everything," which makes a wired-but-unconfigured mask a harmless no-op.
This is classic masked-inpainting territory, and the reason it's still worth doing in 2026: a whole-frame edit model rewrites pixels you didn't touch, and the drift compounds across a chain of edits. A mask keeps the untouched cells bit-identical - the one thing instruction-editing models still can't promise. The pack README even lays out the natural loop: assemble scenes with this node → run the grid through an img2img pass → break it back apart with the sibling Carousel Split node.
The inputs that matter
mode, ratio (manual only), megapixels (target total grid size, default 4), scale_method (lanczos default), and the image_i ports themselves. That's genuinely the whole list - the defaults are good enough to just click a layout and start.
Install
No model files, no extra dependencies: torch and numpy only, both already present in ComfyUI. Install via ComfyUI Manager (search "GridSplit"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/workordie/ComfyUI-GridSplit
Restart ComfyUI, then hard-refresh the browser (Ctrl+Shift+R). The in-node picker is a frontend widget served from the pack's web/ folder, and a cached page won't show it - no picker and no dynamic ports after install means you skipped the reload, not that the node is broken.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| rows | INT | 21–4 | — |
| cols | INT | 21–4 | — |
| mode | COMBO | auto | auto = preserve every image, no cropping (cells can differ). manual = center-crop every image to one ratio for a uniform grid. |
| ratio | COMBO | 3:4 | Manual mode only: the aspect every image is center-cropped to before stitching. |
| megapixels | FLOAT | 4.00.1–100 | Target TOTAL size of the stitched grid. |
| scale_method | COMBO | lanczos | 5 options: lanczos, bicubic, area, bilinear, nearest-exact |
| mask_cellsopt | STRING | Cells to DENOISE for the MASK output (row-major, 1-indexed, e.g. '2,4-6'). Others are preserved. Empty = denoise all (mask is a no-op). Set via the picker's mask toggle, or by hand / from an app. | |
| image_1opt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| image_5opt | IMAGE | — | |
| image_6opt | IMAGE | — | |
| image_7opt | IMAGE | — | |
| image_8opt | IMAGE | — | |
| image_9opt | IMAGE | — | |
| image_10opt | IMAGE | — | |
| image_11opt | IMAGE | — | |
| image_12opt | IMAGE | — | |
| image_13opt | IMAGE | — | |
| image_14opt | IMAGE | — | |
| image_15opt | IMAGE | — | |
| image_16opt | IMAGE | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| grid | IMAGE | — |
| width | INT | — |
| height | INT | — |
| mask | MASK | — |