Views
No views yet

pip install diffusers accelerate1import torch
2from diffusers import DiffusionPipeline, AutoencoderKL
3
4# Load the pipeline
5vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
6pipe = DiffusionPipeline.from_pretrained(
7 "stabilityai/stable-diffusion-xl-base-1.0",
8 vae=vae,
9 torch_dtype=torch.float16,
10 variant="fp16",
11 use_safetensors=True
12)
13pipe.load_lora_weights("tonyassi/warhol-lora")
14pipe.to("cuda")
15
16# Generate image
17prompt = "Warhol style, Bella Hadid"
18image = pipe(prompt=prompt,
19 height=1024,
20 width=1024,
21 num_inference_steps=50,
22 negative_prompt="ugly, deformed face, deformed body").images[0]
23image
24




