Chatterbox-TTS-Server icon indicating copy to clipboard operation
Chatterbox-TTS-Server copied to clipboard

Linux. requirements-rocm.txt is probably wrong.

Open skafiend opened this issue 10 months ago • 4 comments

# requirements.txt

# Chatterbox TTS engine - Install from chatterbox-v2 fork
chatterbox-tts @ git+https://github.com/devnen/chatterbox-v2.git@master

# Core Web Framework
fastapi
uvicorn[standard]

# Machine Learning & Audio
torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-6.4.1/torch-2.6.0%2Brocm6.4.1.git1ded221d-cp310-cp310-linux_x86_64.whl
torchaudio @ https://repo.radeon.com/rocm/manylinux/rocm-rel-6.4.1/torchaudio-2.6.0%2Brocm6.4.1.gitd8831425-cp310-cp310-linux_x86_64.whl
pytorch-triton-rocm @ https://repo.radeon.com/rocm/manylinux/rocm-rel-6.4.1/pytorch_triton_rocm-3.2.0%2Brocm6.4.1.git6da9e660-cp310-cp310-linux_x86_64.whl

can anyone confirm that pip install -r requirements-rocm.txt works?

I didn't manage to download those packages from https://repo.radeon.com/rocm/, so instead, I manually installed torch, torchaudio and pytorch-triton-rocm from download.pytorch.org, and removed those packages from requirements-rocm.txt. In the file torchaudio-2.6.0 and torch-2.6.0 are specified.

pip3 --no-cache install torch==2.6.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/rocm6.2.4

but in the very end an error popped up:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
chatterbox-tts 0.1.6 requires torch==2.5.1, but you have torch 2.6.0+rocm6.2.4 which is incompatible.
chatterbox-tts 0.1.6 requires torchaudio==2.5.1, but you have torchaudio 2.6.0+rocm6.2.4 which is incompatible.

After that I reinstalled their compatible versions:

pip3 --no-cache install torch==2.5.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/rocm6.1

and now it works just fine.

P.S. Also the start.sh doesn't force Python 3.10 while creating a venv environment, and the file assumes that Python 3.10 is the latest version (torch-2.6.0%2Brocm6.4.1.git1ded221d-cp310-cp310-linux_x86_64.whl), so if your system python version is not 3.10 you get constant errors "filename.wh is not compatible". To get around that I had to create a new virtual environment:

conda create -n chatterbox_310 python=3.10
conda activate chatterbox_310

and only after that the installation properly started.

skafiend avatar Jan 24 '26 16:01 skafiend

Thanks to everyone who helped debug this, especially @normen, @puddotv, @doctorcolossus, and @marcushoff. Your testing and solutions were invaluable.

This is now fixed in commit b181edb. The ROCm installation has been reworked:

  • New requirements-rocm-init.txt installs torch 2.5.1 from PyTorch's official ROCm 6.1 index (as @doctorcolossus and @normen suggested)
  • requirements-rocm.txt no longer includes torch/torchaudio/torchvision
  • Chatterbox is installed with --no-deps to prevent pip from replacing ROCm torch with CPU versions (the issue @normen ran into)
  • Dockerfile.rocm and start.py both handle this automatically now

For manual installation the steps are:

pip install -r requirements-rocm-init.txt
pip install -r requirements-rocm.txt
pip install --no-deps git+https://github.com/devnen/chatterbox-v2.git@master

APU users (like Strix Halo) may still need HSA_OVERRIDE_GFX_VERSION=11.0.0 — this is documented in the AMD ROCm Support Details section of the README.

Please rebuild with --no-cache and let me know if you hit any issues.

devnen avatar Mar 26 '26 21:03 devnen

Just adding some info here,

if you're on arch, make sure that opt/rocm/bin is in your PATH

I also had to use newer versions for my card:

pip3 install torch==2.7.0 torchaudio==2.7.0+rocm6.3 torchvision==0.22.0+rocm6.3 --index-url https://download.pytorch.org/whl/rocm6.3 --force-reinstall

luthis1124 avatar May 19 '26 08:05 luthis1124

I think this also applies to the cpu only install as well

Barrettloganj13 avatar May 21 '26 21:05 Barrettloganj13

Closing as a duplicate of #92, which was fixed in b181edb. The ROCm install was reworked to install torch first from the ROCm 6.1 index via requirements-rocm-init.txt and to install chatterbox with --no-deps so pip does not replace the ROCm torch wheels with the CPU build. Please reopen if you still hit it on a clean install.

devnen avatar May 26 '26 19:05 devnen