KimythAnly / AGAIN-VC

This is the official implementation of the paper AGAIN-VC: A One-shot Voice Conversion using Activation Guidance and Adaptive Instance Normalization.
https://kimythanly.github.io/AGAIN-VC-demo/index
MIT License
111 stars 19 forks source link

RuntimeError: Input type (torch.cuda.DoubleTensor) and weight type (torch.cuda.FloatTensor) should be the same #2

Closed ak9250 closed 3 years ago

ak9250 commented 3 years ago

when running the inference notebook

RuntimeError Traceback (most recent call last)

in () ----> 1 inferencer.inference(source_path=source_path, target_path=target_path, out_path=out_path, seglen=seglen) 8 frames /usr/local/lib/python3.6/dist-packages/torch/nn/modules/conv.py in forward(self, input) 255 _single(0), self.dilation, self.groups) 256 return F.conv1d(input, self.weight, self.bias, self.stride, --> 257 self.padding, self.dilation, self.groups) 258 259 RuntimeError: Input type (torch.cuda.DoubleTensor) and weight type (torch.cuda.FloatTensor) should be the same
KimythAnly commented 3 years ago

Could you provide your source and target wave files? Thanks

ak9250 commented 3 years ago

@KimythAnly I used the default ones in the repo

KimythAnly commented 3 years ago

I revise the function np2pt in util/mytorch.py to explicitly set the dtype of the returned tensor to be FloatTensor. I think the problem is caused by the different environments (numpy, torch, or other packages) we use.

Btw, the following is my system environment.

python==3.8.2

numpy==1.18.5
torch==1.6.0
librosa==0.8.0
SoundFile==0.10.3.post1
ak9250 commented 3 years ago

@KimythAnly great, the reason I suggested colab is because the system environment will be the same for everyone so you wont run into issues of different environments, it also provides a p100 gpu free to use for 12 hours sessions https://colab.research.google.com/