ComfyUI Node

Solidify Alpha

Solidify Alpha — for when your cutout looks like smoked glass

By tggo·Created about a month ago·Updated about a month ago· 3
Solidify Alpha
  • images
  • IMAGE
threshold0.50
feather0.08

Layer decomposers - and every rembg-style matting tool, for that matter - have a tell: they're nervous about limbs. You ask for a person cutout and the model is confident about the torso but hedges on the arms, returning them at 40–60% alpha. Composite that over a colored panel and the result reads as smoked glass instead of a person, because you're seeing the background through a half-transparent arm.

Solidify Alpha is the fix: it hardens a soft probability matte into a solid silhouette, then adds back just enough edge softness that it doesn't look like a paper cutout.

How it works

It only touches the alpha channel, leaving RGB alone. Everything above threshold gets pushed to fully opaque, and the transition band just below the threshold is kept for anti-aliasing - a linear ramp from the feather edge up to full alpha. Net effect: limbs that were ghosting become solid, while hair edges and other genuinely soft boundaries keep their AA instead of snapping into staircases.

Two inputs shape that:

  • threshold (default 0.5) - the alpha value above which a pixel becomes fully opaque. Raise it if too much stays translucent, lower it if the model is erring the other way and cutting holes.
  • feather (default 0.08) - the width of the transition band below the threshold. Set it to 0 and you get a hard binary mask, edge aliasing and all. Keep a little unless you're making sprite assets that want a rock-hard silhouette.

The single IMAGE output is the same frames with the alpha rewritten - wire it straight into Save Layers (RGBA) or into compositing. If you feed it an RGB image with no alpha channel, it passes it through unchanged rather than inventing a mask, which is polite behavior worth knowing about.

Where it sits in the workflow

In the pack's example graph it runs right after Split Layer Stack, on the layer stack, before the save node - the README calls it "the fix for limbs that come back 40–60% transparent." It's equally useful after Merge Layer Range: merge a fragmented subject back together and then solidify the result so the merged silhouette is clean instead of a patchwork of translucencies.

A note on ordering: solidify after you've decided what belongs together. Once a matte is hard, you can't soft-blend two solidified layers together as gracefully. Decide your layer granularity first, then harden.

Installing

It ships in ComfyUI-StableLayers:

cd ComfyUI/custom_nodes
git clone https://github.com/tggo/ComfyUI-StableLayers

then restart (or install via ComfyUI Manager, searching ComfyUI-StableLayers). This node has no dependency beyond the pack itself - no model downloads, no huggingface_hub requirement.

Gotchas

The threshold is doing all the work, so if your subject still has translucent patches, nudge it up in 0.05 steps rather than cranking feather. And remember it's a matte hardener, not a matte improver: a pixel at 30% alpha is either made solid or discarded, and Solidify Alpha makes it solid - it won't rebuild detail the model already lost.

CategoryStable Layers

Inputs (3)

NameTypeDefaultDescription
imagesIMAGE
thresholdFLOAT0.500–1
featherFLOAT0.080–0.5

Outputs (1)

NameTypeDescription
IMAGEIMAGE