Free | No tracking | Every fact with a source|German and English

Error / Installation

xFormers can't load C++/CUDA extensions (version conflict)

The installed xFormers does not match the installed PyTorch or Python version, so it is not being used.

The message

WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.x.x+cu128 with CUDA 1208 (you have 2.y.y+cu130) …

Affects: ComfyUI

Why is this happening?

xFormers is built for exactly one PyTorch version. If you update PyTorch, the old xFormers no longer fits. Conversely, pip install xformers can replace the existing PyTorch version. ComfyUI does not strictly need xFormers, because without xFormers it uses PyTorch's built-in attention.

How to fix it

  1. If ComfyUI runs normally despite the warning, you can ignore the warning or start ComfyUI with --disable-xformers.
  2. The cleanest fix: remove xFormers. Portable: .\python_embeded\python.exe -m pip uninstall xformers in the ComfyUI_windows_portable folder. Manually in the activated venv: pip uninstall xformers.
  3. If you need xFormers for a specific node, install the version that matches your CUDA variant, e.g. pip install -U xformers --index-url https://download.pytorch.org/whl/cu130 (with Portable use .\python_embeded\python.exe -m pip).
  4. Then check whether PyTorch is still the CUDA version: python -c "import torch; print(torch.__version__, torch.cuda.is_available())". If not, see the entry “CUDA gone after installing a custom node.”

Better not: Do not install xFormers with a simple pip install xformers without an index URL. That can replace your CUDA version of PyTorch.

Set up from scratch again

If it still doesn’t work after that, a fresh setup step by step often helps:

Terms for this

Similar errors

Sources

Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.