Fashion Cloth Mask
46 toggles that turn a photo into the exact try-on mask
- image
- mask
If CatVTONNode is the engine of this pack, Fashion Cloth Mask is the steering wheel. It's a semantic-segmentation node: feed it a photo and it labels every pixel of clothing, then outputs a mask of exactly the garment pieces you asked for. Its whole reason to exist is producing the mask input that CatVTONNode needs - the region that gets redrawn with the new garment.
How it works
It runs the image through a Segformer B3 fashion model (sayeed99/segformer-b3-fashion on Hugging Face) that assigns one of 46 labels to each pixel. That's not just garment types - shirt, sweater, jacket, dress, coat - but small details too: zipper, pocket, collar, sleeve, ruffle, sequin, bow, even "epaulette". Everything you might want to isolate from a fashion photo, the model knows. The node then builds a mask from the labels you pick and returns it as a single MASK.
The gotcha that trips up everyone
The toggles are opt-in and inverted-feeling: every checkbox defaults to OFF, and turning one ON means "this piece becomes white in the mask" - i.e., the region marked for replacement. Leave them all off and you get a perfectly useless all-black mask: nothing selected, nothing will be swapped. The node's own display labels are in Chinese (e.g. ✔ 衬衫、罩衫), which doesn't help the confusion on first open.
To swap a shirt, turn ON only shirt. To swap the whole outfit, turn on the top-level pieces (top, pants, skirt…). The white area of the output mask is the region CatVTONNode will redraw, so be deliberate: everything you check becomes a "replace me" zone.
Because it's marked as an output node, you also get a live preview of the mask in the UI - worth a glance before you wire it anywhere, since the all-black default is easy to miss.
Installing it
ComfyUI Manager → comfyui-try-on, or:
cd ComfyUI/custom_nodes
git clone https://github.com/shadowcz007/comfyui-try-on
restart, then drop the model where the code hardcodes it:
ComfyUI/models/segformer/segformer-b3-fashion
Note the exact folder name - dash, not underscore, and not "the HF download default folder". The node looks up that literal path, so if your download landed somewhere else, it errors out. It also needs transformers and torchvision in ComfyUI's Python; this pack ships no requirements.txt, so Manager won't install those for you.
Performance and quirks
The Segformer model is loaded from disk on every single run - there's no caching. The first mask is slow, and every re-run pays the load again, so expect a pause each time you hit Execute. Once the mask is out, though, it's instant to iterate on the diffusion side, so the hit is tolerable.
One honest caveat: 46 toggles is a lot of knobs for what is ultimately a two-step chore (pick garment, make mask). If you're only ever swapping whole tops or bottoms, the coarser sibling Fashion Cloth Mask 2 is faster to configure. Reach for this one when you need fine-grained control - pocket patches, collars, sleeves - or when the detail classes are the whole point.
Inputs (47)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| shirt | BOOLEAN | false | — |
| top | BOOLEAN | false | — |
| sweater | BOOLEAN | false | — |
| cardigan | BOOLEAN | false | — |
| jacket | BOOLEAN | false | — |
| vest | BOOLEAN | false | — |
| pants | BOOLEAN | false | — |
| shorts | BOOLEAN | false | — |
| skirt | BOOLEAN | false | — |
| coat | BOOLEAN | false | — |
| dress | BOOLEAN | false | — |
| jumpsuit | BOOLEAN | false | — |
| cape | BOOLEAN | false | — |
| glasses | BOOLEAN | false | — |
| hat | BOOLEAN | false | — |
| hairaccessory | BOOLEAN | false | — |
| tie | BOOLEAN | false | — |
| glove | BOOLEAN | false | — |
| watch | BOOLEAN | false | — |
| belt | BOOLEAN | false | — |
| legwarmer | BOOLEAN | false | — |
| tights | BOOLEAN | false | — |
| sock | BOOLEAN | false | — |
| shoe | BOOLEAN | false | — |
| bagwallet | BOOLEAN | false | — |
| scarf | BOOLEAN | false | — |
| umbrella | BOOLEAN | false | — |
| hood | BOOLEAN | false | — |
| collar | BOOLEAN | false | — |
| lapel | BOOLEAN | false | — |
| epaulette | BOOLEAN | false | — |
| sleeve | BOOLEAN | false | — |
| BOOLEAN | false | — | |
| neckline | BOOLEAN | false | — |
| buckle | BOOLEAN | false | — |
| zipper | BOOLEAN | false | — |
| applique | BOOLEAN | false | — |
| bead | BOOLEAN | false | — |
| bow | BOOLEAN | false | — |
| flower | BOOLEAN | false | — |
| fringe | BOOLEAN | false | — |
| ribbon | BOOLEAN | false | — |
| rivet | BOOLEAN | false | — |
| ruffle | BOOLEAN | false | — |
| sequin | BOOLEAN | false | — |
| tassel | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | MASK | — |