๐ Region Preview
See your multi-region layout before you pay for N sampler passes
- base_image
- masks
- combined_mask
- checker
- mask_adjust
- feather
- opacity
Here's the annoying thing about multi-region inpainting: you only see whether your regions actually line up and layer sensibly at the very end, after every region has gone through its own KSampler pass. Get the layering wrong and you've burned N generations to discover it. This node exists so you don't have to.
RegionPreview shows you, before any generation, exactly what BBoxMultipleAssembler will produce - the combined mask and a coloured-outline "checker" view of each region sitting on your base image. It's a side-channel branch you hang right after RegionMaskList or MaskSplitRegions; it reads the same mask list, never touches the list that goes to the real pipeline, and its preview is the final render because it reuses the assembler's exact math.
How it works
Under the hood it imports the assembler's own helpers - _grow_shrink_fast, _feather_fast, _resize_mask and the palette - so mask_adjust, feather and opacity are applied identically in the preview and in the final composite. No second implementation to drift out of sync. Because the masks it takes are full-size (the normal output of RegionMaskList / MaskSplitRegions, already positioned on the canvas), it needs no coordinates at all - just the base image and the mask list.
It doubles as a tuning point: set mask_adjust / feather / opacity here, eyeball the result, then wire those same values into the assembler. The node conveniently passes its three widgets through as outputs (mask_adjust, feather, opacity), so you can convert the assembler's widgets to inputs and just drag the wires over. One dial, one preview, both nodes.
Inputs and outputs
base_image- the image your regions sit on.masks- the regional masks (full-size), as a list.mask_adjust- grow (+) or shrink (โ) each mask on the full canvas, default 0.feather- Gaussian edge softening, default 8.opacity- per-layer opacity, default 1.0.
Outputs: combined_mask (the union with your adjustments applied, exactly like the assembler), checker (base image plus a coloured outline and light fill per region), and the three pass-through values for rewiring into the assembler.
Installing it
Ships in the Aioli Nodes pack. ComfyUI Manager โ search "Aioli Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/aiolicollective/aioli-nodes
Restart ComfyUI; it's under Aioli Nodes. Pure torch, no extra dependencies.
What it won't tell you
Two honest caveats. order is deliberately not exposed here - it's a dropdown on the assembler, and ComfyUI can't wire a node output into a combo input. Ordering also doesn't change the preview anyway (it's about paint order at composite time), so just set it on the assembler. And the debug outline is always drawn - frozen in the code, not exposed as a toggle - because without it the checker view would just be the bare base image with nothing to look at. If your regions overlap, remember the preview reflects the geometry, not the final content of each region - it can't tell you whether the cat's colour will match the sofa. That part still costs real generations. It's a young pack from a small studio, so treat the GitHub issues page as the real support channel if anything odd shows up.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| base_image | IMAGE | โ | |
| masks | MASK | โ | |
| mask_adjustopt | INT | 0-512โ512 | โ |
| featheropt | INT | 80โ512 | โ |
| opacityopt | FLOAT | 1.000โ1 | โ |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| combined_mask | MASK | โ |
| checker | IMAGE | โ |
| mask_adjust | INT | โ |
| feather | INT | โ |
| opacity | FLOAT | โ |