Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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!")
|