Views
No views yet
pip install diffusers transformers accelerate safetensors1from diffusers import DiffusionPipeline
2import torch
3
4# Load base model
5pipe = DiffusionPipeline.from_pretrained(
6 "stabilityai/stable-diffusion-xl-base-1.0",
7 torch_dtype=torch.float16,
8 variant="fp16"
9)
10pipe.to("cuda")
11
12# Load LoRA weights
13pipe.load_lora_weights(
14 "zyuzuguldu/vton-lora-linen",
15 weight_name="pytorch_lora_weights.safetensors"
16)
17
18# Generate image
19prompt = "a garment with linen fabric texture, high quality, detailed"
20image = pipe(
21 prompt,
22 num_inference_steps=30,
23 guidance_scale=7.5
24).images[0]
25
26image.save("output.png")1from diffusers import DiffusionPipeline
2import torch
3
4pipe = DiffusionPipeline.from_pretrained(
5 "stabilityai/stable-diffusion-xl-base-1.0",
6 torch_dtype=torch.float16
7).to("cuda")
8
9# Load with custom weight
10pipe.load_lora_weights(
11 "zyuzuguldu/vton-lora-linen",
12 weight_name="pytorch_lora_weights.safetensors",
13 adapter_name="linen"
14)
15
16# Set LoRA scale (0.0 to 1.0)
17pipe.set_adapters(["linen"], adapter_weights=[0.8])
18
19# Generate
20prompt = "a stylish jacket with linen texture, fashion photography"
21negative_prompt = "blurry, low quality, distorted"
22
23image = pipe(
24 prompt,
25 negative_prompt=negative_prompt,
26 num_inference_steps=40,
27 guidance_scale=8.0
28).images[0]
29
30image.save("styled_garment.png")1from diffusers import StableDiffusionXLInpaintPipeline
2import torch
3
4# Load inpainting pipeline for try-on
5pipe = StableDiffusionXLInpaintPipeline.from_pretrained(
6 "stabilityai/stable-diffusion-xl-base-1.0",
7 torch_dtype=torch.float16
8).to("cuda")
9
10# Load LoRA
11pipe.load_lora_weights("zyuzuguldu/vton-lora-linen")
12
13# Apply texture to masked garment area
14result = pipe(
15 prompt="garment with linen fabric",
16 image=original_image,
17 mask_image=garment_mask,
18 num_inference_steps=30
19).images[0]1learning_rate: 1e-4
2lora_rank: 15
3lora_alpha: 15
4batch_size: 4
5resolution: 1024x1024
6mixed_precision: fp16
7gradient_accumulation_steps: 4"a garment with linen fabric texture, high quality, detailed"
"stylish clothing made of linen material, professional photography"
"fashion design with linen texture, studio lighting"
"linen fabric garment, detailed texture, 4k quality""blurry, low quality, distorted, unrealistic, artificial"
"pixelated, noisy, artifacts, bad texture"1@misc{vton_lora_linen,
2 author = {zyuzuguldu},
3 title = {Virtual Try-On LoRA: Linen},
4 year = {2026},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/zyuzuguldu/vton-lora-linen}}
7}