Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -349,7 +349,8 @@ def generation_loop(video_path='./test_videos', seed=666, fps_out=12, batch_size
|
|
| 349 |
|
| 350 |
ori_lengths = [video.size(1) for video in cond_latents]
|
| 351 |
input_videos = cond_latents
|
| 352 |
-
|
|
|
|
| 353 |
|
| 354 |
# runner.dit.to("cpu")
|
| 355 |
print(f"Encoding videos: {list(map(lambda x: x.size(), cond_latents))}")
|
|
@@ -429,7 +430,7 @@ with gr.Blocks(title="SeedVR2: One-Step Video Restoration via Diffusion Adversar
|
|
| 429 |
fps = gr.Number(label="fps", value=24)
|
| 430 |
|
| 431 |
with gr.Row():
|
| 432 |
-
output_video = gr.Video(label="
|
| 433 |
output_image = gr.Image(label="Output_Image")
|
| 434 |
download_link = gr.File(label="Download the output")
|
| 435 |
|
|
|
|
| 349 |
|
| 350 |
ori_lengths = [video.size(1) for video in cond_latents]
|
| 351 |
input_videos = cond_latents
|
| 352 |
+
if is_video:
|
| 353 |
+
cond_latents = [cut_videos(video, sp_size) for video in cond_latents]
|
| 354 |
|
| 355 |
# runner.dit.to("cpu")
|
| 356 |
print(f"Encoding videos: {list(map(lambda x: x.size(), cond_latents))}")
|
|
|
|
| 430 |
fps = gr.Number(label="fps", value=24)
|
| 431 |
|
| 432 |
with gr.Row():
|
| 433 |
+
output_video = gr.Video(label="Output_Video")
|
| 434 |
output_image = gr.Image(label="Output_Image")
|
| 435 |
download_link = gr.File(label="Download the output")
|
| 436 |
|