p0p4k / vits2_pytorch

unofficial vits2-TTS implementation in pytorch
https://arxiv.org/abs/2307.16430
MIT License
471 stars 84 forks source link

Are the parameters for the Duration Discriminator being incorrectly passed? #30

Closed innnky closed 1 year ago

innnky commented 1 year ago

https://github.com/p0p4k/vits2_pytorch/blob/dbdf9362ff9b8033d93e4acaa96ef2bc7a6b7646/train_ms.py#L289C54-L289C54 The last two parameters of the discriminator should be dur_real and dur_hat, respectively. https://github.com/p0p4k/vits2_pytorch/blob/dbdf9362ff9b8033d93e4acaa96ef2bc7a6b7646/models.py#L182 However, the passed parameters logw and logw_

https://github.com/p0p4k/vits2_pytorch/blob/dbdf9362ff9b8033d93e4acaa96ef2bc7a6b7646/models.py#L935 logw is predicted duration, logw_ is real duration

so it should be net_dur_disc(hidden_x, xmask, logw, logw) ?

p0p4k commented 1 year ago

Yes, thanks for the catch!

yihuitang commented 1 year ago

Should this also be fixed in train_ms.py? @p0p4k

p0p4k commented 1 year ago

Should this also be fixed in train_ms.py? @p0p4k

Yes, thanks for reminding me! Another thought on this matter, is then why did earlier training experiments by other users work even if the discrimator was kind of wrong? I guess it ended up like a coin flip, 50-50 (?)

AWAS666 commented 1 year ago

Should this also be fixed in train_ms.py? @p0p4k

Yes, thanks for reminding me! Another thought on this matter, is then why did earlier training experiments by other users work even if the discrimator was kind of wrong? I guess it ended up like a coin flip, 50-50 (?)

seeing some weird speed up in ms/vctk training, so kinda seeing it

p0p4k commented 1 year ago

@AWAS666 speed up after changing the discriminator bug?

FENRlR commented 1 year ago

What about the following code from the generator part(which comes after)? It is passing the same sequence again. y_dur_hat_r, y_dur_hat_g = net_dur_disc(hidden_x, x_mask, logw, logw_) https://github.com/p0p4k/vits2_pytorch/commit/dba480542a54fc9c50b2117c3288675ddfc1bfa7#diff-ed183d67207df065a11e1289f19d34cc2abbc5448dea952683cfe9728c342b95R290

p0p4k commented 1 year ago

@FENRlR right, I am being so careless with these corrections. Thanks for spotting it. Fixed now.

AWAS666 commented 1 year ago

@AWAS666 speed up after changing the discriminator bug?

no using it before the changes, just wanted to mention it as an example