Teeth Split Grid Image
Slice a 4- or 9-Grid Contact Sheet Into Individual Images
- image
- image_list
Somewhere in your pipeline someone hands you a contact sheet - four variants in a 2×2, nine in a 3×3 - and you need the individual tiles back. That's the whole job of Teeth Split Grid Image: take the grid image, cut it into equal pieces, save each one as a PNG, and hand you the pieces as a list of image tensors you can wire straight into a preview, an upscaler, or a comparison node.
It's part of ComfyUI-Teeth, a small single-author utility pack, and it's the node that pairs with the pack's Teeth Image Grid Lines - draw the grid with one, cut along it with the other. No models, no downloads, nothing to configure beyond the grid type and an output folder.
How it works
The node is a straightforward PIL crop loop. Pick grid_type - "4" gives a 2×2 split, "9" gives 3×3 - and it divides the image's width and height by the number of columns and rows, cropping equal sub-images from left to right, top to bottom. Each tile gets saved as {number}-{HHMMSSmmm}.png (numbered from 1, timestamped to the millisecond) into folder_path, and simultaneously converted back to a tensor and appended to the image_list output.
Note the numbered-from-1 filename versus the 0-based order in the list. Tile 1 is image_list[0], tile 5 is image_list[4]. If you're picking tiles by number, subtract one.
Inputs and outputs that matter
- image (IMAGE, required) - the grid to split.
- grid_type -
"4"(2×2) or"9"(3×3). - folder_path - where the PNGs land. Default
outputmaps to ComfyUI's output directory. - image_list (output) - a LIST of image tensors, one per tile, in reading order.
Wire image_list into Teeth Get Value By Index From List to grab one tile by index, or into a batch processor to run every tile through the same operations.
Where people get burned
Non-divisible dimensions drop pixels. The node uses integer division - a 1000px-wide image split 3-wide gives three 333px tiles and silently discards the leftover column. If your grid image isn't an exact multiple of the grid size, the right edge (or bottom row) quietly disappears. That's the single most common "where did my content go" report with this node.
Every run writes files. There's no "dry run." Run the workflow and it saves PNGs, timestamped so nothing overwrites - which means the folder accumulates tiles on every execution. If you only need the tensors, point folder_path somewhere disposable or clean it out periodically.
Squeeze assumptions. It expects a single image (squeeze()), so a batched input will misbehave. Feed it one grid image per node instance.
Install
ComfyUI Manager: search ComfyUI-Teeth. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/steelan9199/ComfyUI-Teeth
Restart ComfyUI. Dependencies are numpy, Pillow, and torch - already present in any working ComfyUI. One pack-level note: the README is in Chinese and the community footprint is close to zero, so treat the source in custom_nodes/ComfyUI-Teeth as your documentation when something behaves unexpectedly.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| grid_type | COMBO | 4 | 2 options: 4, 9 |
| folder_path | STRING | output | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image_list | LIST | — |