Repository navigation
CPU-only Linux package ships the cu124 torchvision wheel: warmup fails with "operator torchvision::nms does not exist" #778
Description
Package: StemDeck-Linux-x64.tar.gz (CPU-only variant, cpu-only marker present), release 0.20.0, runtimeId py3.12-9b2b87d8ac2ddbc3
OS: Linux x86_64 (Debian-based), no NVIDIA GPU, no CUDA libraries on the system
How I installed: extracted the tarball, then ./install.sh --local → ~/.local/opt/stemdeck
What happens
First-run setup logs a failure on the model warmup:
[stemdeck] model warmup: WARMUP_FAILED vocal_split partially initialized module 'torchvision' has no attribute 'extension' (most likely due to a circular import)
and any direct import of torchvision fails:
$ python/bin/python3 -c "import torchvision"
...
File ".../torchvision/_meta_registrations.py", line 163, in <module>
@torch.library.register_fake("torchvision::nms")
...
RuntimeError: operator torchvision::nms does not exist
Why
The CPU package ships the CUDA build of torchvision next to a CPU-only torch.
torchvision/version.py in the package says __version__ = '0.21.0+cu124' while torch is 2.6.0+cpu, and the compiled extension links CUDA:
$ readelf -d python/lib/python3.12/site-packages/torchvision/_C.so | grep -E 'NEEDED|RPATH'
NEEDED libc10.so
NEEDED libtorch.so
NEEDED libtorch_cpu.so
NEEDED libtorch_python.so
NEEDED libcudart.so.12 # not shipped in the CPU package
NEEDED libc10_cuda.so # not shipped
NEEDED libtorch_cuda.so # not shipped
RPATH /__w/_temp/conda_environment_13022746230/lib
image.so additionally needs libnvjpeg.02b6d700.so.12, and torchvision.libs/ bundles libcudart.41118559.so.12 + libnvjpeg.02b6d700.so.12 — about 7.4 MB of CUDA code that can never load on a CPU-only install.
The extension import fails, the failure is swallowed into _HAS_OPS = false, and _meta_registrations then raises operator torchvision::nms does not exist. Same symptom as #614, different cause: the versions here are a matched pair (torch 2.6.0 + torchvision 0.21.0), the build variant is wrong — PyPI's default linux wheel for torchvision==0.21.0 is the cu124 build.
Demucs, beat_this and the section model never touch torchvision, so separation keeps working; the karaoke split (audio-separator → onnx2torch → torchvision) is broken, and setup reports a failure on the package that is supposed to be the clean CPU one.
Steps to reproduce
- Download
StemDeck-Linux-x64.tar.gz(CPU variant) on a machine with no NVIDIA GPU. tar xzf StemDeck-Linux-x64.tar.gz && cd StemDeck-Linux-x64 && ./StemDeck- Let first-run setup run →
logs/setup.logcontainsWARMUP_FAILED vocal_split ... - Direct check:
python/bin/python3 -c "import torchvision"→RuntimeError: operator torchvision::nms does not exist
Expected
The CPU package should ship torchvision-0.21.0+cpu (from https://download.pytorch.org/whl/cpu) so that _C.so and image.so link only libc10, libtorch, libtorch_cpu and libtorch_python, with no torchvision.libs CUDA payloads.
Workaround I applied
Replaced torchvision/_C.so, image.so and version.py with the files from torchvision-0.21.0+cpu-cp312-cp312-linux_x86_64.whl (sha256 d6874431e678ba107b60a83f255c33f3755f06bad587b1b919aa514ec325dcd8) and deleted torchvision.libs/libcudart.*.so.12 and torchvision.libs/libnvjpeg.*.02b6d700.so.12 from both the installed copy and the extracted tarball. After that every warmup step reports WARMUP_OK (demucs, beat_this, sections, vocal_split, whisper) and setup completes.
This looks like the CPU-side counterpart of #615: wherever the CPU pack installs torchvision, it resolves torchvision==0.21.0 from PyPI instead of the matching CPU wheel from the PyTorch index.
Activity