Nodes/ComfyUI-JakeUpgrade/Split Image Grid JK๐Ÿ‰
ComfyUI Node

Split Image Grid JK๐Ÿ‰

Chop a grid back into individual tiles

By jakechaiยทCreated 2 years agoยทUpdated 3 months agoยท 147
Split Image Grid JK๐Ÿ‰
  • image
  • images
โ—„grid_sidetrueโ–บ
โ—„grid_side_num1โ–บ
โ—„crop_excesstrueโ–บ

If you generate grids - four heads in a 2ร—2, nine poses in a 3ร—3 - you eventually want the individual cells back. Split Image Grid JK is the reverse of Make Image Grid JK: it takes one tiled image and slices it into separate tiles, returned as an image batch you can feed to per-tile processes like an upscaler or a face-fix pass.

How it works

You give it the grid image and one number: the count along a side. grid_side is a toggle - rows or columns - and grid_side_num is how many of that side your grid has. Tell it the grid is 2 rows and it derives the columns from the image geometry (2ร—3, 2ร—2, whatever fits), slices each cell, and concatenates the results into an IMAGE batch, one image per tile.

The crop_excess toggle is the safety valve. Grids are rarely pixel-perfect: a 2ร—3 grid built from odd-sized tiles leaves a sliver of leftover pixels at the edge. With crop_excess on (the default) it crops those few stray pixels so the math divides evenly. With it off, an unevenly divisible image raises an error telling you the exact dimensions that would work - which is a deliberate choice so you notice the mismatch instead of silently losing content.

The node was substantially hardened in the pack's v2.2.3 update: guaranteed minimum row/column counts (no more divide-by-zero), boundary checks so crops never exceed the image, and graceful fallbacks if a crop fails. Old versions could blow up on weird grids; current ones mostly don't.

Inputs and outputs

  • image - the grid to split.
  • grid_side - rows vs columns.
  • grid_side_num - the count of that side. Minimum 1.
  • crop_excess - crop the remainder (on) or error on uneven grids (off).
  • images - the tiles as an IMAGE batch.

Installing it

Ships in ComfyUI-JakeUpgrade:

  • ComfyUI Manager โ†’ search "JakeUpgrade" โ†’ install โ†’ restart.
  • Or:
cd ComfyUI/custom_nodes
git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
cd ComfyUI-JakeUpgrade
pip install -r requirements.txt

Windows portable: run install.bat or ../../../python_embeded/python.exe -s -m pip install -r requirements.txt.

Common issues

  • Wrong side count. Set grid_side_num to the number of rows or columns, not the total tile count. A 2ร—3 grid needs 2 with rows selected or 3 with columns selected - not 6.
  • Tiles come out wrong-shaped. If your grid has an aspect ratio that doesn't split into the count you gave, crop_excess trims the edge slivers to force divisibility. That's usually what you want; if a pixel or two of content matters, resize the grid first or flip crop_excess off to get a loud error instead of a silent trim.
  • It returns a batch, not a list of nodes. Tiles come out as one IMAGE wire. Feed that into batch-aware nodes (upscalers, batch save). If you need each tile as a separate value on its own wire, this isn't the node for that.

The natural loop: generate a grid, split it, upscale or refine each tile individually, then Make Image Grid JK reassembles the improved grid. That split-process-rejoin pattern is where this node shines.

Category๐Ÿ‰ JK/๐Ÿ›ฉ๏ธ Image

Inputs (4)

NameTypeDefaultDescription
imageIMAGEโ€”
grid_sideBOOLEANtrueโ€”
grid_side_numINT11โ€“8192โ€”
crop_excessBOOLEANtrueโ€”

Outputs (1)

NameTypeDescription
imagesIMAGEโ€”