[Perf] Hash videos by source bytes (#49607)

Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
Signed-off-by: Guan-Ming Chiu <105915352+guan404ming@users.noreply.github.com>
Co-authored-by: Isotr0py <2037008807@qq.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Guan-Ming Chiu
2026-07-27 23:57:55 +08:00
committed by GitHub
co-authored by Isotr0py mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent d2ca3002d9
commit 04502deca2
8 changed files with 94 additions and 21 deletions
+8 -2
View File
@@ -24,7 +24,13 @@ from .inputs import (
MultiModalKwargsItem,
MultiModalSharedField,
)
from .media import AudioMediaIO, ImageMediaIO, MediaConnector, VideoMediaIO
from .media import (
AudioMediaIO,
ImageMediaIO,
MediaConnector,
MediaWithBytes,
VideoMediaIO,
)
if TYPE_CHECKING:
import torch.types
@@ -332,7 +338,7 @@ def fetch_image(
def fetch_video(
video_url: str,
video_io_kwargs: dict[str, Any] | None = None,
) -> tuple[npt.NDArray, dict[str, Any]]:
) -> MediaWithBytes[tuple[npt.NDArray, dict[str, Any]]]:
"""
Args:
video_url: URL of the video file to fetch.