hlky HF staff commited on
Commit
0e77d0a
·
verified ·
1 Parent(s): 4fa249c

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -2
handler.py CHANGED
@@ -1,6 +1,5 @@
1
  from typing import cast, Union
2
 
3
- import PIL.Image
4
  import torch
5
 
6
  from diffusers import AutoencoderKLHunyuanVideo
@@ -49,7 +48,7 @@ class EndpointHandler:
49
  elif output_type == "pil":
50
  frames = cast(torch.Tensor, self.video_processor.postprocess_video(frames, output_type="pt")[0])
51
  elif output_type == "mp4":
52
- frames = torch.Tensor, self.video_processor.postprocess_video(frames, output_type="pil")[0]
53
  path = export_to_video(frames, fps=15)
54
  with open(path, "rb") as f:
55
  frames = f.read()
 
1
  from typing import cast, Union
2
 
 
3
  import torch
4
 
5
  from diffusers import AutoencoderKLHunyuanVideo
 
48
  elif output_type == "pil":
49
  frames = cast(torch.Tensor, self.video_processor.postprocess_video(frames, output_type="pt")[0])
50
  elif output_type == "mp4":
51
+ frames = cast(torch.Tensor, self.video_processor.postprocess_video(frames, output_type="pil")[0])
52
  path = export_to_video(frames, fps=15)
53
  with open(path, "rb") as f:
54
  frames = f.read()