Skip to content

Instantly share code, notes, and snippets.

@sayakpaul
Created June 30, 2023 06:19
Show Gist options
  • Save sayakpaul/c269da54270f6d866ef5acafd4bf8319 to your computer and use it in GitHub Desktop.
Save sayakpaul/c269da54270f6d866ef5acafd4bf8319 to your computer and use it in GitHub Desktop.
# To run the script, first install `diffusers` like so:
# pip install git+https://github.com/huggingface/diffusers@temp/lora-debug
# Then grab the LoRA file:
# wget https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/vividWatercolors_10.safetensors
import torch
from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
pipeline = StableDiffusionPipeline.from_pretrained(
"runwayml/stable-diffusion-v1-5", safety_checker=None
)
pipeline.scheduler = DPMSolverMultistepScheduler.from_config(
pipeline.scheduler.config, use_karras_sigmas=True
)
pipeline.load_lora_weights(".", weight_name="vividWatercolors_10.safetensors")
# This should spit out: https://pastebin.com/CwYs1x0L
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment