Skip to content

Add macOS Nix and MLX runtime support - #100

Open
66Ton99 wants to merge 1 commit into
NVIDIA:mainfrom
66Ton99:macos-nix-mlx-runtime
Open

Add macOS Nix and MLX runtime support#100
66Ton99 wants to merge 1 commit into
NVIDIA:mainfrom
66Ton99:macos-nix-mlx-runtime

Conversation

@66Ton99

@66Ton99 66Ton99 commented Jun 27, 2026

Copy link
Copy Markdown

Summary

  • add a Nix-based macOS setup path for Apple Silicon, including MLX runtime dependencies and Web UI build helpers
  • add moshi.convert_mlx to create a local MLX bundle, including native model.moshi_mlx.safetensors for moshi_mlx
  • route --device mps and auto-selected MPS to the MLX runtime while preserving CUDA/CPU PyTorch paths
  • improve local model asset discovery, browser-safe server URLs, voice prompt embedding loading, and Web UI playback buffering for MLX bursty output

Verification

  • nix-shell --run './scripts/bootstrap-nix-macos.sh'
  • nix-shell --run 'python -m py_compile moshi/moshi/server.py moshi/moshi/offline.py moshi/moshi/convert_mlx.py moshi/moshi/models/lm.py'
  • nix-shell --run 'python -m moshi.convert_mlx --self-test'
  • ./scripts/build-client.sh
  • git diff --check
  • MLX smoke test on macOS: python -m moshi.server --ssl "$SSL_DIR" --device auto --port 9016 --static none resolved device = mps, loaded model-mlx/model.moshi_mlx.safetensors, warmed up, listened on https://localhost:9016, and returned WebSocket handshake b'\x00'

It will close #71

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.

MLX support for Apple Silicon

1 participant