Nodes/Pseudocomfy/Blur Mask
ComfyUI Node

Blur Mask

Feather those hard edges before they hit the sampler

By Pseudotools·Created 2 years ago·Updated 19 days ago· 4
Blur Mask
  • msks_list
  • msks
blur_radius25
sigma1.0
invertfalse

A mask with a razor-sharp edge is usually wrong. When a regional mask ends abruptly, the generated image shows it - a visible seam, a hard transition, an area that looks cut and pasted rather than rendered. Blur Mask is the fix: it runs a Gaussian blur over your masks so the white-to-black transition fades gradually, and regional conditioning blends instead of slicing.

This matters double in Pseudocomfy's world, where masks come straight from the snapshot pipeline as hard binary shapes. Blurring them before they reach the Apply nodes is the difference between a wall that visibly switches materials at a pixel line and a wall whose material change reads as natural lighting.

The controls

  • blur_radius (default 25, range 1–51) - the kernel radius. The actual kernel is radius * 2 + 1, so 25 gives a 51-pixel-wide blur. Bigger = softer edges, more bleed between regions. Default 25 is a solid starting point; drop toward 5–10 for fine features, push toward 40+ when you want regions to gently wash into each other.
  • sigma (default 1.0, range 0.1–20) - the Gaussian's standard deviation. Higher sigma spreads the blur wider even at the same kernel size. The pair (radius, sigma) is worth tuning together: radius controls the extent, sigma controls the softness within it.
  • invert (default off) - flips the mask after blurring. Useful when you blurred the wrong polarity and don't want to add a separate invert node.

The blur is computed with conv2d using a proper 2D Gaussian kernel and reflect padding, which avoids the dark-edge artifacts you get from zero padding on masks that touch the image border.

List in, list out

Like the rest of this pack's mask utilities, it's INPUT_IS_LIST: feed it msks_list (a whole list from PseudoUnpackModelSnapshot or PseudoProcessMaterialPrompts) and it returns all of them blurred, still as a list. Handles both [1, H, W] and batched [B, H, W] masks, and a radius of 0 passes masks through untouched (handy for testing without destroying your unblurred version).

When you'd reach for it

  • Before regional conditioning - the main use: feather every region mask so the Dense Diffusion or IPAdapter Apply nodes blend edges.
  • After aggregating - combine masks with PseudoMaskAggregate, then blur the single result for a smooth composite region.
  • Refining mask edges - erode or dilate with PseudoMaskReshape first, then blur to clean up the jaggies those operations leave.

A common trap: blurring too much on masks with thin features - window mullions, railings - where a wide radius can dissolve the feature entirely. Check the result visually; masks are cheap to inspect, expensive to render wrong. Install is pack-standard: clone Pseudocomfy into custom_nodes (or Manager → "Pseudocomfy") and restart.

CategoryPseudocomfy/Utils

Inputs (4)

NameTypeDefaultDescription
msks_listMASK
blur_radiusINT251–51
sigmaFLOAT1.00.1–20
invertBOOLEANfalse

Outputs (1)

NameTypeDescription
msksMASK