Split Image into Tiles
Split an image into tiles so ComfyUI stops OOM-ing on big renders
- image
- tiles
- rows
- columns
- overlap
- tiling_spec
You've got a 4K source image, a 6GB card, and a sampler that folds the moment you encode anything above 1024px. This node is the answer you're looking for: it slices an image into overlapping tiles, hands them to ComfyUI one at a time so VRAM stays flat, and (with its sibling Stitch Image Tiles) puts the whole thing back together with no visible seams. It's the manual, DIY version of what Ultimate SD Upscale does on the A1111 side, except you keep full control of the grid.
How it works
The math is honest and simple. Given rows, columns, and overlap (in pixels), the node works out a tile size as ceil((W + (columns-1) * overlap) / columns) and pads the image with zeros to make every tile land exactly. Tiles are then cut at a stride of tile_size - overlap, so the overlap region is genuinely shared between neighbours - that's what later lets the stitch node blend them seamlessly instead of drawing a grid line across your render.
Three things to actually set here:
- rows / columns - how many tiles per dimension. Default 2x2. For a 4K image on a tight card, 3x3 or 4x4 is more realistic; each tile is roughly
(W/cols + overlap)on a side. - overlap - the pixels of shared content between tiles, default 64, max 1024. Too little and you'll see seams at stitch time; too much and you're re-drawing the same pixels in every tile, which wastes VRAM and time. 64–128 is a sane starting point.
The node returns a list called tiles, plus rows, columns, overlap, and a tiling_spec wildcard. The spec is a little dict that Stitch Image Tiles reads so it doesn't need you to re-enter the grid settings - wire it straight across and you can't get rows/cols out of sync.
Wiring it into a workflow
The pattern the README pushes is: Split Image into Tiles → VAE Encode → KSampler → VAE Decode → Stitch Image Tiles. Because the tile output is a list, ComfyUI executes everything downstream of it once per tile instead of all at once. That sequential execution is the whole VRAM trick - your peak usage is roughly one tile plus one sampler, not the full resolution.
This is also how you'd do a tiled upscale: split at low res, run your upscaler or a ControlNet Tile pass on each tile, then let the stitch node auto-detect the upscaling and scale the overlap to match. It's more setup than dropping in Ultimate SD Upscale, but it's the same lineage, and you can see every seam decision instead of trusting a black box.
Installing it
It's on ComfyUI Manager - search for "ComfyUI-SplitImage" - or the old-fashioned way:
cd ComfyUI/custom_nodes
git clone https://github.com/QuigleyDown/ComfyUI-SplitImage.git
Then restart ComfyUI. That's genuinely it: no requirements.txt, no model downloads, no API keys. It's pure PyTorch (torch and torch.nn.functional), so it only needs what ComfyUI already ships.
Gotchas
Seams are the tell. If your stitched result shows faint gridlines, overlap is too small for your sampler's denoise - bump it up. And if Stitch Image Tiles throws "total tiles not divisible by rows*cols", you changed the grid after splitting; keep the spec wired through and it self-corrects. One thing to know: the pack is a small, low-traffic project by QuigleyDown - no community footprint to speak of - so you're using it at your own risk. But the source is short, readable, and does exactly what it claims.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| rows | INT | 21–100 | — |
| columns | INT | 21–100 | — |
| overlap | INT | 640–1024 | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| tiles | IMAGE | — |
| rows | INT | — |
| columns | INT | — |
| overlap | INT | — |
| tiling_spec | * | — |