Spaces:
Runtime error
Runtime error
shichen1231
commited on
Commit
β’
f2467d5
1
Parent(s):
a10a711
Update app.py
Browse files
app.py
CHANGED
@@ -5,15 +5,18 @@ import torch
|
|
5 |
torch.backends.cuda.matmul.allow_tf32 = True
|
6 |
import gc
|
7 |
|
|
|
|
|
|
|
8 |
controlnet = ControlNetModel.from_pretrained("ioclab/connow", torch_dtype=torch.float16, use_safetensors=True)
|
9 |
|
10 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
11 |
-
|
12 |
controlnet=controlnet,
|
13 |
torch_dtype=torch.float16,
|
14 |
safety_checker=None,
|
15 |
)
|
16 |
-
|
17 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|
18 |
|
19 |
pipe.enable_xformers_memory_efficient_attention()
|
|
|
5 |
torch.backends.cuda.matmul.allow_tf32 = True
|
6 |
import gc
|
7 |
|
8 |
+
model_id = "andite/pastel-mix"
|
9 |
+
|
10 |
+
|
11 |
controlnet = ControlNetModel.from_pretrained("ioclab/connow", torch_dtype=torch.float16, use_safetensors=True)
|
12 |
|
13 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
14 |
+
model_id,
|
15 |
controlnet=controlnet,
|
16 |
torch_dtype=torch.float16,
|
17 |
safety_checker=None,
|
18 |
)
|
19 |
+
pipe = pipe.to("cuda")
|
20 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|
21 |
|
22 |
pipe.enable_xformers_memory_efficient_attention()
|