From dae4a392c9758877d7c8a2a84fb657357a93addf Mon Sep 17 00:00:00 2001 From: wind4000 <109077979+wind4000@users.noreply.github.com> Date: Sun, 5 Feb 2023 14:24:16 +0800 Subject: [PATCH] fix mix ckptD with ckptG --- train.py | 2 +- train_ms.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index ce49f20..76121dc 100644 --- a/train.py +++ b/train.py @@ -108,7 +108,7 @@ def run(rank, n_gpus, hps): _, _, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(hps.model_dir, "G_*.pth"), net_g, optim_g) if ckptD is not None: - _, _, _, epoch_str = utils.load_checkpoint(ckptG, net_g, optim_g, is_old=True) + _, _, _, epoch_str = utils.load_checkpoint(ckptD, net_d, optim_d, is_old=True) print("加载原版VITS模型D记录点成功") else: _, _, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(hps.model_dir, "D_*.pth"), net_d, diff --git a/train_ms.py b/train_ms.py index fcc04fd..4520dd1 100644 --- a/train_ms.py +++ b/train_ms.py @@ -108,7 +108,7 @@ def run(rank, n_gpus, hps): _, _, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(hps.model_dir, "G_*.pth"), net_g, optim_g) if ckptD is not None: - _, _, _, epoch_str = utils.load_checkpoint(ckptG, net_g, optim_g, is_old=True) + _, _, _, epoch_str = utils.load_checkpoint(ckptD, net_d, optim_d, is_old=True) print("加载原版VITS模型D记录点成功") else: _, _, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(hps.model_dir, "D_*.pth"), net_d,