Spaces:
Running
on
Zero
Running
on
Zero
Update app.py (#6)
Browse files- Update app.py (9e91a57abd33e76e806fb48c49f10e15be88a767)
Co-authored-by: Yanzuo Lu <Yanzuo@users.noreply.huggingface.co>
app.py
CHANGED
@@ -45,7 +45,7 @@ if not path.exists(cache_path):
|
|
45 |
os.makedirs(cache_path, exist_ok=True)
|
46 |
|
47 |
controlnet = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-scribble", torch_dtype=torch.float16, use_safetensors=True)
|
48 |
-
pipe = StableDiffusionControlNetPipeline.from_pretrained("
|
49 |
pipe.load_lora_weights("ByteDance/Hyper-SD", weight_name="Hyper-SD15-1step-lora.safetensors", adapter_name="default")
|
50 |
pipe.to("cuda")
|
51 |
pipe.scheduler = TCDScheduler.from_config(pipe.scheduler.config, timestep_spacing ="trailing")
|
|
|
45 |
os.makedirs(cache_path, exist_ok=True)
|
46 |
|
47 |
controlnet = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-scribble", torch_dtype=torch.float16, use_safetensors=True)
|
48 |
+
pipe = StableDiffusionControlNetPipeline.from_pretrained("ckpt/sd15", controlnet=controlnet, torch_dtype=torch.float16, variant="fp16")
|
49 |
pipe.load_lora_weights("ByteDance/Hyper-SD", weight_name="Hyper-SD15-1step-lora.safetensors", adapter_name="default")
|
50 |
pipe.to("cuda")
|
51 |
pipe.scheduler = TCDScheduler.from_config(pipe.scheduler.config, timestep_spacing ="trailing")
|