How to use from the
Use from the
Diffusers library
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
from diffusers.utils import load_image

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("ovi054/virtual-tryon-kontext-lora")

prompt = "wear it"
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")

image = pipe(image=input_image, prompt=prompt).images[0]

virtual tryon kontext lora

Model description

Trigger words

You should use wear it to trigger the image generation.

πŸ“Š Examples

Input Output Input Output

βš™οΈ How to use

  1. You need a model image and a garments overlay over it
    • You can put garments overlay on model photo with this tool I made.
  2. Put the trigger word wear it in your prompt.
  3. Adjust LoRA weight (recommended 1.0)

Try it Online / Demo Space

We have built a demo space to try it easily. Try it now: https://huggingface.co/spaces/ovi054/virtual-tryon-flux-kontext.

Try it Locally with Gradio UI

git clone https://huggingface.co/spaces/ovi054/virtual-tryon-flux-kontext
cd ovi054/virtual-tryon-flux-kontext
pip install -r requirements.txt
python app.py

Download model

Weights for this model are available in Safetensors format.

Download them in the Files & versions tab.

Training at fal.ai

Training was done using fal.ai/models/fal-ai/flux-kontext-trainer.

Downloads last month
43
Inference Providers NEW

Model tree for ovi054/virtual-tryon-kontext-lora

Adapter
(239)
this model

Spaces using ovi054/virtual-tryon-kontext-lora 6