[Frontend] Remove librosa from audio dependency (#37058)
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
This commit is contained in:
@@ -12,6 +12,7 @@ import math
|
||||
import warnings
|
||||
from collections.abc import Iterable, Mapping, Sequence
|
||||
from functools import cached_property
|
||||
from io import BytesIO
|
||||
from typing import Annotated, Literal, TypeAlias
|
||||
|
||||
import torch
|
||||
@@ -53,7 +54,7 @@ from vllm.multimodal.inputs import (
|
||||
MultiModalKwargsItems,
|
||||
VideoItem,
|
||||
)
|
||||
from vllm.multimodal.media.audio import extract_audio_from_video_bytes
|
||||
from vllm.multimodal.media.audio import load_audio_pyav
|
||||
from vllm.multimodal.parse import (
|
||||
AudioProcessorItems,
|
||||
ImageEmbeddingItems,
|
||||
@@ -553,7 +554,7 @@ class NanoNemotronVLMultiModalProcessor(
|
||||
"video must be loaded with keep_video_bytes=True (e.g. via "
|
||||
"the chat API with a model that sets use_audio_in_video)."
|
||||
)
|
||||
audio_items.append(extract_audio_from_video_bytes(video_bytes))
|
||||
audio_items.append(load_audio_pyav(BytesIO(video_bytes)))
|
||||
|
||||
# Create a new VideoProcessorItems with metadata that does not contain
|
||||
# the large video bytes, to avoid modifying the input `mm_items`.
|
||||
|
||||
Reference in New Issue
Block a user