Auto Grid / Carousel Split
Split any stitched image back into its panels
- image
- panels
- count
- preview
Somebody posts a 2×2 grid of variations, or you saved a "carousel" that's really five panels glued side by side, or you stitched a collage to run it through an edit pass and now you want the pieces back. That's this node's entire job: feed it the combined image and it figures out where it was divided and cuts it back into panels. No model, no weights, no GPU requirement, any resolution - it's just arithmetic on pixels.
It's one of three nodes in the ComfyUI-GridSplit pack, and the family resemblance is worth knowing: the other two do the reverse, stitching images into grids. Split is the un-stitch. The loop people actually run is stitch → edit the whole grid at once → split back into per-panel results, and this node closes that loop.
How it finds the seams
Nothing learns anything here. The node looks at the grayscale version of your image and auto-dispatches to one of two regimes:
- Guttered layouts. If the image contains solid separator bands - black, white, or any near-flat full-span row or column - it trims the outer frame and runs a recursive "guillotine" cut: find the widest solid band, cut there, repeat on each side. Because only near-solid bands qualify as gutters, content edges (faces, text, a pool next to a chalkboard) never trigger a cut. This is what makes irregular "bento" collages work, where different regions have completely different split lines.
- Seamless grids. When panels abut with no gutter at all, it falls back to global row×column seam detection: measure per-row and per-column pixel differences, find the strong discontinuities, and cut there. The seams are clustered and relative-suppressed, so real grid lines win over content edges that happen to be high-contrast.
The author's own test cases say it handles: a 2048² 2×2 → four clean tiles; a 2728×1536 uneven 1×3 → three panels 928/976/824 px wide; and a 3344×1880 irregular 10-panel collage including a column that's itself split in two. If it can do the bento one, your 2×2 is a warm-up.
The inputs that matter
You'll realistically touch three of the four:
image- the stitched image. The only required input; everything else has a sane default.sensitivity(default 1, range 1–10) - splitting aggressiveness. Only affects the seamless path: higher values catch weaker, subtler seams. Gutterless grid not splitting? This is the knob.min_panel_px(default 64) - rejects any split that would leave a panel smaller than this.edge_trim(default 0) - shaves N pixels off each interior seam edge. Set it to a few pixels when your panels carry a blend, a halo, or leftover anti-aliased gutter fringe.
What comes out
Three outputs:
panels- a list of images, each tile at its native size. It's a list rather than one batch tensor because panels come in different sizes; SaveImage handles it and writes one file per tile.count- how many panels were detected.preview- your input with the detected boxes drawn in red. Check this before you save anything; it's the cheap way to see whether the node hallucinated a seam.
Two behaviors worth knowing. First, a non-grid image passes through unchanged as a single panel - feeding it a plain photo is a no-op, not a crash. Second, if count looks wrong, preview tells you why at a glance: a missing box on a seamless seam means raise sensitivity; boxes hugging content instead of gutters means your separator isn't solid enough to qualify, so it took the seamless path and misread the layout.
Install
The whole pack has zero dependencies beyond torch and numpy (both already in ComfyUI) and downloads no model files. Install through ComfyUI Manager by searching "GridSplit", or:
cd ComfyUI/custom_nodes
git clone https://github.com/workordie/ComfyUI-GridSplit
then restart ComfyUI. One genuine trap: the repo was previously named ComfyUI-AutoGrid, and parts of the README (and its pyproject) still say so - the clone URL in the README points at the old name. Use the GridSplit URL above, or let Manager resolve it for you.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| sensitivity | FLOAT | 1.01–10 | Splitting aggressiveness. 1 = standard (recommended). Higher = split more eagerly / catch weaker seams. |
| min_panel_px | INT | 648–8192 | Reject any split that would make a panel smaller than this. |
| edge_trim | INT | 00–256 | Shave N px off each interior seam edge (kills blend/halo/leftover gutter). |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| panels | IMAGE | — |
| count | INT | — |
| preview | IMAGE | — |