Closed SimonDemarty closed 6 months ago
I found the issue over the weekend:
I was not loading the model correctly.
On the line: params_whole = torch.load("path/to/my/checkpoint.pth", map_location='cpu')
, the parameter "path/to/my/checkpoint.pth"
was incorrect...
Hello
Thank you for this great model!
Here is an issue I faced when infering on a model I finetuned from LibriTTS:
Error Message
How did I end up there
wav = inference(text, ref_s, alpha=0.3, beta=0.7, diffusion_steps=5, embedding_scale=1)
throws the error above.Trying to find the error
The error is due to the inference function of the notebook, line
pred_aln_trg = torch.zeros(input_lengths, int(pred_dur.sum().data))
pred_dur
is:Then I went further:
pred_dur
is computed afterduration
which is also weird:duration
is computed afterx
which is computed afterd
, both are:d
is computed afterd_en
,s
,input_length
andtext_mask
. Some of those variables have weird values:I assumed the error comes either from
text_masks
or froms
.text_mask
comes frominput_length
which seems fine so I checkeds_pred
(used to computes
):And finally, to compute
s_pred
, the unknown value wasbert_dur
which seems fine:Questions
I wanted to know where the error was coming from, since values seems to be fine when starting inference but become NaN out of nowhere (at least so it seems).
I will continue to investigate this and will write here if I find the error. In the meantime, if you find what I did wrong, feel free to tell me.
Thanks in advance