Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -301,7 +301,15 @@ def inference_and_return_video(dilation_iterations, num_inference_steps, video_p
|
|
| 301 |
|
| 302 |
video_file = f"/tmp/{time.time()}-{random.random()}-removed_output.mp4"
|
| 303 |
clip = ImageSequenceClip(list(out), fps=fps)
|
| 304 |
-
clip.write_videofile(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 305 |
return video_file
|
| 306 |
|
| 307 |
@spaces.GPU(duration=40)
|
|
|
|
| 301 |
|
| 302 |
video_file = f"/tmp/{time.time()}-{random.random()}-removed_output.mp4"
|
| 303 |
clip = ImageSequenceClip(list(out), fps=fps)
|
| 304 |
+
clip.write_videofile(
|
| 305 |
+
video_file,
|
| 306 |
+
codec="libx264",
|
| 307 |
+
audio=False,
|
| 308 |
+
fps=fps,
|
| 309 |
+
preset="medium",
|
| 310 |
+
ffmpeg_params=["-crf", "17", "-pix_fmt", "yuv420p"],
|
| 311 |
+
verbose=False, logger=None
|
| 312 |
+
)
|
| 313 |
return video_file
|
| 314 |
|
| 315 |
@spaces.GPU(duration=40)
|