tools / load_lora.py
patrickvonplaten's picture
correct vocab
ae23482
raw
history blame
448 Bytes
#!/usr/bin/env python3
import torch
from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
pipeline = StableDiffusionPipeline.from_pretrained(
"runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16, safety_checker=None
).to("cuda")
pipeline.scheduler = DPMSolverMultistepScheduler.from_config(
pipeline.scheduler.config, use_karras_sigmas=True
)
pipeline.load_lora_weights("sayakpaul/sd-model-finetuned-lora-t4")