Errors on training : AttributeError: module 'torch._C' has no attribute '_cuda_setDevice' #148

Closed
opened 2023-03-17 12:43:48 +00:00 by SyntheticVoices · 3 comments

H:\ai-voice-cloning>call .\venv\Scripts\activate.bat
!WARNING! Automatically deduced sample batch size returned 1.
!WARNING! Automatically deduced sample batch size returned 1.
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Spawning process:  train.bat ./training/biden/train.yaml
[Training] [2023-03-17T12:42:20.511029]
[Training] [2023-03-17T12:42:20.515039] (venv) H:\ai-voice-cloning>call .\venv\Scripts\activate.bat
[Training] [2023-03-17T12:42:21.805790] NOTE: Redirects are currently not supported in Windows or MacOs.
[Training] [2023-03-17T12:42:22.387199] H:\ai-voice-cloning\venv\lib\site-packages\torchvision\io\image.py:13: UserWarning: Failed to load image Python extension: Could not find module 'H:\ai-voice-cloning\venv\Lib\site-packages\torchvision\image.pyd' (or one of its dependencies). Try using the full path with constructor syntax.
[Training] [2023-03-17T12:42:22.391197]   warn(f"Failed to load image Python extension: {e}")
[Training] [2023-03-17T12:42:23.199268] NOT using BitsAndBytes optimizations
[Training] [2023-03-17T12:42:23.203263] Traceback (most recent call last):
[Training] [2023-03-17T12:42:23.206780]   File "H:\ai-voice-cloning\src\train.py", line 68, in <module>
[Training] [2023-03-17T12:42:23.209780]     train(config_path, args.launcher)
[Training] [2023-03-17T12:42:23.212779]   File "H:\ai-voice-cloning\src\train.py", line 25, in train
[Training] [2023-03-17T12:42:23.216288]     torch.cuda.set_device(opt['gpu_ids'][0])
[Training] [2023-03-17T12:42:23.219296]   File "H:\ai-voice-cloning\venv\lib\site-packages\torch\cuda\__init__.py", line 326, in set_device
[Training] [2023-03-17T12:42:23.222297]     torch._C._cuda_setDevice(device)
[Training] [2023-03-17T12:42:23.225297] AttributeError: module 'torch._C' has no attribute '_cuda_setDevice'

I updated the repo today and it seems I get this error when I try to train. I did a re-install/update etc to no avail. Not sure why it's not picking CUDA (or what ever this means)

``` H:\ai-voice-cloning>call .\venv\Scripts\activate.bat !WARNING! Automatically deduced sample batch size returned 1. !WARNING! Automatically deduced sample batch size returned 1. Running on local URL: http://127.0.0.1:7860 To create a public link, set `share=True` in `launch()`. Spawning process: train.bat ./training/biden/train.yaml [Training] [2023-03-17T12:42:20.511029] [Training] [2023-03-17T12:42:20.515039] (venv) H:\ai-voice-cloning>call .\venv\Scripts\activate.bat [Training] [2023-03-17T12:42:21.805790] NOTE: Redirects are currently not supported in Windows or MacOs. [Training] [2023-03-17T12:42:22.387199] H:\ai-voice-cloning\venv\lib\site-packages\torchvision\io\image.py:13: UserWarning: Failed to load image Python extension: Could not find module 'H:\ai-voice-cloning\venv\Lib\site-packages\torchvision\image.pyd' (or one of its dependencies). Try using the full path with constructor syntax. [Training] [2023-03-17T12:42:22.391197] warn(f"Failed to load image Python extension: {e}") [Training] [2023-03-17T12:42:23.199268] NOT using BitsAndBytes optimizations [Training] [2023-03-17T12:42:23.203263] Traceback (most recent call last): [Training] [2023-03-17T12:42:23.206780] File "H:\ai-voice-cloning\src\train.py", line 68, in <module> [Training] [2023-03-17T12:42:23.209780] train(config_path, args.launcher) [Training] [2023-03-17T12:42:23.212779] File "H:\ai-voice-cloning\src\train.py", line 25, in train [Training] [2023-03-17T12:42:23.216288] torch.cuda.set_device(opt['gpu_ids'][0]) [Training] [2023-03-17T12:42:23.219296] File "H:\ai-voice-cloning\venv\lib\site-packages\torch\cuda\__init__.py", line 326, in set_device [Training] [2023-03-17T12:42:23.222297] torch._C._cuda_setDevice(device) [Training] [2023-03-17T12:42:23.225297] AttributeError: module 'torch._C' has no attribute '_cuda_setDevice' ``` I updated the repo today and it seems I get this error when I try to train. I did a re-install/update etc to no avail. Not sure why it's not picking CUDA (or what ever this means)

I did pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 in the activated env but it says requirments already satisifed

Also when generating a voice :

H:\ai-voice-cloning>call .\venv\Scripts\activate.bat
!WARNING! Automatically deduced sample batch size returned 1.
!WARNING! Automatically deduced sample batch size returned 1.
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
!!!! WARNING !!!! No GPU available in PyTorch. You may need to reinstall PyTorch.
Loading TorToiSe... (AR: H:\ai-voice-cloning\models\tortoise\autoregressive.pth, vocoder: bigvgan_24khz_100band)
No hardware acceleration is available, falling back to CPU...
I did `pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 ` in the activated env but it says requirments already satisifed Also when generating a voice : ``` H:\ai-voice-cloning>call .\venv\Scripts\activate.bat !WARNING! Automatically deduced sample batch size returned 1. !WARNING! Automatically deduced sample batch size returned 1. Running on local URL: http://127.0.0.1:7860 To create a public link, set `share=True` in `launch()`. !!!! WARNING !!!! No GPU available in PyTorch. You may need to reinstall PyTorch. Loading TorToiSe... (AR: H:\ai-voice-cloning\models\tortoise\autoregressive.pth, vocoder: bigvgan_24khz_100band) No hardware acceleration is available, falling back to CPU... ```
Owner

You need to pass --force-reinstall when trying to install torch again.

You need to pass `--force-reinstall` when trying to install torch again.

You need to pass --force-reinstall when trying to install torch again.

Thank you. Resolved.

> You need to pass `--force-reinstall` when trying to install torch again. Thank you. Resolved.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mrq/ai-voice-cloning#148
No description provided.