AGSoft Mask Blur
Soft edges on your inpaint mask — the difference between 'seamless' and 'rectangle'
- mask
- mask_out
- convert_mask_to_image
A hard-edged mask is the fast way to get a visible seam. The model treats the boundary as an absolute cliff - regenerate here, touch nothing there - and the result shows it. AGSoft Mask Blur is the five-second fix: it runs a Gaussian blur over your mask so the transition between "regenerate" and "leave alone" is a gradient instead of a wall. It's the boring, unglamorous node that makes an inpaint look finished.
This is one of a small cluster of mask nodes in the AGSoft pack (Fix, Composite, From Color, plus this). Where Mask Fix is the kitchen-sink cleanup tool, Mask Blur is the focused one-trick pony: blur and get out.
How it works
You feed it a mask and it applies a Gaussian blur using OpenCV under the hood (the pack ships opencv-python as a dependency). The mask goes in as the usual ComfyUI MASK tensor - a single channel where white means "regenerate" - and comes back the same shape, just softened.
Two outputs come out, not one:
- mask_out - the blurred
MASK, what you'd normally feed onward into your inpaint pipeline. - convert_mask_to_image - the same mask rendered as a grayscale
IMAGE, handy if you want to look at it in a Preview node or pipe it somewhere image-based.
The inputs that matter
- mask - your input mask. Any mask works; the node doesn't care where it came from.
- blur_radius - the Gaussian radius, 0–256, default 5. This is the whole ballgame: higher = softer, more gradual edges. Start at 5 and creep up if the seam persists. Past ~20 it starts swallowing small mask details, so don't go nuclear.
- device -
cpu(default) orcuda. The tooltip's honest about it: cuda speeds things up if you have a compatible GPU, but for a mask blur the difference is usually a few milliseconds. Leave it on cpu unless you're batch-processing hundreds.
Installing and common issues
Standard AGSoft install:
cd ComfyUI/custom_nodes
git clone https://github.com/Art-xmaster/comfyui-AGSoft
Restart, or use ComfyUI Manager → "comfyui-AGSoft". The opencv dependency gets pulled automatically; no model files involved.
The classic gotcha is inverted expectations: if your blurred mask looks like it's growing or shrinking the white area, that's not the node lying - it's that Gaussian blur spreads brightness, so very soft edges look wider. If the mask grows too far into protected territory, blur less or run a threshold step (the pack's Mask Fix has threshold for exactly this). And if you're combining a blurred mask with compositing elsewhere, remember the convert_mask_to_image output is a preview convenience, not a second mask source - keep using mask_out for the real work.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | — | |
| blur_radius | FLOAT | 5.00–256 | Радиус гауссова размытия. Чем выше — тем мягче края. |
| device | COMBO | cpu | Устройство для вычислений. 'cuda' ускоряет обработку на GPU, но требует совместимой видеокарты. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| mask_out | MASK | — |
| convert_mask_to_image | IMAGE | — |