Retrieval-based-Voice-Conversion-WebUI icon indicating copy to clipboard operation
Retrieval-based-Voice-Conversion-WebUI copied to clipboard

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

Open SilverFox12-afk opened this issue 1 year ago • 5 comments

To create a public link, set share=True in launch(). loading weights/Nanami_e600_s2400.pth gin_channels: 256 self.spk_embed_dim: 109 <All keys matched successfully> 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 avatar Jul 06 '24 18:07 SilverFox12-afk

Capture Ev Capture1

SilverFox12-afk avatar Jul 06 '24 18:07 SilverFox12-afk

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"

RAIACAD0564 avatar Jul 08 '24 14:07 RAIACAD0564

doen't work. any other solution?

zeki0485 avatar Jul 16 '24 08:07 zeki0485

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 👍

Lucalme avatar Jul 20 '24 20:07 Lucalme

It seems that the issue is with the Gradio library. To update the library, run the following command:

pip install --upgrade gradio Since the new version of Gradio has deprecated concurrency_count, you need to use the new method for setting concurrency limits.

Solution Remove the concurrency_count parameter: Use Ctrl+F to find where the error is occurring in the code, and replace it with the following: if config.iscolab: app.queue(max_size=1022).launch(max_threads=511) else: app.queue(max_size=1022).launch( server_name="0.0.0.0", inbrowser=not config.noautoopen, server_port=config.listen_port, quiet=True, ) After making these changes, run the script again, and it should work.

mi-ye avatar Sep 12 '24 04:09 mi-ye

pip install gradio==3.48.0

RitterKW avatar Dec 04 '24 16:12 RitterKW