Spaces:
Running
on
Zero
Running
on
Zero
zhangyang-0123
commited on
Commit
•
4bc008c
1
Parent(s):
a014349
modify
Browse files- README.md +1 -1
- app.py +1 -4
- requirements.txt +4 -4
README.md
CHANGED
@@ -6,7 +6,7 @@ colorTo: red
|
|
6 |
sdk: gradio
|
7 |
sdk_version: 5.0.1
|
8 |
app_file: app.py
|
9 |
-
pinned:
|
10 |
license: apache-2.0
|
11 |
short_description: Diffusion Model Compression
|
12 |
---
|
|
|
6 |
sdk: gradio
|
7 |
sdk_version: 5.0.1
|
8 |
app_file: app.py
|
9 |
+
pinned: true
|
10 |
license: apache-2.0
|
11 |
short_description: Diffusion Model Compression
|
12 |
---
|
app.py
CHANGED
@@ -9,10 +9,7 @@ import torch
|
|
9 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
10 |
model_repo_id = "stabilityai/stable-diffusion-xl-base-1.0" # Replace to the model you would like to use
|
11 |
|
12 |
-
|
13 |
-
torch_dtype = torch.float16
|
14 |
-
else:
|
15 |
-
torch_dtype = torch.float32
|
16 |
|
17 |
pipe = DiffusionPipeline.from_pretrained(model_repo_id, torch_dtype=torch_dtype)
|
18 |
pipe = pipe.to(device)
|
|
|
9 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
10 |
model_repo_id = "stabilityai/stable-diffusion-xl-base-1.0" # Replace to the model you would like to use
|
11 |
|
12 |
+
torch_dtype = torch.bfloat16
|
|
|
|
|
|
|
13 |
|
14 |
pipe = DiffusionPipeline.from_pretrained(model_repo_id, torch_dtype=torch_dtype)
|
15 |
pipe = pipe.to(device)
|
requirements.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
|
2 |
-
diffusers
|
3 |
invisible_watermark
|
4 |
torch
|
5 |
-
|
6 |
-
|
|
|
|
1 |
+
diffusers==0.31.0
|
|
|
2 |
invisible_watermark
|
3 |
torch
|
4 |
+
sentencepiece
|
5 |
+
transformers==4.45.2
|
6 |
+
accelerate==0.33.0
|