Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
cee7436a
Unverified
Commit
cee7436a
authored
Jan 11, 2026
by
Isotr0py
Committed by
GitHub
Jan 11, 2026
Browse files
[Misc] Make `scipy` as optional audio/benchmark dependency (#32096)
Signed-off-by:
Isotr0py
<
mozf@mail2.sysu.edu.cn
>
parent
4c16ba61
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
requirements/common.txt
requirements/common.txt
+0
-1
setup.py
setup.py
+2
-1
vllm/multimodal/audio.py
vllm/multimodal/audio.py
+8
-5
No files found.
requirements/common.txt
View file @
cee7436a
...
...
@@ -42,7 +42,6 @@ depyf==0.20.0 # required for profiling and debugging with compilation config
cloudpickle # allows pickling lambda functions in model_executor/models/registry.py
watchfiles # required for http server to monitor the updates of TLS files
python-json-logger # Used by logging as per examples/others/logging_configuration.md
scipy # Required for phi-4-multimodal-instruct
ninja # Required for xgrammar, rocm, tpu, xpu
pybase64 # fast base64 implementation
cbor2 # Required for cross-language serialization of hashable objects
...
...
setup.py
View file @
cee7436a
...
...
@@ -978,12 +978,13 @@ setup(
ext_modules
=
ext_modules
,
install_requires
=
get_requirements
(),
extras_require
=
{
"bench"
:
[
"pandas"
,
"matplotlib"
,
"seaborn"
,
"datasets"
],
"bench"
:
[
"pandas"
,
"matplotlib"
,
"seaborn"
,
"datasets"
,
"scipy"
],
"tensorizer"
:
[
"tensorizer==2.10.1"
],
"fastsafetensors"
:
[
"fastsafetensors >= 0.1.10"
],
"runai"
:
[
"runai-model-streamer[s3,gcs] >= 0.15.3"
],
"audio"
:
[
"librosa"
,
"scipy"
,
"soundfile"
,
"mistral_common[audio]"
,
],
# Required for audio processing
...
...
vllm/multimodal/audio.py
View file @
cee7436a
...
...
@@ -27,6 +27,12 @@ try:
except
ImportError
:
soundfile
=
PlaceholderModule
(
"soundfile"
)
# type: ignore[assignment]
try
:
import
scipy.signal
as
scipy_signal
except
ImportError
:
scipy_signal
=
PlaceholderModule
(
"scipy"
).
placeholder_attr
(
"signal"
)
# type: ignore[assignment]
# ============================================================
...
...
@@ -173,13 +179,10 @@ def resample_audio_scipy(
orig_sr
:
float
,
target_sr
:
float
,
):
# lazy import scipy.signal, otherwise it will crash doc build.
import
scipy.signal
if
orig_sr
>
target_sr
:
return
scipy
.
signal
.
resample_poly
(
audio
,
1
,
orig_sr
//
target_sr
)
return
scipy
_
signal
.
resample_poly
(
audio
,
1
,
orig_sr
//
target_sr
)
elif
orig_sr
<
target_sr
:
return
scipy
.
signal
.
resample_poly
(
audio
,
target_sr
//
orig_sr
,
1
)
return
scipy
_
signal
.
resample_poly
(
audio
,
target_sr
//
orig_sr
,
1
)
return
audio
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment