Nodes/StableZero123-comfyui/SDZero ImageSplit
ComfyUI Node

SDZero ImageSplit

Chop one image into a grid of tiles

By deroberon·Created 3 years ago·Updated 2 years ago· 181
SDZero ImageSplit
  • images
  • IMAGE
columns2
lines3

This one does exactly what it says: take a single image, cut it into an even grid, and hand you back each cell as its own frame. Give it a number of columns and a number of lines and it slices the picture into columns × lines equal tiles, stacked into an image batch you can save or process one by one.

It ships inside a 3D/novel-view pack (deroberon's StableZero123), and that's where it earns its keep - but don't let the packaging fool you. Nothing about splitting an image into a grid is specific to 3D. If you googled your way here because you have a contact sheet, a sprite sheet, a 2×2 collage, or any tiled output and you just want the individual cells back, you're in the right place. It's a plain, useful grid-splitter that happens to live in an odd neighborhood.

Why it exists (the 3D story)

The reason it was written: the Stablezero123 node in the same pack outputs its six generated camera angles as one tiled image - three rows, two columns. On its own that grid isn't much use; you want the six views as six separate frames. That's precisely why ImageSplit's defaults are columns 2, lines 3 - run the Stablezero123 output straight into it and you get your six clean views out the other side. The two nodes are meant to sit next to each other.

But the defaults are just defaults. Point it at any image and any grid and it'll happily carve that up too.

How it works

It's mechanical, not magical - no model, no weights, nothing to download for this node itself. It reads the width and height of your incoming image, divides that region into columns across and lines down, and cuts. Each tile becomes one frame in the output batch, read left-to-right, top-to-bottom.

Because the cut is purely arithmetic, one thing follows: your grid numbers have to match how the image is actually laid out. Tell it 2×3 on an image that's really a 4×4 sprite sheet and you'll get six ugly slices straight through your content. Get the grid right and it's clean.

The inputs and output

There are only three inputs and two of them are the whole point:

  • images - the image to slice (IMAGE).
  • columns - how many vertical divisions. Default 2, range 1–100.
  • lines - how many horizontal divisions. Default 3, range 1–100.

The output is a single IMAGE - but it's a batch of tiles, not one picture. Wire it into a Save Image and you'll get each cell written out as its own file (six files with the defaults). Anything downstream that accepts an image batch - an upscaler, a preview, a further process node - will see all the tiles.

Installing it

Same pack as everything else here. In ComfyUI Manager, search "StableZero123-comfyui" and install. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/deroberon/StableZero123-comfyui

Then restart ComfyUI and the SDZero ImageSplit node shows up. There's no separate model download for this node - the weight-pulling step only applies to the Stablezero123 node in the pack, not this one.

Where people get burned

Mostly it's the grid math. The split is into equal tiles, so if your image dimensions don't divide cleanly by your column/line counts, expect the cut lines to land a pixel or two off - fine for feeding another process, occasionally annoying if you need pixel-perfect crops. And the usual reminder: the numbers must match the real layout of the source, or you'll bisect your subjects instead of separating them.

Worth stating plainly, since it colors the whole pack: this is an old, small, experimental utility rather than a maintained tool. For the narrow job of "cut this grid into cells" that's completely fine - it's simple enough that there's little to break. Just don't expect padding controls, uneven splits, or overlap handling. It cuts an even grid, and that's the whole feature.

Categorytests

Inputs (3)

NameTypeDefaultDescription
imagesIMAGE
columnsINT21–100
linesINT31–100

Outputs (1)

NameTypeDescription
IMAGEIMAGE