Nodes/ComfyUI-xiaozhuguang/小珠光 IS (图像分割)
ComfyUI Node

小珠光 IS (图像分割)

Cut your image into tiles without butchering the seams

By xiaozhuguang·Created 2 months ago·Updated a day ago· 56
小珠光 IS (图像分割)
  • image
  • mask
  • images
  • masks
  • split_data
  • merge_weights
split_x2
split_y2
overlap0

You have a big image and a GPU that can't sample it whole. The standard escape hatch is tiling: cut the image into chunks, process each chunk on its own, stitch them back. If you've ever done that with a raw crop, you know the ugly part - seams where two tiles meet, either a visible edge or a doubling artifact where the model re-invented the overlap. XiaozhuguangImageSplitter (小珠光 IS, for 图像分割) is the split half of that workflow, and it's built to make the merge clean.

Here's how it actually works: you give it an image, a number of columns (split_x), a number of rows (split_y), and an optional overlap in pixels. It cuts the image into a grid - up to 8×8 - and for every tile it also computes a feather mask: the overlap regions get soft weight gradients instead of a hard edge. Those two things travel together through whatever you do to the tiles, and when you feed them back into the pack's companion merge node (小珠光 IM), the feathered weights crossfade the seams so the stitch disappears. This is the tiled-upscaling pattern from the KB's upscaling essay, done with proper math instead of a naive crop.

Inputs worth knowing:

  • image - required. Also accepts a list, which is nice for batch processing.
  • split_x / split_y - grid dimensions, both 0–8, default 2. A 2×2 grid = 4 tiles; for very wide images you can split unevenly (e.g. 4 columns × 2 rows).
  • overlap - how many pixels tiles share at the edges, 0–256, default 0. For upscaling chains you almost always want some overlap - it gives the model context at the boundary so it doesn't hallucinate a seam. Start around 48–96px and tune up if your merge shows artifacts.
  • mask - optional. If you hand it a mask alongside the image, you get mask tiles back too, which is how you keep an inpaint region aligned while the tiles move through the graph.

Four outputs, and they're designed to be fed into the merge node in matching order:

  • images - the tiles (list).
  • masks - matching mask tiles if you provided a mask.
  • split_data - the bookkeeping structure that remembers the original layout and overlaps. This is what the merge node needs to reassemble the image.
  • merge_weights - the feather masks, one per tile (list).

The trap most people hit: don't reorder, drop, or independently upscale tiles to different sizes and expect split_data to still know where everything goes. The feather weights are computed for the tile grid you gave it, so the merge side assumes tiles came back in the same order and roughly the same dimensions. Keep the tiles and their weights in lockstep - that's the entire contract of this node.

Same install as the rest of the pack: ComfyUI Manager, search ComfyUI-xiaozhuguang, install, restart. No models, no pip packages. There's a Bilibili walkthrough in the README if you want the author's own demo of the split→process→merge flow. This node is the quieter, less hyped half of the tiling equation, but for high-res work where your sampler can't handle the full frame, it's the half that decides whether the result looks like one image or four squares pasted together.

Categoryxiaozhuguang

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
split_xINT20–8
split_yINT20–8
overlapINT00–256
maskoptMASK

Outputs (4)

NameTypeDescription
imagesIMAGE
masksMASK
split_dataSPLIT_DATA
merge_weightsMASK