sayakpaul HF staff commited on
Commit
2355a89
1 Parent(s): 0acc836

add xformer

Browse files
Files changed (2) hide show
  1. app.py +2 -0
  2. requirements.txt +2 -1
app.py CHANGED
@@ -16,6 +16,8 @@ def load_pipeline(id: str):
16
  pipeline = StableDiffusionInstructPix2PixPipeline.from_pretrained(
17
  id, torch_dtype=torch.float16
18
  ).to("cuda")
 
 
19
  return pipeline
20
 
21
 
16
  pipeline = StableDiffusionInstructPix2PixPipeline.from_pretrained(
17
  id, torch_dtype=torch.float16
18
  ).to("cuda")
19
+ pipeline.enable_xformers_memory_efficient_attention()
20
+ pipeline.set_progress_bar_config(disable=True)
21
  return pipeline
22
 
23
 
requirements.txt CHANGED
@@ -1,5 +1,6 @@
1
  diffusers
2
  accelerate
3
  transformers
4
- -f https://download.pytorch.org/whl/cu116
 
5
  torch==1.13.1+cu116
1
  diffusers
2
  accelerate
3
  transformers
4
+ xformers==0.0.16
5
+ --extra-index-url https://download.pytorch.org/whl/cu116
6
  torch==1.13.1+cu116