From 32a46d9494d8e6216e3fe409c9a105779d4da274 Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Tue, 6 Aug 2024 12:03:05 +0800 Subject: [PATCH] Add files via upload --- GPT_SoVITS/s2_train.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GPT_SoVITS/s2_train.py b/GPT_SoVITS/s2_train.py index ddbe2ab..c5dee8d 100644 --- a/GPT_SoVITS/s2_train.py +++ b/GPT_SoVITS/s2_train.py @@ -119,7 +119,7 @@ def run(rank, n_gpus, hps): collate_fn=collate_fn, batch_sampler=train_sampler, persistent_workers=True, - prefetch_factor=16, + prefetch_factor=4, ) # if rank == 0: # eval_dataset = TextAudioSpeakerLoader(hps.data.validation_files, hps.data, val=True) @@ -211,7 +211,7 @@ def run(rank, n_gpus, hps): # traceback.print_exc() epoch_str = 1 global_step = 0 - if hps.train.pretrained_s2G != "": + if hps.train.pretrained_s2G != ""and hps.train.pretrained_s2G != None and os.path.exists(hps.train.pretrained_s2G): if rank == 0: logger.info("loaded pretrained %s" % hps.train.pretrained_s2G) print( @@ -223,7 +223,7 @@ def run(rank, n_gpus, hps): strict=False, ) ) ##测试不加载优化器 - if hps.train.pretrained_s2D != "": + if hps.train.pretrained_s2D != ""and hps.train.pretrained_s2D != None and os.path.exists(hps.train.pretrained_s2D): if rank == 0: logger.info("loaded pretrained %s" % hps.train.pretrained_s2D) print(