zhangyang-0123 commited on
Commit
4bc008c
1 Parent(s): a014349
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +1 -4
  3. 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: false
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
- if torch.cuda.is_available():
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
- accelerate
2
- diffusers
3
  invisible_watermark
4
  torch
5
- transformers
6
- xformers
 
 
1
+ diffusers==0.31.0
 
2
  invisible_watermark
3
  torch
4
+ sentencepiece
5
+ transformers==4.45.2
6
+ accelerate==0.33.0