jhj0517 / Whisper-WebUI

A Web UI for easy subtitle using whisper model.
Apache License 2.0
1.35k stars 188 forks source link

[에러] Could not locate cudnn_ops_infer64_8.dll. Please make sure it is in your library path! #235

Closed snowyegret23 closed 2 months ago

snowyegret23 commented 2 months ago

윈도우10, x64 사용중입니다. Python 버전은 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] on win32입니다.

Use "faster-whisper" implementation
Device "cuda" is detected
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Could not locate cudnn_ops_infer64_8.dll. Please make sure it is in your library path!
"launching the app"
계속하려면 아무 키나 누르십시오 . . .
  1. git clone 후
  2. install.bat로 설치하고
  3. start-webui.bat를 통해 시작한 다음
  4. mp3파일을 업로드한 후
  5. GENERATE SUBTITLE FILE을 누르면 위 오류가 발생하며 프로그램이 종료됩니다.

venv\Lib\site-packages\torch\lib에 있는 폴더 내용물입니다.

asmjit.dll
asmjit.lib
c10.dll
c10.lib
c10_cuda.dll
c10_cuda.lib
caffe2_nvrtc.dll
caffe2_nvrtc.lib
cpuinfo.lib
cublas64_12.dll
cublasLt64_12.dll
cudart64_12.dll
cudnn64_9.dll
cudnn_adv64_9.dll
cudnn_cnn64_9.dll
cudnn_engines_precompiled64_9.dll
cudnn_engines_runtime_compiled64_9.dll
cudnn_graph64_9.dll
cudnn_heuristic64_9.dll
cudnn_ops64_9.dll
cufft64_11.dll
cufftw64_11.dll
cupti64_2023.1.1.dll
curand64_10.dll
cusolver64_11.dll
cusolverMg64_11.dll
cusparse64_12.dll
dnnl.lib
fbgemm.dll
fbgemm.lib
fmt.lib
kineto.lib
libiomp5md.dll
libiompstubs5md.dll
libprotobuf-lite.lib
libprotobuf.lib
libprotoc.lib
nvJitLink_120_0.dll
nvrtc-builtins64_121.dll
nvrtc64_120_0.dll
nvToolsExt64_1.dll
pthreadpool.lib
shm.dll
shm.lib
sleef.lib
torch.dll
torch.lib
torch_cpu.dll
torch_cpu.lib
torch_cuda.dll
torch_cuda.lib
torch_global_deps.dll
torch_python.dll
torch_python.lib
uv.dll
XNNPACK.lib
zlibwapi.dll
_C.lib

다른 곳에서 해당 파일을 복사 붙여넣기 하면 다음과 같은 오류가 뜹니다.

Traceback (most recent call last):
  File "F:\Project\github_repos\Whisper-WebUI\app.py", line 5, in <module>
    from modules.whisper.whisper_factory import WhisperFactory
  File "F:\Project\github_repos\Whisper-WebUI\modules\whisper\whisper_factory.py", line 4, in <module>
    from modules.whisper.faster_whisper_inference import FasterWhisperInference
  File "F:\Project\github_repos\Whisper-WebUI\modules\whisper\faster_whisper_inference.py", line 4, in <module>
    import torch
  File "F:\Project\github_repos\Whisper-WebUI\venv\lib\site-packages\torch\__init__.py", line 148, in <module>
    raise err
OSError: [WinError 126] 지정된 모듈을 찾을 수 없습니다. Error loading "F:\Project\github_repos\Whisper-WebUI\venv\lib\site-packages\torch\lib\shm.dll" or one of its dependencies.
"launching the app"
계속하려면 아무 키나 누르십시오 . . .
snowyegret23 commented 2 months ago

https://github.com/Purfview/whisper-standalone-win/releases/tag/libs 여기 있는 cuBLAS.and.cuDNN_CUDA12_win_v1.7z 다운로드 후 torch의 해당 lib 폴더에 덮어쓰고 시작하니 해결되었습니다.

jhj0517 commented 2 months ago

@snowyegret23 님 안녕하세요. 버그 제보에 감사드립니다. CUDA 와 torch 버전 호환성 문제인 것으로 보이는데요,

CUDA 버전에 맞게 torch 를 재설치 하는 것으로 해결했던 것으로 기억합니다.

237 에서 본인의 사양에 맞게 CUDA 버전을 수정하도록 명시하였습니다.

snowyegret23 commented 2 months ago

감사합니다!

violetgoing commented 2 months ago

which version of cuda should I use?

jhj0517 commented 2 months ago

@violetgoing The default CUDA version used in this web UI is CUDA 12.1.

https://github.com/jhj0517/Whisper-WebUI/blob/4bea17a1892d8c5f94308c1f8508132ccbe9cfdf/requirements.txt#L6-L7

If you are using CUDA 12.4, you can update the URL in the requirements.txt to https://download.pytorch.org/whl/cu124.

Note that the minimum CUDA version is 12.1, because faster-whipser==1.0.3 needs at least CUDA 12.1.

violetgoing commented 2 months ago

@jhj0517 i change but it actually doesnt work

