Fix bug introduced by config file reading

This commit is contained in:
babysor00 2022-03-06 09:35:25 +08:00
parent c36f02634a
commit 6c01b92703
2 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,8 @@ class HParams(object):
def loadJson(self, dict):
print("\Loading the json with %s\n", dict)
for k in dict.keys():
self.__dict__[k] = dict[k]
if k not in ["tts_schedule", "tts_finetune_layers"]:
self.__dict__[k] = dict[k]
return self
def dumpJson(self, fp):

View File

@ -451,7 +451,7 @@ class Toolbox:
self.ui.log("set hifigan as vocoder")
# search a config file
model_config_fpaths = list(model_fpath.parent.rglob("*.json"))
if self.ui.current_extractor_fpath is None:
if self.vc_mode and self.ui.current_extractor_fpath is None:
return
model_config_fpath = model_config_fpaths[0]
else: