Nodes/ComfyUI-Curve/🔀 Gaussian Blur with Mask
ComfyUI Node

🔀 Gaussian Blur with Mask

Selective blur with a mask, and feathering that doesn't fight you

By aiaiaikkk·Created about a year ago·Updated 10 months ago· 181
🔀 Gaussian Blur with Mask
  • image
  • mask
  • image
blur_radius2.0
mask_blur0.0
invert_maskfalse

A blur node in a color-grading pack reads like a bonus track, but this one earns its place. Core ComfyUI has blur primitives; what it doesn't hand you in one node is a masked, feathered, invertible Gaussian blur - blur the background, keep the subject sharp, done. If you've ever built a selective-blur graph out of three or four generic nodes, this collapses the whole thing into one box with three knobs.

Reach for it when you want depth without re-generating: fake a shallow depth of field behind a portrait, soften a busy background so a watermark or text reads, pull attention to the subject, or scrub private details out of a render. It's also the standard trick for "sharpen one thing, let the rest fall off" workflows - blur the background, then composite back at partial opacity.

How it works

The core is OpenCV's cv2.GaussianBlur, applied per channel. The kernel size is derived from blur_radius (roughly radius × 6, forced odd), so bigger radius means a wider, softer spread - and since it's a true Gaussian, you get the smooth falloff instead of a boxy smear. It handles RGBA images by blurring color and preserving the alpha channel, which is a thoughtful touch few utility nodes bother with.

The mask is where it gets useful. Feed a mask and only the white areas blur; black areas keep the original pixels. mask_blur (0-20) feathers the mask edge before it's applied, which is the difference between a hard "blur disc" look and a natural transition - the README's guidance is 2-4 pixels for skin, 5-10 for sky, 1-3 for object edges. invert_mask flips the selection if your mask is backwards.

The inputs that matter

  • blur_radius - 0.1 to 50, default 2. The only required parameter besides the image. Start small; radius 2-8 covers most tasteful looks.
  • mask - optional. White blurs, black keeps. No mask = the whole image blurs.
  • mask_blur - edge feathering, 0-20.
  • invert_mask - flip the masked region.

Single image output. You'll typically grab a mask from a segmentation or depth node - anything that emits a MASK works.

Installing it

Part of the ComfyUI-Curve pack. ComfyUI Manager → search "ComfyUI-Curve", or:

cd ComfyUI/custom_nodes
git clone https://github.com/aiaiaikkk/ComfyUI-Curve.git

Restart ComfyUI. OpenCV comes with ComfyUI's bundled environment, so there's nothing extra to chase down.

Where people get burned

The classic mistake is forgetting the mask entirely - no mask means the whole image blurs, and "why is everything soft" is always this. Second, the README advertises radius up to 100px, but the node's actual max is 50; don't go hunting for a missing slider range. Third, huge radii on big images are slow - this is a per-pixel kernel, not a pyramid, so radius 50 on a 2K render takes a noticeable beat. And one known bug was fixed in the June 2025 update ("GaussianBlurNode parameter passing error"), so if you're on an old version of the pack, update before debugging anything else.

CategoryImage/Effects

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
blur_radiusFLOAT2.00.1–50模糊半径,值越大模糊效果越强
maskoptMASK可选遮罩,白色区域应用模糊,黑色区域保持原图
mask_bluroptFLOAT0.00–20遮罩边缘羽化,使模糊边界更自然
invert_maskoptBOOLEANfalse反转遮罩,黑色区域变为白色区域

Outputs (1)

NameTypeDescription
imageIMAGE