dlxj commited on
Commit ·
96e5a22
1
Parent(s): 32854df
cuda ok
Browse files- main.py +15 -0
- readme.txt +2 -0
- requirements.txt +1 -0
main.py
CHANGED
|
@@ -13,6 +13,21 @@ import warnings
|
|
| 13 |
from threading import Event
|
| 14 |
import re
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
# Third-party imports
|
| 17 |
import numpy as np
|
| 18 |
from bs4 import BeautifulSoup
|
|
|
|
| 13 |
from threading import Event
|
| 14 |
import re
|
| 15 |
|
| 16 |
+
# Add NVIDIA library paths to DLL search path for Windows
|
| 17 |
+
if os.name == 'nt':
|
| 18 |
+
try:
|
| 19 |
+
site_packages = os.path.join(os.path.dirname(sys.executable), 'Lib', 'site-packages')
|
| 20 |
+
nvidia_libs = [
|
| 21 |
+
os.path.join(site_packages, 'nvidia', 'cudnn', 'bin'),
|
| 22 |
+
os.path.join(site_packages, 'nvidia', 'cublas', 'bin'),
|
| 23 |
+
]
|
| 24 |
+
for lib_path in nvidia_libs:
|
| 25 |
+
if os.path.exists(lib_path):
|
| 26 |
+
os.add_dll_directory(lib_path)
|
| 27 |
+
os.environ['PATH'] = lib_path + os.pathsep + os.environ['PATH']
|
| 28 |
+
except Exception as e:
|
| 29 |
+
print(f"Warning: Failed to setup NVIDIA library paths: {e}")
|
| 30 |
+
|
| 31 |
# Third-party imports
|
| 32 |
import numpy as np
|
| 33 |
from bs4 import BeautifulSoup
|
readme.txt
CHANGED
|
@@ -6,6 +6,8 @@ https://github.com/nazdridoy/kokoro-tts/issues/1
|
|
| 6 |
|
| 7 |
cuda_12.0.0_527.41_windows.exe 安装
|
| 8 |
|
|
|
|
|
|
|
| 9 |
conda install -y cudnn 再安装
|
| 10 |
|
| 11 |
https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements
|
|
|
|
| 6 |
|
| 7 |
cuda_12.0.0_527.41_windows.exe 安装
|
| 8 |
|
| 9 |
+
pip install nvidia-cudnn-cu12
|
| 10 |
+
|
| 11 |
conda install -y cudnn 再安装
|
| 12 |
|
| 13 |
https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements
|
requirements.txt
CHANGED
|
@@ -3,6 +3,7 @@ ebooklib
|
|
| 3 |
PyMuPDF
|
| 4 |
kokoro-onnx[gpu]
|
| 5 |
onnxruntime_gpu
|
|
|
|
| 6 |
pymupdf4llm
|
| 7 |
sounddevice
|
| 8 |
soundfile
|
|
|
|
| 3 |
PyMuPDF
|
| 4 |
kokoro-onnx[gpu]
|
| 5 |
onnxruntime_gpu
|
| 6 |
+
nvidia-cudnn-cu12
|
| 7 |
pymupdf4llm
|
| 8 |
sounddevice
|
| 9 |
soundfile
|