Nodes/comfyui-try-on/Fashion Cloth Mask
ComfyUI Node

Fashion Cloth Mask

46 toggles that turn a photo into the exact try-on mask

By MixLabPro·Created 2 years ago·Updated 2 years ago· 17
Fashion Cloth Mask
  • image
  • mask
shirtfalse
topfalse
sweaterfalse
cardiganfalse
jacketfalse
vestfalse
pantsfalse
shortsfalse
skirtfalse
coatfalse
dressfalse
jumpsuitfalse
capefalse
glassesfalse
hatfalse
hairaccessoryfalse
tiefalse
glovefalse
watchfalse
beltfalse
legwarmerfalse
tightsfalse
sockfalse
shoefalse
bagwalletfalse
scarffalse
umbrellafalse
hoodfalse
collarfalse
lapelfalse
epaulettefalse
sleevefalse
pocketfalse
necklinefalse
bucklefalse
zipperfalse
appliquefalse
beadfalse
bowfalse
flowerfalse
fringefalse
ribbonfalse
rivetfalse
rufflefalse
sequinfalse
tasselfalse

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.

Category♾️Mixlab/TryOn

Inputs (47)

NameTypeDefaultDescription
imageIMAGE
shirtBOOLEANfalse
topBOOLEANfalse
sweaterBOOLEANfalse
cardiganBOOLEANfalse
jacketBOOLEANfalse
vestBOOLEANfalse
pantsBOOLEANfalse
shortsBOOLEANfalse
skirtBOOLEANfalse
coatBOOLEANfalse
dressBOOLEANfalse
jumpsuitBOOLEANfalse
capeBOOLEANfalse
glassesBOOLEANfalse
hatBOOLEANfalse
hairaccessoryBOOLEANfalse
tieBOOLEANfalse
gloveBOOLEANfalse
watchBOOLEANfalse
beltBOOLEANfalse
legwarmerBOOLEANfalse
tightsBOOLEANfalse
sockBOOLEANfalse
shoeBOOLEANfalse
bagwalletBOOLEANfalse
scarfBOOLEANfalse
umbrellaBOOLEANfalse
hoodBOOLEANfalse
collarBOOLEANfalse
lapelBOOLEANfalse
epauletteBOOLEANfalse
sleeveBOOLEANfalse
pocketBOOLEANfalse
necklineBOOLEANfalse
buckleBOOLEANfalse
zipperBOOLEANfalse
appliqueBOOLEANfalse
beadBOOLEANfalse
bowBOOLEANfalse
flowerBOOLEANfalse
fringeBOOLEANfalse
ribbonBOOLEANfalse
rivetBOOLEANfalse
ruffleBOOLEANfalse
sequinBOOLEANfalse
tasselBOOLEANfalse

Outputs (1)

NameTypeDescription
maskMASK