Torch not compiled with CUDA enabled?

#10
by jattoedaltni - opened

I have torch + vision/audio installed (seems it's in the reqs)
I'm still getting:

AssertionError: Torch not compiled with CUDA enabled

Try this from your virtual environment. It complains about it being the wrong version for chatterbox, but it works fine on my end.

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

Same issue, if you create a new environment you need to add "pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121" as indicated by Deadtaco

I modified the pyproject.toml as follows (can be used with uv or call with
pip install -e . --extra-index-url https://download.pytorch.org/whl/cu121

[project]
name = "chatterbox-tts"
version = "0.1.6"
description = "Chatterbox: Open Source TTS and Voice Conversion by Resemble AI"
readme = "README.md"
requires-python = ">=3.10"
license = {file = "LICENSE"}
authors = [
{name = "resemble-ai", email = "[email protected]"}
]
dependencies = [
"numpy>=1.24.0,<1.26.0",
"librosa==0.11.0",
"s3tokenizer",
"torch==2.5.1+cu121",
"torchvision==0.20.1+cu121",
"torchaudio==2.5.1+cu121",
"transformers==4.46.3",
"diffusers==0.29.0",
"resemble-perth==1.0.1",
"conformer==0.3.2",
"safetensors==0.5.3",
"spacy-pkuseg",
"pykakasi==2.3.0",
"gradio==5.44.1",
"pyloudnorm",
"omegaconf",
"ffmpeg<8",
"torchcodec"
]

[project.urls]
Homepage = "https://github.com/resemble-ai/chatterbox"
Repository = "https://github.com/resemble-ai/chatterbox"

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
where = ["src"]

[[tool.uv.index]]
name = "pytorch-cu121"
url = "https://download.pytorch.org/whl/cu121"
explicit = true

[tool.uv.sources]
torch = { index = "pytorch-cu121" }
torchvision = { index = "pytorch-cu121" }
torchaudio = { index = "pytorch-cu121" }

Sign up or log in to comment