File size: 4,503 Bytes
5e93218
 
d251289
 
 
 
5e93218
 
 
 
 
f36e262
5e93218
77f455d
 
5e93218
f36e262
77f455d
 
 
5e93218
f36e262
77f455d
 
 
5e93218
f36e262
77f455d
 
 
5e93218
f36e262
5e93218
77f455d
 
75a2040
 
 
 
 
5e93218
f36e262
5e93218
 
 
 
 
 
 
 
 
 
 
 
 
56d738a
5e93218
6c70963
5e93218
 
 
6c70963
 
 
 
5e93218
6c70963
3a950e5
fca7c67
3a950e5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5e93218
6c70963
 
 
 
 
6d16b45
5e93218
6c70963
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
tags:
- flux.2
- image-to-image
- virtual-try-off
- fal
- lora
- diffusers
- template:diffusion-lora
widget:
- output:
    url: images/5.png
  text: >-
    TRYOFF extract the t-shirt over a white background, product photography style. 
    NO HUMAN VISIBLE (the garments maintain their 3D form like an invisible mannequin).
- output:
    url: images/3.png
  text: >-
    TRYOFF extract the dress over a white background, product photography style. 
    NO HUMAN VISIBLE (the garments maintain their 3D form like an invisible mannequin).
- output:
    url: images/2.png
  text: >-
    TRYOFF extract the pants over a white background, product photography style. 
    NO HUMAN VISIBLE (the garments maintain their 3D form like an invisible mannequin).
- output:
    url: images/6.png
  text: >-
    TRYOFF extract the outfit over a white background, product photography style. 
    NO HUMAN VISIBLE (the garments maintain their 3D form like an invisible mannequin).
- output:
    url: images/1.png
  text: >-
    TRYOFF extract the t-shirt over a white background, product photography style. 
    NO HUMAN VISIBLE (the garments maintain their 3D form like an invisible mannequin).
# - output:
#     url: images/4.png
#   text: >-
#     TRYOFF extract the upper body over a white background, product photography style. 
#     NO HUMAN VISIBLE (the garments maintain their 3D form like an invisible mannequin).
- output:
    url: images/7.png
  text: >-
    TRYOFF extract full outfit in the reference image over a white background,
    high-end professional product photography. Present the outfit as a complete,
    vertically stacked ensemble arranged as if worn. The items are stacked as if
    worn. The top-layer garment is dominant, followed directly by the
    bottom-layer garment. The footwear is placed below the bottom-layer hem,
    aligning with where the feet would naturally be. Lighting: Clean, even,
    diffused studio lighting (softbox or beauty dish style). The illumination
    must highlight all varying textures (e.g., pebble leather, suede, knit, or
    canvas) without creating harsh shadows.
base_model: black-forest-labs/FLUX.2-klein-9B
instance_prompt: TRYOFF
license: apache-2.0
pipeline_tag: image-to-image
---
# FLUX.2-klein-base-9B Virtual Try-Off LoRA

<Gallery />

Virtual Try-Off: Given an image of a person wearing clothing and a garment category prompt, the model generates a clean image of the garment as if it were photographed alone.\
The model reconstructs the clothing item while preserving its style, texture, color, and design from the input image.\
1 input image (person wearing clothes) + text category → 1 output garment image\
Built with fal.ai.

### Usage
- Try the LoRA on [fal.ai Playground](https://fal.ai/models/fal-ai/flux-2-klein/9b/base/edit/lora/playground?share=033cae58-12b5-4fef-992b-d48ff6759e01)
- Try the workflow (image-to-video) at [fal.ai Workflow](https://fal.ai/workflows/rizavelioglu/workflow-virtual-try-off?view=playground)
- ComfyUI: download compatible weights [virtual-tryoff-lora_comfy.safetensors](https://huggingface.co/fal/virtual-tryoff-lora/resolve/main/virtual-tryoff-lora_comfy.safetensors)
- Diffusers:
  ```python
  import torch
  from diffusers import Flux2KleinPipeline
  from PIL import Image
  
  pipeline = Flux2KleinPipeline.from_pretrained(
    "black-forest-labs/FLUX.2-klein-base-9B", 
    torch_dtype=torch.bfloat16, 
    low_cpu_mem_usage=False
  ).to("cuda")
  pipeline.load_lora_weights(
      "fal/virtual-tryoff-lora", 
      weight_name="virtual-tryoff-lora_diffusers.safetensors", 
      adapter_name="vtoff"
  )
  pipeline.set_adapters("vtoff", adapter_weights=1.0)
  pipeline.fuse_lora(adapter_names=["vtoff"], lora_scale=1.0)
  
  image = pipeline(
      image=Image.open("<your_image>.jpg"),
      prompt="TRYOFF extract the full outfit over a white background, product photography style.  NO HUMAN VISIBLE (the garments maintain their 3D form like an invisible mannequin).",
      height=1024,
      width=768,
      num_inference_steps=28,
      guidance_scale=5.0,
      generator=torch.Generator("cuda").manual_seed(42),
  ).images[0]
  ```

### Training
Trained with [fal.ai trainer](https://fal.ai/models/fal-ai/flux-2-klein-9b-base-trainer/edit).
- Base model: FLUX.2-klein-base-9B
- Steps: 10000
- Learning Rate: 0.00005
- Dataset: 300 image pairs (model + garment) of shape `1024x1024`

### Author
Created by [Riza Velioglu](https://rizavelioglu.github.io/) at [fal.ai](https://fal.ai/)