Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -128,6 +128,12 @@ def run_inference(prompt, video_path, condition, video_length, seed, steps):
|
|
128 |
seed = math.floor(seed)
|
129 |
o_width = get_video_dimension(video_path)[0]
|
130 |
o_height = get_video_dimension(video_path)[1]
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
|
132 |
# Get FPS of original video input
|
133 |
target_fps = get_video_dimension(video_path)[2]
|
|
|
128 |
seed = math.floor(seed)
|
129 |
o_width = get_video_dimension(video_path)[0]
|
130 |
o_height = get_video_dimension(video_path)[1]
|
131 |
+
|
132 |
+
# Prepare dimensions
|
133 |
+
if o_width > 512 :
|
134 |
+
# Calculate the new height while maintaining the aspect ratio
|
135 |
+
o_height = int(o_height / o_width * 512)
|
136 |
+
o_width = 512
|
137 |
|
138 |
# Get FPS of original video input
|
139 |
target_fps = get_video_dimension(video_path)[2]
|