gitmylo / audio-webui

A webui for different audio related Neural Networks
MIT License
964 stars 90 forks source link

[BUG REPORT] Error: RVC and Pitch extraction: rmvpe #178

Open marekbujko opened 8 months ago

marekbujko commented 8 months ago

Hello, today I installed this great WebUI. When I try to generate something with RVC and Pitch extraction: rmvpe, I get errors. Others Pitch extractions work without problems. I also tried original RVC-Project/Retrieval-based-Voice-Conversion-WebUI and it works there for rmvpe.

OS/Python: Ubuntu 20.04 LTS, Python 3.10.6

Errors: if data.dtype in [np.float64, np.float32, np.float16]: AttributeError: 'NoneType' object has no attribute 'dtype'

Full log: loading rmvpe model Traceback (most recent call last): File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/webui/modules/implementations/rvc/rvc.py", line 226, in vc_single audio_opt = vc.pipeline( File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/webui/modules/implementations/rvc/vc_infer_pipeline.py", line 298, in pipeline pitch, pitchf = self.get_f0( File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/webui/modules/implementations/rvc/vc_infer_pipeline.py", line 94, in get_f0 f0 = cpe.pitch_extract(f0_method, x, f0_min, f0_max, p_len, time_step, self.sr, self.window, crepe_hop_length, filter_radius) File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/webui/modules/implementations/rvc/custom_pitch_extraction.py", line 158, in pitch_extract f0 = model_rmvpe.infer_from_audio(x, thred=0.03) File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/webui/modules/implementations/rvc/rmvpe.py", line 283, in infer_from_audio mel = self.mel_extractor(audio, center=True) File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/webui/modules/implementations/rvc/rmvpe.py", line 241, in forward log_mel_spec = torch.log(torch.clamp(mel_output, min=self.clamp)) RuntimeError: "clamp_min_scalar_cpu" not implemented for 'Half'

Traceback (most recent call last): File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/webui/modules/implementations/rvc/rvc.py", line 226, in vc_single audio_opt = vc.pipeline( File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/webui/modules/implementations/rvc/vc_infer_pipeline.py", line 298, in pipeline pitch, pitchf = self.get_f0( File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/webui/modules/implementations/rvc/vc_infer_pipeline.py", line 94, in get_f0 f0 = cpe.pitch_extract(f0_method, x, f0_min, f0_max, p_len, time_step, self.sr, self.window, crepe_hop_length, filter_radius) File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/webui/modules/implementations/rvc/custom_pitch_extraction.py", line 158, in pitch_extract f0 = model_rmvpe.infer_from_audio(x, thred=0.03) File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/webui/modules/implementations/rvc/rmvpe.py", line 283, in infer_from_audio mel = self.mel_extractor(audio, center=True) File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/webui/modules/implementations/rvc/rmvpe.py", line 241, in forward log_mel_spec = torch.log(torch.clamp(mel_output, min=self.clamp)) RuntimeError: "clamp_min_scalar_cpu" not implemented for 'Half'

Traceback (most recent call last): File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 437, in run_predict output = await app.get_blocks().process_api( File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1352, in process_api result = await self.call_function( File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1077, in call_function prediction = await anyio.to_thread.run_sync( File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, *args) File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/webui/ui/tabs/rvc.py", line 147, in gen return [audio_tuple, util.make_waveform(audio_tuple), background, audio] File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/webui/modules/util.py", line 63, in make_waveform return gradio.make_waveform(audio, bg_color=bg_color, bg_image=bg_image, fg_alpha=fg_alpha, bars_color=bars_color, bar_count=bar_count, bar_width=bar_width) File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/venv/lib/python3.10/site-packages/gradio/helpers.py", line 744, in make_waveform processing_utils.audio_to_file(audio[0], audio[1], tmp_wav.name, format="wav") File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/venv/lib/python3.10/site-packages/gradio/processing_utils.py", line 156, in audio_to_file data = convert_to_16_bit_wav(data) File "/home/administrator/Dokumenty/AI/AI Ine/Audio-WebUI/audio-webui/venv/lib/python3.10/site-packages/gradio/processing_utils.py", line 170, in convert_to_16_bit_wav if data.dtype in [np.float64, np.float32, np.float16]: AttributeError: 'NoneType' object has no attribute 'dtype'

gitmylo commented 8 months ago

Are you running this on gpu? And if you are, which gpu are you running it on?

marekbujko commented 7 months ago

On CPU only. My old AMD FX CPU does not support PCIe Atomics for support AMD ROCm on GPU.

gitmylo commented 7 months ago

That's likely why it's not working, I'd assume torchcrepe also doesn't work?

marekbujko commented 7 months ago

I tested now all Pitch extractions: dio, pm, harvest, torchcrepe, torchcrepe tiny, mangio-crepe, mangio-crepe tiny and rmvpe. All except rmvpe work.

I also tried RVC Project - Retrieval-based-Voice-Conversion-WebUI with rmvpe and rmvpe worked there. I don't know what they changed in code.