lnyan commited on
Commit
98778ff
1 Parent(s): 59868ce

Add xformers

Browse files
Files changed (2) hide show
  1. app.py +1 -0
  2. requirements.txt +3 -1
app.py CHANGED
@@ -302,6 +302,7 @@ class StableDiffusionInpaint:
302
  inpaint.tokenizer,
303
  )
304
  inpaint.to(device)
 
305
  # if device == "mps":
306
  # _ = text2img("", num_inference_steps=1)
307
  scheduler_dict["PLMS"] = inpaint.scheduler
 
302
  inpaint.tokenizer,
303
  )
304
  inpaint.to(device)
305
+ inpaint.enable_xformers_memory_efficient_attention()
306
  # if device == "mps":
307
  # _ = text2img("", num_inference_steps=1)
308
  scheduler_dict["PLMS"] = inpaint.scheduler
requirements.txt CHANGED
@@ -12,4 +12,6 @@ diffusers==0.9.0
12
  transformers
13
  ftfy
14
  fpie
15
- accelerate
 
 
 
12
  transformers
13
  ftfy
14
  fpie
15
+ accelerate
16
+ ninja
17
+ -e git+https://github.com/facebookresearch/xformers.git@main#egg=xformers