Image Grid Split
Cut one image into a grid of tiles and get them back as a batch
- image
- image
Tile-based upscaling, storyboard grids, contact sheets, and "I generated one big image and now I want each panel separately" all start the same way: chop an image into a grid. Image Grid Split does the chopping. Give it rows and columns, and it returns every tile as a single image batch - no per-cell cropping nodes wired in a loop.
The math is what you'd hope: the image is divided into rows x columns equal cells, walking row by row, left to right. Any remainder in the division just means the tiles are sized by height // rows and width // columns, so uneven splits leave the leftover pixels uncropped on the edges. If your grid doesn't divide cleanly, tile sizes may differ by a pixel or two - usually invisible, occasionally annoying.
The inputs
- image - the source.
- rows / columns - grid dimensions, each 1-10. The two knobs that define the whole operation.
- all -
true(default) returns every tile as a batch and makesindexirrelevant. - index - when
allisfalse, this picks a single tile: 0-based from the top-left, negative from the end, Python-style.-1is the bottom-right tile.
Outputs: image. With all on, it's the full tile batch; with all off, a single-image batch holding just the requested cell. Both are batch tensors, so either feeds a per-tile processor the same way.
When you'd reach for it
The obvious home is tile-based upscaling - split a big render into tiles, run each through a detail-enhancing pass, and merge them back (that's where a tile-merge or stitch node takes over). It's also the natural splitter for grids you generated as one canvas: character sheets, storyboards, 2x2 prompt grids. And because the output is a proper batch, you can send all tiles through a batch-aware sampler or processor in one run instead of node-per-tile.
Installing it
ComfyUI Manager, search "ComfyUI 1hewNodes", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/1hew/ComfyUI-1hewNodes
Standard pack note: the repo's requirements.txt pulls heavy dependencies (opencv, rembg, ultralytics, transformers...) for its detection nodes; this crop node is plain tensor slicing and ignores all of it.
Gotchas
Uneven division is the classic surprise - a 1024px image split into 3 columns gives you 341px tiles with a leftover pixel column, which is why people doing serious tiling prefer the pack's Image Tile Split (which handles exact sizing and overlap) over a raw grid. Also remember index only does anything when all is false - leave all on and the index is silently ignored, which trips up exactly one person per year. And it splits every frame in the input batch, so a batch in gives a multiplied batch out.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| rows | INT | 21–10 | — |
| columns | INT | 21–10 | — |
| index | INT | 0-100–100 | — |
| all | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |