Spaces:
Running
on
Zero
Running
on
Zero
Antoni Bigata
commited on
Commit
·
aa87ffe
1
Parent(s):
506e646
requirements
Browse files
app.py
CHANGED
@@ -219,10 +219,7 @@ def compute_video_embedding(video_reader, min_len):
|
|
219 |
video_frames = torch.cat(video_frames, dim=0)
|
220 |
video_frames = rearrange(video_frames, "f h w c -> f c h w")
|
221 |
torch.cuda.empty_cache()
|
222 |
-
|
223 |
-
video_embedding_safe = encoded.detach().cpu().numpy().tolist()
|
224 |
-
video_frames_safe = video_frames.detach().cpu().numpy().tolist()
|
225 |
-
return video_embedding_safe, video_frames_safe
|
226 |
|
227 |
|
228 |
@spaces.GPU(duration=120)
|
@@ -598,6 +595,8 @@ def sample(
|
|
598 |
return complete_video
|
599 |
|
600 |
|
|
|
|
|
601 |
def process_video(video_input, audio_input, max_num_seconds):
|
602 |
"""Main processing function to generate synchronized video"""
|
603 |
|
|
|
219 |
video_frames = torch.cat(video_frames, dim=0)
|
220 |
video_frames = rearrange(video_frames, "f h w c -> f c h w")
|
221 |
torch.cuda.empty_cache()
|
222 |
+
return encoded, video_frames
|
|
|
|
|
|
|
223 |
|
224 |
|
225 |
@spaces.GPU(duration=120)
|
|
|
595 |
return complete_video
|
596 |
|
597 |
|
598 |
+
@spaces.GPU(duration=600)
|
599 |
+
@torch.no_grad()
|
600 |
def process_video(video_input, audio_input, max_num_seconds):
|
601 |
"""Main processing function to generate synchronized video"""
|
602 |
|