Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -46,7 +46,8 @@ def convert_mp4_to_frames(video_path):
|
|
46 |
def infer(prompt, video_in):
|
47 |
|
48 |
video = convert_mp4_to_frames(video_in)
|
49 |
-
|
|
|
50 |
video_path = export_to_video(video_frames, output_video_path="xl_result.mp4")
|
51 |
|
52 |
return "xl_result.mp4", gr.Group.update(visible=True)
|
|
|
46 |
def infer(prompt, video_in):
|
47 |
|
48 |
video = convert_mp4_to_frames(video_in)
|
49 |
+
video_resized = [Image.fromarray(frame).resize((1024, 576)) for frame in video]
|
50 |
+
video_frames = pipe_xl(prompt, video=video_resized, strength=0.6).frames
|
51 |
video_path = export_to_video(video_frames, output_video_path="xl_result.mp4")
|
52 |
|
53 |
return "xl_result.mp4", gr.Group.update(visible=True)
|