Mask Blur
Feather the mask edge so the inpaint seam disappears — Mask Blur
- mask
- mask
Hard mask edges are the #1 reason an inpaint pass looks like a sticker was slapped on. The KB's masking doc says it plainly: the fix for visible seams is to soften the mask edge, and the standard remedy is blurring the mask before it hits the sampler. wcx_MaskBlur is that remedy as a single node - Gaussian blur the mask, hand it to your inpaint, and the transition stops being a razor line.
Mechanically it's a Gaussian blur with the blur amount folded in twice: a blur value of n produces a kernel of 2n+1 pixels and a sigma of n/2. So blur 4 → a 9×9 kernel with sigma 2. It handles single masks and whole batches alike (a 3D mask gets its channel dimension added and removed internally), and it prints a small status line to the console telling you how many masks it processed. Input is mask (MASK) and the blur amount; output is mask again, ready for the sampler.
The sweet spot is small-to-medium values. The KB's detailing guidance - raise mask-blur padding so the mask follows the subject instead of a rectangle - lives exactly here. A blur of 4–8 on a face-size mask softens the boundary just enough that the regenerated region melts into the surrounding pixels. That's the whole job, and it does it without touching the geometry.
Where people get burned:
- Big blur on a small mask eats it. Blur 50 on a 64-pixel mask and you've blurred the mask into a gray smear that barely means anything. The sigma scales with the blur value, so large numbers on small regions genuinely destroy the mask's information. Small mask, small blur.
- Blur is softening, not expanding. If your mask is too small for the region (a bbox detector's tight rectangle, per the KB's seam warning), blur alone won't cover the gap - you want this pack's
Mask Growfirst, then a light blur on top. Blur smooths what's there; it doesn't add coverage. - Zero is valid. blur 0 skips the blur entirely and passes the mask through, which is handy for toggling the effect without deleting the node.
Standard light install, no dependencies:
# ComfyUI Manager: search "ComfyUI-Practical-Tools" → Install → restart
# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/wenchengxiang/ComfyUI-Practical-Tools
# restart ComfyUI
It's one of those boring nodes you forget you installed until you get a visible seam and realize you forgot the feathering step. Then you remember why it's in the pack.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | — | |
| blur | INT | 40–999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | MASK | — |