Nodes/Comfyui-SAL-VTON/Apply SAL-VTON
ComfyUI Node

Apply SAL-VTON

Free ComfyUI virtual try-on, no $50 wrapper required

By ratulrafsan·Created 2 years ago·Updated 2 years ago· 92
Apply SAL-VTON
  • garment
  • person
  • garment_mask
  • SAL-VTON
  • Landmarked Person
  • Landmarked Garment

Search "SAL-VTON ComfyUI" and there's a decent chance you land on a $50 paid workflow first - a wrapper built by someone else around the same underlying model. SALVTON_Apply is the actual free node: clone the repo, download three model files, and you've got clothing swap running locally for nothing. Worth knowing that split exists before you reach for your wallet.

It implements SAL-VTON - "Linking Garment With Person via Semantically Associated Landmarks for Virtual Try-On," a CVPR 2023 paper - wrapped around ModelScope's inference code. The pitch: put a garment photo onto a person photo and get something that looks worn, without diffusion inpainting or a text prompt doing the heavy lifting. It's landmark-based - the model finds corresponding points between garment and body, then warps and composites the garment onto the person using those correspondences, rather than generating the clothed person from scratch. That shows up in both directions: garment detail and texture tend to survive better than a generative model preserves them, but it also can't invent a pose the garment photo doesn't already suggest.

The inputs and outputs that matter

All three inputs are required, and all three are typed IMAGE:

  • person - the photo you're dressing.
  • garment - the flat clothing shot you're putting on them. The README is specific here: it needs to be 768×1024. If yours isn't, resize it in ComfyUI first rather than feeding it in raw.
  • garment_mask - the shape of the garment, isolated. Note the type: it's an IMAGE, not a MASK, despite the name - a common trip-up if you're generating your mask with a node that outputs MASK (rembg, SAM, BiRefNet) and need to convert it to an image before wiring it in.

Three outputs come back, all IMAGE:

  • SAL-VTON - the composited try-on result. This is what you save or preview.
  • Landmarked Person and Landmarked Garment - visualizations of the landmarks the model detected on each input. Since the whole method hinges on getting those correspondences right, these two are your debug view: check them before you trust the final composite, especially if the result looks warped or misaligned.

How to install it

Via ComfyUI Manager: search "Comfyui-SAL-VTON", install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ratulrafsan/Comfyui-SAL-VTON
cd Comfyui-SAL-VTON
pip install -r requirements.txt

Run that pip install from inside the ComfyUI venv - the author calls this out directly in the README.

Then the model files - the part people skip and then wonder why the node errors out. Download landmark.pth, warp.pth, and pytorch_model.bin from ModelScope (linked in the repo README), create a salvton folder inside ComfyUI/models/, and drop all three in there. No sizes are published, so budget some time rather than assuming it's small.

Common issues & troubleshooting

Bad results, and the background is the culprit. The README says it outright: results are poor if the person image doesn't have a white background. This is worth doing properly rather than eyeballing it - isolate the subject and replace the background with white first. The README suggests rembg or SAM; if you're setting this up fresh, reach for BiRefNet instead, which ComfyUI now ships natively and gives noticeably cleaner edges on hair and complex outlines than the older rembg default the README was written against.

A tensor size mismatch error. People running this exact node have hit The size of tensor a (1023) must match the size of tensor b (1024) - a one-pixel-off error that traces straight back to the garment resolution requirement. If your garment image isn't cleanly 768×1024, resize it explicitly before it hits this node rather than trusting an auto-resize to land exactly right.

The pose doesn't match and the result looks meh. Not a bug, just the honest limit of the method - it warps a garment onto a person using landmark correspondences, it doesn't generate a new pose. Community testing on this exact node found results ranging from genuinely impressive to failing outright, and the deciding factor was usually how close the person's pose was to what the garment shot implies. Don't expect it to dress someone in a dramatically different pose than the reference.

Gaps or overlap at the mask edges. Some users report the resize/fill step not landing cleanly, leaving visible seams at the mask boundary. If you see that, double-check garment_mask is a tight, accurate outline of just the garment - a loose or misaligned mask is the first thing to rule out.

Worth comparing against OOTDiffusion. If SAL-VTON isn't cutting it on a given garment, people in the ComfyUI community often reach for OOTDiffusion instead - opinions are split on which preserves detail better, so try both on your hard cases before picking one.

CategoryClothing - SAL-VTON

Inputs (3)

NameTypeDefaultDescription
garmentIMAGE
personIMAGE
garment_maskIMAGE

Outputs (3)

NameTypeDescription
SAL-VTONIMAGE
Landmarked PersonIMAGE
Landmarked GarmentIMAGE