Spaces:
Running
on
Zero
Running
on
Zero
Plat
commited on
Commit
β’
1b970c4
1
Parent(s):
5e4176a
xformers
Browse files- app.py +2 -1
- requirements.txt +6 -6
app.py
CHANGED
@@ -95,11 +95,12 @@ def load_pipeline():
|
|
95 |
IMAGE_MODEL_REPO_ID,
|
96 |
vae=vae,
|
97 |
torch_dtype=torch.float16,
|
|
|
98 |
add_watermarker=False,
|
99 |
custom_pipeline="lpw_stable_diffusion_xl",
|
100 |
)
|
101 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
102 |
-
pipe.
|
103 |
if CPU_OFFLOAD: # local
|
104 |
pipe.enable_sequential_cpu_offload(gpu_id=0, device=device)
|
105 |
else:
|
|
|
95 |
IMAGE_MODEL_REPO_ID,
|
96 |
vae=vae,
|
97 |
torch_dtype=torch.float16,
|
98 |
+
use_safetensors=True,
|
99 |
add_watermarker=False,
|
100 |
custom_pipeline="lpw_stable_diffusion_xl",
|
101 |
)
|
102 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
103 |
+
pipe.enable_xformers_memory_efficient_attention()
|
104 |
if CPU_OFFLOAD: # local
|
105 |
pipe.enable_sequential_cpu_offload(gpu_id=0, device=device)
|
106 |
else:
|
requirements.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
transformers
|
6 |
-
|
7 |
-
|
|
|
1 |
+
torch==2.4.0
|
2 |
|
3 |
+
accelerate==0.34.2
|
4 |
+
diffusers==0.30.1
|
5 |
+
transformers==4.45.1
|
6 |
+
spaces==0.30.2
|
7 |
+
xformers
|