Instructions for updating:
Use standard file APIs to check for files with this prefix.
Testing the vocoder...
Traceback (most recent call last):
File "demo_cli.py", line 105, in
vocoder.infer_waveform(mel, target=200, overlap=50, progress_callback=no_action)
File "/home/ml/rtvc/Real-Time-Voice-Cloning-master/vocoder/inference.py", line 57, in infer_waveform
wav = _model.generate(mel, batched, target, overlap, hp.mu_law, progress_callback)
File "/home/ml/rtvc/Real-Time-Voice-Cloning-master/vocoder/models/fatchord_version.py", line 163, in generate
mels, aux = self.upsample(mels.transpose(1, 2))
File "/home/ml/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in __call__
result = self.forward(input, *kwargs)
File "/home/ml/rtvc/Real-Time-Voice-Cloning-master/vocoder/models/fatchord_version.py", line 79, in forward
aux = self.resnet(m).unsqueeze(1)
File "/home/ml/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in __call__
result = self.forward(input, *kwargs)
File "/home/ml/rtvc/Real-Time-Voice-Cloning-master/vocoder/models/fatchord_version.py", line 39, in forward
x = self.conv_in(x)
File "/home/ml/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in __call__
result = self.forward(input, *kwargs)
File "/home/ml/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 202, in forward
self.padding, self.dilation, self.groups)
RuntimeError: Expected tensor for argument #1 'input' to have the same device as tensor for argument #2 'weight'; but device 3 does not equal 0 (while checking arguments for cudnn_convolution)
you have more than one GPU? the demo kind of assumes you have a single GPU.
Yes, I have 4 GPUs. Do you mean that I need to run the program on a single GPU machine, otherwise there may be various errors, resulting in the program cannot run?
Solve it by running: CUDA_VISIBLE_DEVICES=0 python3 demo_cli.py
(hint here: https://discuss.pytorch.org/t/how-to-specify-gpu-usage/945/2)
@hnjiakai Please reopen this issue if @royshil 's suggestion doesn't fix the problem for you. Though I would make a slight modification by doing an export:
export CUDA_VISIBLE_DEVICES=0
python3 demo_cli.py