Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -59,6 +59,8 @@ def infer(prompt, video_in, denoise_strength):
|
|
59 |
video = convert_mp4_to_frames(video_in, duration=3)
|
60 |
video_resized = [Image.fromarray(frame).resize((1024, 576)) for frame in video]
|
61 |
video_frames = pipe_xl(prompt, negative_prompt=negative_prompt, video=video_resized, strength=denoise_strength).frames
|
|
|
|
|
62 |
video_path = export_to_video(video_frames, output_video_path="xl_result.mp4")
|
63 |
|
64 |
return "xl_result.mp4", gr.Group.update(visible=True)
|
|
|
59 |
video = convert_mp4_to_frames(video_in, duration=3)
|
60 |
video_resized = [Image.fromarray(frame).resize((1024, 576)) for frame in video]
|
61 |
video_frames = pipe_xl(prompt, negative_prompt=negative_prompt, video=video_resized, strength=denoise_strength).frames
|
62 |
+
del pipe_xl
|
63 |
+
torch.cuda.empty_cache()
|
64 |
video_path = export_to_video(video_frames, output_video_path="xl_result.mp4")
|
65 |
|
66 |
return "xl_result.mp4", gr.Group.update(visible=True)
|