Skip to content

Add Mac MPS support for Gradio app#298

Open
MuyleangIng wants to merge 1 commit into
OpenBMB:mainfrom
MuyleangIng:mac-mps-gradio-support
Open

Add Mac MPS support for Gradio app#298
MuyleangIng wants to merge 1 commit into
OpenBMB:mainfrom
MuyleangIng:mac-mps-gradio-support

Conversation

@MuyleangIng
Copy link
Copy Markdown

@MuyleangIng MuyleangIng commented May 8, 2026

Summary:

  • Add --device to app.py for auto/cpu/mps/cuda selection.
  • Use existing resolve_runtime_device so Apple Silicon resolves to mps.
  • Pass the resolved device into VoxCPM.from_pretrained.
  • Disable the CUDA-only optimize path on non-CUDA devices.
  • Lazy-load the ASR model only when transcript recognition is used.
  • Ignore local .venv directories.

Tested:

  • .venv/bin/python -m pytest tests/test_model_utils.py tests/test_cli.py tests/test_validate.py tests/test_lora_checkpoint_loading.py -q
  • .venv/bin/python scripts/test_pick_runtime_dtype.py
  • App probe on Apple M2 Air/macOS 15.5: device=auto resolved to mps, optimize=False, ASR/TTS models lazy before first use.

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.

1 participant