mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-05-06 20:01:37 +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.is_half = False
|
||||
self.use_jit = False
|
||||
self.n_cpu = 0
|
||||
self.n_cpu = 1
|
||||
self.gpu_name = None
|
||||
self.json_config = self.load_config_json()
|
||||
self.gpu_mem = None
|
||||
@ -282,10 +282,7 @@ class CPUConfig:
|
||||
def load_config_json() -> dict:
|
||||
d = {}
|
||||
for config_file in version_config_list:
|
||||
p = f"configs/inuse/{config_file}"
|
||||
if not os.path.exists(p):
|
||||
shutil.copy(f"configs/{config_file}", p)
|
||||
with open(f"configs/inuse/{config_file}", "r") as f:
|
||||
with open(f"configs/{config_file}", "r") as f:
|
||||
d[config_file] = json.load(f)
|
||||
return d
|
||||
|
||||
|
@ -136,7 +136,7 @@ def model_hash_ckpt(cpt):
|
||||
|
||||
with TorchSeedContext(114514):
|
||||
tgt_sr = cpt["config"][-1]
|
||||
if_f0 = cpt.get("f0", 1)
|
||||
if_f0 = 0
|
||||
version = cpt.get("version", "v1")
|
||||
synthesizer_class = {
|
||||
("v1", 1): SynthesizerTrnMs256NSFsid,
|
||||
|
Loading…
x
Reference in New Issue
Block a user