JarodMica / ai-voice-cloning

GNU General Public License v3.0
570 stars 128 forks source link

Start.bat - ModuleNotFoundError: No module named 'torchaudio' #29

Open infambart opened 8 months ago

infambart commented 8 months ago

https://youtu.be/p31Ax_A5VKA?si=IzAZN9iog-ylIrAh&t=154 at this point, I get this... (windows10, RTX3060)


C:\ai-voice-cloning>set PYTHONUTF8=1

C:\ai-voice-cloning>python.exe .\src\main.py Traceback (most recent call last): File "C:\ai-voice-cloning\src\main.py", line 20, in from utils import * File "C:\ai-voice-cloning\src\utils.py", line 29, in import torchaudio ModuleNotFoundError: No module named 'torchaudio'

C:\ai-voice-cloning>pause Press any key to continue . . .

To1p5 commented 8 months ago

You got a bit further than me but I think I'm having a similar issue C:\Users\fmsal\Downloads\ai-voice-cloning>set PYTHONUTF8=1

C:\Users\fmsal\Downloads\ai-voice-cloning>runtime\python.exe .\src\main.py C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\torch\nn\modules\transformer.py:20: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\utils\tensor_numpy.cpp:84.) device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'), Traceback (most recent call last): File "C:\Users\fmsal\Downloads\ai-voice-cloning\src\main.py", line 20, in from utils import * File "C:\Users\fmsal\Downloads\ai-voice-cloning\src\utils.py", line 29, in import torchaudio File "C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\torchaudio__init.py", line 1, in from . import ( # noqa: F401 File "C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\torchaudio_extension\init.py", line 45, in _load_lib("libtorchaudio") File "C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\torchaudio_extension\utils.py", line 64, in _load_lib torch.ops.load_library(path) File "C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\torch_ops.py", line 852, in load_library ctypes.CDLL(path) File "ctypes\init.py", line 374, in init__ FileNotFoundError: Could not find module 'C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\Lib\site-packages\torchaudio\lib\libtorchaudio.pyd' (or one of its dependencies). Try using the full path with constructor syntax.

C:\Users\fmsal\Downloads\ai-voice-cloning>pause Press any key to continue . . .

JarodMica commented 8 months ago

C:\ai-voice-cloning>python.exe .\src\main.py

@infambart This would suggest you did a git clone of this repo as the packaged version would call it with runtime\python.exe. Can you double check that you downloaded the packaged version?

@To1p5 what GPU do you have? Could you try installing the latest drivers

To1p5 commented 8 months ago

This my current gpu NVIDIA GeForce RTX 3060 Laptop GPU I'll try that now

To1p5 commented 8 months ago

I just updated both the game drivers and the studio drivers the error did change still having issues though. It's saying it has something to do with numpy. 'C:\Users\fmsal\Downloads\ai-voice-cloning>set PYTHONUTF8=1

C:\Users\fmsal\Downloads\ai-voice-cloning>runtime\python.exe .\src\main.py C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\torch\nn\modules\transformer.py:20: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\utils\tensor_numpy.cpp:84.) device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'), Traceback (most recent call last): File "C:\Users\fmsal\Downloads\ai-voice-cloning\src\main.py", line 20, in from utils import File "C:\Users\fmsal\Downloads\ai-voice-cloning\src\utils.py", line 31, in import gradio as gr File "C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\gradio__init.py", line 3, in import gradio.components as components File "C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\gradio\components.py", line 21, in import altair as alt File "C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\altair\init__.py", line 620, in from .vegalite import File "C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\altair\vegalite__init.py", line 2, in from .v5 import File "C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\altair\vegalite\v5__init__.py", line 2, in from .schema import File "C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\altair\vegalite\v5\schema__init__.py", line 3, in from .core import * File "C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\altair\vegalite\v5\schema\core.py", line 7, in from altair.utils.schemapi import SchemaBase, Undefined, UndefinedType, _subclasses File "C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\altair\utils\init.py", line 1, in from .core import ( File "C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\altair\utils\core.py", line 27, in import pandas as pd File "C:\Users\fmsal\Downloads\ai-voice-cloning\runtime\lib\site-packages\pandas\init__.py", line 43, in raise ImportError( ImportError: Unable to import required dependencies: numpy: No module named 'numpy'

C:\Users\fmsal\Downloads\ai-voice-cloning>pause Press any key to continue . . .'

also I don't know if this means anything 'device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'),'

infambart commented 8 months ago

@JarodMica I didn't use a git clone the 1st time, but I did have 7zip errors that I didn't recall until I just did it again. https://huggingface.co/Jmica/ai-voice-cloning/blob/main/ai-voice-cloning-v2_0.7z produced errors using 7zip, see attached screenshot Capture

JarodMica commented 7 months ago

This is definitely an issue, is your 7zip up to date? I've only seen this occur with 7zip versions that needed to be updated.