[Misc] Continue refactoring model tests (#17573)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-05-01 22:06:08 -07:00
committed by GitHub
parent b4003d11fc
commit f89d0e11bf
6 changed files with 20 additions and 16 deletions
+4 -4
View File
@@ -78,18 +78,18 @@ def video_to_pil_images_list(path: str,
@dataclass(frozen=True)
class VideoAsset:
name: Literal["sample_demo_1.mp4"]
name: Literal["sample_demo_1"]
num_frames: int = -1
@property
def pil_images(self) -> list[Image.Image]:
video_path = download_video_asset(self.name)
video_path = download_video_asset(self.name + ".mp4")
ret = video_to_pil_images_list(video_path, self.num_frames)
return ret
@property
def np_ndarrays(self) -> npt.NDArray:
video_path = download_video_asset(self.name)
video_path = download_video_asset(self.name + ".mp4")
ret = video_to_ndarrays(video_path, self.num_frames)
return ret
@@ -99,5 +99,5 @@ class VideoAsset:
See also: examples/offline_inference/qwen2_5_omni/only_thinker.py
"""
video_path = download_video_asset(self.name)
video_path = download_video_asset(self.name + ".mp4")
return librosa.load(video_path, sr=sampling_rate)[0]