Spaces:
Runtime error
Runtime error
fix
Browse files
app.py
CHANGED
|
@@ -37,11 +37,11 @@ def memory_efficient(model):
|
|
| 37 |
model.enable_vae_slicing()
|
| 38 |
except AttributeError:
|
| 39 |
print("enable_vae_slicing is not supported.")
|
| 40 |
-
if device == 'cuda':
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
|
| 46 |
controlnet = ControlNetModel.from_pretrained("diffusers/controlnet-depth-sdxl-1.0", torch_dtype=torch_dtype)
|
| 47 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch_dtype)
|
|
|
|
| 37 |
model.enable_vae_slicing()
|
| 38 |
except AttributeError:
|
| 39 |
print("enable_vae_slicing is not supported.")
|
| 40 |
+
# if device == 'cuda':
|
| 41 |
+
# try:
|
| 42 |
+
# model.enable_xformers_memory_efficient_attention()
|
| 43 |
+
# except AttributeError:
|
| 44 |
+
# print("enable_xformers_memory_efficient_attention is not supported.")
|
| 45 |
|
| 46 |
controlnet = ControlNetModel.from_pretrained("diffusers/controlnet-depth-sdxl-1.0", torch_dtype=torch_dtype)
|
| 47 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch_dtype)
|