- image
- tiles
Grids are the cheapest way to compare a bunch of generations at once - one image, nine results, instant A/B. The problem comes after: you picked a winner, and now you need it as an actual individual image, not a cell in a montage. KIE Grid Slice is the un-gluing step. Feed it a 2×2, 2×3, or 3×3 grid and it splits it back into separate tiles on the batch dimension.
What makes it interesting is why this pack ships one: it's the downstream half of the pack's own grid workflow, where Nano Banana generates a grid and this node slices it into individual assets that can then feed a video node or get saved one by one. It's also a reminder of the KIE pack's personality - for a cloud-API pack, a local utility with zero credits and zero network calls is a refreshing change of pace. It's pure tensor math on your own machine.
How it works
It slices a single IMAGE into equal tiles using your grid spec. The logic handles real-world grid quirks: outer_crop_px trims a border off each side before slicing (useful if your grid has a frame or padding baked in), and gutter_px removes the spacing between tiles inside the grid. Ordering is configurable, and it can process just the first image of a batch or every image.
The inputs that matter
- image - the grid image. One grid in, tiles out.
- grid -
2x2(default),2x3, or3x3. - outer_crop_px - pixels to trim from each edge first. Default 0; set it when the grid has a visible border.
- gutter_px - pixels between tiles to remove. Default 0; set it if the generator left gaps.
- order -
row-major(default) orcolumn-major. Changes the tile ordering in the output batch, which matters if you're indexing tiles downstream. - process_batch -
first(default) orall.allslices every image in the input batch;firstonly slices the first. Keep the default unless you know you want the batch exploded.
Output: tiles - an IMAGE batch with 4, 6, or 9 tiles per processed image.
Installing
Installs with the pack. ComfyUI Manager: search "ComfyUI Kie API". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/gateway/ComfyUI-Kie-API
# restart ComfyUI
No models, no key needed - this node never touches the API, so it works even if you haven't configured kie_key.txt.
Where people get burned
The math is the trap: if outer_crop_px or gutter_px is too big for the image, the node errors out with a clear "too large for the input" message - dial them back. If your tiles come out with stray borders or seams, you misjudged the gutters, not the node. And remember the output is a batch: tile order follows your order setting, so if you're feeding tiles into something positional downstream, double-check you didn't need column-major. It's a small node, but it's the exact thing that turns a comparison grid into usable assets.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| gridopt | COMBO | 2x2 | 3 options: 2x2, 2x3, 3x3 |
| outer_crop_pxopt | INT | 00–8192 | — |
| gutter_pxopt | INT | 00–8192 | — |
| orderopt | COMBO | row-major | 2 options: row-major, column-major |
| process_batchopt | COMBO | first | 2 options: first, all |
| logopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| tiles | IMAGE | — |