Nodes/BrainDead Nodes/BD Fashn Human Parser
ComfyUI Node

BD Fashn Human Parser

Human parsing into 18 regions — and the license asterisk you shouldn't skip

By BizaNator·Created 8 months ago·Updated 3 days ago· 15
BD Fashn Human Parser
  • image
  • parse_map
model_idfashn-ai/fashn-human-parser
deviceauto
dtypefp16
confidence_threshold0.00
cache_dir

"Human parser" is one of those terms that sounds scarier than it is. It means: take a photo of a person and assign every pixel a semantic label - background, face, hair, top, dress, skirt, pants, and a dozen more. This node runs the fashn-ai/fashn-human-parser SegFormer-B4 model and hands you that classification as a HUMAN_PARSE_MAP. It's the thing you reach for when you need an outfit mask ("just the jacket"), a skin mask, or region masks to drive a parts pipeline or a PBR pass, and you don't want to hand-prompt SAM3 for every single region.

This is one of two human-parser backends in ComfyUI-BrainDead - the sibling is BD ATR Human Parser (mattmdjaga's segformer_b2_clothes), and the pack treats them as interchangeable upstreams for the same downstream nodes. The functional difference is small. The license difference is not, and I'll get to it.

How it works

Under the hood it's a SegFormer-B4 semantic segmentation model from HuggingFace. First run downloads the weights automatically (to models/huggingface/ in your ComfyUI dir, or wherever HF is configured), then inference is one forward pass per image. The model was trained at 384×576, which matters more than you'd think.

The node's output is not an image - it's a HUMAN_PARSE_MAP, a small struct that carries the class map, per-pixel confidence, the 18 FASHN labels, and which backend produced it. You can't preview it directly; it has to flow into one of the pack's map-consuming nodes: BD Human Parser Mask Split, BD Human Parser Named Mask, BD Human Parser Mask Clean, or BD Human Parser Preview for a colorized look.

The inputs that matter

  • image - your person image.
  • model_id - defaults to fashn-ai/fashn-human-parser. Leave it alone unless you know a better repo.
  • confidence_threshold - 0 means off (use raw argmax). The tooltip's tip is the good one: try 0.5–0.7 to scrub low-confidence noise, and downsample big images to ~512px before this node because FASHN's 384×576 training resolution blurs edges on the upsample.
  • device / dtype - auto/fp16 defaults are fine; drop to cpu/fp32 if you're squeezed.

The license asterisk

The model weights ship under the NVIDIA Source Code License, which is research/non-commercial leaning - and the pack's own description flags it. This isn't paranoia; people literally hit this wall when trying to ship FASHN-based tooling commercially (there are threads about exactly this on r/StableDiffusion). If there's any chance your output is commercial, swap to BD ATR Human Parser - its weights are MIT - and the downstream split/clean/preview nodes won't care which backend fed them.

Install

Standard BrainDead pack install:

cd ComfyUI/custom_nodes
git clone https://github.com/BizaNator/ComfyUI-BrainDead
cd ComfyUI-BrainDead
pip install -r requirements.txt

Or just search "BrainDead" in ComfyUI Manager. The pack's requirements.txt is tiny (it's mostly the Pixal3D/MoGe stack), so this node brings in nothing heavy beyond transformers, which ComfyUI almost certainly already has. It's built against the V3 extension API, so keep ComfyUI reasonably current. First run downloads the SegFormer weights - give it a minute.

Troubleshooting

  • Blurry class boundaries - you're feeding it 1024px+ images. Downsize to ~512 before the node; it was trained small.
  • Speckle in the result - raise confidence_threshold to 0.5–0.7, then run the mask through BD Human Parser Mask Clean.
  • Weights land somewhere you don't want - set cache_dir explicitly.
  • It says MIT matters but you already used FASHN - rerun the pipeline with the ATR backend; same parse-map type, same downstream nodes.
Category🧠BrainDead/Segmentation

Inputs (6)

NameTypeDefaultDescription
imageIMAGE
model_idSTRINGfashn-ai/fashn-human-parserHuggingFace repo id
deviceoptCOMBOauto3 options: auto, cuda, cpu
dtypeoptCOMBOfp163 options: fp16, bf16, fp32
confidence_thresholdoptFLOAT0.000–1Pixels 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 (FASHN was trained at 384×576). Large inputs blur edges on the upsample.
cache_diroptSTRINGOverride HF cache dir. Blank → HF_HOME env var, or ComfyUI models/huggingface/, or HF default.

Outputs (1)

NameTypeDescription
parse_mapHUMAN_PARSE_MAP