Bertoin commited on
Commit
f01e85a
·
verified ·
1 Parent(s): e5a2790

roll back and rapply monkey patch

Browse files
Files changed (1) hide show
  1. app.py +28 -28
app.py CHANGED
@@ -8,34 +8,34 @@ from diffusers.pipelines.prx import PRXPipeline
8
  # monkey patch to add 1024 aspect ratios
9
  import diffusers.pipelines.prx.pipeline_prx as prx_mod
10
 
11
- # CUSTOM_ASPECT_RATIO_512_BIN = {
12
- # "0.49": [704, 1440],
13
- # "0.52": [736, 1408],
14
- # "0.53": [736, 1376],
15
- # "0.57": [768, 1344],
16
- # "0.59": [768, 1312],
17
- # "0.62": [800, 1280],
18
- # "0.67": [832, 1248],
19
- # "0.68": [832, 1216],
20
- # "0.78": [896, 1152],
21
- # "0.83": [928, 1120],
22
- # "0.94": [992, 1056],
23
- # "1.0": [1024, 1024],
24
- # "1.06": [1056, 992],
25
- # "1.13": [1088, 960],
26
- # "1.21": [1120, 928],
27
- # "1.29": [1152, 896],
28
- # "1.37": [1184, 864],
29
- # "1.46": [1216, 832],
30
- # "1.5": [1248, 832],
31
- # "1.71": [1312, 768],
32
- # "1.75": [1344, 768],
33
- # "1.87": [1376, 736],
34
- # "1.91": [1408, 736],
35
- # "2.05": [1440, 704],
36
- # }
37
-
38
- # prx_mod.ASPECT_RATIO_512_BIN = CUSTOM_ASPECT_RATIO_512_BIN
39
 
40
  dtype = torch.bfloat16
41
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
8
  # monkey patch to add 1024 aspect ratios
9
  import diffusers.pipelines.prx.pipeline_prx as prx_mod
10
 
11
+ CUSTOM_ASPECT_RATIO_512_BIN = {
12
+ "0.49": [704, 1440],
13
+ "0.52": [736, 1408],
14
+ "0.53": [736, 1376],
15
+ "0.57": [768, 1344],
16
+ "0.59": [768, 1312],
17
+ "0.62": [800, 1280],
18
+ "0.67": [832, 1248],
19
+ "0.68": [832, 1216],
20
+ "0.78": [896, 1152],
21
+ "0.83": [928, 1120],
22
+ "0.94": [992, 1056],
23
+ "1.0": [1024, 1024],
24
+ "1.06": [1056, 992],
25
+ "1.13": [1088, 960],
26
+ "1.21": [1120, 928],
27
+ "1.29": [1152, 896],
28
+ "1.37": [1184, 864],
29
+ "1.46": [1216, 832],
30
+ "1.5": [1248, 832],
31
+ "1.71": [1312, 768],
32
+ "1.75": [1344, 768],
33
+ "1.87": [1376, 736],
34
+ "1.91": [1408, 736],
35
+ "2.05": [1440, 704],
36
+ }
37
+
38
+ prx_mod.ASPECT_RATIO_512_BIN = CUSTOM_ASPECT_RATIO_512_BIN
39
 
40
  dtype = torch.bfloat16
41
  device = "cuda" if torch.cuda.is_available() else "cpu"