diff --git a/GPT_SoVITS/utils.py b/GPT_SoVITS/utils.py index a0fe21a6..08e18384 100644 --- a/GPT_SoVITS/utils.py +++ b/GPT_SoVITS/utils.py @@ -69,8 +69,7 @@ def my_save(fea, path): #####fix issue: torch.save doesn't support chinese path name = os.path.basename(path) tmp_path = "%s.pth" % (ttime()) torch.save(fea, tmp_path) - os.makedirs(dir, exist_ok=True) - os.replace(tmp_path, "%s/%s" % (dir, name)) + shutil.move(tmp_path, "%s/%s" % (dir, name)) def save_checkpoint(model, optimizer, learning_rate, iteration, checkpoint_path):