Improve: Changed PyTorch to an optional dependency when used style_bert_vits2 as a library
ONNXRuntime has relied on CUDA 12.x / cuDNN 9.x by default since v1.19.0, while PyTorch finally supports cuDNN 9 since v2.4.0. Therefore, unless the pinning of torch<2.4 is eliminated, CUDA cannot be used with the latest version of ONNXRuntime.
This commit is contained in:
@@ -22,7 +22,6 @@ classifiers = [
|
||||
"Programming Language :: Python :: Implementation :: CPython",
|
||||
]
|
||||
dependencies = [
|
||||
"accelerate",
|
||||
"cmudict",
|
||||
"cn2an",
|
||||
"g2p_en",
|
||||
@@ -37,10 +36,15 @@ dependencies = [
|
||||
"pypinyin",
|
||||
"pyworld-prebuilt",
|
||||
"safetensors",
|
||||
"torch>=2.1",
|
||||
"transformers",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
torch = [
|
||||
"accelerate",
|
||||
"torch>=2.1",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Documentation = "https://github.com/litagin02/Style-Bert-VITS2#readme"
|
||||
Issues = "https://github.com/litagin02/Style-Bert-VITS2/issues"
|
||||
@@ -68,6 +72,7 @@ packages = ["style_bert_vits2"]
|
||||
|
||||
[tool.hatch.envs.test]
|
||||
dependencies = ["coverage[toml]>=6.5", "pytest", "scipy"]
|
||||
features = ["torch"]
|
||||
[tool.hatch.envs.test.scripts]
|
||||
# Usage: `hatch run test:test`
|
||||
test = "pytest {args:tests}"
|
||||
@@ -77,6 +82,8 @@ test-cov = "coverage run -m pytest {args:tests}"
|
||||
cov-report = ["- coverage combine", "coverage report"]
|
||||
# Usage: `hatch run test:cov`
|
||||
cov = ["test-cov", "cov-report"]
|
||||
[[tool.hatch.envs.test.matrix]]
|
||||
python = ["3.9", "3.10", "3.11"]
|
||||
|
||||
[tool.hatch.envs.style]
|
||||
detached = true
|
||||
@@ -94,9 +101,6 @@ fmt = [
|
||||
"check",
|
||||
]
|
||||
|
||||
[[tool.hatch.envs.test.matrix]]
|
||||
python = ["3.9", "3.10", "3.11"]
|
||||
|
||||
[tool.coverage.run]
|
||||
source_pkgs = ["style_bert_vits2", "tests"]
|
||||
branch = true
|
||||
|
||||
Reference in New Issue
Block a user