Smart Grid Cutter ✂️
Cut that 3×3 grid into real frames without counting pixels
- image
- frame_0
- frame_1
- frame_2
- frame_3
- frame_4
- frame_5
- frame_6
- frame_7
- frame_8
- cols
- rows
- total_frames
- grid_info
You know the workflow: you generate one big 3×3 storyboard, or a 4×2 character turnaround sheet, and then you need each cell as its own image to feed into video, animation, or a LoRA dataset. Doing that with ComfyUI's built-in crop node means hand-counting pixels nine times, and the grid lines are never exactly where you think they are. Smart Grid Cutter is the node that looks at the image, finds the divider lines itself, and hands you back individual frames.
It's a small utility from iMind Studio, and it's honest about being one: it splits a grid image into up to nine cells, automatically if you let it. Zero model files, zero API calls, nothing to download beyond the node itself. If you've been manually cropping character sheets from the KB's turnaround-sheet playbook (generate a 2×2 or 3×3 grid, then use it as the ground truth for IP-Adapter or LoRA training), this is the step that stops being annoying.
How it works
The detection is pure image analysis, no ML involved. The node converts your image to grayscale, then scans rows and columns looking for uniform bands - divider lines are low-variance strips whose brightness contrasts with the cells on either side. When it finds enough of them, it knows where the grid is.
In auto mode it runs that detection and, if the result looks wrong (no dividers found at all), falls back to an aspect-ratio guess: square goes 3×3, wide goes 4×2, portrait-ish goes 3×2. In a preset mode like 3x3 it still tries smart detection first and only uses the preset as a sanity check - so it'll ride the actual divider positions when they're detectable and fall back to simple equal division when they're not.
One honest gotcha from reading the source: the divider_threshold input is effectively vestigial in the current version. The code accepts it, the tooltip says lower = more sensitive, but the detection no longer uses it - that's the reality of how the divider scan is written now. Don't go turning it down expecting different behavior; the one that actually matters is min_divider_width, which filters out speckle that's too thin to be a real grid line.
The inputs that matter
- mode -
autois the selling point. Pick a preset (3x3,4x2,3x2,2x2) when you already know the layout and want the fallback to be deterministic, orcustomwithcustom_cols/custom_rowsfor something the presets don't cover. - padding - pixels trimmed from each cell edge after cutting. Divider lines are rarely clean single pixels; the default of 2 clears the fuzzy edge artifacts.
- align_to - snaps each cell's dimensions down to a multiple of this (default 16). That's the setting for video pipelines, which want frame dimensions that divide cleanly. Set it to 1 if you want every pixel preserved.
What you get back
Nine frame_0 through frame_8 IMAGE outputs, plus cols, rows, total_frames, and a grid_info string that tells you which detection path ran. Wire any frame into your video, upscale, or detailing chain.
Watch the placeholder trap: the node always returns nine outputs, so a 2×2 grid pads the remaining five with tiny 16×16 black images. total_frames is the real count, and grid_info will say 4 frames - check it before you batch-save, or you'll silently write black tiles to disk.
Install
ComfyUI Manager is the easy path - search "SmartGridCutter". Or the manual way:
cd ComfyUI/custom_nodes/
git clone https://github.com/veoreg/ComfyUI-SmartGridCutter.git
Then restart ComfyUI. That's the whole install: no requirements, no models, nothing. (The README's clone URL still points at an old imind-studio org - the repo actually lives at veoreg, and Manager resolves either way.) You'll find it under image/transform.
Fair warning: this is a brand-new, barely-adopted node (it shipped as a single v1.0.0 commit), so you're getting a useful tool, not a battle-tested one. For a fixed layout you could always hand-crop instead - but for auto-detecting grids that change, it earns its keep.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mode | COMBO | 6 options: auto, 3x3, 4x2, 3x2, 2x2, custom | |
| custom_colsopt | INT | 31–10 | — |
| custom_rowsopt | INT | 31–10 | — |
| divider_thresholdopt | FLOAT | 0.150.01–0.5 | Brightness difference threshold for detecting divider lines. Lower = more sensitive. |
| min_divider_widthopt | INT | 21–20 | Minimum width in pixels for a line to be considered a divider. |
| paddingopt | INT | 20–20 | Pixels to trim from each cell edge after cutting. |
| align_toopt | INT | 161–64 | Align cell dimensions to this value (16 for video compatibility). |
Outputs (13)
| Name | Type | Description |
|---|---|---|
| frame_0 | IMAGE | — |
| frame_1 | IMAGE | — |
| frame_2 | IMAGE | — |
| frame_3 | IMAGE | — |
| frame_4 | IMAGE | — |
| frame_5 | IMAGE | — |
| frame_6 | IMAGE | — |
| frame_7 | IMAGE | — |
| frame_8 | IMAGE | — |
| cols | INT | — |
| rows | INT | — |
| total_frames | INT | — |
| grid_info | STRING | — |