RVC-Project / RVC-Project/Retrieval-based-Voice-Conversion-WebUI

推理模型时出错

Open
#2,368 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
38.4k
Forks
5.3k
PR merge metrics
No merged PRs in 30d

Description

使用的显卡是 intel iris Xe,操作系统是win11
报错时使用的是之前在其他地方训练的模型,但更换至示例模型时也会报错

D:\RVC1006AMD_Intel\RVC1006AMD_Intel1>runtime\python.exe infer-web.py --pycmd runtime\python.exe --port 7897 --dml
2024-11-01 17:45:40 | INFO | configs.config | No supported Nvidia GPU found
2024-11-01 17:45:40 | INFO | configs.config | overwrite v1/32k.json
2024-11-01 17:45:40 | INFO | configs.config | overwrite v1/40k.json
2024-11-01 17:45:40 | INFO | configs.config | overwrite v1/48k.json
2024-11-01 17:45:40 | INFO | configs.config | overwrite v2/48k.json
2024-11-01 17:45:40 | INFO | configs.config | overwrite v2/32k.json
2024-11-01 17:45:40 | INFO | configs.config | overwrite preprocess_per to 3
2024-11-01 17:45:40 | INFO | configs.config | Use DirectML instead
2024-11-01 17:45:40 | INFO | configs.config | Half-precision floating-point: False, device: privateuseone:0
2024-11-01 17:45:42 | INFO | main | Use Language: zh_CN
Running on local URL: http://0.0.0.0:7897
2024-11-01 17:45:51 | INFO | infer.modules.vc.modules | Get sid: 嗲嗲(芸芸).pth
2024-11-01 17:45:51 | INFO | infer.modules.vc.modules | Loading: assets/weights/嗲嗲(芸芸).pth
2024-11-01 17:45:52 | INFO | infer.modules.vc.modules | Select index:
2024-11-01 17:48:55 | WARNING | infer.modules.vc.modules | Traceback (most recent call last):
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\infer\modules\vc\modules.py", line 188, in vc_single
audio_opt = self.pipeline.pipeline(
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\infer\modules\vc\pipeline.py", line 375, in pipeline
self.vc(
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\infer\modules\vc\pipeline.py", line 271, in vc
audio1 = (net_g.infer(*arg)[0][0, 0]).data.cpu().float().numpy()
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\infer\lib\infer_pack\models.py", line 791, in infer
m_p, logs_p, x_mask = self.enc_p(phone, pitch, phone_lengths)
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\runtime\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\infer\lib\infer_pack\models.py", line 71, in forward
x = self.encoder(x * x_mask, x_mask)
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\runtime\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\infer\lib\infer_pack\attentions.py", line 69, in forward
y = attn_layers(x, x, attn_mask)
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\runtime\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\infer\lib\infer_pack\attentions.py", line 227, in forward
x, _ = self.attention(q, k, v, mask=attn_mask)
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\infer\lib\infer_pack\attentions.py", line 278, in attention
relative_weights = self._absolute_position_to_relative_position(p_attn)
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\infer\lib\infer_pack\attentions.py", line 373, in _absolute_position_to_relative_position
x_final = x_flat.view([batch, heads, length, 2 * length])[:, :, :, 1:]
RuntimeError

Traceback (most recent call last):
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\runtime\lib\site-packages\gradio\routes.py", line 321, in run_predict
output = await app.blocks.process_api(
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\runtime\lib\site-packages\gradio\blocks.py", line 1007, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\runtime\lib\site-packages\gradio\blocks.py", line 953, in postprocess_data
prediction_value = block.postprocess(prediction_value)
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\runtime\lib\site-packages\gradio\components.py", line 2076, in postprocess
processing_utils.audio_to_file(sample_rate, data, file.name)
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\runtime\lib\site-packages\gradio\processing_utils.py", line 206, in audio_to_file
data = convert_to_16_bit_wav(data)
File "D:\RVC1006AMD_Intel\RVC1006AMD_Intel1\runtime\lib\site-packages\gradio\processing_utils.py", line 219, in convert_to_16_bit_wav
if data.dtype in [np.float64, np.float32, np.float16]:
AttributeError: 'NoneType' object has no attribute 'dtype'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with infer/modules/vc/pipeline.py at line 271 and infer/lib/infer_pack/attentions.py at line 373, then reproduce the failure using the provided Windows DirectML command and an example model. Trace the RuntimeError before the Gradio NoneType error; done means inference completes without either reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.