mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-05-07 04:09:06 +08:00
fix(config): restrict CPUConfig
This commit is contained in:
parent
8ed0dec181
commit
84d9d9a2bc
@ -270,7 +270,7 @@ class CPUConfig:
|
|||||||
self.device = "cpu"
|
self.device = "cpu"
|
||||||
self.is_half = False
|
self.is_half = False
|
||||||
self.use_jit = False
|
self.use_jit = False
|
||||||
self.n_cpu = 0
|
self.n_cpu = 1
|
||||||
self.gpu_name = None
|
self.gpu_name = None
|
||||||
self.json_config = self.load_config_json()
|
self.json_config = self.load_config_json()
|
||||||
self.gpu_mem = None
|
self.gpu_mem = None
|
||||||
@ -282,10 +282,7 @@ class CPUConfig:
|
|||||||
def load_config_json() -> dict:
|
def load_config_json() -> dict:
|
||||||
d = {}
|
d = {}
|
||||||
for config_file in version_config_list:
|
for config_file in version_config_list:
|
||||||
p = f"configs/inuse/{config_file}"
|
with open(f"configs/{config_file}", "r") as f:
|
||||||
if not os.path.exists(p):
|
|
||||||
shutil.copy(f"configs/{config_file}", p)
|
|
||||||
with open(f"configs/inuse/{config_file}", "r") as f:
|
|
||||||
d[config_file] = json.load(f)
|
d[config_file] = json.load(f)
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ def model_hash_ckpt(cpt):
|
|||||||
|
|
||||||
with TorchSeedContext(114514):
|
with TorchSeedContext(114514):
|
||||||
tgt_sr = cpt["config"][-1]
|
tgt_sr = cpt["config"][-1]
|
||||||
if_f0 = cpt.get("f0", 1)
|
if_f0 = 0
|
||||||
version = cpt.get("version", "v1")
|
version = cpt.get("version", "v1")
|
||||||
synthesizer_class = {
|
synthesizer_class = {
|
||||||
("v1", 1): SynthesizerTrnMs256NSFsid,
|
("v1", 1): SynthesizerTrnMs256NSFsid,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user