mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-01-20 02:51:09 +00:00
优化代码结构
This commit is contained in:
@@ -81,11 +81,11 @@ class Config:
|
||||
or "1070" in self.gpu_name
|
||||
or "1080" in self.gpu_name
|
||||
):
|
||||
print("16|10|P40 series, force to fp32")
|
||||
print("Found GPU", self.gpu_name, ", force to fp32")
|
||||
self.is_half = False
|
||||
use_fp32_config()
|
||||
else:
|
||||
self.gpu_name = None
|
||||
print("Found GPU", self.gpu_name)
|
||||
self.gpu_mem = int(
|
||||
torch.cuda.get_device_properties(i_device).total_memory
|
||||
/ 1024
|
||||
@@ -99,12 +99,12 @@ class Config:
|
||||
with open("trainset_preprocess_pipeline_print.py", "w") as f:
|
||||
f.write(strr)
|
||||
elif self.has_mps():
|
||||
print("No supported Nvidia GPU, use MPS instead")
|
||||
print("No supported Nvidia GPU found, use MPS instead")
|
||||
self.device = "mps"
|
||||
self.is_half = False
|
||||
use_fp32_config()
|
||||
else:
|
||||
print("No supported Nvidia GPU, use CPU instead")
|
||||
print("No supported Nvidia GPU found, use CPU instead")
|
||||
self.device = "cpu"
|
||||
self.is_half = False
|
||||
use_fp32_config()
|
||||
|
||||
Reference in New Issue
Block a user