Spaces:
Runtime error
Runtime error
add xformer
Browse files- app.py +2 -0
- 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 |
-
|
|
|
|
| 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
|