Skip to content

Commit 3c1e851

Browse files
jamiepineclaude
andauthored
fix(build): install mlx-audio/mlx-lm with --no-deps to bypass transformers 5.x conflict (#482)
The previous fix (#481) capped transformers at 4.57.6 in requirements-mlx.txt, but pip's clean resolver in CI can't satisfy that alongside mlx-audio>=0.3.1 (declares `transformers==5.0.0rc3` or `>=5.0.0`) — it backtracks through every transformers and tokenizers version and exits with `ResolutionImpossible`. The dev install worked only because mlx-audio 0.4.1 was already present, so pip never tried to re-resolve. mlx-audio 0.4.1 + mlx-lm 0.31.1 both declare transformers>=5.x but the API surface we actually use works fine on 4.57.x in practice (verified across all engines in dev). Install both --no-deps to bypass the resolver; transitive runtime deps (huggingface_hub, librosa, numpy, numba, pyloudnorm, etc.) are already pulled in by requirements.txt. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent bf58750 commit 3c1e851

2 files changed

Lines changed: 19 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ jobs:
6868
if: matrix.backend == 'mlx'
6969
run: |
7070
pip install -r backend/requirements-mlx.txt
71+
# mlx-audio>=0.3.1 and mlx-lm>=0.31.1 both declare transformers>=5.x,
72+
# which conflicts with our 4.57.x cap. The runtime APIs we use work
73+
# fine on transformers 4.57.x in practice (verified in dev), so install
74+
# them --no-deps. mlx-audio's other runtime deps (huggingface_hub,
75+
# librosa, numpy, numba, pyloudnorm) are already in requirements.txt;
76+
# the rest (sounddevice, miniaudio, protobuf, sentencepiece, pyyaml,
77+
# jinja2) are pulled in by other engines.
78+
pip install --no-deps mlx-lm==0.31.1
79+
pip install --no-deps mlx-audio==0.4.1
7180
7281
- name: Build Python server (Linux/macOS)
7382
if: matrix.platform != 'windows-latest'

backend/requirements-mlx.txt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
# These should only be installed on aarch64-apple-darwin platforms
33

44
mlx>=0.30.0
5-
mlx-audio>=0.3.1
65

7-
# Restate the transformers cap from requirements.txt. mlx-audio depends on
8-
# `transformers` with no upper bound, so installing it after requirements.txt
9-
# lets pip upgrade transformers past 4.57.x (latest is 5.x), which breaks
10-
# qwen-custom-voice (`@check_model_inputs()` API change), tada-1b (dataclass
11-
# `mutable default` enforcement), and luxtts (Whisper init path) in the
12-
# frozen MLX bundle. Keep this constraint in sync with requirements.txt.
13-
transformers>=4.36.0,<=4.57.6
6+
# NOTE: mlx-audio is intentionally not listed here. From 0.3.1 onward it
7+
# declares `transformers==5.0.0rc3` / `>=5.0.0`, which conflicts with the
8+
# `transformers<=4.57.6` cap in requirements.txt and breaks CI's clean
9+
# resolver. The mlx-audio API surface we use (mlx_audio.tts.load,
10+
# mlx_audio.stt.load) works fine on transformers 4.57.x in practice.
11+
#
12+
# Install it via `pip install --no-deps mlx-audio==0.4.1` after this file
13+
# (see .github/workflows/release.yml). All other mlx-audio runtime deps
14+
# (huggingface_hub, librosa, miniaudio, mlx-lm, numba, numpy, protobuf,
15+
# pyloudnorm, sounddevice, tqdm) are already in requirements.txt.

0 commit comments

Comments
 (0)