Nodes/BrainDead Nodes/BD Human Parser Mask Split
ComfyUI Node

BD Human Parser Mask Split

One parse map in, nine ready-to-use region masks out

By BizaNator·Created 8 months ago·Updated 3 days ago· 15
BD Human Parser Mask Split
  • 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

  • skin mask → skin-tone processing, face/neck shader work, or as a negative to keep a recoloring pass off the person.
  • all_clothing mask → outfit masks for garment editing or a PBR albedo pass.
  • background mask → 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. footwear on 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.
Category🧠BrainDead/Segmentation

Inputs (1)

NameTypeDefaultDescription
parse_mapHUMAN_PARSE_MAP

Outputs (9)

NameTypeDescription
all_clothingMASK
upper_bodyMASK
lower_bodyMASK
accessoriesMASK
skinMASK
footwearMASK
hairMASK
faceMASK
backgroundMASK