taki0112 commited on
Commit
56f7912
1 Parent(s): 9894f0a
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -33,12 +33,11 @@ def memory_efficient(model):
33
  model.enable_vae_slicing()
34
  except AttributeError:
35
  print("enable_vae_slicing is not supported.")
36
-
37
- if device == 'cuda':
38
- try:
39
- model.enable_xformers_memory_efficient_attention()
40
- except AttributeError:
41
- print("enable_xformers_memory_efficient_attention is not supported.")
42
 
43
  controlnet = ControlNetModel.from_pretrained("diffusers/controlnet-depth-sdxl-1.0", torch_dtype=torch_dtype)
44
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch_dtype)
 
33
  model.enable_vae_slicing()
34
  except AttributeError:
35
  print("enable_vae_slicing is not supported.")
36
+ # if device == 'cuda':
37
+ # try:
38
+ # model.enable_xformers_memory_efficient_attention()
39
+ # except AttributeError:
40
+ # print("enable_xformers_memory_efficient_attention is not supported.")
 
41
 
42
  controlnet = ControlNetModel.from_pretrained("diffusers/controlnet-depth-sdxl-1.0", torch_dtype=torch_dtype)
43
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch_dtype)