Skip to content

[BUG] SadTalker incompatible with PyTorch versions required for NVIDIA RTX 50xx (Blackwell) GPUs – C++ ops failing + keypoint extraction errors #1023

Description

@manucabrio

Hello,
I am reporting this issue because SadTalker currently cannot run in GPU mode on NVIDIA RTX 50xx (Blackwell) laptops, due to incompatibilities between SadTalker’s dependencies (torchvision / facelib / retinaface) and the only versions of PyTorch that support this new architecture.

This is not a configuration error:

  • The issue comes from deprecated or removed torchvision C++ ops required by SadTalker.
  • These ops do not exist anymore in current PyTorch builds compatible with RTX 5080 / CUDA 12.8.

Below is a complete technical report.


  1. System Information

Laptop: MSI Vector 16 HX AI
GPU: NVIDIA GeForce RTX 5080 Laptop GPU (Blackwell architecture)
CPU: Intel Ultra 9
RAM: 32 GB
Storage: 1 TB NVMe SSD
OS: Windows 11 64-bit
Python: 3.10.11
CUDA requirement: RTX 5080 requires CUDA >= 12.8


  1. PyTorch Requirements for RTX 50xx

Stable PyTorch releases do not support the RTX 50xx series yet.

The only PyTorch builds that successfully detect and use the RTX 5080 GPU are NIGHTLY wheels:

torch==2.10.0.dev (CUDA 12.8)
torchvision==0.25.0.dev
torchaudio==2.10.0.dev

Running:

python -c "import torch; print(torch.cuda.is_available(), torch.cuda.get_device_name(0))"

returns:

CUDA dispo = True
Nombre de GPU = 1
Nom GPU = NVIDIA GeForce RTX 5080 Laptop GPU

Meaning the GPU is correctly detected with nightly PyTorch.


  1. Why SadTalker Breaks on RTX 50xx

SadTalker internally relies on:

  • old torchvision.ops APIs
  • legacy C++ ops (NMS, bbox ops)
  • RetinaFace + facelib layers compiled against older ABI
  • functionality removed in torchvision >= 0.25

These APIs no longer exist in current nightly builds of PyTorch.

Attempting to downgrade torchvision to a SadTalker-compatible version (0.15.x) fails because:

  • its C++ ops cannot load under torch nightly
  • ABI is incompatible
  • CUDA versions mismatch

  1. Steps to Reproduce the Issue

  1. Create a new venv:

    python -m venv venv
    venv\Scripts\activate

  2. Install PyTorch nightly:

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

  3. Install SadTalker dependencies:

    pip install -r requirements.txt

  4. Run SadTalker:

    python app_sadtalker.py

The UI loads normally.

  1. Attempt to generate an animation → SadTalker crashes.

  1. Error Logs

ERROR A — C++ ops cannot load:

RuntimeError: Couldn't load custom C++ ops.
This can happen if your PyTorch and torchvision versions are incompatible,
or if you had errors while compiling torchvision from source.

Traceback:

torchvision/ops/boxes.py
torchvision/extension.py
assert_has_ops()

This indicates that torchvision.ops.nms and related ops are not available anymore.


ERROR B — Keypoint extraction fails:

UnboundLocalError: local variable 'keypoints' referenced before assignment

Traceback:

extract_kp_videos_safe.py → extract_keypoint()
retinaface → detect_faces()
py_cpu_nms()
torchvision.ops.nms()

Since torchvision.ops.nms is removed from nightly builds, the detection pipeline crashes and keypoints never initialize.


  1. What Has Already Been Attempted

  • Installing old torchvision:
    pip install torchvision==0.15.2 --no-deps
    → fails (C++ extensions cannot load)

  • Using latest nightly torchvision (0.25.0.dev)
    → breaks SadTalker: missing ops, incompatible APIs

  • Testing all pre-processing modes
    → same issue (NMS fails)

  • Testing multiple images
    → same issue

  • CPU mode
    → works perfectly


  1. Diagnosis (Root Cause)

SadTalker currently depends on:

  • deprecated torchvision.ops APIs
  • C++ ops built for CUDA 11.x
  • RetinaFace detection relying on outdated interfaces

But RTX 5080 requires:

  • PyTorch >= 2.10 nightly
  • CUDA >= 12.8
  • torchvision >= 0.25.x

These environments are not compatible.

Thus:
→ SadTalker cannot currently run in GPU mode on RTX 50xx GPUs.


  1. Requested Feedback / Possible Solutions

Option A — Update SadTalker’s face detection pipeline

  • Replace torchvision.ops.nms with a pure Python implementation
  • Update RetinaFace / facelib to modern torch APIs
  • Remove dependency on torchvision C++ ops

Option B — Provide a “torchvision-free” mode
Useful for environments where torchvision cannot load C++ ops.

Option C — Publish compatibility matrix
To inform users which PyTorch versions are expected to work with SadTalker.

Option D — Provide updated wheels
SadTalker-specific builds for CUDA 12.8 / Blackwell GPUs.


  1. Conclusion

SadTalker works flawlessly in CPU mode, but GPU mode is currently impossible on NVIDIA RTX 50xx (Blackwell) GPUs because:

  • PyTorch stable does not support these GPUs
  • PyTorch nightly removes the legacy ops SadTalker depends on
  • torchvision incompatible C++ ops break the detection pipeline

I am happy to test any patches, branches, or experimental wheels.

Thank you for maintaining this excellent project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions