casperarmani
commited on
Commit
·
b98a9d3
1
Parent(s):
c62236d
changed helper function trim cap to 120s from 10s
Browse files- gradio_app.py +2 -2
gradio_app.py
CHANGED
|
@@ -62,8 +62,8 @@ ckpt = "2-Step"
|
|
| 62 |
video_inpainting_sd = DiffuEraser(device, base_model_path, vae_path, diffueraser_path, ckpt=ckpt)
|
| 63 |
propainter = Propainter(propainter_model_dir, device=device)
|
| 64 |
|
| 65 |
-
# Helper function to trim videos
|
| 66 |
-
def trim_video(input_path, output_path, max_duration=
|
| 67 |
clip = VideoFileClip(input_path)
|
| 68 |
duration = min(max_duration, clip.duration)
|
| 69 |
clip.close()
|
|
|
|
| 62 |
video_inpainting_sd = DiffuEraser(device, base_model_path, vae_path, diffueraser_path, ckpt=ckpt)
|
| 63 |
propainter = Propainter(propainter_model_dir, device=device)
|
| 64 |
|
| 65 |
+
# Helper function to trim videos (cap at 120s so longer clips still pass through)
|
| 66 |
+
def trim_video(input_path, output_path, max_duration=120):
|
| 67 |
clip = VideoFileClip(input_path)
|
| 68 |
duration = min(max_duration, clip.duration)
|
| 69 |
clip.close()
|