ComfyUI Node
LC Person Mask π§
Select parts of a person: face, hair, body, clothes, accessories, background. Segformer or MediaPipe, with optional guided filter / VITMatte refine.
LC Person Mask π§
- image
- cutout
- mask
- raw_mask
βenginesegformerβΊ
βsegformer_modelβΎβΊ
βfacetrueβΊ
βhairfalseβΊ
βbodyfalseβΊ
βclothesfalseβΊ
βaccessoriesfalseβΊ
βbackgroundfalseβΊ
βconfidence0.40βΊ
βrefinevitmatteβΊ
βvitmatte_modelβΎβΊ
βedge_erode10.0βΊ
βedge_dilate10.0βΊ
βblack_point0.010βΊ
βwhite_point0.990βΊ
βmax_megapixels2.00βΊ
CategoryLC MaskMaker/mask
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Image with a person in it. | |
| engine | COMBO | segformer | segformer: higher resolution. Body = arms and legs only (bare torso and neck read as clothes). mediapipe: body includes torso and neck skin. Needs the mediapipe package. |
| segformer_model | COMBO | Used by the segformer engine. Entries marked 'Download' are fetched the first time you run. | |
| face | BOOLEAN | true | β |
| hair | BOOLEAN | false | β |
| body | BOOLEAN | false | Skin below the face. See engine for what counts. |
| clothes | BOOLEAN | false | β |
| accessories | BOOLEAN | false | Hats, glasses, shoes, bags (and whatever else the model calls an accessory). |
| background | BOOLEAN | false | β |
| confidence | FLOAT | 0.400.05β0.95 | How sure the model must be. Lower grows the selection, higher shrinks it. |
| refine | COMBO | vitmatte | Edge refinement of the raw mask. vitmatte is best for hair, guided_filter is fast, none keeps the raw mask. |
| vitmatte_model | COMBO | Only used when refine is vitmatte. | |
| edge_erode | FLOAT | 10.00β1024 | Trimap: how far the sure-foreground is pulled in from the mask edge (pixels). |
| edge_dilate | FLOAT | 10.00β1024 | Trimap: how far the unknown band reaches out past the mask edge (pixels). |
| black_point | FLOAT | 0.0100β0.999 | Mask values at or below this become 0. |
| white_point | FLOAT | 0.9900.001β1 | Mask values at or above this become 1. |
| max_megapixels | FLOAT | 2.000.25β16 | vitmatte only. Larger images are matted at this size, then scaled back. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| cutout | IMAGE | β |
| mask | MASK | β |
| raw_mask | MASK | β |