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

Easily train a good VC model with voice data <= 10 mins!
MIT License
21.32k stars 3.26k forks source link

Attribute Error: 'NoneType' object has no attribute 'tobytes' #2182

Open SilverFox12-afk opened 2 weeks ago

SilverFox12-afk commented 2 weeks ago

To create a public link, set share=True in launch(). loading weights/Nanami_e600_s2400.pth gin_channels: 256 self.spk_embed_dim: 109

Traceback (most recent call last): File "C:\Users\Desktop\Mangio-RVC-v23.7.0_INFER\Mangio-RVC-v23.7.0\infer-web.py", line 316, in vc_single audio_opt = vc.pipeline( File "C:\Users\Desktop\Mangio-RVC-v23.7.0_INFER\Mangio-RVC-v23.7.0\vc_infer_pipeline.py", line 564, in pipeline self.vc( File "C:\Users\Desktop\Mangio-RVC-v23.7.0_INFER\Mangio-RVC-v23.7.0\vc_infer_pipeline.py", line 450, in vc (net_g.infer(feats, p_len, pitch, pitchf, sid)[0][0, 0]) RuntimeError: CUDA error: the launch timed out and was terminated CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions. Traceback (most recent call last): File "C:\Users\Desktop\Mangio-RVC-v23.7.0_INFER\Mangio-RVC-v23.7.0\runtime\lib\site-packages\gradio\routes.py", line 437, in run_predict output = await app.get_blocks().process_api( File "C:\Users\Desktop\Mangio-RVC-v23.7.0_INFER\Mangio-RVC-v23.7.0\runtime\lib\site-packages\gradio\blocks.py", line 1349, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "C:\Users\Desktop\Mangio-RVC-v23.7.0_INFER\Mangio-RVC-v23.7.0\runtime\lib\site-packages\gradio\blocks.py", line 1283, in postprocess_data prediction_value = block.postprocess(prediction_value) File "C:\Users\Desktop\Mangio-RVC-v23.7.0_INFER\Mangio-RVC-v23.7.0\runtime\lib\site-packages\gradio\components.py", line 2586, in postprocess file_path = self.audio_to_temp_file( File "C:\Users\Desktop\Mangio-RVC-v23.7.0_INFER\Mangio-RVC-v23.7.0\runtime\lib\site-packages\gradio\components.py", line 360, in audio_to_temp_file temp_dir = Path(dir) / self.hash_bytes(data.tobytes()) AttributeError: 'NoneType' object has no attribute 'tobytes' I need help ;-;)
SilverFox12-afk commented 2 weeks ago

Capture Ev Capture1

RAIACAD0564 commented 2 weeks ago

I was trying to figure out this issue myself and what worked for me was downgrading the av package. Hope it works for everyone else too.

pip install --force-reinstall -v "av==11.0.0"

zeki0485 commented 1 week ago

doen't work. any other solution?

Lucalme commented 3 days ago

doen't work. any other solution?

go to infer\lib\audio.py

-> Line 61, replace open(file, "r") as f: with: open(file, "rb") as f:

Also, Lines 34 and 35 should be: inp = av.open(i, "r") out = av.open(o, "w", format=format)

Hope that does it 👍