Nodes/ComfyUI 1hewNodes/Image Grid Split
ComfyUI Node

Image Grid Split

Cut one image into a grid of tiles and get them back as a batch

By 1hew·Created about a year ago·Updated 8 days ago· 33
Image Grid Split
  • image
  • image
rows2
columns2
index0
alltrue

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 makes index irrelevant.
  • index - when all is false, this picks a single tile: 0-based from the top-left, negative from the end, Python-style. -1 is 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.

Category1hewNodes/image/crop

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
rowsINT21–10
columnsINT21–10
indexINT0-100–100
allBOOLEANtrue

Outputs (1)

NameTypeDescription
imageIMAGE