fix(build): pin transformers in MLX requirements to prevent 5.x upgrade (#481)

mlx-audio depends on `transformers` with no upper bound. Installing
requirements-mlx.txt after requirements.txt lets pip upgrade transformers
past the 4.57.x cap to 5.x, which breaks three engines in the frozen MLX
bundle:

- qwen-custom-voice: `check_model_inputs` was rewritten to take `func` as
  positional, so `@check_model_inputs()` factory calls fail with
  `TypeError: missing 1 required positional argument: 'func'`
- tada-1b: `PretrainedConfig.__init_subclass__` now applies `@dataclass`,
  which rejects tada's `strides: list = []` mutable default
- luxtts: Whisper init hits `AssertionError` in `torch._refs.normal_`

Restating the same constraint here keeps mlx-audio's transformers
dependency from quietly winning the resolver.

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This commit is contained in:
Jamie Pine
2026-04-18 17:05:36 -07:00
committed by GitHub
co-authored by Claude Opus 4.7
parent 2d56309bdd
commit bf58750447
+8
View File
@@ -3,3 +3,11 @@
mlx>=0.30.0
mlx-audio>=0.3.1
# Restate the transformers cap from requirements.txt. mlx-audio depends on
# `transformers` with no upper bound, so installing it after requirements.txt
# lets pip upgrade transformers past 4.57.x (latest is 5.x), which breaks
# qwen-custom-voice (`@check_model_inputs()` API change), tada-1b (dataclass
# `mutable default` enforcement), and luxtts (Whisper init path) in the
# frozen MLX bundle. Keep this constraint in sync with requirements.txt.
transformers>=4.36.0,<=4.57.6