Merge pull request #557 from XXXXRT666/main

Change the inference device on Mac
main
RVC-Boss 1 year ago committed by GitHub
commit 7ee72bec7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -72,8 +72,6 @@ os.environ['PYTORCH_ENABLE_MPS_FALLBACK'] = '1' # 确保直接启动推理UI时
if torch.cuda.is_available():
device = "cuda"
elif torch.backends.mps.is_available():
device = "mps"
else:
device = "cpu"

@ -19,8 +19,6 @@ exp_root = "logs"
python_exec = sys.executable or "python"
if torch.cuda.is_available():
infer_device = "cuda"
elif torch.backends.mps.is_available():
infer_device = "mps"
else:
infer_device = "cpu"

Loading…
Cancel
Save