PlayVoice / lora-svc

singing voice change based on whisper, and lora for singing voice clone
MIT License
630 stars 78 forks source link

训练一切正常,但是保存第一个模型时出现了ZeroDivisionError: float division by zero #60

Open sswwjj4 opened 1 year ago

sswwjj4 commented 1 year ago
屏幕截图 2023-05-10 081846
MaxMax2016 commented 1 year ago

验证集是空的,从训练集剪切前五条放到验证集

KakaruHayate commented 1 year ago
屏幕截图 2023-05-10 081846
#@title 生成验证集文件列表
import random

def cut_and_paste(train_file_path, eval_file_path):
    with open(train_file_path, 'r') as f:
        lines = f.readlines()
        random_lines = random.sample(lines, 5)
    with open(eval_file_path, 'w') as f:
        f.write('')
    with open(eval_file_path, 'a') as f:
        for line in random_lines:
            f.write(line)

cut_and_paste('/content/lora-svc/filelists/train.txt', '/content/lora-svc/filelists/eval.txt')

可以参考下colab