Blur Mask (Fast)
Feather a mask edge without ComfyUI's built-in blur crawling
- masks
- MASK
A hard-edged mask makes for a hard, visible seam wherever it's composited or inpainted - the standard fix is feathering, blurring the mask's edge so the transition is gradual instead of a cliff. Blur Mask (Fast) is exactly the mask-shaped sibling of this pack's Blur Image (Fast): same OpenCV gaussian blur under the hood, same speed advantage over ComfyUI's stock blur, just operating on a MASK instead of an IMAGE.
Nothing more exotic than that - if you already know why you'd reach for the image version, this is the same tool for the other data type.
The inputs
masks(MASK) - required.radius_x/radius_y(each default 1, 0–1023) - blur radius per axis, independently settable if you want a directional feather rather than a symmetric one (rare for masks, but available).
Output: one MASK.
For inpainting specifically, feathering somewhere in the 4-12 pixel range is the usual starting point - too little and you keep a visible hard seam, too much and the blur bleeds the effect into areas you meant to protect. Treat that as a starting range to tune from, not a hard rule; it depends heavily on your resolution and how big the masked region is.
Where it fits in a mask pipeline
This is almost always the last step, not the first. The common order is: get a rough mask (SAM, a hand-drawn selection, a matte), adjust its boundary size with this pack's Dilate/Erode Mask if you need to grow or shrink it, then soften the edge with this node. Blurring alone doesn't change how much area the mask covers, just how hard the transition at its edge is - if you also need more or less coverage, that's a separate step.
One thing worth knowing: blurring a mask's edge visually shrinks its effective hard-coverage area a little, since the outer band fades toward zero instead of staying fully opaque. If your compositing depends on covering a specific footprint exactly, dilate the mask slightly before blurring to compensate for that softening.
How to install it
ComfyUI Manager: search "ComfyUI-Image-Filters", install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/spacepxl/ComfyUI-Image-Filters
restart ComfyUI. The pack's dependency is opencv-contrib-python; a cv2 import error on startup is typically a conflicting opencv variant from another node pack, not this one - the author's install.bat/import_error_install.bat resolve it on Windows, and the manual fix elsewhere is uninstalling stray opencv installs and reinstalling opencv-contrib-python alone. No models, negligible cost to run.
Common issues & troubleshooting
Composite still shows a visible seam. Either the radius is too small for your resolution - 1px default is basically a no-op on anything but a tiny image - or you're blurring a mask that was too tight to begin with. Try dilating a few pixels first, then blur.
Blur bleeds the effect noticeably outside where you wanted it. Radius too large relative to the feature size. Back it off; feathering should be subtle enough that it's not obvious as a distinct soft ring around the masked region.
Mask coverage feels smaller than expected after blurring. That's the softening effect described above - the edges fade rather than stay solid. Compensate with a small positive dilate on Dilate/Erode Mask before blurring if exact coverage matters.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| masks | MASK | — | |
| radius_x | INT | 10–1023 | — |
| radius_y | INT | 10–1023 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | — |