ComfyUI fails to start with a `RuntimeError` due to a CUDA version mismatch between PyTorch and TorchAudio.
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
## Bug: TorchAudio/PyTorch CUDA version mismatch in v0.24.0
**Describe the bug**
ComfyUI fails to start with a `RuntimeError` due to a CUDA version mismatch between PyTorch and TorchAudio.
**Error**
```
RuntimeError: Detected that PyTorch and TorchAudio were compiled with different CUDA versions.
PyTorch has CUDA version 13.0 whereas TorchAudio has CUDA version 12.8.
Please install the TorchAudio version that matches your PyTorch version.
```
**Full traceback path**
```
main.py -> execution.py -> latent_preview.py -> comfy/sd.py
-> comfy/ldm/lightricks/vae/audio_vae.py -> torchaudio
```
**Environment**
- Image: `ghcr.io/clsferguson/comfyui-docker:v0.24.0`
- GPU: NVIDIA A40
- PyTorch version (inside container): `2.12.0+cu130`
- TorchAudio CUDA version: `12.8`
**Root cause**
The image appears to have been built with PyTorch from the `cu130` (nightly) wheel index, but TorchAudio was pulled from the `cu128` stable index. These need to match.
Per the repo README, the intended base is CUDA 12.8 with PyTorch from the `cu128` wheel index — so either PyTorch was inadvertently upgraded to a nightly cu130 build, or TorchAudio was not updated to match.
**Workaround**
Manually reinstalling a matching TorchAudio nightly inside the running container resolves the issue:
```bash
docker exec -it ComfyUI-latest bash -c \
"pip install --upgrade --pre torchaudio \
--index-url https://download.pytorch.org/whl/nightly/cu130"
docker restart ComfyUI-latest
```
**Expected behavior**
PyTorch and TorchAudio should be pinned to the same CUDA version at build time so the container starts without errors.
**Steps to reproduce**
1. Pull `ghcr.io/clsferguson/comfyui-docker:v0.24.0`
2. Start the container
3. Observe the RuntimeError in container logs
Contributor guide
Assessment
This issue has not been assessed yet.