Skip to content

Commit

Permalink
Merge pull request #647 from ShiromiyaG/fix-my-mistakes-5
Browse files Browse the repository at this point in the history
Fix some issues
  • Loading branch information
blaisewf authored Aug 28, 2024
2 parents 5471dab + ca4ffcc commit ce0857c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rvc/train/process/extract_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 4 additions & 3 deletions rvc/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit ce0857c

Please sign in to comment.