Skip to content

Commit d0d5b12

Browse files
committed
make cudnn optional, suppress transformers 4.48+ warning, update transformers to 4.49.0
1 parent 11ffd2f commit d0d5b12

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ https://github.com/user-attachments/assets/5581bd53-422b-4a92-9b97-7ee4ea37e09b
8080
Make sure you have ffmpeg downloaded, on windows terminal ( winget install ffmpeg ) or checkout https://ffmpeg.org/download.html then restart shell or vscode, type ffmpeg -version to see if installed correctly
8181

8282
Local XTTS you also might need cuDNN for using nvidia GPU https://developer.nvidia.com/cudnn and make sure C:\Program Files\NVIDIA\CUDNN\v9.5\bin\12.6
83-
is in system PATH or whatever version you downloaded
83+
is in system PATH or whatever version you downloaded, you can also disable cudnn in the XTTS-V2/config.json to "cudnn_enable": false, if you don't want to use it.
8484

8585
### Optional - Download Checkpoints - ONLY IF YOU ARE USING THE LOCAL XTTS
8686

@@ -428,6 +428,10 @@ Invalid handle. Cannot load symbol cudnnCreateTensorDescriptor
428428
```
429429
To resolve this:
430430

431+
You can disable cudnn in the XTTS-V2/config.json and set to "cudnn_enable": false,
432+
433+
or
434+
431435
Install cuDNN: Download cuDNN from the NVIDIA cuDNN page https://developer.nvidia.com/cudnn
432436

433437
Here’s how to add it to the PATH:

app/app.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
from pydub import AudioSegment
2323
from .shared import clients
2424

25+
import logging
26+
logging.getLogger("transformers").setLevel(logging.ERROR) # transformers 4.48+ warning
2527

2628
# Load environment variables
2729
load_dotenv()
@@ -60,6 +62,9 @@
6062
# Check for CUDA availability
6163
device = "cuda" if torch.cuda.is_available() else "cpu"
6264

65+
# Disable CuDNN explicitly - enable this if you get cudnn errors or change in xtts-v2/config.json
66+
# torch.backends.cudnn.enabled = False
67+
6368
# Default model size (adjust as needed)
6469
model_size = "medium.en"
6570

@@ -221,8 +226,6 @@ def sync_play_audio(file_path):
221226

222227
pass
223228

224-
# Model and device setup
225-
# device = 'cuda' if torch.cuda.is_available() else 'cpu'
226229
output_dir = os.path.join(project_dir, 'outputs')
227230
os.makedirs(output_dir, exist_ok=True)
228231

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ soundfile==0.12.1
1313
langid==1.1.6
1414
librosa==0.10.0
1515
scipy==1.11.4
16-
transformers==4.41.2
16+
transformers==4.49.0
1717
pydantic==2.7.4
1818
pillow==10.3.0
1919

requirements_no_xtts.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ soundfile==0.12.1
1111
langid==1.1.6
1212
librosa==0.10.0
1313
scipy==1.11.4
14-
transformers==4.41.2
14+
transformers==4.49.0
1515
pydantic==2.7.4
1616
pillow==10.3.0
1717

0 commit comments

Comments
 (0)