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
- If ComfyUI runs normally despite the warning, you can ignore the warning or start ComfyUI with
--disable-xformers. - The cleanest fix: remove xFormers. Portable:
.\python_embeded\python.exe -m pip uninstall xformersin theComfyUI_windows_portablefolder. Manually in the activated venv:pip uninstall xformers. - 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). - 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:
- Set up and maintain ComfyUI on Windows
Desktop or Portable, where the models belong, sharing models with other programs, safely installing custom nodes, updates, startup options … - Your First Image with ComfyUI
Install Comfy Desktop, learn the interface, and create your first AI image with FLUX.2 [small] 4B or Z-Image Turbo. - Your First AI Video with LTX in ComfyUI
Use LTX-2.3 in ComfyUI to create short videos with sound from text or an image. Template, files, settings, and license.
Terms for this
Similar errors
Sources
- https://github.com/facebookresearch/xformers/blob/main/README.md
- https://github.com/facebookresearch/xformers/blob/main/xformers/_cpp_lib.py
- https://github.com/Comfy-Org/ComfyUI/blob/master/comfy/cli_args.py
- https://github.com/Comfy-Org/ComfyUI/blob/master/comfy/model_management.py
- https://docs.comfy.org/installation/comfyui_portable_windows
Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.