CjangCjengh / MoeGoe

Executable file for VITS inference
MIT License
2.32k stars 251 forks source link

Problem occurred when using official hubert-soft model #13

Open wind4000 opened 1 year ago

wind4000 commented 1 year ago

The hubert model used is this one, together with vits model.

Error message: audio = net_g_ms.infer(unit, unit_lengths, sid=sid, noise_scale=.667, noise_scale_w=0.8, length_scale=length_scale)[0][0,0].data.float().numpy() File "/content/MoeGoe/models.py", line 501, in infer x, m_p, logs_p, x_mask = self.enc_p(x, x_lengths) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, kwargs) File "/content/MoeGoe/models.py", line 169, in forward x = self.emb(x) math.sqrt(self.hidden_channels) # [b, t, h] File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(input, kwargs) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/sparse.py", line 160, in forward self.norm_type, self.scale_grad_by_freq, self.sparse) File "/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py", line 2199, in embedding return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse) RuntimeError: Expected tensor for argument #1 'indices' to have one of the following scalar types: Long, Int; but got torch.FloatTensor instead (while checking arguments for embedding)