File size: 491 Bytes
e7fffba
44e2509
e7fffba
 
44e2509
e7fffba
 
 
44e2509
e7fffba
 
44e2509
e7fffba
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from transformers import pipeline

model_name = "franciszzj/Leffa"  # Replace with the chosen model
tryon_pipeline = pipeline("image-to-image", model=model_name)

# Load input image (person) and clothing image
input_image = "person.jpg"  # Replace with your image
clothing_image = "clothing.jpg"  # Replace with your clothing image

# Run virtual try-on
output = tryon_pipeline({"person": input_image, "clothing": clothing_image})

# Save result
output["generated_image"].save("output.jpg")