Mangio621 / Mangio-RVC-Fork

*CREPE+HYBRID TRAINING* A very experimental fork of the Retrieval-based-Voice-Conversion-WebUI repo that incorporates a variety of other f0 methods, along with a hybrid f0 nanmedian method.
MIT License
996 stars 215 forks source link

AttributeError: 'NoneType' object has no attribute 'tobytes' #179

Open Kevin201110219 opened 9 months ago

Kevin201110219 commented 9 months ago

when i run using someguy and somegirl it works but when i try to input another audio , here's the problem : AttributeError: 'NoneType' object has no attribute 'tobytes'

size of the audio is just 4,4 mb and 4:39min audio. does this code only work for 7second audio ? anyone can help me ? i'm stuck already

Kevin201110219 commented 9 months ago

C:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\Mangio-RVC-v23.7.0>runtime\python.exe infer-web.py --pycmd runtime\python.exe --port 7897 Found GPU NVIDIA GeForce MX130 Set fp16_run to false in 32k.json Set fp16_run to false in 40k.json Set fp16_run to false in 48k.json Use Language: en_US Running on local URL: http://0.0.0.0:7897

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

Traceback (most recent call last): File "C:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\Mangio-RVC-v23.7.0\infer-web.py", line 316, in vc_single audio_opt = vc.pipeline( File "C:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\Mangio-RVC-v23.7.0\vc_infer_pipeline.py", line 542, in pipeline pitch, pitchf = self.get_f0( File "C:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\Mangio-RVC-v23.7.0\vc_infer_pipeline.py", line 303, in get_f0 f0 = self.get_f0_official_crepe_computation(x, f0_min, f0_max) File "C:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\Mangio-RVC-v23.7.0\vc_infer_pipeline.py", line 142, in get_f0_official_crepe_computation f0, pd = torchcrepe.predict( File "C:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\Mangio-RVC-v23.7.0\runtime\lib\site-packages\torchcrepe\core.py", line 120, in predict probabilities = infer(frames, model) File "C:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\Mangio-RVC-v23.7.0\runtime\lib\site-packages\torchcrepe\core.py", line 564, in infer return infer.model(frames, embed=embed) File "C:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\Mangio-RVC-v23.7.0\runtime\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "C:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\Mangio-RVC-v23.7.0\runtime\lib\site-packages\torchcrepe\model.py", line 96, in forward x = self.embed(x) File "C:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\Mangio-RVC-v23.7.0\runtime\lib\site-packages\torchcrepe\model.py", line 120, in embed x = self.layer(x, self.conv1, self.conv1_BN, (0, 0, 254, 254)) File "C:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\Mangio-RVC-v23.7.0\runtime\lib\site-packages\torchcrepe\model.py", line 132, in layer x = F.relu(x) File "C:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\Mangio-RVC-v23.7.0\runtime\lib\site-packages\torch\nn\functional.py", line 1457, in relu result = torch.relu(input) torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 512.00 MiB (GPU 0; 2.00 GiB total capacity; 851.32 MiB already allocated; 62.24 MiB free; 1.02 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF Traceback (most recent call last): File "C:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\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:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\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:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\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:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\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:\RVC\Mangio-RVC-v23.7.0_INFER_TRAIN\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'
phineas-pta commented 9 months ago

out of memory error because your gpu only has 2 gb vram

if u want process longer video, u need to buy better gpu

aidanmastro commented 9 months ago

I was able to get around this by leaving the "Path to the feature index file" input blank. And instead placing your audio file within the "\Mangio-RVC-v23.7.0\audios" directory, you can then select the audio file from the dropdown menu (see below)

image

That worked for me, let me know how it goes @Kevin201110219