mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 13:40:27 +02:00
Add onnxruntime-gpu installation for Supertonic GPU acceleration - #163
This commit is contained in:
@@ -38,6 +38,8 @@ This method handles everything automatically - installing all dependencies inclu
|
|||||||
#### <b>OPTION 2: Install using uv</b>
|
#### <b>OPTION 2: Install using uv</b>
|
||||||
First, [install uv](https://docs.astral.sh/uv/getting-started/installation/) if you haven't already.
|
First, [install uv](https://docs.astral.sh/uv/getting-started/installation/) if you haven't already.
|
||||||
|
|
||||||
|
The CUDA extras install both GPU-accelerated Kokoro (via PyTorch) and Supertonic (via onnxruntime-gpu).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# For NVIDIA GPUs (CUDA 12.8) - Recommended
|
# For NVIDIA GPUs (CUDA 12.8) - Recommended
|
||||||
uv tool install --python 3.12 abogen[cuda] --extra-index-url https://download.pytorch.org/whl/cu128 --index-strategy unsafe-best-match
|
uv tool install --python 3.12 abogen[cuda] --extra-index-url https://download.pytorch.org/whl/cu128 --index-strategy unsafe-best-match
|
||||||
@@ -65,6 +67,9 @@ venv\Scripts\activate
|
|||||||
# We need to use an older version of PyTorch (2.8.0) until this issue is fixed: https://github.com/pytorch/pytorch/issues/166628
|
# We need to use an older version of PyTorch (2.8.0) until this issue is fixed: https://github.com/pytorch/pytorch/issues/166628
|
||||||
pip install torch==2.8.0+cu128 torchvision==0.23.0+cu128 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128
|
pip install torch==2.8.0+cu128 torchvision==0.23.0+cu128 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128
|
||||||
|
|
||||||
|
# Also install onnxruntime-gpu for Supertonic GPU acceleration:
|
||||||
|
pip install onnxruntime-gpu
|
||||||
|
|
||||||
# For AMD GPUs:
|
# For AMD GPUs:
|
||||||
# Not supported yet, because ROCm is not available on Windows. Use Linux if you have AMD GPU.
|
# Not supported yet, because ROCm is not available on Windows. Use Linux if you have AMD GPU.
|
||||||
|
|
||||||
|
|||||||
@@ -323,6 +323,13 @@ if /I "%IS_NVIDIA%"=="true" (
|
|||||||
pause
|
pause
|
||||||
exit /b
|
exit /b
|
||||||
)
|
)
|
||||||
|
echo Installing onnxruntime-gpu for Supertonic GPU acceleration...
|
||||||
|
%PYTHON_CONSOLE_PATH% -m uv pip install --system onnxruntime-gpu
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo Failed to install onnxruntime-gpu.
|
||||||
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
) else (
|
) else (
|
||||||
echo CUDA is available on NVIDIA GPU.
|
echo CUDA is available on NVIDIA GPU.
|
||||||
)
|
)
|
||||||
@@ -348,6 +355,13 @@ if /I "%IS_NVIDIA%"=="true" (
|
|||||||
pause
|
pause
|
||||||
exit /b
|
exit /b
|
||||||
)
|
)
|
||||||
|
echo Installing onnxruntime-gpu for Supertonic GPU acceleration...
|
||||||
|
%PYTHON_CONSOLE_PATH% -m uv pip install --system onnxruntime-gpu
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo Failed to install onnxruntime-gpu.
|
||||||
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -30,7 +30,7 @@ dependencies = [
|
|||||||
"pip",
|
"pip",
|
||||||
"kokoro>=0.9.4",
|
"kokoro>=0.9.4",
|
||||||
"misaki[zh]>=0.9.4",
|
"misaki[zh]>=0.9.4",
|
||||||
"supertonic>=0.1.0",
|
"supertonic>=1.3.1",
|
||||||
"ebooklib>=0.19",
|
"ebooklib>=0.19",
|
||||||
"beautifulsoup4>=4.13.4",
|
"beautifulsoup4>=4.13.4",
|
||||||
"spacy>=3.8.7,<4.0",
|
"spacy>=3.8.7,<4.0",
|
||||||
@@ -111,11 +111,11 @@ filterwarnings = [
|
|||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
# NVIDIA GPU (Windows) (CUDA 12.6) # uv tool install abogen[cuda126]
|
# NVIDIA GPU (Windows) (CUDA 12.6) # uv tool install abogen[cuda126]
|
||||||
cuda126 = ["torch"]
|
cuda126 = ["torch", "onnxruntime-gpu>=1.26.0"]
|
||||||
# NVIDIA GPU (Windows) (CUDA 12.8) # uv tool install abogen[cuda]
|
# NVIDIA GPU (Windows) (CUDA 12.8) # uv tool install abogen[cuda]
|
||||||
cuda = ["torch"]
|
cuda = ["torch", "onnxruntime-gpu>=1.26.0"]
|
||||||
# NVIDIA GPU (Windows) (CUDA 13.0) # uv tool install abogen[cuda130]
|
# NVIDIA GPU (Windows) (CUDA 13.0) # uv tool install abogen[cuda130]
|
||||||
cuda130 = ["torch"]
|
cuda130 = ["torch", "onnxruntime-gpu>=1.26.0"]
|
||||||
# AMD GPU (Linux) (ROCm 6.4) # uv tool install abogen[rocm]
|
# AMD GPU (Linux) (ROCm 6.4) # uv tool install abogen[rocm]
|
||||||
rocm = ["torch", "pytorch-triton-rocm"]
|
rocm = ["torch", "pytorch-triton-rocm"]
|
||||||
# Development dependencies # uv tool install abogen[dev]
|
# Development dependencies # uv tool install abogen[dev]
|
||||||
|
|||||||
Reference in New Issue
Block a user