Box Blur Mask
Feather a mask's hard edges
- mask
- mask
Box Blur Mask softens a MASK - it takes a mask with hard edges and blurs them into a gradient. This is the small, unglamorous node that makes composites and inpaints stop looking like cut-and-paste. A crisp-edged mask produces a visible seam where the masked region meets the rest of the image; feathering that edge lets the two blend, so the result reads as one image instead of a sticker slapped on top.
You reach for it constantly in mask-based work. Inpainting with a tight mask? Feather it so the repaint fades into the surroundings. Pasting a subject onto a background? Soften the mask edge so there's no halo. Any time you've got a hard mask - from a segmentation node, a threshold, a hand-drawn shape - running it through a blur before it drives a composite is the difference between "obvious edit" and "seamless."
How it works
It applies a box blur to the mask. A box blur averages each pixel with its neighbors within a radius - the simplest kind of blur, fast and slightly boxy compared to a Gaussian, but for softening a mask edge that distinction basically doesn't matter. Bigger radius, wider and softer the feathered zone. The mask goes in sharp and comes out with its edges spread into a smooth falloff.
The inputs and outputs that matter
- mask (required) - the MASK to soften.
- radius (required, default 1) - how far the blur spreads, in pixels. This is the one knob, and small values do the job: 2–10 for a gentle feather, more for a heavy fade. The input technically accepts absurdly large numbers, but there's no reason to go big - a huge radius just smears the mask into mush.
One output: mask, the softened MASK. Wire it wherever the original mask was going - an inpaint sampler, a composite node, an alpha channel.
Installing it
Pure Python, no models, no heavy dependencies - installs fast. ComfyUI Manager → Install Custom Nodes → search "antrobots ComfyUI Nodepack" → Install → restart, or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/antrobot1234/antrobots-comfyUI-nodepack
then restart. It's under antrobots-ComfyUI-nodepack/image-handling.
Common issues
The default radius of 1 is barely-there - one pixel of blur is close to a no-op. If you feathered a mask and saw no difference, that's why; push the radius up to something like 4–8 and you'll actually see the edge soften.
Overdoing it is the other direction: too large a radius eats into the solid part of the mask, not just the edge, so the middle of your masked region goes semi-transparent and the inpaint/composite comes out weak and washed. Match the radius to how big your image and mask actually are - a feather that looks right on a 512px mask is invisible on a 2048px one. It's a small solo pack, so if the node genuinely misbehaves, the README asks you to open a GitHub issue.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | — | |
| radius | FLOAT | 1.000–999999999999999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | MASK | — |