Skip to content

Build and README adjustments #55

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

ksomml
Copy link

@ksomml ksomml commented May 29, 2025

PROBLEM:
As recommended in the current README:

pip install chatterbox-tts

will not install torch and torchvision with a precompiled CUDA version, thus you won't be able to execute the example file given here https://github.com/resemble-ai/chatterbox?tab=readme-ov-file#usage any other examples using CUDA due to:

model = ChatterboxTTS.from_pretrained(device="cuda")

SOLUTION: 5a8aa64

docs: add prerequisites, adjust installation section and adjust general formatting


PROBLEM:
The numpy dependency in https://github.com/resemble-ai/chatterbox/blob/master/pyproject.toml is 1.26.0

Python >= 3.13 does not support numpy==1.26.0, only Python <3.13

SOLUTION: 507763a

ops: adjust python version range


PROBLEM:

Executing https://github.com/resemble-ai/chatterbox/blob/master/example_tts.py gives this warning:

C:\...\chatterbox\.venv\Lib\site-packages\perth\perth_net\__init__.py:1:
UserWarning: pkg_resources is deprecated as an API.
See https://setuptools.pypa.io/en/latest/pkg_resources.html.
The pkg_resources package is slated for removal as early as 2025-11-30.
Refrain from using this package or pin to Setuptools<81.

SOLUTION (temporary): d4d9852 (this won't suppress the warning though)

ops: pin setuptools<81.0.0


Everything was tested in a virtual environment and the https://github.com/resemble-ai/chatterbox/blob/master/example_tts.py

(.venv) PS C:\Development\chatterbox> python .\check.py
Python Executable: C:\Development\chatterbox\.venv\Scripts\python.exe
Python Version: 3.12.8 (tags/v3.12.8:2dc476b, Dec  3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)]
Platform: Windows-11-10.0.26100-SP0
Virtual Env Root: C:\Development\chatterbox\.venv
Site-Packages Directory: ['C:\\Development\\chatterbox\\.venv', 'C:\\Development\\chatterbox\\.venv\\Lib\\site-packages']

Installed Packages:
Package                Version
---------------------- -----------
antlr4-python3-runtime 4.9.3
audioread              3.0.1
certifi                2025.4.26
cffi                   1.17.1
cfgv                   3.4.0
charset-normalizer     3.4.2
chatterbox-tts         0.1.1
colorama               0.4.6
conformer              0.3.2
decorator              5.2.1
diffusers              0.29.0
distlib                0.3.9
einops                 0.8.1
filelock               3.18.0
fsspec                 2025.5.1
huggingface-hub        0.32.2
identify               2.6.12
idna                   3.10
importlib_metadata     8.7.0
Jinja2                 3.1.6
joblib                 1.5.1
lazy_loader            0.4
librosa                0.10.0
llvmlite               0.44.0
MarkupSafe             3.0.2
mpmath                 1.3.0
msgpack                1.1.0
networkx               3.5
nodeenv                1.9.1
numba                  0.61.2
numpy                  1.26.0
omegaconf              2.3.0
onnx                   1.18.0
packaging              25.0
pillow                 11.2.1
pip                    25.1.1
platformdirs           4.3.8
pooch                  1.8.2
pre_commit             4.2.0
protobuf               6.31.1
pycparser              2.22
PyYAML                 6.0.2
regex                  2024.11.6
requests               2.32.3
resampy                0.4.3
resemble-perth         1.0.1
s3tokenizer            0.1.7
safetensors            0.5.3
scikit-learn           1.6.1
scipy                  1.15.3
setuptools             80.9.0
soundfile              0.13.1
soxr                   0.5.0.post1
sympy                  1.13.1
threadpoolctl          3.6.0
tokenizers             0.20.3
torch                  2.6.0+cu124
torchaudio             2.6.0+cu124
tqdm                   4.67.1
transformers           4.46.3
typing_extensions      4.13.2
urllib3                2.4.0
virtualenv             20.31.2
zipp                   3.22.0

@AcTePuKc
Copy link

You can use it with Cuda 12.8 as well with nightly build Pytorch 128

@ksomml
Copy link
Author

ksomml commented May 29, 2025

You can use it with Cuda 12.8 as well with nightly build Pytorch 128

/edit: Did you try that out? I initially added a note mentioning only CUDA 12.6, 12.4 and 11.8.

@AcTePuKc
Copy link

yes for people that had installed it and are lazy to downgrade (similar to me) for CUDA 12.8 the download has to be - https://download.pytorch.org/whl/nightly/cu128

@ksomml
Copy link
Author

ksomml commented May 29, 2025

Tried testing this by using:

pip install chatterbox-tts --extra-index-url https://download.pytorch.org/whl/nightly/cu128

in a fresh virtual environment. This did not install the torch==2.6.0+cu128 & torchvision==2.6.0+cu128 packages for me but the normal ones without a precompiled CUDA. I believe I am missing some prerequisites then if you say it worked for you.

@AcTePuKc
Copy link

Yeah, man ... because you have CUDA 12.6 : it doesn't matter if you install in separate galaxy - if you have cuda xxx - you need pytorch xxx 😄
check out my repos and download the intall_torch.py - run it on any new project when it requires pytorch - you'll not ever think to do something different - it has to be run last

@ksomml
Copy link
Author

ksomml commented May 29, 2025

I did not install any CUDA toolkits locally on my machine. Just used a virtual environment to install Pytorch with the specific precompiled CUDA version inside it, as shown with the command above (just with cu126 and cu124). Tested it with CUDA 12.4 and 12.6. Both worked inside the my virtual environment. According to the 'nvidia-smi' command, my GPU supports CUDA up to version 12.9 so not sure why pip could not find the according package with cu128.

@juangea
Copy link

juangea commented May 30, 2025

@ksomml before installing pytorch with cuda uninstall all the pytorch versions:

pip3 uninstall torch torchvision torchaudio

Then install it again:

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128

This worked for me.

@ksomml
Copy link
Author

ksomml commented May 30, 2025

@juangea for every new test i always purge the cache and create a new venv. Can you list your package names? It should say something like torch==2.6.0+cu128 then if it worked correctly

@TeddyRuncorn
Copy link

yes for people that had installed it and are lazy to downgrade (similar to me) for CUDA 12.8 the download has to be - https://download.pytorch.org/whl/nightly/cu128

All working now, thanks for the information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants