Image Simple Skin Mask
Bare skin in one pass, without a body-part model
- image
- mask
Sooner or later you want to change the skin and nothing else: retexture it, grade it, inpaint a blemish, blur it, composite a result back. Every one of those needs a mask that hits bare skin and misses lips, eyebrows, hair and the beige sweater that's roughly the same colour. This is the light version of that node, and it's the one to try first.
What it's for
Masks are the interface to everything else in an image pipeline - the whole detailing-and-inpainting layer of ComfyUI is downstream of "give me a region". Where a detection node for faces or hands exists as a trained model, skin doesn't have one, because "skin" isn't an object. It's a label region across the face, arms, hands and legs, minus eyes and mouth, minus clothing.
Image Simple Skin Mask gets there with two cheap models rather than a big segmentation network: a SegFormer trained on clothing labels (about 190 MB) plus the whole-body pose model for eye and mouth points, with per-person skin colour used to settle borderline pixels. Quick, light on VRAM, and good enough for a portrait or a clean full-body shot.
How it works
The clothing model labels each pixel into 18 classes - background, hat, hair, sunglasses, face, arms, legs, shoes, bag, scarf, upper clothes, dress, skirt, pants and so on. Those get grouped: face/arms/legs count as skin, hair and garments never do, and the ambiguous ones - upper clothes, dress - are decided by colour instead. The node samples high-confidence skin, clothing and background pixels, clusters them, and asks whether each ambiguous pixel sits closer to this person's measured skin or to their clothing. tolerance moves that threshold.
Eyes, brows and the inside of the mouth are cut using the pose model's face landmarks, so you're removing this person's eyes rather than guessing at blobs.
The inputs you touch
image - a batch is fine, each picture gets its own mask.
areas - all skin, face (jaw to forehead) or body (everything below the jaw). Worth setting, because a face-only pass doesn't waste decisions on hands.
eyes and mouth - the defaults, remove with brows and remove inside, are right for retouching: you don't want to relight an eyeball or a tongue. Use keep when you're inpainting a whole head and the eyes should be regenerated too.
tolerance - leave it at 1.0 until something goes wrong. 0.7 is stricter, for tan or beige clothing getting caught as skin. 1.5 takes in deep shadow and flushed skin.
One output: mask, at the picture's size with a soft edge - 1 is skin, 0 is everything else. From there it goes into an inpaint encode, a mask detailer, Image Composite Masked, or a blur/grade chain. If that chain is skin smoothing, make the blur bilateral or guided rather than Gaussian - Gaussian smears the edge you just spent a model finding, which is most of why amateur skin retouching looks like plastic.
Installing it
Manager, search WAS Node Suite v3, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui.git
ComfyUI 0.14.0+, Python 3.10+. Nothing pip-installed, but this node is one of the exceptions to "no models needed": it wants the SegFormer clothing checkpoint in ComfyUI/models/segmentation and ViTPose Wholebody in ComfyUI/models/pose. With features.network: true under features: in <ComfyUI user dir>/was-node-suite/config.yaml it fetches them on first use; otherwise it tells you what's missing, which is the pack's default behaviour on purpose. The node also lives behind the preprocessors config group - on by default, worth knowing if you ever wonder where it went.
Where it goes wrong
Beige clothing comes out masked. The classic. Clothing models label the garment, then colour decides whether it's skin, and a tan t-shirt is close. Drop tolerance to 0.7 and re-run before you start hand-painting.
Half a backlit body missing. The colour sample came from the lit side and the shadow didn't qualify. Push tolerance up to 1.4–1.5.
Nobody found. Skin outside every detected person is dropped, and person_threshold (default 0.4) is the confidence gate. Small figures, heavy crops and crowds at 0.7 will get skipped - lower it, or use Image Skin Mask, which reads the whole picture when it finds no one.
A bare torso comes out half masked. That's the known weakness of the clothing-label approach: a bare chest labelled "upper clothes" only returns as skin if the colour test rescues it. Image Skin Mask exists for exactly this case.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The pictures to find skin in; IMAGE. Each picture of a batch is masked on its own. | |
| areas | COMBO | all skin | Which skin the mask keeps. 'all skin' = face and body; 'face' = from the jaw to the forehead; 'body' = everything below the jaw. |
| eyes | COMBO | remove with brows | 'remove with brows' = cut out the eyes and the eyebrows; 'remove' = the eyes alone; 'keep' = leave both in the mask. |
| mouth | COMBO | remove inside | 'remove inside' = cut out the teeth and tongue between the lips; 'remove lips' = the lips as well; 'keep' = leave the mouth in the mask. |
| tolerance | FLOAT | 1.000.5–2 | How far a colour may sit from each person's own skin and still count. 1.0 = as measured; 1.5 = takes in deep shadow and flushed skin; 0.7 = stricter, for beige or tan clothing being caught. |
| person_threshold | FLOAT | 0.400.05–0.95 | How sure the person detector has to be. 0.4 = most people in a crowd; 0.7 = only clear, large figures. Skin outside every person found is left out. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | MASK | The skin; MASK at the picture's size with a soft edge. 1 = skin, 0 = everything else. |