BD Human Parser Mask Split
One parse map in, nine ready-to-use region masks out
- parse_map
- all_clothing
- upper_body
- lower_body
- accessories
- skin
- footwear
- hair
- face
- background
The point of a human parser is the masks, and BD_HumanParserMaskSplit is where they actually come out. Feed it a HUMAN_PARSE_MAP and it emits nine group masks at once: all_clothing, upper_body, lower_body, accessories, skin, footwear, hair, face, and background.
It's the node that turns "I parsed this person" into "here's a clothing mask for the PBR pass and a skin mask for the shader" without you manually mashing class indices together. If you've ever had to hand-assemble a "clothing = top + dress + skirt + pants" union, you'll appreciate that this is already done.
How it works
The magic is that the group masks are defined over labels, not indices - the pack keeps authoritative class tables for both backends (FASHN's 18 classes and ATR's 18 classes, which use different index numbers for the same concepts). So all_clothing means "top, dress, skirt, pants, belt, scarf, hat, bag" whether the map came from the FASHN backend or the ATR one, and the node does the label→index translation for you. Labels that don't exist in the active backend's scheme are silently zero - no errors, just an empty mask for that group.
The grouping is sensible for asset work: upper_body (top/dress/scarf), lower_body (pants/skirt), skin (face, arms, hands, legs, feet, torso), footwear (feet/shoes), accessories (bag, belt, hat, glasses, jewelry). background is the inverse of everything else.
What it's for
skinmask → skin-tone processing, face/neck shader work, or as a negative to keep a recoloring pass off the person.all_clothingmask → outfit masks for garment editing or a PBR albedo pass.backgroundmask → check what the parser thinks is backdrop, or composite against it.hair/face→ the usual suspects for head work.
The only input is parse_map. No settings, no configuration - wire the parser in, get nine MASK outputs, route them wherever you need. Run it through BD Human Parser Mask Clean first if the raw parse is noisy.
Install
Part of the BrainDead pack:
cd ComfyUI/custom_nodes
git clone https://github.com/BizaNator/ComfyUI-BrainDead
cd ComfyUI-BrainDead
pip install -r requirements.txt
Or search "BrainDead" in ComfyUI Manager and restart. No extra dependencies - pure array slicing.
Troubleshooting
- An output is all black - likely a label group the backend doesn't cover (e.g.
footwearon a cropped portrait with no feet). The node intentionally returns zeros instead of erroring. - Masks look noisy - clean the map upstream with BD Human Parser Mask Clean before splitting.
- You need a single specific label, not a group - use BD Human Parser Named Mask instead.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| parse_map | HUMAN_PARSE_MAP | — |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| all_clothing | MASK | — |
| upper_body | MASK | — |
| lower_body | MASK | — |
| accessories | MASK | — |
| skin | MASK | — |
| footwear | MASK | — |
| hair | MASK | — |
| face | MASK | — |
| background | MASK | — |