Gaussian Mask Regions
Soften a mask's edges before you composite
- masks
- MASKS
Hard mask edges are the classic cause of visible seams - you inpaint a region, composite a cutout, or blend two layers, and there's a crisp, obviously-artificial boundary where the new content meets the old. The fix people reach for constantly is mask blur, and SaltMaskGaussianRegion is exactly that: it applies a Gaussian blur to your mask so the transition from "fully affected" to "not affected at all" happens gradually instead of in one pixel.
How it works
Straightforward Gaussian smoothing applied to the mask channel itself, not to the image. Every pixel's value gets replaced with a weighted average of its neighbors, with the weighting following a bell curve controlled by radius. A small radius softens the edge by a few pixels; a large one turns a crisp cutout into a soft, cloud-like gradient. The image-editing literature calls this "feathering," and it's the same idea whether you're doing it in Photoshop, A1111's mask blur slider, or here.
The inputs and outputs that matter
masks(required, MASK) - your input mask.radius(default 5, range 0–1024, step 0.1) - the blur strength, in roughly the same units as pixel distance. This is the one field you'll actually touch. For reference, the general rule for inpaint mask feathering is 4–12 pixels for a subtle blend; go well past that only if you deliberately want a wide, soft falloff rather than a defined edge. At0this should do essentially nothing; cranked toward the high end of the range you'll blur a mask into near-uniform gray.
Output: MASKS, same shape, softened.
How to install it
SaltMaskGaussianRegion is part of get-salt-AI/SaltAI - "SaltAI-Open-Resources" - built by Salt AI (getsalt.ai). They launched in March 2024 offering hosted infrastructure to run ComfyUI workflows as Discord bots and later an API; the masking and animation-scheduling nodes in this repo were the general-purpose toolkit that worked independent of that platform.
Worth knowing up front: github.com/get-salt-AI/SaltAI currently returns a 404. It's not in the org's current repo list, and it's missing from ComfyUI Manager's index too, so a fresh git clone or a Manager search both come up empty right now. That means the normal install path - search "SaltAI" or "SaltAI-Open-Resources" in Manager, install, restart - doesn't currently work for this pack. If you inherited it from an existing environment or a shared workflow bundle, no need to touch it; it's a self-contained mask operation with no models to fetch and no dependency on Salt AI's own servers to keep running.
Common issues & troubleshooting
The blur bled outside where you wanted the effect. Gaussian blur expands a mask's affected area slightly at every edge - a soft mask covers a bit more territory than the hard one it came from. If you're using this ahead of an "only masked" inpaint crop, pad your crop region accordingly or the softened edge can get clipped by the crop boundary.
It looks like nothing happened. Check that radius is actually above zero - it's easy to leave a node at its default and forget to raise it, and 5 is a fairly gentle amount on a large image. Bump it up and re-check in a Preview Image node.
Your downstream node treats the mask as fully binary and the feathering gets undone. Some consumers (a hard threshold step further down your graph, certain inpaint modes) reduce a mask back to 0/1 before using it, which throws away exactly the gradient you just created. Put this node as close as possible to the step that actually needs the soft edge.
You want the opposite - a harder edge, not a softer one. This node only blurs; there's no "sharpen" direction here. Use SaltMaskHistogramEqualizationRegion if you're trying to punch up contrast in a mask that's gone too soft from an earlier step, or the pack's threshold-based nodes if you need a hard binary result.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| masks | MASK | — | |
| radius | FLOAT | 5.00–1024 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASKS | MASK | — |