Mask Gaussian Blur (AnotherUtils)
Mask Gaussian Blur — the feathering tool for masks that came out too sharp
- mask
- MASK
A mask from a segmentation model comes out looking like a hard cookie cutter: crisp edges, zero transition. Paste a subject back into an image with that mask and you can see the seam from across the room. Blur is the fix - soften the mask edge so the blend actually blends - and AnotherMaskBlur is the node that does it without you having to learn ComfyUI's tensor gymnastics.
It's a Gaussian blur applied to a MASK tensor, which sounds like the most boring utility imaginable until you're standing in front of an inpainting or compositing workflow with a jagged mask and nothing handy to feather it with. Then it's the node that saves the shot.
How it works
The mechanism is exactly what it says on the tin: it runs a Gaussian blur over the mask with the radius and sigma you give it. You don't need to know the math - you need to know the two knobs:
blur_radius(INT, default 5) - how wide the blur spreads in pixels. This is your main "how soft is the edge" control. Radius 0 gets you no blur at all.sigma(FLOAT, default 1.0) - the standard deviation of the Gaussian. Sigma shapes how much of that radius actually gets used; cranking it up makes the falloff smoother within the radius.
The mental model that works: radius is the reach, sigma is the smoothness. For a mild anti-aliasing of a mask edge, small radius and small sigma. For a proper feather that fades out over a wide band, bigger radius and a sigma roughly proportional to it.
Input is mask (MASK), output is MASK. Same shape in and out, so you can drop it anywhere in a mask chain - after a SAM2 or segmentation node, before a VAE encode for inpainting, or ahead of a composite.
Installing it
Part of the AnotherUtils pack, installed like any other node in it:
cd ComfyUI/custom_nodes
git clone https://github.com/marcoc2/ComfyUI-AnotherUtils.git
Restart ComfyUI. Or use ComfyUI Manager and search "AnotherUtils". No extra dependencies - it's plain tensor math, which is one of the nicer things about this pack: you don't pay a dependency tax for a blur.
Where people get confused
The classic mistake is expecting blur_radius 100 to produce a dreamy wide feather and getting a mush that bleeds the mask everywhere. High radius + high sigma on a small mask just turns the whole thing gray. Start at radius 5, sigma 1, and scale up from there - you almost never need to go near the top of the range.
Another thing worth knowing: this blurs the values of the mask, so a blurred mask is no longer binary - it has soft gray gradients. That's the point, but it means anything downstream that re-thresholds the mask will erase your feathering. If you're blurring to feather, don't run a threshold after it.
This is one of those little nodes you don't think about until the moment you need it, and then you're glad it's there. Pair it with RefineMask (also in this pack) if you need to expand and feather a mask in one go.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | — | |
| blur_radius | INT | 50–100 | — |
| sigma | FLOAT | 1.00.1–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | — |