Views
No views yet
train_dreambooth_lora_sdxl.py (diffusers).1import torch
2from diffusers import StableDiffusionXLPipeline
3
4pipe = StableDiffusionXLPipeline.from_pretrained(
5 "stabilityai/stable-diffusion-xl-base-1.0",
6 torch_dtype=torch.float16
7).to("cuda")
8
9pipe.load_lora_weights("samikhao/my-stars-lora-sdxl", weight_name="pytorch_lora_weights.safetensors")
10
11prompt = "a star in MY-STARS style"
12image = pipe(prompt, num_inference_steps=30, guidance_scale=5.0).images[0]
13image.save("sample.png")
14Основной файл: pytorch_lora_weights.safetensors (из checkpoint-500).