Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Misc] Abstract out the logic for reading and writing media content #11527

Merged
merged 10 commits into from
Dec 27, 2024
Prev Previous commit
Next Next commit
Fix typos
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
DarkLight1337 committed Dec 26, 2024
commit 72a1d4d3c789c0ccba1a06a11c4f097eedd0778b
8 changes: 4 additions & 4 deletions vllm/multimodal/utils.py
Original file line number Diff line number Diff line change
@@ -148,7 +148,7 @@ def fetch_audio(audio_url: str) -> tuple[np.ndarray, Union[int, float]]:
return global_media_connector.load_from_url(
audio_url,
audio_io,
fetch_timeout=envs.VLLM_IMAGE_FETCH_TIMEOUT,
fetch_timeout=envs.VLLM_AUDIO_FETCH_TIMEOUT,
)


@@ -162,7 +162,7 @@ async def async_fetch_audio(
return await global_media_connector.load_from_url_async(
audio_url,
audio_io,
fetch_timeout=envs.VLLM_IMAGE_FETCH_TIMEOUT,
fetch_timeout=envs.VLLM_AUDIO_FETCH_TIMEOUT,
)


@@ -219,7 +219,7 @@ def fetch_video(
return global_media_connector.load_from_url(
video_url,
video_io,
fetch_timeout=envs.VLLM_IMAGE_FETCH_TIMEOUT,
fetch_timeout=envs.VLLM_VIDEO_FETCH_TIMEOUT,
)


@@ -240,7 +240,7 @@ async def async_fetch_video(
return await global_media_connector.load_from_url_async(
video_url,
video_io,
fetch_timeout=envs.VLLM_IMAGE_FETCH_TIMEOUT,
fetch_timeout=envs.VLLM_VIDEO_FETCH_TIMEOUT,
)