p0p4k/vits2_pytorch

Error in code when training

Silver267 opened this issue · 2 comments

vits2_pytorch\models.py", line 886, in forward
    return o, l_length, attn, ids_slice, x_mask, y_mask, (z, z_p, m_p, logs_p, m_q, logs_q), (x, logw, logw_)
UnboundLocalError: local variable 'logw' referenced before assignment

Seems like the variables logw and logw_ are not defined when using sdp.

Also, when training with nosdp, this error pops up:

vits2_pytorch\train.py", line 194, in run
    train_and_evaluate(rank, epoch, hps, [net_g, net_d, net_dur_disc], [optim_g, optim_d, optim_dur_disc], [scheduler_g, scheduler_d, scheduler_dur_disc], scaler, [train_loader, eval_loader], logger, [writer, writer_eval])
UnboundLocalError: local variable 'optim_dur_disc' referenced before assignment
p0p4k commented

Oh yes, once again some silly mistakes on my part. Thanks for the catch; should be fixed in latest patch. Try and give me feedback!

The fix seems to work, thanks!