rizavelioglu commited on
Commit
3a950e5
·
verified ·
1 Parent(s): a8ab9d6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -1
README.md CHANGED
@@ -65,8 +65,38 @@ The model reconstructs the clothing item while preserving its style, texture, co
65
  Built with fal.ai.
66
 
67
  ### Usage
68
- - Try 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)
69
  - Try the workflow (image-to-video) at [fal.ai Workflow](https://fal.ai/workflows/rizavelioglu/workflow-virtual-try-off?view=playground)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
 
71
  ### Training
72
  Trained with [fal.ai trainer](https://fal.ai/models/fal-ai/flux-2-klein-9b-base-trainer/edit).
 
65
  Built with fal.ai.
66
 
67
  ### Usage
68
+ - 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)
69
  - Try the workflow (image-to-video) at [fal.ai Workflow](https://fal.ai/workflows/rizavelioglu/workflow-virtual-try-off?view=playground)
70
+ - ComfyUI: download compatible weights [virtual-tryoff-lora_comfy.safetensors](https://huggingface.co/fal/virtual-tryoff-lora/resolve/main/virtual-tryoff-lora_comfy.safetensors)
71
+ - Diffusers:
72
+ ```python
73
+ import torch
74
+ from diffusers import Flux2KleinPipeline
75
+ from PIL import Image
76
+
77
+ pipeline = Flux2KleinPipeline.from_pretrained(
78
+ "black-forest-labs/FLUX.2-klein-base-9B",
79
+ torch_dtype=torch.bfloat16,
80
+ low_cpu_mem_usage=False
81
+ ).to("cuda")
82
+ pipeline.load_lora_weights(
83
+ "fal/virtual-tryoff-lora",
84
+ weight_name="virtual-tryoff-lora_diffusers.safetensors",
85
+ adapter_name="vtoff"
86
+ )
87
+ pipeline.set_adapters("vtoff", adapter_weights=1.0)
88
+ pipeline.fuse_lora(adapter_names=["vtoff"], lora_scale=1.0)
89
+
90
+ image = pipeline(
91
+ image=Image.open("<your_image>.jpg"),
92
+ 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).",
93
+ height=1024,
94
+ width=768,
95
+ num_inference_steps=28,
96
+ guidance_scale=5.0,
97
+ generator=torch.Generator("cuda").manual_seed(42),
98
+ ).images[0]
99
+ ```
100
 
101
  ### Training
102
  Trained with [fal.ai trainer](https://fal.ai/models/fal-ai/flux-2-klein-9b-base-trainer/edit).