fffiloni commited on
Commit
da9328a
·
1 Parent(s): af0354d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- video_frames = pipe_xl(prompt, video=video, strength=0.6, height=576, width=1024).frames
 
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)