Fix config bug

This commit is contained in:
litagin02
2024-01-03 10:46:22 +09:00
parent 30067335e1
commit 5b49315009
2 changed files with 3 additions and 3 deletions

View File

@@ -121,14 +121,14 @@ class Train_ms_config:
config_path: str, config_path: str,
env: Dict[str, any], env: Dict[str, any],
# base: Dict[str, any], # base: Dict[str, any],
model: str, model_dir: str,
num_workers: int, num_workers: int,
spec_cache: bool, spec_cache: bool,
keep_ckpts: int, keep_ckpts: int,
): ):
self.env = env # 需要加载的环境变量 self.env = env # 需要加载的环境变量
# self.base = base # 底模配置 # self.base = base # 底模配置
self.model = model # 训练模型存储目录该路径为相对于dataset_path的路径而非项目根目录 self.model_dir = model_dir # 训练模型存储目录该路径为相对于dataset_path的路径而非项目根目录
self.config_path = config_path # 配置文件路径 self.config_path = config_path # 配置文件路径
self.num_workers = num_workers # worker数量 self.num_workers = num_workers # worker数量
self.spec_cache = spec_cache # 是否启用spec缓存 self.spec_cache = spec_cache # 是否启用spec缓存

View File

@@ -108,7 +108,7 @@ def run():
help="Skip saving default style config and mean vector.", help="Skip saving default style config and mean vector.",
) )
args = parser.parse_args() args = parser.parse_args()
model_dir = os.path.join(args.model, config.train_ms_config.model) model_dir = os.path.join(args.model, config.train_ms_config.model_dir)
if not os.path.exists(model_dir): if not os.path.exists(model_dir):
os.makedirs(model_dir) os.makedirs(model_dir)
hps = utils.get_hparams_from_file(args.config) hps = utils.get_hparams_from_file(args.config)