BD ATR Human Parser
Cut a character into 18 clothing/body regions with one SegFormer pass
- image
- parse_map
Sometimes you don't need SAM3's open-vocabulary power - you just need to know where the hat, jacket, pants, and shoes are. BD ATR Human Parser is the fast, boring version of that: a SegFormer human parser that labels a character image into 18 semantic regions using the classic ATR scheme (background, hat, hair, gloves, sunglasses, upper/lower clothes, skirt, socks, shoes, face, skin, scarf, jacket, dress, etc.). One forward pass, one HUMAN_PARSE_MAP out.
It's one of two human parsers in the pack - this is the ATR one, the other (BD Fashn Human Parser) uses a different SegFormer with its own 18-class scheme. They feed the same downstream nodes, so picking is mostly about which label set matches your task. ATR is the older, more widely used scheme, and the default weights here are mattmdjaga/segformer_b2_clothes, which are MIT-licensed - nice if licensing ever matters for your output.
Where it fits
The output parse_map is a HUMAN_PARSE_MAP, not an image - it's meant to flow into the pack's mask-split nodes: BD_HumanParserMaskSplit (split the map into per-region MASK outputs), BD_HumanParserNamedMask (pull one label as a mask), or BD_HumanParserMaskClean / BD_HumanParserPreview. That's the whole pipeline that turns "photo of a character" into "a mask of just the upper clothes."
A fair warning from the pack itself: human parsers are trained on photos, so for heavily stylized art (anime, painterly, cel-shaded) results degrade. Reach for SAM3 (BD SAM3 Multi-Prompt) when your art is stylized; use this when you want the fast, deterministic, class-based pass.
The inputs that matter
- image - the character image.
- model_id - defaults to
mattmdjaga/segformer_b2_clothes; you can point it at any HuggingFace repo that uses the ATR 18-class scheme. - confidence_threshold - 0 by default (off). Pixels whose max-softmax score falls below this get treated as background. Try 0.5–0.7 to scrub noise out of the edges.
- device / dtype -
autoandfp16defaults; tweak only if you're fighting VRAM. - cache_dir - blank resolves to
HF_HOME, then ComfyUImodels/huggingface/, then the HF default. The weights auto-download on first run either way.
Output is the single parse_map (HUMAN_PARSE_MAP).
Install and gotchas
The pack install is standard:
cd ComfyUI/custom_nodes
git clone https://github.com/BizaNator/ComfyUI-BrainDead
cd ComfyUI-BrainDead
pip install -r requirements.txt
(Or ComfyUI Manager → search "BrainDead".) Restart, and it's under 🧠BrainDead/Segmentation. This pack needs a recent ComfyUI with the V3 node API - if the nodes don't appear, update ComfyUI first.
The one quality trick that actually matters: the model was trained at 512×512, so feed it images downscaled to ~512px for sharper boundaries. The node's own tooltip says it plainly - large inputs blur edges on the upsampled output. Downsize, parse, then upscale the mask if you need it at full res. Costs almost nothing and visibly tightens the region edges.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model_id | STRING | mattmdjaga/segformer_b2_clothes | HuggingFace repo id (must use ATR 18-class scheme) |
| deviceopt | COMBO | auto | 3 options: auto, cuda, cpu |
| dtypeopt | COMBO | fp16 | 3 options: fp16, bf16, fp32 |
| confidence_thresholdopt | FLOAT | 0.000–1 | Pixels with max-softmax below this become background. 0 = off. Try 0.5–0.7 to clean noise. Tip: for sharper boundaries, downsize the image to ~512px before this node (ATR was trained at 512×512). Large inputs blur edges on the upsample. |
| cache_diropt | STRING | Override HF cache dir. Blank → HF_HOME env var, or ComfyUI models/huggingface/, or HF default. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| parse_map | HUMAN_PARSE_MAP | — |