RVC-Project / RVC-Project/Retrieval-based-Voice-Conversion-WebUI
推理时报AttributeError错误
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 38.4k
- Forks
- 5.3k
- PR merge metrics
- No merged PRs in 30d
Description
完整日志
使用正确的index文件
O:\RVC-WebUi\RVC1006Nvidia>runtime\python.exe infer-web.py --pycmd runtime\python.exe --port 7897
2025-01-11 22:19:03 | INFO | configs.config | Found GPU NVIDIA P106-100, force to fp32
overwrite preprocess and configs.json
is_half:False, device:cuda:0
2025-01-11 22:19:07 | INFO | __main__ | Use Language: zh_CN
Running on local URL: http://0.0.0.0:7897/
2025-01-11 22:19:16 | INFO | infer.modules.vc.modules | Get sid: cassie.pth
2025-01-11 22:19:16 | INFO | infer.modules.vc.modules | Loading: assets/weights/cassie.pth
2025-01-11 22:19:17 | INFO | infer.modules.vc.modules | Select index: logs\added_IVF882_Flat_nprobe_1_cassie_v2.index
2025-01-11 22:20:20 | WARNING | libav.mp3 | Estimating duration from bitrate, this may be inaccurate
2025-01-11 22:20:23 | INFO | infer.modules.vc.pipeline | Loading rmvpe model,assets/rmvpe/rmvpe.pt
2025-01-11 22:20:26 | WARNING | infer.modules.vc.modules | Traceback (most recent call last):
File "O:\RVC-WebUi\RVC1006Nvidia\infer\modules\vc\modules.py", line 185, in vc_single
audio_opt = self.pipeline.pipeline(
File "O:\RVC-WebUi\RVC1006Nvidia\infer\modules\vc\pipeline.py", line 410, in pipeline
self.vc(
File "O:\RVC-WebUi\RVC1006Nvidia\infer\modules\vc\pipeline.py", line 235, in vc
score, ix = index.search(npy, k=8)
File "O:\RVC-WebUi\RVC1006Nvidia\runtime\lib\site-packages\faiss\__init__.py", line 341, in replacement_search
assert d == self.d
AssertionError
Traceback (most recent call last):
File "O:\RVC-WebUi\RVC1006Nvidia\runtime\lib\site-packages\gradio\routes.py", line 321, in run_predict
output = await app.blocks.process_api(
File "O:\RVC-WebUi\RVC1006Nvidia\runtime\lib\site-packages\gradio\blocks.py", line 1007, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "O:\RVC-WebUi\RVC1006Nvidia\runtime\lib\site-packages\gradio\blocks.py", line 953, in postprocess_data
prediction_value = block.postprocess(prediction_value)
File "O:\RVC-WebUi\RVC1006Nvidia\runtime\lib\site-packages\gradio\components.py", line 2076, in postprocess
processing_utils.audio_to_file(sample_rate, data, file.name)
File "O:\RVC-WebUi\RVC1006Nvidia\runtime\lib\site-packages\gradio\processing_utils.py", line 206, in audio_to_file
data = convert_to_16_bit_wav(data)
File "O:\RVC-WebUi\RVC1006Nvidia\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'
不使用index文件/使用错误的index文件
2025-01-12 11:41:49 | INFO | infer.modules.vc.modules | Get sid:
2025-01-12 11:41:49 | INFO | infer.modules.vc.modules | Clean model cache
2025-01-12 11:41:51 | INFO | infer.modules.vc.modules | Get sid: cassie.pth
2025-01-12 11:41:51 | INFO | infer.modules.vc.modules | Loading: assets/weights/cassie.pth
2025-01-12 11:41:52 | INFO | infer.modules.vc.modules | Select index: logs\cassie\added_IVF882_Flat_nprobe_1_cassie_v2.index
2025-01-12 11:41:55 | WARNING | libav.mp3 | Estimating duration from bitrate, this may be inaccurate
2025-01-12 11:41:58 | INFO | infer.modules.vc.pipeline | Loading rmvpe model,assets/rmvpe/rmvpe.pt
2025-01-12 11:42:00 | WARNING | infer.modules.vc.modules | Traceback (most recent call last):
File "O:\RVC-WebUi\RVC1006Nvidia\infer\modules\vc\modules.py", line 185, in vc_single
audio_opt = self.pipeline.pipeline(
File "O:\RVC-WebUi\RVC1006Nvidia\infer\modules\vc\pipeline.py", line 410, in pipeline
self.vc(
File "O:\RVC-WebUi\RVC1006Nvidia\infer\modules\vc\pipeline.py", line 221, in vc
if protect < 0.5 and pitch is not None and pitchf is not None:
TypeError: '<' not supported between instances of 'dict' and 'float'
Traceback (most recent call last):
File "O:\RVC-WebUi\RVC1006Nvidia\runtime\lib\site-packages\gradio\routes.py", line 321, in run_predict
output = await app.blocks.process_api(
File "O:\RVC-WebUi\RVC1006Nvidia\runtime\lib\site-packages\gradio\blocks.py", line 1007, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "O:\RVC-WebUi\RVC1006Nvidia\runtime\lib\site-packages\gradio\blocks.py", line 953, in postprocess_data
prediction_value = block.postprocess(prediction_value)
File "O:\RVC-WebUi\RVC1006Nvidia\runtime\lib\site-packages\gradio\components.py", line 2076, in postprocess
processing_utils.audio_to_file(sample_rate, data, file.name)
File "O:\RVC-WebUi\RVC1006Nvidia\runtime\lib\site-packages\gradio\processing_utils.py", line 206, in audio_to_file
data = convert_to_16_bit_wav(data)
File "O:\RVC-WebUi\RVC1006Nvidia\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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two reported cases from the logs, using the correct index and then no or an incorrect index. Start with infer/modules/vc/pipeline.py at the reported lines 221 and 235, then trace the call from infer/modules/vc/modules.py line 185. Done means the index-related failure is identified and inference no longer produces the downstream NoneType error shown by Gradio.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100