PlayVoice / whisper-vits-svc

Core Engine of Singing Voice Conversion & Singing Voice Clone
https://huggingface.co/spaces/maxmax20160403/sovits5.0
MIT License
2.65k stars 921 forks source link

Super Slow Loss Calc On Google TPU #16

Closed flyingblackshark closed 1 year ago

flyingblackshark commented 1 year ago

最近我正在尝试将本项目移植到谷歌TPU上,但这段代码在谷歌TPU上运行速度极慢,耗费十分钟才计算完毕,推测是自定义损失函数导致其运行在CPU上,请问有没有替代方案解决该问题 vits_extends下的train.py中的 loss_kl_f = kl_loss(z_f, logs_q, m_p, logs_p, logdet_f, z_mask) hp.train.c_kl loss_kl_r = kl_loss(z_r, logs_p, m_q, logs_q, logdet_r, z_mask) hp.train.c_kl loss_g = score_loss + mel_loss + stft_loss + loss_kl_f loss_g.backward()

MaxMax2016 commented 1 year ago

哦,我也不会,从SNAC移植过来的