Skip to content

Commit

Permalink
remove mps & xpu acceleration
Browse files Browse the repository at this point in the history
  • Loading branch information
blaisewf authored Dec 4, 2024
1 parent eff39c7 commit 66904a5
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions rvc/configs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import json
import os


version_config_paths = [
os.path.join("v1", "32000.json"),
os.path.join("v1", "40000.json"),
Expand Down Expand Up @@ -46,14 +45,6 @@ def load_config_json(self) -> dict:
configs[config_file] = json.load(f)
return configs

def has_mps(self) -> bool:
# Check if Metal Performance Shaders are available - for macOS 12.3+.
return torch.backends.mps.is_available()

def has_xpu(self) -> bool:
# Check if XPU is available.
return hasattr(torch, "xpu") and torch.xpu.is_available()

def set_precision(self, precision):
if precision not in ["fp32", "fp16"]:
raise ValueError("Invalid precision type. Must be 'fp32' or 'fp16'.")
Expand Down Expand Up @@ -109,10 +100,6 @@ def get_precision(self):
def device_config(self) -> tuple:
if self.device.startswith("cuda"):
self.set_cuda_config()
elif self.has_mps():
self.device = "mps"
self.is_half = False
self.set_precision("fp32")
else:
self.device = "cpu"
self.is_half = False
Expand Down

0 comments on commit 66904a5

Please sign in to comment.