Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -19,6 +19,7 @@ from typing import Tuple
|
|
19 |
import paramiko
|
20 |
import datetime
|
21 |
#from diffusers import DPMSolverSDEScheduler
|
|
|
22 |
|
23 |
torch.backends.cuda.matmul.allow_tf32 = False
|
24 |
torch.backends.cuda.matmul.allow_bf16_reduced_precision_reduction = False
|
@@ -109,7 +110,7 @@ def load_and_prepare_model():
|
|
109 |
#pipe.unet.to(memory_format=torch.channels_last)
|
110 |
#pipe.enable_vae_tiling()
|
111 |
pipe.to(device=device, dtype=torch.bfloat16)
|
112 |
-
|
113 |
return pipe
|
114 |
|
115 |
pipe = load_and_prepare_model()
|
|
|
19 |
import paramiko
|
20 |
import datetime
|
21 |
#from diffusers import DPMSolverSDEScheduler
|
22 |
+
from diffusers.models.attention_processor import AttnProcessor2_0
|
23 |
|
24 |
torch.backends.cuda.matmul.allow_tf32 = False
|
25 |
torch.backends.cuda.matmul.allow_bf16_reduced_precision_reduction = False
|
|
|
110 |
#pipe.unet.to(memory_format=torch.channels_last)
|
111 |
#pipe.enable_vae_tiling()
|
112 |
pipe.to(device=device, dtype=torch.bfloat16)
|
113 |
+
pipe.unet.set_attn_processor(AttnProcessor2_0())
|
114 |
return pipe
|
115 |
|
116 |
pipe = load_and_prepare_model()
|