Skip to content

Commit

Permalink
fix python 3.10 issue in pyav load video
Browse files Browse the repository at this point in the history
  • Loading branch information
KairuiHu committed Nov 28, 2024
1 parent ab96465 commit 1637365
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lmms_eval/models/model_utils/load_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def read_video_pyav_pil(video_path: str, *, num_frm: int = 8, fps: float = None,
# return [Image.fromarray(frame) for frame in frames]


def read_video_pyav_base64(video_path: str, *, num_frm: int = 8, fps: Optional[float] = None, format="rgb24", img_format="PNG", max_image_size: Optional[Tuple[int, int] | int] = None, resize_strategy: str = "resize"):
def read_video_pyav_base64(video_path: str, *, num_frm: int = 8, fps: Optional[float] = None, format="rgb24", img_format="PNG", max_image_size: Optional[Union[Tuple[int, int], int]] = None, resize_strategy: str = "resize"):
frames = read_video_pyav(video_path, num_frm=num_frm, fps=fps, format=format)
base64_frames = []
for frame in frames:
Expand Down

0 comments on commit 1637365

Please sign in to comment.