GrayShine commited on
Commit
653a139
1 Parent(s): e054928

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -228,7 +228,7 @@ def video_generation(text, image, scfg_scale, tcfg_scale, img_cfg_scale, diffusi
228
  text_encoder = text_encoder.to(device)
229
  image_encoder = image_encoder.to(device)
230
  model = model.to(device)
231
- if args.enable_xformers_memory_efficient_attention and device=="cuda":
232
  if is_xformers_available():
233
  model.enable_xformers_memory_efficient_attention()
234
  print("xformer!")
@@ -285,7 +285,7 @@ def video_prediction(text, image, scfg_scale, tcfg_scale, img_cfg_scale, prefram
285
  text_encoder = text_encoder.to(device)
286
  image_encoder = image_encoder.to(device)
287
  model = model.to(device)
288
- if args.enable_xformers_memory_efficient_attention and device=="cuda":
289
  if is_xformers_available():
290
  model.enable_xformers_memory_efficient_attention()
291
  print("xformer!")
 
228
  text_encoder = text_encoder.to(device)
229
  image_encoder = image_encoder.to(device)
230
  model = model.to(device)
231
+ if device=="cuda":
232
  if is_xformers_available():
233
  model.enable_xformers_memory_efficient_attention()
234
  print("xformer!")
 
285
  text_encoder = text_encoder.to(device)
286
  image_encoder = image_encoder.to(device)
287
  model = model.to(device)
288
+ if device=="cuda":
289
  if is_xformers_available():
290
  model.enable_xformers_memory_efficient_attention()
291
  print("xformer!")