ford442 commited on
Commit
12d4f76
·
verified ·
1 Parent(s): 8cc70a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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()