Auto Person Mask
One-click person mask, with one dependency the README forgets to mention
- image
- person_mask
- masked_image
Feed this node an image, and it hands you a mask of the person plus a cut-out version, no prompt engineering required. It's the pack's shortcut for "give me the subject as a mask" - the kind of thing you reach for when you want to inpaint the background, drive a regional prompt from the person, or swap a background in a ControlNet workflow. It does exactly what it says. Just know what it's actually running underneath, because the README is quietly silent on it.
How it works
The node is a thin wrapper around rembg - the standard background-removal library. rembg spins up a U2-Net ONNX model, runs it over your image, and returns the alpha. The node then converts that into a person_mask tensor and a masked_image (the person composited on a transparent background, represented as an image). There's no magic here; it's the same segmentation pipeline that's been in the ecosystem since 2020, packaged as a node.
You pick the segmenter through the model dropdown:
u2net- the general-purpose default.u2netp- the lightweight, faster one.u2net_human_seg- tuned for people, which is usually the right call for a person mask.silueta- same network as u2net at a smaller size.
The settings that matter
alpha_matting- better edge quality, noticeably slower. Turn it on when the default edges look ragged.alpha_matting_foreground_threshold/alpha_matting_background_threshold/alpha_matting_erode_size- matting tuning; defaults (240 / 10 / 10) are a fine starting point, only touch these if edges go mushy.post_process_mask- runs morphological cleanup to tidy stray specks. Cheap, usually worth it.
Outputs are person_mask (MASK) and masked_image (IMAGE). The mask feeds regional prompting, the temporal combiner, or an inpaint; the masked image is handy for compositing or a quick preview.
The dependency the README doesn't mention
The README lists matplotlib pillow numpy torch scipy and stops. This node also needs rembg, and it's not in that list. Install it or the node throws at runtime:
pip install rembg
First run downloads the U2-Net ONNX weights (roughly 150–170MB), so don't panic at the stall on your first execution. It also needs onnxruntime - rembg pulls that in as a dependency, but if you're on a constrained setup, be ready for it.
Honest take
U2-Net is old and it shows. On clean studio shots - a person against a plain background - it's great, fast, and runs fine on CPU. On hair, fur, and transparent fabrics it produces exactly the kind of messy edges the background-removal crowd has been complaining about since 2020. If you're masking for a regional prompt, that's often fine. If you need a crisp cutout for compositing, you'll get better results from a BiRefNet node elsewhere in the ecosystem and save this one for quick jobs. It's a free win when it fits, not a replacement for careful masking.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model | COMBO | 4 options: u2net, u2netp, u2net_human_seg, silueta | |
| alpha_mattingopt | BOOLEAN | false | Better edge quality but slower |
| alpha_matting_foreground_thresholdopt | INT | 2400–255 | — |
| alpha_matting_background_thresholdopt | INT | 100–255 | — |
| alpha_matting_erode_sizeopt | INT | 100–50 | — |
| post_process_maskopt | BOOLEAN | false | Clean up mask with morphological operations |
| show_debugopt | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| person_mask | MASK | — |
| masked_image | IMAGE | — |