CaioXapelaum
commited on
Commit
•
2c7e862
1
Parent(s):
52d483a
Update SD1.5 code samples as runawayml/stable-diffusion-v-1-5 is deprecated
Browse files
README.md
CHANGED
@@ -160,7 +160,7 @@ Take the 2-steps LoRA as an example, you can also use other LoRAs for the corres
|
|
160 |
import torch
|
161 |
from diffusers import DiffusionPipeline, DDIMScheduler
|
162 |
from huggingface_hub import hf_hub_download
|
163 |
-
base_model_id = "
|
164 |
repo_name = "ByteDance/Hyper-SD"
|
165 |
# Take 2-steps lora as an example
|
166 |
ckpt_name = "Hyper-SD15-2steps-lora.safetensors"
|
@@ -314,7 +314,7 @@ control_image.save("control.png")
|
|
314 |
|
315 |
# Initialize pipeline
|
316 |
controlnet = ControlNetModel.from_pretrained(controlnet_checkpoint, torch_dtype=torch.float16)
|
317 |
-
pipe = StableDiffusionControlNetPipeline.from_pretrained("
|
318 |
pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-SD15-2steps-lora.safetensors"))
|
319 |
pipe.fuse_lora()
|
320 |
# Ensure ddim scheduler timestep spacing set as trailing !!!
|
|
|
160 |
import torch
|
161 |
from diffusers import DiffusionPipeline, DDIMScheduler
|
162 |
from huggingface_hub import hf_hub_download
|
163 |
+
base_model_id = "stable-diffusion-v1-5/stable-diffusion-v1-5"
|
164 |
repo_name = "ByteDance/Hyper-SD"
|
165 |
# Take 2-steps lora as an example
|
166 |
ckpt_name = "Hyper-SD15-2steps-lora.safetensors"
|
|
|
314 |
|
315 |
# Initialize pipeline
|
316 |
controlnet = ControlNetModel.from_pretrained(controlnet_checkpoint, torch_dtype=torch.float16)
|
317 |
+
pipe = StableDiffusionControlNetPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", controlnet=controlnet, torch_dtype=torch.float16).to("cuda")
|
318 |
pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-SD15-2steps-lora.safetensors"))
|
319 |
pipe.fuse_lora()
|
320 |
# Ensure ddim scheduler timestep spacing set as trailing !!!
|