Enable MPS GPU Accerlation on MacOS (#164)

* Enable MPS GPU Accerlation on MacOS

* Fix
This commit is contained in:
fondoger
2025-04-11 02:40:25 +08:00
committed by GitHub
parent 1c7bdd971d
commit 6d87f4ae7a
2 changed files with 19 additions and 1 deletions

View File

@@ -95,6 +95,14 @@ To install espeak-ng on Windows:
For advanced configuration and usage on Windows, see the [official espeak-ng Windows guide](https://github.com/espeak-ng/espeak-ng/blob/master/docs/guide.md)
### MacOS Apple Silicon GPU Acceleration
On Mac M1/M2/M3/M4 devices, you can explicitly specify the environment variable `PYTORCH_ENABLE_MPS_FALLBACK=1` to enable GPU acceleration.
```bash
PYTORCH_ENABLE_MPS_FALLBACK=1 python run-your-kokoro-script.py
```
### Conda Environment
Use the following conda `environment.yml` if you're facing any dependency issues.
```yaml