From 38422972086cc8d3e5f41eca824915aebdc410e6 Mon Sep 17 00:00:00 2001 From: Guilherme <86894155+ShiromiyaG@users.noreply.github.com> Date: Wed, 28 Aug 2024 15:51:58 -0300 Subject: [PATCH 1/2] Fix --- rvc/train/train.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rvc/train/train.py b/rvc/train/train.py index 8b6c9a73..d6ec9434 100644 --- a/rvc/train/train.py +++ b/rvc/train/train.py @@ -1018,10 +1018,11 @@ def save_to_json( ) pid_file_path = os.path.join(experiment_dir, "config.json") - with open(pid_file_path, "w") as f: - pid_data = json.load(f) + with open(pid_file_path, "r") as pid_file: + pid_data = json.load(pid_file) + with open(pid_file_path, "w") as pid_file: pid_data.pop("process_pids", None) - json.dump(pid_data, f, indent=4) + json.dump(pid_data, pid_file, indent=4) if not os.path.exists( os.path.join(experiment_dir, f"{model_name}_{epoch}e_{global_step}s.pth") From ca4ffcc3f14336f6c600e3401681d8d2e7050e55 Mon Sep 17 00:00:00 2001 From: Guilherme <86894155+ShiromiyaG@users.noreply.github.com> Date: Wed, 28 Aug 2024 15:55:25 -0300 Subject: [PATCH 2/2] Fix --- rvc/train/process/extract_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rvc/train/process/extract_model.py b/rvc/train/process/extract_model.py index 44459a3b..d4abde9f 100644 --- a/rvc/train/process/extract_model.py +++ b/rvc/train/process/extract_model.py @@ -57,7 +57,7 @@ def extract_model( else: dataset_lenght = None - with open(os.path.join(now_dir, "assets", "config.json"), "w") as f: + with open(os.path.join(now_dir, "assets", "config.json"), "r") as f: data = json.load(f) model_author = data.get("model_author", None)