Repository navigation
fix(build): install mlx-audio/mlx-lm with --no-deps to bypass transformers 5.x conflict - #482
Conversation
…rmers 5.x conflict 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>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe pull request restructures MLX backend dependency installation by removing version constraints from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 34a53ba. Configure here.
| # Install it via `pip install --no-deps mlx-audio==0.4.1` after this file | ||
| # (see .github/workflows/release.yml). All other mlx-audio runtime deps | ||
| # (huggingface_hub, librosa, miniaudio, mlx-lm, numba, numpy, protobuf, | ||
| # pyloudnorm, sounddevice, tqdm) are already in requirements.txt. |
There was a problem hiding this comment.
Local dev setup missing mlx-audio and mlx-lm
High Severity
Removing mlx-audio from requirements-mlx.txt breaks local developer setup on Apple Silicon. The justfile setup-python recipe and several documentation pages (TROUBLESHOOTING.md, setup.mdx) instruct users to install requirements-mlx.txt, which now only contains mlx>=0.30.0. The --no-deps workaround for mlx-audio and mlx-lm was only added to release.yml, so developers running just setup will be missing these packages and the MLX backend will fail at runtime when importing mlx_audio.tts.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 34a53ba. Configure here.


Summary
The fix in #481 (cap
transformers<=4.57.6inrequirements-mlx.txt) didn't actually resolve in CI — pip backtracked through every transformers version and exited withResolutionImpossible. Local install worked only because mlx-audio 0.4.1 was already present and pip didn't re-resolve.Root cause
mlx-audio>=0.3.1declarestransformers==5.0.0rc3(0.3.1) or>=5.0.0(0.4.x).mlx-lm==0.31.1(mlx-audio's transitive dep) also declarestransformers>=5.0.0. Both are unsatisfiable withtransformers<=4.57.6.In practice the mlx-audio API surface we use (
mlx_audio.tts.load,mlx_audio.stt.load) works fine on transformers 4.57.x — verified by user across all engines on a Mac MLX dev install. The 5.x cap on these packages is conservative metadata, not a hard runtime requirement for our use cases.Fix
mlx-audiofromrequirements-mlx.txt(it can't be pip-resolved with our transformers cap)mlx-audio==0.4.1andmlx-lm==0.31.1with--no-depsinrelease.yml, after the rest of the deps are in placehuggingface_hub,librosa,numpy,numba,pyloudnorm,sounddevice,miniaudio,protobuf,sentencepiece,pyyaml,jinja2,tqdm) are already pulled in byrequirements.txtor other engines — verified against the working dev venv.Test plan
🤖 Generated with Claude Code
Note
Medium Risk
Changes the macOS MLX release build dependency installation strategy, which can affect reproducibility and whether release CI succeeds. Low runtime risk, but a mis-specified version or missing transitive dependency could still break the MLX bundle at build time.
Overview
Fixes CI dependency resolution for the Apple Silicon (MLX) release build by removing
mlx-audiofrombackend/requirements-mlx.txtand installingmlx-lm==0.31.1andmlx-audio==0.4.1explicitly with--no-depsinrelease.yml.Adds documentation/comments explaining the
transformers<=4.57.6cap conflict with MLX packages that declaretransformers>=5.x, and relies on already-pinned deps fromrequirements.txt/other engines to satisfymlx-audioruntime needs.Reviewed by Cursor Bugbot for commit 34a53ba. Configure here.
Summary by CodeRabbit
mlx-lmandmlx-audioversions and prevent conflicting dependency resolutions. Simplified backend requirements file by removing redundant constraints.