Human Parsing Skin Mask
Whole-body skin masks that don't let the background bleed in
- image
- MASK
If you're color-correcting a portrait, the whole trick is knowing which pixels are skin and which are just warm-colored - a tan wall, a wooden floor, a sunset glow. Raw HSV skin detectors can't tell the difference. Human Parsing Skin Mask can, because it doesn't threshold colors at all: it runs a real segmentation model and sums up the actual body parts. That makes it the node you reach for when the subject is more than just a face - a full-body shot, an arm crossing the frame, a person with skin tones HSV would happily classify as "background."
How it works. It loads a clothes/human-parsing Segformer model (mattmdjaga/segformer_b2_clothes) from Hugging Face and predicts a per-pixel class: face, arms, legs, clothes, background. It then sums the softmax probabilities for the face, left/right arm, and left/right leg classes into one "skinness" score per pixel and thresholds that at your confidence_threshold. Because it's a probability sum rather than a hard winner-takes-all label, the edge is softer and more forgiving than a plain argmax - that's a deliberate design choice that keeps shoulders from looking chiseled.
The inputs. You toggle which body parts count:
include_face(default on),include_arms(on),include_legs(on) - turn off what you don't want masked. Turn everything off and it politely returns an empty mask instead of crashing.confidence_threshold(default 0.5) - this is the one to actually tune. Lower it toward 0.3 and the mask gets greedier, swallowing fuzzy edges and maybe a sliver of background; raise it toward 0.7 for a tighter, cleaner cut that may drop dimly-lit skin. Start at 0.5 and nudge from there.
Output is a single MASK tensor, ready to wire into the skin_mask input of ColorCorrectionAnalyzer, SkinToneCorrector, or ColorCastRemover.
Gotchas. First run downloads the model, and it's a real download with a real wait - expect it to take a minute or two and don't panic. Subsequent runs are fast because the model is cached in memory. It also loads onto CUDA when available, so a big batch is fine after the first frame. One thing this node deliberately does not have is feathering - the mask comes out hard-edged, so if you see banding at the boundary, run it through a blur or pick the FaceParsingSkinMask sibling when you only need the face.
Which mask node when? Here's the honest division of labor inside this pack:
- FaceParsingSkinMask - close-ups, headshots. It explicitly excludes lips, eyes, brows, and hair, which is exactly what you want for skin-color work on a face.
- HumanParsingSkinMask - this one. Whole body, arms and legs included, background-aware. Pick it when the skin you care about isn't just facial.
- MediaPipeSkinMask - a third path in the pack; fast and license-clean but rougher around hair.
Installing it. It ships in the Eric Color Correction pack, so you install the whole thing at once:
cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/Eric_Color_Correction_ComfyUI
cd Eric_Color_Correction_ComfyUI
pip install -r requirements.txt
Restart ComfyUI afterward, or grab it via ComfyUI Manager by searching "Eric Color Correction." The transformers dependency is the heavy one here - if pip complains, that's what's missing. And before you use it on commercial work, check the pack's license: it's non-commercial (CC BY-NC-style) unless you buy the separate commercial license. A node that downloads a segmentation model on first run and prints nothing for ten seconds isn't frozen - it's fetching weights, which is the single most common "is this broken?" moment with this pack.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| include_face | BOOLEAN | true | — |
| include_arms | BOOLEAN | true | — |
| include_legs | BOOLEAN | true | — |
| confidence_threshold | FLOAT | 0.500–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | — |