Created
June 30, 2023 06:19
-
-
Save sayakpaul/c269da54270f6d866ef5acafd4bf8319 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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