taki0112 commited on
Commit
9953e90
·
1 Parent(s): e3a3eca
Files changed (1) hide show
  1. app.py +5 -5
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
- 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)
 
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)