Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -132,8 +132,8 @@ def run_inference(prompt, video_path, condition, video_length, seed, steps):
|
|
| 132 |
# Prepare dimensions
|
| 133 |
if o_width > 512 :
|
| 134 |
# Calculate the new height while maintaining the aspect ratio
|
| 135 |
-
|
| 136 |
-
|
| 137 |
|
| 138 |
# Get FPS of original video input
|
| 139 |
target_fps = get_video_dimension(video_path)[2]
|
|
@@ -146,8 +146,8 @@ def run_inference(prompt, video_path, condition, video_length, seed, steps):
|
|
| 146 |
total_frames = get_video_dimension(video_path)[3]
|
| 147 |
|
| 148 |
# Resize the video
|
| 149 |
-
r_width = make_nearest_multiple_of_32(
|
| 150 |
-
r_height = make_nearest_multiple_of_32(
|
| 151 |
print(f"multiple of 32 sizes : {r_width}x{r_height}")
|
| 152 |
# Check if the file already exists
|
| 153 |
if os.path.exists('resized.mp4'):
|
|
|
|
| 132 |
# Prepare dimensions
|
| 133 |
if o_width > 512 :
|
| 134 |
# Calculate the new height while maintaining the aspect ratio
|
| 135 |
+
n_height = int(o_height / o_width * 512)
|
| 136 |
+
n_width = 512
|
| 137 |
|
| 138 |
# Get FPS of original video input
|
| 139 |
target_fps = get_video_dimension(video_path)[2]
|
|
|
|
| 146 |
total_frames = get_video_dimension(video_path)[3]
|
| 147 |
|
| 148 |
# Resize the video
|
| 149 |
+
r_width = make_nearest_multiple_of_32(n_width)
|
| 150 |
+
r_height = make_nearest_multiple_of_32(n_height)
|
| 151 |
print(f"multiple of 32 sizes : {r_width}x{r_height}")
|
| 152 |
# Check if the file already exists
|
| 153 |
if os.path.exists('resized.mp4'):
|