From bf58750447f05f80252f79c0ee51fdfc5e9c0959 Mon Sep 17 00:00:00 2001 From: Jamie Pine <32987599+jamiepine@users.noreply.github.com> Date: Sat, 18 Apr 2026 17:05:36 -0700 Subject: [PATCH] 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) --- backend/requirements-mlx.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/requirements-mlx.txt b/backend/requirements-mlx.txt index 80ab1730..4bd1798c 100644 --- a/backend/requirements-mlx.txt +++ b/backend/requirements-mlx.txt @@ -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