-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
voicevox_core python api - dll loading - windows #445
Comments
voicevox_core depends on ONNX Runtime 1.13.1. Could you download this and use the onnxruntime DLLs in it? voicevox_core-windows-x64-cuda-0.14.1.zip And one more thing, We also provide DirectML version of voicevox_core. This is primarily supported version for Windows. voicevox_core-0.14.1+directml-cp38-abi3-win_amd64.whl
Well, AFAIR, DLLs in
Unfortunately, We decided (didn't we? @Hiroshiba) not to bundle ORT DLLs at least directly because they are too large to upload to PyPI. |
I got everything working by modifying the _load_dlls.py file. The dlls in the path were NOT loaded by the provided file. this is the one I'm now using : import glob
import platform
from ctypes import CDLL
from pathlib import Path
import os
from ctypes.util import find_library
from pathlib import Path
from os import getenv
PATH = getenv("PATH")
PATHS = [path for path in PATH.split(
";") if path != "" and os.path.exists(path)]
for path in PATHS:
if os.path.exists(f"{path}\\onnxruntime.dll") and "system32" not in path:
print(f"{path=}")
CDLL(f"{path}\\onnxruntime.dll")
else:
os.add_dll_directory(path)
# if platform.system() == "Windows":
# pathname = "*.dll"
# elif platform.system() == "Darwin":
# pathname = "*.dylib"
# elif platform.system() == "Linux":
# pathname = "*.so.*"
# else:
# raise RuntimeError("Unsupported platform")
# for dll in glob.glob(pathname):
# CDLL(str(Path(dll).resolve(strict=True)))
lib_file_names = [
"torch_cpu.dll",
"torch_cuda.dll",
"DirectML.dll",
]
for dll in lib_file_names:
CDLL(find_library(dll)) the following _load_dlls.py requires the required .dll files to be in path |
質問の内容
sorry for posting in english (I don't speak japanese yet)
The problem:
The python api loads onnxruntime.dll from current directory. I got it working after copying onnxruntime_providers_shared.dll and onnxruntime.dll in the example/python/ directory.
But, only CPU mode works, GPU mode fails with the following error
copying onnxruntime_providers_cuda.dll in the run.py directory doesn't help either:
VOICEVOXのバージョン
voicevox_core cloned 3/19/2023
OSの種類/ディストリ/バージョン
なるべく詳しく書いてください 記述例:
その他
The text was updated successfully, but these errors were encountered: