Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -137,6 +137,10 @@ def run_inference(prompt, video_path, condition, video_length, seed, steps):
|
|
| 137 |
r_width = make_nearest_multiple_of_32(o_width)
|
| 138 |
r_height = make_nearest_multiple_of_32(o_height)
|
| 139 |
print(f"multiple of 32 sizes : {r_width}x{r_height}")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
resized = resize_video(video_path, 'resized.mp4', r_width, r_height, target_fps)
|
| 141 |
|
| 142 |
# normalize pixels
|
|
|
|
| 137 |
r_width = make_nearest_multiple_of_32(o_width)
|
| 138 |
r_height = make_nearest_multiple_of_32(o_height)
|
| 139 |
print(f"multiple of 32 sizes : {r_width}x{r_height}")
|
| 140 |
+
# Check if the file already exists
|
| 141 |
+
if os.path.exists('resized.mp4'):
|
| 142 |
+
# Delete the existing file
|
| 143 |
+
os.remove('resized.mp4')
|
| 144 |
resized = resize_video(video_path, 'resized.mp4', r_width, r_height, target_fps)
|
| 145 |
|
| 146 |
# normalize pixels
|