w-okada / voice-changer

リアルタイムボイスチェンジャー Realtime Voice Changer
Other
16.4k stars 1.8k forks source link

AttributeError: 'RVC' object has no attribute 'slot' #201

Closed nanowell closed 1 year ago

nanowell commented 1 year ago

VC PROCESSING!!!! EXCEPTION!!! 'RVC' object has no attribute 'slot' Traceback (most recent call last): File "voice_changer\VoiceChanger.py", line 235, in on_request_sola File "voice_changer\RVC\RVC.py", line 354, in inference AttributeError: 'RVC' object has no attribute 'slot'

Using RVC model. Have a G.pth, npy file and index file.

Version: 1.5.2.4a Platform: Win 11

nanowell commented 1 year ago

New error, I downloaded hubert model and now it errors this: Model Load Error! Check your model is valid. 'trans'

w-okada commented 1 year ago

Maybe that is a bug. Please change default tuning slider and half-precision checkbox, then upload.

nanowell commented 1 year ago

Model upload, this error log: [Voice Changer] Model Load Error! Check your model is valid. 'config'

After I start I see this error logs:

VC PROCESSING!!!! EXCEPTION!!! 'RVC' object has no attribute 'slot' Traceback (most recent call last): File "voice_changer\VoiceChanger.py", line 235, in on_request_sola File "voice_changer\RVC\RVC.py", line 354, in inference AttributeError: 'RVC' object has no attribute 'slot'

Please manage error handling better it's kind of disorienting to not now what I need to do in order to fix errors.

GUI screenshot: image

w-okada commented 1 year ago

You use wrong model. Please use .pth under the weights folder, not G_xxx.pth.

Maybe the same issue. https://github.com/w-okada/voice-changer/issues/192

nanowell commented 1 year ago

Model upload: no errors

When I start I get this error log: VC PROCESSING!!!! EXCEPTION!!! "slow_conv2d_cpu" not implemented for 'Half' Traceback (most recent call last): File "voice_changer\VoiceChanger.py", line 235, in on_request_sola File "voice_changer\RVC\RVC.py", line 361, in inference File "voice_changer\RVC\RVC.py", line 346, in _pyTorch_inference File "voice_changer\RVC\custom_vc_infer_pipeline.py", line 168, in pipeline File "voice_changer\RVC\custom_vc_infer_pipeline.py", line 104, in vc File "fairseq\models\hubert\hubert.py", line 535, in extract_features res = self.forward( File "fairseq\models\hubert\hubert.py", line 437, in forward features = self.forward_features(source) File "fairseq\models\hubert\hubert.py", line 392, in forward_features features = self.feature_extractor(source) File "torch\nn\modules\module.py", line 1194, in _call_impl return forward_call(*input, kwargs) File "fairseq\models\wav2vec\wav2vec2.py", line 895, in forward x = conv(x) File "torch\nn\modules\module.py", line 1194, in _call_impl return forward_call(*input, *kwargs) File "torch\nn\modules\container.py", line 204, in forward input = module(input) File "torch\nn\modules\module.py", line 1194, in _call_impl return forward_call(input, kwargs) File "torch\nn\modules\conv.py", line 313, in forward return self._conv_forward(input, self.weight, self.bias) File "torch\nn\modules\conv.py", line 309, in _conv_forward return F.conv1d(input, weight, bias, self.stride, RuntimeError: "slow_conv2d_cpu" not implemented for 'Half'

GUI screenshot: image

w-okada commented 1 year ago

Did you have GPU? Half precision is only for Nvidia GPU. If you have no Nvidia GPU, please off half-precision to run with cpu.

nanowell commented 1 year ago

No, I don't have GPU. I followed your advice to turn off half precision and this error still occurred. I suspect it's some sort of bug with half-precision.

Error after start: VC PROCESSING!!!! EXCEPTION!!! "baddbmm_with_gemm" not implemented for 'Half' Traceback (most recent call last): File "voice_changer\VoiceChanger.py", line 235, in on_request_sola File "voice_changer\RVC\RVC.py", line 361, in inference File "voice_changer\RVC\RVC.py", line 346, in _pyTorch_inference File "voice_changer\RVC\custom_vc_infer_pipeline.py", line 168, in pipeline File "voice_changer\RVC\custom_vc_infer_pipeline.py", line 129, in vc File "D:\Tools\MMVCServerSIO\RVC\infer_pack\models.py", line 554, in infer m_p, logs_p, x_mask = self.enc_p(phone, pitch, phone_lengths) File "torch\nn\modules\module.py", line 1194, in _call_impl return forward_call(*input, *kwargs) File "D:\Tools\MMVCServerSIO\RVC\infer_pack\models.py", line 39, in forward x = self.emb_phone(phone) + self.emb_pitch(pitch) File "torch\nn\modules\module.py", line 1194, in _call_impl return forward_call(input, **kwargs) File "torch\nn\modules\linear.py", line 114, in forward return F.linear(input, self.weight, self.bias) RuntimeError: "baddbmm_with_gemm" not implemented for 'Half'

GUI screenshot:

image

w-okada commented 1 year ago

Turn off then re-upload the model.