IDM-VTON: Virtual Try-On From One Photo, Step by Step
IDM-VTON puts a garment on a person from two photos. Here's how to prepare every input, pick the right category, debug masks and get repeatable try-ons on each::labs.
By Eftal Yurtseven · Nov 24, 2026 · 9 min read

A product page with a flat garment shot asks the shopper to do the hard part: imagine it on a body. Most don't bother. They scroll. That's the gap virtual try-on is meant to close, and it's why IDM-VTON keeps showing up in searches from developers building fashion apps. You hand it one photo of a person and one photo of a garment, and it returns the person wearing that garment, with the fabric, print and fit carried over instead of redrawn from scratch.
The catch is that IDM-VTON rewards preparation. Feed it a sloppy portrait and a cluttered garment photo and you'll get a sloppy result. Feed it the right inputs with the right category and a sharp garment description, and it gets surprisingly close to a studio shoot. This guide walks through every input of the IDM-VTON model on each::labs, step by step, so your first batch of try-ons looks like a catalog and not like a collage.
What IDM-VTON Actually Is
IDM-VTON is the official implementation of the ECCV 2024 paper "Improving Diffusion Models for Authentic Virtual Try-on in the Wild" by Yisol Choi, Sangkyung Kwak, Kyungmin Lee, Hyungwon Choi and Jinwoo Shin. The word that matters in that title is authentic. Earlier try-on systems tended to paste a warped garment onto a body, which works until the shirt has a logo, a stripe or a pocket. Then the details smear.
IDM-VTON is a diffusion model, and its training builds on a pretrained SDXL IP-Adapter and image encoder, which is how it keeps the garment's visual identity while it re-renders the clothing around a new pose. The authors trained and evaluated it on two public try-on datasets, VITON-HD and DressCode, and DressCode is split into three garment groups: upper body, lower body and dresses. Keep those three groups in mind. They come back as the most important setting you'll choose.
One practical note before you build a product on it: the IDM-VTON repository releases its code and checkpoints under a CC BY-NC-SA 4.0 license, which is a non-commercial license. Read it before you put try-on output in front of paying customers, and decide with your team what that means for your use.

How IDM-VTON Works on each::labs
On each::labs, IDM-VTON is one request with a short list of fields. Two are required. Everything else is a lever you pull when the default isn't enough.
human_img is the person. garm_img is the garment, and the model's own description says it should match the category and "can be a product image or even a photo of someone" wearing it. garment_des is a short text description of the garment. category tells the model which part of the body to dress. crop, force_dc, mask_img, mask_only, steps and seed handle framing, the DressCode variant, masking, debugging, quality and repeatability.
Here's a complete request body you can adapt:
{
"human_img": "https://your-cdn.example/models/ayla-front-3x4.jpg",
"garm_img": "https://your-cdn.example/products/linen-shirt-flat.jpg",
"garment_des": "Relaxed fit linen button-up shirt, short sleeves, sage green",
"category": "upper_body",
"crop": false,
"steps": 30,
"seed": 42
}That's the whole contract. The rest of this guide is about filling each field well, in the order that saves you the most retries.

Step 1: Shoot the Person Photo for 3:4
The person photo does more work than the garment photo, and it's where most bad try-ons start. The model's schema is blunt about it: if the human image is not 3:4, check crop. That ratio isn't arbitrary. The repository runs VITON-HD inference at 768x1024, which is exactly 3:4, so a portrait in that shape lands where the model expects it.
You have two options. Crop your portraits to 3:4 yourself and set crop to false, so nothing gets trimmed that you wanted to keep. Or leave crop at its default of true and let the model trim the outer areas down to the important part. Self-cropping wins when you have a consistent shooting setup. The automatic crop wins when your inputs come from users and you can't control their framing.
Beyond the ratio, think like a photographer working for a tailor. Front-facing or a slight three-quarter turn. Arms away from the torso, so the model can see where the sleeves should fall. Even light without hard shadows across the chest. A plain background helps too: if your source photos are busy, run them through a background remover such as Bria Background Remove first. Crossed arms, a bag strap across the body or a jacket over the shirt you want replaced will all fight the model. Don't make it guess.
Step 2: Pick a Garment Shot the Model Can Read
A clean product image is the safest garm_img: the garment alone, flat or on a ghost mannequin, filling most of the frame, on a plain background. The model needs to see the collar shape, the hem, the print and the sleeve length clearly, because whatever it can't see, it has to invent.
The schema also allows a photo of someone wearing the garment, which is handy when all you have is a lookbook shot. Treat that as the second-best option. Folds, shadows and the original wearer's pose all become noise the model has to see through, so pick a shot where the garment is front-on and unobstructed.
And match the garment to the category. A pair of trousers sent with the upper body setting is not a creative experiment. It's a wasted call.

