Skip to content

Update mlx-swift to 0.30.6 — fixes static audio on iPhone 16 Pro#29

Open
whothisbeme wants to merge 1 commit intomlalma:mainfrom
whothisbeme:fix/mlx-swift-0.30.6-nax-fix
Open

Update mlx-swift to 0.30.6 — fixes static audio on iPhone 16 Pro#29
whothisbeme wants to merge 1 commit intomlalma:mainfrom
whothisbeme:fix/mlx-swift-0.30.6-nax-fix

Conversation

@whothisbeme
Copy link

Summary

  • Updates mlx-swift dependency from exact: "0.30.2" to from: "0.30.6"
  • mlx-swift 0.30.2 produces static/corrupted audio on iPhone 16 Pro due to two NAX bugs fixed in 0.30.6
  • Changes pin style from exact to from to allow downstream consumers to resolve compatible versions

Problem

On iPhone 16 Pro (A18 chip), Kokoro TTS generates white noise / static instead of speech when using mlx-swift 0.30.0–0.30.3. Audio sample values range -11 to +11 instead of the expected -0.33 to +0.54.

Root Cause

Two bugs in mlx-swift's upstream mlx library:

  1. Incorrect NAX hardware detection (ml-explore/mlx#3083) — The A18 chip (generation 17) was incorrectly detected as having Neural Accelerator (NAX) support, which is only available on generation 18+ (iPhone 17 Pro). When NAX was wrongly enabled, computations produced silently wrong numerical results.

  2. NAX overflow in ConvTransposed1d (ml-explore/mlx#3092) — On iOS, transposed convolutions produced incorrect output for large tensors (time dimension > ~8000), directly affecting Kokoro's vocoder.

Both fixes are included in mlx-swift 0.30.6.

Testing

Verified with kokoro-ios 1.0.10 + mlx-swift 0.30.6 on iPhone 16 Pro — clear audio output with correct sample values.

Related Issues

mlx-swift 0.30.2 produces static/corrupted audio on iPhone 16 Pro due to two NAX (Neural Accelerator) bugs: 1. Incorrect NAX hardware detection on A18 chip (ml-explore/mlx#3083) - A18 (gen 17) was wrongly detected as having NAX support (gen 18+) - Caused silently wrong numerical output instead of a crash 2. NAX overflow in ConvTransposed1d (ml-explore/mlx#3092) - Incorrect output for large tensors (time dim > ~8000) - Directly affects Kokoro's vocoder transposed convolutions Both fixes are included in mlx-swift 0.30.6. Using `from:` instead of `exact:` allows downstream consumers to resolve compatible versions. Relates to: mlalma/KokoroTestApp#7, ml-explore/mlx-swift#344
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant