Skip to content

fix(build): install mlx-audio/mlx-lm with --no-deps to bypass transformers 5.x conflict - #482

Merged
jamiepine merged 1 commit into
mainfrom
fix/mlx-audio-no-deps
Apr 19, 2026
Merged

jamiepine merged 1 commit into
mainfrom
fix/mlx-audio-no-deps

Conversation

@jamiepine

@jamiepine jamiepine commented Apr 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

The fix in #481 (cap transformers<=4.57.6 in requirements-mlx.txt) didn't actually resolve in CI — pip backtracked through every transformers version and exited with ResolutionImpossible. Local install worked only because mlx-audio 0.4.1 was already present and pip didn't re-resolve.

ERROR: Cannot install -r backend/requirements-mlx.txt (line 13) and transformers because these package versions have conflicting dependencies.
The conflict is caused by:
    transformers 4.36.0 depends on huggingface-hub<1.0 and >=0.19.3
    tokenizers 0.14.1 depends on huggingface_hub<0.18 and >=0.16.4

Root cause

mlx-audio>=0.3.1 declares transformers==5.0.0rc3 (0.3.1) or >=5.0.0 (0.4.x). mlx-lm==0.31.1 (mlx-audio's transitive dep) also declares transformers>=5.0.0. Both are unsatisfiable with transformers<=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

  • Drop mlx-audio from requirements-mlx.txt (it can't be pip-resolved with our transformers cap)
  • Install mlx-audio==0.4.1 and mlx-lm==0.31.1 with --no-deps in release.yml, after the rest of the deps are in place
  • All transitive runtime deps (huggingface_hub, librosa, numpy, numba, pyloudnorm, sounddevice, miniaudio, protobuf, sentencepiece, pyyaml, jinja2, tqdm) are already pulled in by requirements.txt or other engines — verified against the working dev venv.

Test plan

  • CI release build succeeds for macOS MLX
  • All four MLX-affected engines load and generate audio in the resulting bundle:
    • qwen-tts MLX (the engine that already worked)
    • qwen-custom-voice (was broken in 0.4.1)
    • tada-1b (was broken in 0.4.1)
    • luxtts (was broken in 0.4.1)

🤖 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-audio from backend/requirements-mlx.txt and installing mlx-lm==0.31.1 and mlx-audio==0.4.1 explicitly with --no-deps in release.yml.

Adds documentation/comments explaining the transformers<=4.57.6 cap conflict with MLX packages that declare transformers>=5.x, and relies on already-pinned deps from requirements.txt/other engines to satisfy mlx-audio runtime needs.

Reviewed by Cursor Bugbot for commit 34a53ba. Configure here.

Summary by CodeRabbit

  • Chores
    • Updated MLX backend dependency installation to explicitly pin mlx-lm and mlx-audio versions and prevent conflicting dependency resolutions. Simplified backend requirements file by removing redundant constraints.

…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>
@coderabbitai

coderabbitai Bot commented Apr 19, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The pull request restructures MLX backend dependency installation by removing version constraints from backend/requirements-mlx.txt and instead managing specific packages (mlx-lm and mlx-audio) explicitly in the CI release workflow using pip install --no-deps to bypass conflicting transitive dependency declarations.

Changes

Cohort / File(s) Summary
CI Workflow MLX Setup
.github/workflows/release.yml
Added explicit pinned installation of mlx-lm==0.31.1 and mlx-audio==0.4.1 with --no-deps flag in the release job's MLX dependency step to prevent transitive dependencies from being installed.
Backend Requirements Configuration
backend/requirements-mlx.txt
Removed mlx-audio>=0.3.1 and transformers version pin constraint; added documentation explaining that mlx-audio is intentionally excluded due to conflicting transformers requirements and should be installed separately via workflow.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 Hoppy changes, no deps in sight,
Conflicts resolved, our deps run tight,
MLX Audio stays apart with care,
Transformers sorted—clean and fair! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: installing mlx-audio and mlx-lm with --no-deps to resolve a transformers 5.x conflict, which directly addresses the core issue in the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mlx-audio-no-deps

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jamiepine
jamiepine merged commit 3c1e851 into main Apr 19, 2026
1 of 3 checks passed

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 34a53ba. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant