FASHN Human Parser (All Masks)
All 18 Human-Parser Masks, Stacked and Ready
- image
- all_masks
Where the plain FASHN Human Parser gives you a color-coded map and the Mask variant gives you one binary mask, this node gives you all eighteen at once - a single MASK tensor with 18 frames, one per class, stacked in class-ID order. It's the batch version for people who want to do something with every part of the subject rather than just one.
You'd reach for this when you're building a compositing pipeline that treats body parts as layers: keep the face sharp, re-render the top, blur the background, all in one graph. Since every class mask comes from the same single SegFormer-B4 forward pass, pulling all 18 costs you nothing extra over pulling one - so if you know you'll want more than a couple of labels, this node is the efficient choice. Grab all the masks once, then slice out the frames you care about downstream.
The inputs and outputs
Same shared inputs as the rest of the pack:
image- the IMAGE tensor to parse (first frame only, like the others).device/dtype/model_id-auto/cuda/cpu/mps,float32/float16/bfloat16, and the HF model ID defaulting tofashn-ai/fashn-human-parser. Setdevicetoautoanddtypetofloat16and move on.
One output: all_masks, an 18-frame MASK batch.
The ordering is the whole gotcha. Frames follow class-ID order, not anything intuitive, and ID 0 is background - the background is the first frame, not the last. The mapping is: 0 background, 1 face, 2 hair, 3 top, 4 dress, 5 skirt, 6 pants, 7 belt, 8 bag, 9 hat, 10 scarf, 11 glasses, 12 arms, 13 hands, 14 legs, 15 feet, 16 torso, 17 jewelry. If you're indexing frames blind, you'll grab the background when you meant the top. Remember it by the ID order in the pack's README, or test with a SaveImage on a couple of frames before you trust the indexing in a real workflow.
Install and quirks
ComfyUI Manager (search FASHN Human Parser) or:
cd ComfyUI/custom_nodes
git clone https://github.com/dsrunpod/comfyui-fashn-human-parser
cd comfyui-fashn-human-parser
pip install -r requirements.txt
Restart, then let the ~244 MB model download on first run. The dependencies are the pack's usual set - transformers, opencv-python (actually used, so install it if ComfyUI complains), numpy, Pillow.
Honestly, this node is for the niche case where you're building a layered-compositing workflow or a custom tool on top of the parser. If you just want to swap one garment, the Mask node is simpler and you should use that. But if you're scripting per-class edits, one pass that returns every mask is exactly what you want - just don't forget frame 0 is the background.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| device | COMBO | 4 options: auto, cuda, cpu, mps | |
| dtype | COMBO | 3 options: float32, float16, bfloat16 | |
| model_id | STRING | fashn-ai/fashn-human-parser | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| all_masks | MASK | — |