Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -53,37 +53,35 @@ system_prompt_i2v = """λΉμ μ μ΄λ―Έμ§ κΈ°λ° λΉλμ€ μμ±μ μν ν
|
|
53 |
# Default preset
|
54 |
default_preset = "16:9 (512x320)"
|
55 |
|
56 |
-
#
|
57 |
-
txt2vid_current_height = gr.State(value=320)
|
58 |
-
txt2vid_current_width = gr.State(value=512)
|
59 |
-
txt2vid_current_num_frames = gr.State(value=257) # 10.3μ΄ (257 νλ μ)
|
60 |
-
|
61 |
-
img2vid_current_height = gr.State(value=320)
|
62 |
-
img2vid_current_width = gr.State(value=512)
|
63 |
-
img2vid_current_num_frames = gr.State(value=257) # 10.3μ΄ (257 νλ μ)
|
64 |
-
|
65 |
-
|
66 |
-
# preset_options μμ - 16:9 μ΅μ ν¬κΈ° λ³κ²½
|
67 |
preset_options = [
|
68 |
# 16:9 λΉμ¨ (μ΅λ/μ΅μ)
|
69 |
-
{"label": "16:9 HD (1216x684)", "width": 1216, "height": 684, "num_frames": 41, "aspect": "16:9"},
|
70 |
-
{"label": "16:9 (512x320)", "width": 512, "height": 320, "num_frames":
|
71 |
|
72 |
# 4:3 λΉμ¨ (μ΅λ/μ΅μ)
|
73 |
-
{"label": "4:3 (1024x768)", "width": 1024, "height": 768, "num_frames": 49, "aspect": "4:3"},
|
74 |
-
{"label": "4:3 (640x480)", "width": 640, "height": 480, "num_frames":
|
75 |
|
76 |
# 1:1 λΉμ¨ (μ΅λ/μ΅μ)
|
77 |
-
{"label": "1:1 (896x896)", "width": 896, "height": 896, "num_frames":
|
78 |
-
{"label": "1:1 (512x512)", "width": 512, "height": 512, "num_frames":
|
79 |
|
80 |
# 3:2 λΉμ¨ (μ΅λ)
|
81 |
-
{"label": "3:2 (1200x800)", "width": 1200, "height": 800, "num_frames":
|
82 |
|
83 |
# 9:16 λΉμ¨ (μ΅μ)
|
84 |
-
{"label": "9:16 (432x768)", "width": 432, "height": 768, "num_frames":
|
85 |
]
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
|
89 |
# Load Hugging Face token if needed
|
|
|
53 |
# Default preset
|
54 |
default_preset = "16:9 (512x320)"
|
55 |
|
56 |
+
# preset_options μμ - κ° ν΄μλλ³ μ νν νλ μ μ μ μ©
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
preset_options = [
|
58 |
# 16:9 λΉμ¨ (μ΅λ/μ΅μ)
|
59 |
+
{"label": "16:9 HD (1216x684)", "width": 1216, "height": 684, "num_frames": 41, "aspect": "16:9"}, # 1.6μ΄
|
60 |
+
{"label": "16:9 (512x320)", "width": 512, "height": 320, "num_frames": 257, "aspect": "16:9"}, # 10.3μ΄
|
61 |
|
62 |
# 4:3 λΉμ¨ (μ΅λ/μ΅μ)
|
63 |
+
{"label": "4:3 (1024x768)", "width": 1024, "height": 768, "num_frames": 49, "aspect": "4:3"}, # 2.0μ΄
|
64 |
+
{"label": "4:3 (640x480)", "width": 640, "height": 480, "num_frames": 121, "aspect": "4:3"}, # 4.8μ΄
|
65 |
|
66 |
# 1:1 λΉμ¨ (μ΅λ/μ΅μ)
|
67 |
+
{"label": "1:1 (896x896)", "width": 896, "height": 896, "num_frames": 73, "aspect": "1:1"}, # 2.9μ΄
|
68 |
+
{"label": "1:1 (512x512)", "width": 512, "height": 512, "num_frames": 233, "aspect": "1:1"}, # 9.3μ΄
|
69 |
|
70 |
# 3:2 λΉμ¨ (μ΅λ)
|
71 |
+
{"label": "3:2 (1200x800)", "width": 1200, "height": 800, "num_frames": 41, "aspect": "3:2"}, # 1.6μ΄
|
72 |
|
73 |
# 9:16 λΉμ¨ (μ΅μ)
|
74 |
+
{"label": "9:16 (432x768)", "width": 432, "height": 768, "num_frames": 241, "aspect": "9:16"} # 9.6μ΄
|
75 |
]
|
76 |
|
77 |
+
# State λ³μλ€μ μ΄κΈ°κ°λ μμ (512x320 κΈ°μ€)
|
78 |
+
txt2vid_current_height = gr.State(value=320)
|
79 |
+
txt2vid_current_width = gr.State(value=512)
|
80 |
+
txt2vid_current_num_frames = gr.State(value=257) # 10.3μ΄
|
81 |
+
|
82 |
+
img2vid_current_height = gr.State(value=320)
|
83 |
+
img2vid_current_width = gr.State(value=512)
|
84 |
+
img2vid_current_num_frames = gr.State(value=257) # 10.3μ΄
|
85 |
|
86 |
|
87 |
# Load Hugging Face token if needed
|