File size: 1,762 Bytes
a866b04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# From https://github.com/TencentARC/PhotoMaker/pull/120 written by https://github.com/DiscoNova
# Note: Since output width & height need to be divisible by 8, the w & h -values do
#       not exactly match the stated aspect ratios... but they are "close enough":)

aspect_ratio_list = [
    {
        "name": "Instagram (1:1)",
        "w": 1024,
        "h": 1024,
    },
    {
        "name": "35mm film / Landscape (3:2)",
        "w": 1024,
        "h": 680,
    },
    {
        "name": "35mm film / Portrait (2:3)",
        "w": 680,
        "h": 1024,
    },
    {
        "name": "CRT Monitor / Landscape (4:3)",
        "w": 1024,
        "h": 768,
    },
    {
        "name": "CRT Monitor / Portrait (3:4)",
        "w": 768,
        "h": 1024,
    },
    {
        "name": "Widescreen TV / Landscape (16:9)",
        "w": 1024,
        "h": 576,
    },
    {
        "name": "Widescreen TV / Portrait (9:16)",
        "w": 576,
        "h": 1024,
    },
    {
        "name": "Widescreen Monitor / Landscape (16:10)",
        "w": 1024,
        "h": 640,
    },
    {
        "name": "Widescreen Monitor / Portrait (10:16)",
        "w": 640,
        "h": 1024,
    },
    {
        "name": "Cinemascope (2.39:1)",
        "w": 1024,
        "h": 424,
    },
    {
        "name": "Widescreen Movie (1.85:1)",
        "w": 1024,
        "h": 552,
    },
    {
        "name": "Academy Movie (1.37:1)",
        "w": 1024,
        "h": 744,
    },
    {
        "name": "Sheet-print (A-series) / Landscape (297:210)",
        "w": 1024,
        "h": 720,
    },
    {
        "name": "Sheet-print (A-series) / Portrait (210:297)",
        "w": 720,
        "h": 1024,
    },
]

aspect_ratios = {k["name"]: (k["w"], k["h"]) for k in aspect_ratio_list}