#975·mlx-audio

Unquantized MLX MOSS-Transcribe-Diarize checkpoint fails because Whisper conv weights are transposed twice

Author: z11iCreated Sep 26, 2026Updated Sep 26, 2026

Problem

mlx_audio.stt.generate fails before transcription when loading the unquantized vanch007/mlx-MOSS-Transcribe-Diarize checkpoint. The error is:

ValueError: [conv] Expect the input channels in the input and weight array to match but got shapes - input: (7,3000,80) and weight: (1024,80,3)

Reproduction

On mlx-audio 0.5.6 (upstream commit 4ab7e6f), run:

bash
python -m mlx_audio.stt.generate \
  --model /path/to/mlx-MOSS-Transcribe-Diarize \
  --audio /path/to/recording.m4a \
  --output-path ./transcript \
  --format txt

Environment: macOS 26.6.2 (arm64), Python 3.14.3, MLX 0.32.2.

Observations and diagnosis

  • The checkpoint declares format: mlx-safetensors. Its Whisper conv1.weight is stored as (1024, 3, 80) and conv2.weight as (1024, 3, 1024), both in MLX's (out, kernel, in) layout. It contains zero scales tensors.
  • Model.sanitize() uses the presence of any scales key as its already_converted check. Because this unquantized checkpoint has no such key, the loader transposes its already-converted convolution weights as though they were PyTorch (out, in, kernel) weights.
  • This changes conv1.weight to (1024, 80, 3). MLX interprets the last dimension as 3 input channels, but the audio features have 80 channels, causing the exception above. The failure occurs before token generation; the recording format and transcription output are not the cause.

What we tried

  • Added a shape check that transposes only PyTorch-layout convolution weights while preserving the existing already_converted guard. The original recording then transcribed successfully.
  • Added tests for both convolution layouts, tensor values after transposition, and the existing scales guard. The focused MOSS tests passed (10/10); the full STT model test module passed (97/97).
  • Ran the same recording through the original MLX checkpoint and a temporary checkpoint reconstructed with PyTorch-layout convolution weights. Both CLI runs succeeded and produced byte-for-byte identical 3,251-byte transcripts. An original PyTorch release checkpoint was not available locally.

Expected behavior: unquantized MLX checkpoints should load without transposing convolution weights that are already in MLX layout, while PyTorch-layout weights should still be transposed on load.