Skip to content

Commit

Permalink
Delete before creating new files
Browse files Browse the repository at this point in the history
  • Loading branch information
deiteris committed Jan 1, 2025
1 parent 79489ab commit 253dafc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rvc/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,10 @@ def train_and_evaluate(
)
)

# Clean-up old best epochs
for m in model_del:
os.remove(m)

if model_add:
ckpt = (
net_g.module.state_dict()
Expand All @@ -964,9 +968,6 @@ def train_and_evaluate(
overtrain_info=overtrain_info,
vocoder=vocoder,
)
# Clean-up old best epochs
for m in model_del:
os.remove(m)

# Check completion
if epoch >= custom_total_epoch:
Expand Down

0 comments on commit 253dafc

Please sign in to comment.