Cap transformers below 5.0 to avoid torchcodec ASR crash

transformers 5.x unconditionally imports torchcodec in its ASR pipeline
preprocess step, which crashes in environments without FFmpeg shared libs.
4.x does not have this dependency.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-05 17:32:50 +02:00
parent 5dfaa0b300
commit d6ff42dc7c
+1 -1
View File
@@ -20,7 +20,7 @@ pip("omnivoice", "--no-deps")
# Install omnivoice's runtime inference dependencies (excludes torch, torchaudio,
# gradio, tensorboardX, webdataset which are training/demo-only tools).
pip(
"transformers>=5.0.0",
"transformers>=4.40.0,<5.0.0",
"accelerate",
"pydub",
"soundfile",