Step 3: Write a garment_des That Does Real Work
garment_des is the only text field in the request, and it's easy to treat it as a label. Don't. The authors' pipeline pairs garments with captions, which is a good hint that the description carries information the image alone doesn't settle: fit, length, fabric and how the piece is supposed to sit on the body.
The schema's own example is a good baseline:
Short Sleeve Round Neck T-shirt
That works for a plain tee. For anything with character, say what a shopper would notice first. Garment type, then sleeve and neckline, then fit, then fabric or color:
Oversized cotton hoodie, long sleeves, kangaroo pocket, charcoal grey
Cropped denim jacket, long sleeves, pointed collar, light wash
High waisted wide leg trousers, pleated front, ankle length, cream wool
Sleeveless midi slip dress, V neckline, bias cut satin, emerald green
Fitted ribbed knit turtleneck, long sleeves, tucked in, black
Keep it short and physical. "Our bestselling summer essential" tells the model nothing. "Cropped" and "ankle length" tell it where the hem goes, which is exactly the kind of decision a flat product photo leaves open.
Step 4: Choose the Right IDM-VTON Category
category accepts three values, and you have to type them exactly as the API spells them: upper_body, lover_body and dresses. Yes, the lower-body option is spelled lover_body in the schema. Copy it as is. "Fixing" the spelling in your code will break the request.
upper_body covers shirts, tees, knits, hoodies and jackets. lover_body covers trousers, jeans, shorts and skirts. dresses covers full-length pieces that dress the body from shoulder to hem. If a garment sits on the line (a long tunic, a jumpsuit), pick by what the shopper is buying, then judge the output.
The category also decides which version of the model runs. force_dc switches to the DressCode version of IDM-VTON, the one tied to the dataset with those same three garment groups. It's false by default, except when the category is dresses, where it switches on for you. If upper or lower body results look off for a garment that resembles DressCode-style catalog imagery, setting force_dc to true is a quick experiment worth one call.

Step 5: Use Masks to Control Where the Garment Goes
Before the model can dress someone, it has to decide which pixels belong to the old clothes. Without help, it works that out on its own. With mask_img, you tell it. The schema calls the mask optional "but faster", so a mask saves time as well as guesswork.
The smartest move is to look at the model's own decision first. Set mask_only to true and IDM-VTON returns just the mask it would use, without dressing anyone. It's the debugging step most people skip. If a try-on keeps leaving a strip of the old shirt at the waist, or keeps eating into the person's hair, the mask is almost always the reason, and mask_only shows you that in one call.
From there you have a clean workflow. Run mask_only on a new photo, check the mask, and if it's wrong, draw a corrected one (white where the new garment should go) and pass it as mask_img on the real run. For a catalog where you reuse the same model photos with dozens of garments, you can store a good mask per photo and per category and skip the automatic step every time.
Step 6: Tune Steps and Seed for Repeatable Results
steps defaults to 30 and goes up to 40. Thirty matches what the repository uses for its own VITON-HD inference, so it's a sensible place to stay while you get the inputs right. Push toward 40 for hero images where small details like buttons, ribbing or a printed graphic need to hold up.
seed defaults to 42. That default matters more than it looks: if you never change it, the same inputs will give you comparable results, which is what you want when you're A/B testing two garment descriptions or two masks. Change one thing at a time with a fixed seed, and you'll know which change helped. When you like the setup and want a few alternatives to choose from, vary the seed and keep everything else locked.
Build a Try-On Pipeline on each::labs
One try-on is a demo. A product page needs a pipeline, and IDM-VTON slots into one cleanly. A typical chain looks like this: clean the garment photo with a background remover, run IDM-VTON with a stored mask and a fixed seed, then upscale the winner with an image upscaler such as Topaz Image Upscale before it goes on the page. You can wire those steps together in each::labs AI Flows so a new SKU goes in one end and a finished try-on comes out the other.
IDM-VTON isn't the only try-on option on each::labs, either. P-Image Try-On from Pruna takes a different approach, and our guide on dressing anyone from one photo covers it in depth. If you're building a full fashion stack, each::labs for fashion product visuals maps out how try-on, background removal and the rest fit together. Running the same garment through two try-on models and keeping the better result is a perfectly good production strategy, and the image-to-image models page lists more tools for the steps around it.
Frequently Asked Questions
What is IDM-VTON used for?
Virtual try-on: showing a specific garment on a specific person from two photos. Fashion stores use it to put flat product shots on models, styling apps use it to let users see clothes on themselves, and creative teams use it to mock up a lookbook before a shoot. It comes from the ECCV 2024 paper "Improving Diffusion Models for Authentic Virtual Try-on in the Wild."
Why does my try-on keep the old clothing visible?
Nine times out of ten, it's the mask. Run the same request with mask_only set to true and look at what the model plans to replace. If the mask stops short of the waist or misses a sleeve, draw a corrected mask and pass it as mask_img. Also check that the category matches the garment: an upper body mask will never remove old trousers.
Can I use a photo of someone wearing the garment as garm_img?
You can, and the schema says so explicitly. A clean product shot still gives the model a clearer read of the collar, hem and print, so use the worn photo when it's all you have, and pick one where the garment is front-on and nothing covers it.
Which image size works best for the person photo?
Portrait 3:4. The repository runs inference at 768x1024, and the schema asks you to check crop if your image isn't 3:4. Crop it yourself and set crop to false when you want full control over the framing, or leave crop on for user uploads.



