Nodes/ComfyUI-Image-Filters/Alpha Clean (DEPRECATED, use MaskClean)
ComfyUI Node

Alpha Clean (DEPRECATED, use MaskClean)

Deprecated, use Mask Clean instead

By spacepxl·Created 3 years ago·Updated 8 months ago· 293
Alpha Clean (DEPRECATED, use MaskClean)
  • images
  • IMAGE
radius8
fill_holes1
white_threshold0.90
extra_clip0.98

Straight up: this node is deprecated. The node's own display name says so - "Alpha Clean (DEPRECATED, use MaskClean)" - and it's gone from the pack's current README entirely, replaced by Mask Clean under the Mask category ("Clean up holes and near-solid areas in a matte"). If you're starting a new workflow, skip this one and use Mask Clean. This page exists for anyone who's hit it in an older workflow and wants to know what it actually did.

What it did

Alpha Clean was a matte cleanup filter - the kind of thing you run after generating or extracting a mask (from segmentation, from SAM, from a hand-drawn selection) to tidy up the rough edges before using it. Masks coming out of automated tools are rarely clean: small holes inside what should be solid regions, near-white areas that aren't quite pure white, edges that could use a touch of smoothing.

None of that job description changed when the node got renamed - this is a rename-and-supersede, not a removal of functionality. Whatever made Alpha Clean useful for tidying up a rough matte is still there in Mask Clean, just under different naming and presumably with whatever bugfixes or tweaks came after the rename. That's a useful thing to know if you're reading an old tutorial or a shared workflow that references "Alpha Clean" by name and wondering whether it's safe to substitute the newer node - it is.

Inputs and outputs that matter

  • images - the mask/alpha you're cleaning, as an image.
  • radius (1-64, default 8) - the morphological clean radius; roughly, how big a feature has to be before it survives the cleanup pass.
  • fill_holes (0-16, default 1) - how aggressively small interior holes get filled in.
  • white_threshold (0.01-1, default 0.9) - values above this get pushed toward pure white, tightening up near-solid regions.
  • extra_clip (0.01-1, default 0.98) - an additional clipping pass on top of the threshold.

Output: a single IMAGE.

Installing it (if you're stuck on it)

If you've inherited a workflow that still uses this node, it'll still run as long as you have the pack installed - deprecated in this pack means superseded, not removed. ComfyUI Manager: search ComfyUI Image Filters. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/spacepxl/ComfyUI-Image-Filters

Restart afterward. No models needed. Watch for opencv version conflicts with other installed node packs - the repo's import_error_install.bat fixes that by reinstalling all four opencv variants together, or by hand, uninstall the opencv-* packages and keep just opencv-contrib-python.

What to actually do

Swap it for Mask Clean, in the same pack, under the Mask category. Same job - cleaning up holes and near-solid regions in a matte - under active naming rather than the deprecated one. If you've got an old workflow using Alpha Clean and it's still producing acceptable results, you don't have to rip it out this second; deprecated doesn't mean broken. But treat it as something you migrate off of the next time you're touching that part of the graph, not something to build new workflows around.

CategoryImage-Filters/image

Inputs (5)

NameTypeDefaultDescription
imagesIMAGE
radiusINT81–64
fill_holesINT10–16
white_thresholdFLOAT0.900.01–1
extra_clipFLOAT0.980.01–1

Outputs (1)

NameTypeDescription
IMAGEIMAGE