GrayShine commited on
Commit
ae7106c
β€’
1 Parent(s): 112d595

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -181,7 +181,7 @@ def init_model():
181
  model = get_models(args).to(device)
182
  model = tca_transform_model(model).to(device)
183
  model = ip_transform_model(model).to(device)
184
- if args.enable_xformers_memory_efficient_attention:
185
  if is_xformers_available():
186
  model.enable_xformers_memory_efficient_attention()
187
  print("xformer!")
 
181
  model = get_models(args).to(device)
182
  model = tca_transform_model(model).to(device)
183
  model = ip_transform_model(model).to(device)
184
+ if args.enable_xformers_memory_efficient_attention and device=="cuda":
185
  if is_xformers_available():
186
  model.enable_xformers_memory_efficient_attention()
187
  print("xformer!")