My Region Boundary Effect
White region outlines in one step — MyRegionBoundaryEffect reads your image like a map
- image
- IMAGE
MyRegionBoundaryEffect takes an image and draws white lines along the boundaries of its distinct regions - think posterized map, technical illustration, or that "segmented" look you see on diagram thumbnails. You give it an IMAGE, it returns an IMAGE with fine white strokes tracing where the image's color-and-texture regions change. Nothing is generated or recolored; the original pixels stay exactly as they were, just outlined. It's a stylization node, the sibling of the MyJigsawPuzzleEffect in the same pack, and it shares that pack's whole personality: small, CPU-only, no models, one clear trick.
Where would you actually reach for it? It's a cheap route to an "exploded diagram" or technical-drawing aesthetic without running anything heavy. Throw it before an upscaler and the region boundaries become part of the illustration. It's also genuinely useful as a preview - seeing where the image considers one region to end and another to begin can tell you whether a subject is going to be easy to mask or inpaint. But keep expectations honest: this is a line-drawing effect, not a segmentation tool you can extract masks from.
How it works
Under the hood it runs SLIC superpixel segmentation from scikit-image. SLIC clusters nearby pixels into compact, roughly perceptually-uniform blobs - regions that share color and texture. The node then walks the result pixel by pixel and, wherever a pixel's region label differs from its neighbor above or to the left, it stamps a white dot. Multiply that over the whole image and you get the boundary network. line_width simply stamps the dot in a small square so lines get thicker.
This is the classic "one real dependency hidden in a tiny pack" situation. The node imports skimage.segmentation.slic at runtime, but the pack's requirements.txt only lists numpy, Pillow, and torch. If your ComfyUI environment doesn't already have scikit-image (many do, because other packs pull it in - but it's not guaranteed), the node raises an ImportError with a hint to install it. That's the standard ComfyUI dependency story: no isolation between packs, so whether this works out of the box is a coin flip on what else you've installed.
The inputs that matter
Everything is in required and only the image is a tensor:
segments(10–500, default 100) - the target number of superpixels. Higher means more, smaller regions and a denser, busier boundary web; lower means big chunky territories.compactness(1–100, default 10) - how regular the regions are. Low values let boundaries hug real edges (trees, fur, hair get lots of little lines); high values force rounder, more even blobs that care less about fine detail.line_width(1–10, default 1) - stroke thickness of the white boundary lines. At 1 it's delicate; at 10 it's heavy cartoon outlining.
The single output is an IMAGE, ready for PreviewImage, SaveImage, or another effect node. Note there's no color or style choice - the lines are always white.
Installing it
Same pack as the jigsaw node: Jigsaw Puzzle Effect Plugin (comfyui-PuzzleCrack-Effect). ComfyUI Manager can often find it by searching "Puzzle", but this one's registry metadata is incomplete (blank publisher ID), so Manager may come up empty. The guaranteed path:
cd ComfyUI/custom_nodes
git clone https://github.com/111496583yzy/comfyui-PuzzleCrack-Effect
Restart ComfyUI, and remember the real install step: scikit-image. If the node errors with an import message, install it into ComfyUI's Python environment:
pip install scikit-image
No model files, no downloads beyond that.
Troubleshooting
The failure mode you'll actually hit is the missing scikit-image dependency above - that's the one to solve first. After that, the quirks are inherited from the pack: like its sibling, it only processes the first frame of a batch (image[0]), so keep inputs to single images. And on large images the boundary detection is a per-pixel Python loop, so a 2048px image takes a few seconds - not a hang, just a small pack doing a naive thing. If you want something faster or with mask output, reach for a proper segmentation pack instead; this one is for the look.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| segments | INT | 10010–500 | — |
| compactness | INT | 101–100 | — |
| line_width | INT | 11–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |