PDcrop: Image Grid
Image Grid: cut a 3x3 emoji sheet into individual images
- image
- IMAGE
PDcrop: Image Grid (ImageGridSplitter) splits one image into a rows-by-columns grid of equal tiles and outputs them as a single IMAGE batch. Default is 3×3 - because its real job is slicing up those emoji sticker sheets and 九宫格 (nine-grid) memes you find everywhere - but it'll happily do 4×5 or 1×10.
Why you'd reach for it
The output being a batch, not a list of separate images, is the whole point. A batch of tiles flows straight into whatever nodes come next in a loop - VAE decode, save each tile, feed each tile to a detailer pass, run them through a captioner. The README's use case is exactly that: emoji packs and grid memes that you want processed tile-by-tile, ideally in parallel. This slots into the same "give the loop its inputs" niche as a folder loader, just for a single source image instead of a directory.
How it works
The math is straightforward: cell height is image height divided by rows, cell width is width divided by columns, and it slices top-to-bottom, left-to-right into a stack. The one thing to know - and it's the usual integer-division gotcha - is that if your image dimensions don't divide evenly by the grid size, the rightmost column and bottom row get truncated leftovers. A 1000px-wide image split into 3 columns gives you tiles of 333px, not a clean third each.
Inputs and output
image- the source IMAGE tensor.columns(1–100, default 3) androws(1–100, default 3) - the grid. Set both to 1 and it's a pass-through, which is useful for testing.
Output is a single IMAGE output carrying the whole batch. Note there's no corresponding mask output - if you need per-tile masks you'll derive them downstream or reach for the pack's mask-splitting node instead.
Installing
Part of the 7BEII/Comfyui_PDuse pack. ComfyUI Manager → search "Comfyui_PDuse" → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/7BEII/Comfyui_PDuse
cd Comfyui_PDuse
pip install -r requirements.txt
Restart after. No models to download; the pack's requirements are Pillow, numpy, opencv-python and the usual suspects, with torch supplied by ComfyUI.
Gotchas
The uneven-division truncation is the main trap - crop the source to a multiple of your grid first if you need exact tiles. And if your sticker sheet has irregular spacing or the tiles aren't a clean grid (borders, gutters, varying cell sizes), a fixed-grid splitter will shave edges off your stickers. That's what the fancier mask-based splitter in the same pack is for; this node assumes a clean, regular grid and punishes you mildly when it isn't one.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| columns | INT | 31–100 | — |
| rows | INT | 31–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |