ComfyUI Node
LC Remove Background ✂️
Remove the background with BiRefNet. Outputs an RGBA cutout, the mask, and the subject on a solid color. Optional guided filter or VITMatte refine.
LC Remove Background ✂️
- image
- cutout
- mask
- on_background
◄model▾►
◄refinenone►
◄vitmatte_model▾►
◄grow0.0►
◄edge_erode10.0►
◄edge_dilate10.0►
◄black_point0.000►
◄white_point1.000►
◄feather0.0►
◄max_megapixels2.00►
◄backgroundblack►
CategoryLC MaskMaker/mask
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Image to cut the subject out of. | |
| model | COMBO | Background removal model. The license is in the label. Entries marked 'Download' are fetched the first time you run. | |
| refine | COMBO | none | none: use the model's mask as is. guided_filter: fast, snaps the edge to the image. vitmatte: matting model for hair and fine detail. |
| vitmatte_model | COMBO | Only used when refine is vitmatte. | |
| grow | FLOAT | 0.0-512–512 | Pixels to grow (positive) or shrink (negative) the mask before refining. |
| edge_erode | FLOAT | 10.00–1024 | Refine trimap: how far the sure-foreground area is pulled in from the mask edge. Smaller = tighter. |
| edge_dilate | FLOAT | 10.00–1024 | Refine trimap: how far the unknown band reaches past the mask edge. Smaller = tighter. |
| black_point | FLOAT | 0.0000–0.999 | Mask values at or below this become 0. Raise it to clear faint background haze. |
| white_point | FLOAT | 1.0000.001–1 | Mask values at or above this become 1. Lower it to solidify the subject. |
| feather | FLOAT | 0.00–100 | Final edge softness in pixels. |
| max_megapixels | FLOAT | 2.000.25–16 | vitmatte only. Larger images are matted at this size, then scaled back. |
| background | COMBO | black | Color behind the subject in the on_background output. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| cutout | IMAGE | — |
| mask | MASK | — |
| on_background | IMAGE | — |