Merge pull request #448 from peanutcocktail/main

Set PYTORCH_ENABLE_MPS_FALLBACK=1 for MPS by default
This commit is contained in:
Yushen CHEN
2024-11-11 07:11:19 +08:00
committed by GitHub
+2
View File
@@ -32,6 +32,8 @@ from f5_tts.model.utils import (
_ref_audio_cache = {}
device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
if device == "mps":
os.environ["PYTOCH_ENABLE_MPS_FALLBACK"] = "1"
# -----------------------------------------