Views
No views yet
bbhf2pip install diffusers --upgradepip install invisible_watermark transformers accelerate safetensors1import torch
2from diffusers import DiffusionPipeline, AutoencoderKL
3
4vae = AutoencoderKL.from_pretrained('madebyollin/sdxl-vae-fp16-fix', torch_dtype=torch.float16)
5
6pipe = DiffusionPipeline.from_pretrained(
7 "stabilityai/stable-diffusion-xl-base-1.0",
8 vae=vae, torch_dtype=torch.float16, variant="fp16",
9 use_safetensors=True
10)
11
12pipe.to("cuda")
13
14# This is where you load your trained weights
15pipe.load_lora_weights('herve76/bbhf2')
16
17prompt = "A majestic bbhf2 jumping from a big stone at night"
18
19image = pipe(prompt=prompt, num_inference_steps=50).images[0]