IDM VTON

idm-vton

IDM VTON is best-in-class clothing virtual try-on in the wild (non-commercial use only)

A100 80GB
Fast Inference
REST API

Model Information

Response Time~26 sec
StatusActive
Version
0.0.1
Updated11 days ago

Prerequisites

  • Create an API Key from the Eachlabs Console
  • Install the required dependencies for your chosen language (e.g., requests for Python)

API Integration Steps

1. Create a Prediction

Send a POST request to create a new prediction. This will return a prediction ID that you'll use to check the result. The request should include your model inputs and API key.

import requests
import time
API_KEY = "YOUR_API_KEY" # Replace with your API key
HEADERS = {
"X-API-Key": API_KEY,
"Content-Type": "application/json"
}
def create_prediction():
response = requests.post(
"https://api.eachlabs.ai/v1/prediction/",
headers=HEADERS,
json={
"model": "idm-vton",
"version": "0.0.1",
"input": {
"crop": "true",
"seed": "42",
"steps": "30",
"category": "upper_body",
"force_dc": false,
"garm_img": "your_file.image/jpeg",
"mask_img": "your_file.image/jpeg",
"human_img": "your_file.image/jpeg",
"mask_only": false,
"garment_des": "your garment des here"
}
}
)
prediction = response.json()
if prediction["status"] != "success":
raise Exception(f"Prediction failed: {prediction}")
return prediction["predictionID"]

2. Get Prediction Result

Poll the prediction endpoint with the prediction ID until the result is ready. The API uses long-polling, so you'll need to repeatedly check until you receive a success status.

def get_prediction(prediction_id):
while True:
result = requests.get(
f"https://api.eachlabs.ai/v1/prediction/{prediction_id}",
headers=HEADERS
).json()
if result["status"] == "success":
return result
elif result["status"] == "error":
raise Exception(f"Prediction failed: {result}")
time.sleep(1) # Wait before polling again

3. Complete Example

Here's a complete example that puts it all together, including error handling and result processing. This shows how to create a prediction and wait for the result in a production environment.

try:
# Create prediction
prediction_id = create_prediction()
print(f"Prediction created: {prediction_id}")
# Get result
result = get_prediction(prediction_id)
print(f"Output URL: {result['output']}")
print(f"Processing time: {result['metrics']['predict_time']}s")
except Exception as e:
print(f"Error: {e}")

Additional Information

  • The API uses a two-step process: create prediction and poll for results
  • Response time: ~26 seconds
  • Rate limit: 60 requests/minute
  • Concurrent requests: 10 maximum
  • Use long-polling to check prediction status until completion

Overview

The IDM VTON model enables the realistic visualization of garments on human images by seamlessly overlaying garments while maintaining natural proportions, shadows, and details. This model is designed for fashion innovation, enhancing online retail experiences. .

Technical Specifications

Segmentation and Masking: Uses the provided mask to correctly place the clothing on the target image.


Category-Specific Adjustments: Adjustments should be made based on the type of clothing to provide realistic renderings.


Customization Parameters: Provides adjustable settings such as fine-tuning steps, cropping for resizing, and force_dc to force detailed corrections.

Key Considerations

Garment Fit: IDM VTON does not adjust for physical garment fit; ensure input images represent the desired style.

Background Compatibility: Transparent or plain backgrounds yield the best results, minimizing distractions in the final output.

Lighting Consistency: Match lighting conditions in the garment and human images to maintain realistic compositing

Tips & Tricks

Garment Image:

  • Use clear, flat-lay photos of the garment without excessive creases or folds.
  • Ensure the garment is centered in the image for accurate placement.

Garment Description:

  • Provide specific descriptions to guide the model’s interpretation (e.g., “Red short-sleeve t-shirt with a round neckline”).

Category:

  • Choose the correct category for optimal results:
    • upper_body for tops, shirts, and jackets.
    • lower_body for pants, skirts, and shorts.
    • dresses for one-piece garments.

Mask Image:

  • Use a black-and-white mask where the garment area is white, and the background is black.
  • Keep edges clean to prevent unwanted artifacts.

Steps:

  • Adjust between 20–30 for a balance between speed and quality.
  • For highly detailed garments, increase steps to 35–40 for finer adjustments.

Crop:

  • Enable cropping to focus solely on the human and garment areas if the input image includes unnecessary details.

Force DC:

  • Use this option to enhance detailed corrections, especially for intricate patterns or textures.

Seed:

  • For reproducible outputs, set a specific seed value. This ensures consistent results when using the same input parameters.

Capabilities

  • Visualize how garments appear on a person in various categories (upper_body, lower_body, dresses).
  • Create marketing visuals, fashion catalog content, and personalized styling previews with IDM VTON.
  • Enhance the shopping experience by offering a realistic virtual try-on solution.

What can I use for?

E-commerce: Revolutionize online retail with realistic virtual try-ons for customers.

Fashion Design: Prototype new designs and visualize garments on mannequins or models.

Content Creation: Develop engaging visuals for advertisements, social media, and product showcases.

Things to be aware of

Layered Outfits: Experiment with different garments sequentially for a layered styling effect on IDM VTON.

Customization:

  • Use the steps slider to explore varying levels of detail and refinement.
  • Adjust the crop and mask_only settings for focused outputs.

Creative Uses:

  • Use force_dc to emphasize garment details like embroidery or unique textures.
  • Test with diverse human images, including different poses and body types.

Realistic Outputs:

  • Pair similar lighting conditions between garment and human images for consistency.
  • Use high-quality garment masks to maintain edge precision and clarity.

Limitations

Complex Garments: Intricate patterns or transparent fabrics may not render perfectly.

Pose Variations: Extreme poses in human images can sometimes lead to artifacts.

Multiple Garments: The model supports a single garment per operation. For multi-layered styling, run the model sequentially.

Output Format JPG

Related AI Models

flux-depth-pro

Flux Depth Pro

flux-depth-pro

Image to Image
controlnet-1.1-x-realistic-vision-v2.0

Controlnet Realistic Vision V2.0

controlnet-1-1-x-realistic-vision-v2-0

Image to Image
sdxl-controlnet-lora

SDXL Controlnet Lora

sdxl-controlnet-lora

Image to Image
sdxl-controlnet

SDXL Controlnet

sdxl-controlnet

Image to Image