Skip to content

Add Apple Silicon MPS inference backend#2221

Open
natsusorahoshinochan-max wants to merge 1 commit into
Anjok07:masterfrom
natsusorahoshinochan-max:feature/apple-silicon-mps-backend
Open

Add Apple Silicon MPS inference backend#2221
natsusorahoshinochan-max wants to merge 1 commit into
Anjok07:masterfrom
natsusorahoshinochan-max:feature/apple-silicon-mps-backend

Conversation

@natsusorahoshinochan-max

@natsusorahoshinochan-max natsusorahoshinochan-max commented May 16, 2026

Copy link
Copy Markdown

Summary

This PR adds a pluggable inference backend layer and enables Apple Silicon GPU acceleration through PyTorch MPS while preserving existing CUDA/CPU behavior.

Changes

  • Add backend abstraction for CPU, CUDA, MPS, and CoreML/ONNX providers
  • Add Apple Silicon MPS paths for VR, MDX, MDXC, and Demucs v3/v4
  • Keep CUDA as the first auto-selected backend when available
  • Keep Demucs v1/v2 on the existing CPU/CUDA behavior
  • Add smoke test harness for real-model inference validation
  • Add macOS arm64 PyInstaller build support
  • Update dependency rules so macOS does not install onnxruntime-gpu
  • Ignore local build artifacts, venvs, model weights, and AppleDouble files

Validation

  • CLI smoke summary: 27/27 passed on Mac mini m4
  • Functional MDX23C test used Apple GPU (MPS) with fallback=false
  • macOS arm64 .app build completed and passed ad-hoc codesign verification

@natsusorahoshinochan-max natsusorahoshinochan-max marked this pull request as draft May 16, 2026 07:38
@natsusorahoshinochan-max natsusorahoshinochan-max marked this pull request as ready for review May 16, 2026 07:40
@natsusorahoshinochan-max natsusorahoshinochan-max marked this pull request as draft May 16, 2026 07:40
@natsusorahoshinochan-max natsusorahoshinochan-max marked this pull request as ready for review May 16, 2026 07:45
@DOISolutions

Copy link
Copy Markdown

Cool

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.

2 participants