Ashoka74 commited on
Commit
dfbe31e
1 Parent(s): c56a332

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -150,15 +150,15 @@ def enable_efficient_attention():
150
  print(f"Xformers error: {e}")
151
  print("Falling back to sliced attention")
152
  # Use sliced attention for RTX 2070
153
- unet.set_attention_slice_size(4)
154
- vae.set_attention_slice_size(4)
155
  unet.set_attn_processor(AttnProcessor2_0())
156
  vae.set_attn_processor(AttnProcessor2_0())
157
  else:
158
  # Fallback for when xformers is not available
159
  print("Using sliced attention")
160
- unet.set_attention_slice_size(4)
161
- vae.set_attention_slice_size(4)
162
  unet.set_attn_processor(AttnProcessor2_0())
163
  vae.set_attn_processor(AttnProcessor2_0())
164
 
 
150
  print(f"Xformers error: {e}")
151
  print("Falling back to sliced attention")
152
  # Use sliced attention for RTX 2070
153
+ # unet.set_attention_slice_size(4)
154
+ # vae.set_attention_slice_size(4)
155
  unet.set_attn_processor(AttnProcessor2_0())
156
  vae.set_attn_processor(AttnProcessor2_0())
157
  else:
158
  # Fallback for when xformers is not available
159
  print("Using sliced attention")
160
+ # unet.set_attention_slice_size(4)
161
+ # vae.set_attention_slice_size(4)
162
  unet.set_attn_processor(AttnProcessor2_0())
163
  vae.set_attn_processor(AttnProcessor2_0())
164