Nodes/H3 Editor/H3 Defringe Matte (H3 Editor)
ComfyUI Node

H3 Defringe Matte (H3 Editor)

Un-premultiply the estimated border backdrop colour from partially covered foreground pixels (BiRefNet or similar soft mattes) and tighten alpha coverage, eliminating halos on game sprites and props. On a flat backdrop of any colour it also keys out the backdrop a matte leaves inside or beside the subject.

By igorls·Created 30 days ago·Updated 6 days ago· 128
H3 Defringe Matte (H3 Editor)
  • images
  • mask
  • depth
  • rgba
  • matte
◄alpha_low0.12►
◄alpha_high0.88►
◄invert_maskfalse►
◄key_backdroptrue►
◄alphasoft►
Categoryminimax/h3

Inputs (8)

NameTypeDefaultDescription
imagesIMAGE—
maskMASK—
alpha_lowoptFLOAT0.120–0.5—
alpha_highoptFLOAT0.880.5–1—
invert_maskoptBOOLEANfalseFlip mask polarity when the upstream background remover outputs background=1.
key_backdropoptBOOLEANtrueOn a flat backdrop of any colour, also remove what the matte keeps by mistake: pockets of backdrop the subject encloses and patches beside it. Ignored on a scene.
alphaoptCOMBOsoftsoft keeps partly covered edge pixels. hard makes every pixel fully in or out.
depthoptIMAGEA depth map for each image, from any depth node, near bright or near dark. On a flat backdrop it tells leftover backdrop from the subject's own surfaces of that colour.

Outputs (2)

NameTypeDescription
rgbaIMAGE—
matteMASK—