Use "faster-whisper" implementation
Device "cuda" is detected
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Could not locate cudnn_ops_infer64_8.dll. Please make sure it is in your library path!
"launching the app"
Для продолжения нажмите любую клавишу . . .

my requirments.txt is

# Remove the --extra-index-url line below if you're not using Nvidia GPU.
# If you're using it, Update CUDA version to yours (CUDA 12.1 is minimum requirement):
# For CUDA 12.1, use : https://download.pytorch.org/whl/cu121
# For CUDA 12.4, use : https://download.pytorch.org/whl/cu124

--extra-index-url https://download.pytorch.org/whl/cu124
torch
git+https://github.com/jhj0517/jhj0517-whisper.git
faster-whisper==1.0.3
transformers==4.42.3
gradio==4.29.0
pytubefix
pyannote.audio==3.3.1
snowyegret23 commented 2 months ago

@violetgoing It didn't work for me either, so I solved it by using the Docker version.

violetgoing commented 2 months ago

@snowyegret23 how?

snowyegret23 commented 2 months ago

@violetgoing I simply followed the Insturction. https://github.com/jhj0517/Whisper-WebUI#running-with-docker

  1. Install Docker Desktop
  2. Download this repo (or clone)
  3. follow instuction
violetgoing commented 2 months ago

@snowyegret23 now i have this

[+] Building 0.0s (1/1) FINISHED                                                                   docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 2B                                                                                 0.0s
ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/x4gnhsh8xbty6i5kuv7capt7p
violetgoing commented 2 months ago

before this step 1 docker build -t whisper-webui:latest .

jhj0517 commented 2 months ago

@violetgoing This should work:

  1. Build

    docker pull jhj0517/whisper-webui:latest
  2. Run

    docker run --gpus all -d \
    -v /path/to/models:/Whisper-WebUI/models \
    -v /path/to/outputs:/Whisper-WebUI/outputs \
    -p 7860:7860 \
    -it \
    jhj0517/whisper-webui:latest --server_name 0.0.0.0 --server_port 7860
  3. Connect to http://localhost:7860 with your browser

Update /path/to/models and /path/to/outputs to your local paths as you like.

violetgoing commented 2 months ago

@jhj0517 after step 2. run i have

docker run --gpus all -d \
>> -v /path/to/models:/Whisper-WebUI/models \
>> -v /path/to/outputs:/Whisper-WebUI/outputs \
>> -p 7860:7860 \
>> -it \
>> jhj0517/whisper-webui:latest --server_name 0.0.0.0 --server_port 7860
docker: invalid reference format.
See 'docker run --help'.
-v : Имя "-v" не распознано как имя командлета, функции, файла сценария или выполняемой программы. Проверьте правильность написания имени, а также наличие и правильность пути, после чего повторите попыт
ку.
строка:2 знак:1
+ -v /path/to/models:/Whisper-WebUI/models \
+ ~~
    + CategoryInfo          : ObjectNotFound: (-v:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

-v : Имя "-v" не распознано как имя командлета, функции, файла сценария или выполняемой программы. Проверьте правильность написания имени, а также наличие и правильность пути, после чего повторите попыт 
ку.
строка:3 знак:1
+ -v /path/to/outputs:/Whisper-WebUI/outputs \
+ ~~
    + CategoryInfo          : ObjectNotFound: (-v:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

-p : Имя "-p" не распознано как имя командлета, функции, файла сценария или выполняемой программы. Проверьте правильность написания имени, а также наличие и правильность пути, после чего повторите попыт
ку.
строка:4 знак:1
+ -p 7860:7860 \
+ ~~
    + CategoryInfo          : ObjectNotFound: (-p:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

-it : Имя "-it" не распознано как имя командлета, функции, файла сценария или выполняемой программы. Проверьте правильность написания имени, а также наличие и правильность пути, после чего повторите поп
ытку.
строка:5 знак:1
+ -it \
+ ~~~
    + CategoryInfo          : ObjectNotFound: (-it:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

jhj0517/whisper-webui:latest : Имя "jhj0517/whisper-webui:latest" не распознано как имя командлета, функции, файла сценария или выполняемой программы. Проверьте правильность написания имени, а также нал 
ичие и правильность пути, после чего повторите попытку.
строка:6 знак:1
+ jhj0517/whisper-webui:latest --server_name 0.0.0.0 --server_port 7860
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (jhj0517/whisper-webui:latest:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
violetgoing commented 2 months ago

@jhj0517 Can you pls help me if I show off my screen on discord, skype, etc.?

jhj0517 commented 2 months ago

@violetgoing What kind of terminal do you use? It seems \ is not valid in your terminal, You can try single line command:

docker run --gpus all -d -v /Whisper-WebUI/models -v /Whisper-WebUI/outputs -p 7860:7860 -it jhj0517/whisper-webui:latest --server_name 0.0.0.0 --server_port 7860
violetgoing commented 2 months ago

@jhj0517 yeah its working!

jhj0517 commented 2 months ago

@violetgoing Good to hear. Note that you can use local paths as output and models by editing the -v tags, e.g.) -v /your/path/to/models:/Whisper-WebUI/models -v /your/path/to/outputs:/Whisper-WebUI/outputs