mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-01-19 18:41:52 +00:00
Escaping when device does not match (#203)
This commit is contained in:
@@ -50,7 +50,6 @@ class Config:
|
||||
|
||||
def device_config(self) -> tuple:
|
||||
if torch.cuda.is_available():
|
||||
self.gpu_name = torch.cuda.get_device_name(int(self.device.split(":")[-1]))
|
||||
i_device = int(self.device.split(":")[-1])
|
||||
self.gpu_name = torch.cuda.get_device_name(i_device)
|
||||
if (
|
||||
@@ -76,6 +75,8 @@ class Config:
|
||||
with open("trainset_preprocess_pipeline_print.py", "r+") as f:
|
||||
strr = f.read().replace("3.7", "3.0")
|
||||
f.write(strr)
|
||||
else:
|
||||
self.gpu_name = None
|
||||
elif torch.backends.mps.is_available():
|
||||
print("没有发现支持的N卡, 使用MPS进行推理")
|
||||
self.device = "mps"
|
||||
|
||||
Reference in New Issue
Block a user