ComfyUI Node

Blur Mask

Soften mask edges so inpaints and composites stop showing seams

By rookiepsi·Created about a year ago·Updated 11 months ago· 9
Blur Mask
  • mask
  • MASK
blur1.0

A hard-edged mask is the most common cause of the ugliest artifacts in ComfyUI: visible rectangular seams after an inpaint, a harsh cut when compositing, a controlnet region that ends in a cliff. Blur Mask fixes the usual 90% by softening those edges. It's the mask node you'll reach for more than you expect.

It's from ComfyUI Extended, the zero-dependency pack, and it's about as focused as a node gets: mask in, blur value, softer mask out.

How it works

Two inputs: mask (MASK) and blur (FLOAT, 0–100, default 1). The output is a MASK with the same shape as the input. Internally it's a separable Gaussian blur - two one-dimensional convolution passes (horizontal then vertical) instead of one expensive 2D pass - with the kernel size derived from the blur value (6 * blur, forced odd). A blur of 0 passes the mask through untouched, and the mask is cloned before processing so your source isn't modified in place.

The one input that matters

  • blur - the softening radius. A value of 1–5 handles most real cases: enough to feather a hard edge, not so much that the mask eats into the region you're protecting. Crank it higher (10+) for deliberate, wide feathering, but remember the kernel grows with it, so extreme values on huge masks cost time.

Install

cd /path/to/your/ComfyUI/custom_nodes
git clone https://github.com/rookiepsi/comfyui-extended.git

Restart ComfyUI; it's under comfyui-extended/mask. Or ComfyUI Manager → "ComfyUI Extended" → install → restart. No models, no pip dependencies.

Common issues

  • Too much blur hollows out thin masks. Blurring a narrow region can push it below the threshold downstream nodes care about. Feather, then check the result - don't max the slider on a thin strip.
  • Blur = 0 is a no-op. The node returns your mask unchanged, which is correct behavior, just not a useful one. If nothing changed, that's why.
  • Large blur + large mask = slow. The convolution kernel scales with the blur value. On a 4K mask with blur 100 it'll churn; keep it proportionate.

Where it fits: before any inpaint where a hard mask boundary is visible, before compositing a cut-out, or when feeding masks into controlnet workflows that punish abrupt edges. For the "mask looks right but the seam doesn't" problem, this is the first node to try.

Categorycomfyui-extended/mask

Inputs (2)

NameTypeDefaultDescription
maskMASK
blurFLOAT1.00–100

Outputs (1)

NameTypeDescription
MASKMASK