Coverage for apps/resolutions.py: 100%
4 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-09 04:47 +0000
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-09 04:47 +0000
1"""
2Resolutions:
316:9 (YouTube standard):
4 * 144p: 256 x 144
5 * 240p: 426 x 240
6 * 512 x 288 <- sketch
7 * 360p: 640 x 360
8 * 768 x 432
9 * 480p: 854 x 480 <- video+audio (fantasy talk ~856x480)
10 * 1024 x 576
11 * 720p: 1280 x 720 <- final output
12 * 1366 x 768
13 * 1080p: 1920 x 1080
14 * 1440p: 2560 x 1440
15 * 2160p: 3840 x 2160
164:3:
17 * 320 x 240
18 * 480 x 360
19 * VGA: 640 x 480 <- sketch
20 * 768 x 576 <- video+audio
21 * SVGA: 800 x 600
22 * XGA: 1024 x 768
23 * 1152 x 864
24 * SXGA: 1280 x 960 <- final output
25 * 1440 x 1080
26 * QXGA: 2048 x 1536
2716:10:
28 * 256 x 160
29 * 384 x 240
30 * 512 x 320
31 * 640 x 400
32 * 768 x 480
33 * 896 x 560
34 * 1024 x 640
35 * 1280 x 800
36 * 1440 x 900
375:4:
38 * 320 x 256
39 * 640 x 512
40 * 800 x 640
41 * 1280 x 1024
42 * 1600 x 1280
44Fantasy Talking:
45 16:9:
46 * 256 x 144 V
47 * 320 x 180 X // 8 != 0
48 * 426 x 240 X // 8 != 0
49 * 512 x 288 V
50 * 640 x 360 V (<=8 GPUs)
51 * 768 x 432 V
52 * 854 x 480 X // 8 != 0
53 * 856 x 480 V
54 * 1280 x 720 V
55 4:3
56 * 320 x 240 V (X 8 GPUs)
57 * 480 x 360 V (X 8 GPUs)
58 * 640 x 480 V (<=8 GPUs)
59 * 768 x 576 V (<=8 GPUs)
60 * 1024 x 768 V (<=8 GPUs)
61 * 1280 x 960 V (<=8 GPUs)
62 16:10:
63 * 256 x 160 V (<=8 GPUs)
64 * 384 x 240 V (<=8 GPUs)
65 * 512 x 320 V (<=8 GPUs)
66 * 640 x 400 V (<=8 GPUs)
67 * 768 x 480 V (<=8 GPUs)
68 * 896 x 560 V (<=8 GPUs)
69 * 1024 x 640 V (<=8 GPUs)
70 5:4:
71 * 320 x 256 V (<=8 GPUs)
72 * 480 x 384 V (<=8 GPUs)
73 * 640 x 512 V (<=8 GPUs)
74 * 720 x 576 V (X 8 GPUs)
75 * 800 x 640 V (<=8 GPUs)
76 * 960 x 768 V (<=8 GPUs)
77 * 1280 x 1024 V (<=8 GPUs)
78Hunyuan FramePack F1:
79 16:9:
80 * 256 x 144 V
81 * 320 x 180 X // 8 != 0
82 * 426 x 240 X // 8 != 0
83 * 512 x 288 V
84 * 640 x 360 X Dynamo failed
85 * 768 x 432 V
86 * 854 x 480 X // 8 != 0
87 * 856 x 480 V
88 * 896 x 540 X // 8 != 0
89 * 1280 x 720 X OOM
90 4:3:
91 * 320 x 240 V
92 * 480 x 360 X (7797) not supported for 8 GPUs.
93 * 640 x 480 X (13820) not supported for 8 GPUs.
94 * 768 x 576 V
95 * 800 x 600 X (21620) not supported for 8 GPUs.
96 * 1024 x 768 V Slow
97 * 1280 x 960 ?
98 16:10:
99 * 256 x 160 V (4 GPUs)
100 * 384 x 240 V (4 GPUs)
101 * 512 x 320 V (4 GPUs)
102 * 640 x 400 V (4 GPUs)
103 * 768 x 480 V (4 GPUs)
104 * 896 x 560 V Slow
105 * 1024 x 640 V Slow
106 5:4:
107 * 240 x 192 V
108 * 320 x 256 V
109 * 480 x 384 V
110 * 640 x 512 V
111 * 720 x 576 V
112 * 800 x 640 V
113 * 960 x 768 V Slow
114 * 1280 x 1024 V Slow
115"""
117from typing import Dict
118from typing import Tuple
120ASPECT_RATIO = "16:10" # Close to 16:9 and allows 8 GPU parallelism
122RESOLUTIONS: Dict[str, Dict[str, Tuple[int, int]]] = {
123 "4:3": {
124 # "Low": (640, 480), # Sketch # Not supported with 8 GPUs
125 "low": (768, 576), # Sketch
126 "medium": (768, 576), # Video+Audio
127 "high": (1280, 960) # Final output
128 },
129 "16:9": {
130 "low": (854, 480), # Sketch
131 "medium": (1280, 720), # Video+Audio
132 "high": (1920, 1080) # Final output
133 },
134 "5:4": {
135 "low": (480, 384), # Sketch
136 "medium": (640, 512), # Video+Audio
137 "high": (1280, 1024), # Final output
138 },
139 "16:10": {
140 "low": (512, 320), # Sketch
141 "medium": (640, 400), # Video+Audio
142 "high": (1280, 800), # Final output
143 }
144}