ComfyUI Extension: comfyui-fashn-human-parser

Authored by dsrunpod

Created

Updated

0 stars

Run ComfyUI workflows without the setup

No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

Custom nodes for FASHN Human Parser, a SegFormer-B4 model fine-tuned for human parsing with 18 semantic classes optimized for fashion and virtual try-on workflows.

Looking for a different extension?

Custom Nodes (0)

    README

    ComfyUI FASHN Human Parser

    ComfyUI custom nodes for FASHN Human Parser — a SegFormer-B4 model fine-tuned for human parsing with 18 semantic classes, optimised for fashion and virtual try-on workflows.


    Installation

    Option A – ComfyUI Manager

    Search for FASHN Human Parser and install from the Manager.

    Option B – Manual

    cd ComfyUI/custom_nodes
    git clone https://github.com/<your-fork>/comfyui-fashn-human-parser
    cd comfyui-fashn-human-parser
    pip install -r requirements.txt
    

    Model weights (~244 MB) are downloaded automatically from HuggingFace on first use.


    Nodes

    🟦 FASHN Human Parser

    Full segmentation node.

    | Input | Type | Description | |---|---|---| | image | IMAGE | Input image | | device | combo | auto / cuda / cpu / mps | | dtype | combo | float32 / float16 / bfloat16 | | model_id | STRING | HuggingFace model ID (default: fashn-ai/fashn-human-parser) |

    | Output | Type | Description | |---|---|---| | segmentation_image | IMAGE | Colour-coded visualisation of all 18 classes | | label_id_mask | MASK | Greyscale mask where pixel value encodes class ID (normalised 0-1) |


    🟩 FASHN Human Parser (Mask)

    Extracts a binary mask for one or more body-part labels.

    | Input | Type | Description | |---|---|---| | image | IMAGE | Input image | | label | combo | Primary label to extract (see table below) | | device / dtype / model_id | — | Same as above | | extra_labels (optional) | STRING | Comma-separated additional labels to OR-merge, e.g. dress,skirt | | blur_radius (optional) | INT | Gaussian blur radius for soft edges (0 = off) | | invert (optional) | BOOLEAN | Invert the output mask |

    Output: mask (MASK)


    🟨 FASHN Human Parser (All Masks)

    Returns all 18 class masks stacked as a single (18, H, W) MASK batch. Useful for downstream per-class compositing nodes.

    | Output | Type | Description | |---|---|---| | all_masks | MASK | 18-frame mask batch (one frame per class, in ID order) |


    Label Classes

    | ID | Label | ID | Label | |---|---|---|---| | 0 | background | 9 | hat | | 1 | face | 10 | scarf | | 2 | hair | 11 | glasses | | 3 | top | 12 | arms | | 4 | dress | 13 | hands | | 5 | skirt | 14 | legs | | 6 | pants | 15 | feet | | 7 | belt | 16 | torso | | 8 | bag | 17 | jewelry |


    Model Details

    • Architecture: SegFormer-B4 (MIT-B4 encoder + MLP decoder)
    • Input size: 384 × 576 (W × H)
    • Classes: 18 semantic human-body parts
    • Base model: nvidia/mit-b4
    • License: NVIDIA SegFormer Source Code License

    Typical Workflow

    LoadImage → FASHN Human Parser (Mask)  [label=top, blur_radius=4]
                             │
                             ▼ mask
                     InpaintModelConditioning / IPAdapter / ...
    

    Links

    Run ComfyUI workflows without the setup

    No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

    Learn more