Stable Diffusion xformers Error After Update
Quick answer
xformers must match your exact torch and CUDA versions. After an update, reinstall matching versions or run without xformers (the 'No module xformers' notice is harmless).
Most likely fix: Match versions
How to fix it
Try these in order — the most common fix is first.
1. Match versions
- Activate the venv
- Install the torch build for your CUDA version, then the xformers release that requires that exact torch
- Example reported to work: torch 2.7.0 with xformers 0.0.30
Did this fix it?2. Skip xformers
- 'No module xformers. Proceeding without it.' is only a notice
- Remove --xformers from COMMANDLINE_ARGS or use --opt-sdp-attention
Did this fix it?3. Start clean
- Delete the venv folder and relaunch to reinstall dependencies
Did this fix it?
Symptoms
Errors importing xformers, 'Couldn't install xformers', or version mismatch messages right after updating the UI or torch.
Why it happens
- Update bumped torch but left an older xformers
- xformers built for another CUDA version
- Torch not installed yet when xformers builds
This guide also covers
- stable diffusion xformers error
- xformers not working automatic1111
- couldn't install xformers
Still not working?
If Stable Diffusion keeps failing, you're not alone. See every Stable Diffusion problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usThe same problem in other apps
All not loading, error messages & connection guides →
Midjourney Job Failed or Internal Server Error (Midjourney)
Other Stable Diffusion errors
- Stable Diffusion CUDA Out of Memory Error
- Stable Diffusion "Torch is not able to use GPU" Error
- Stable Diffusion Black Images and NaN Error
- Stable Diffusion Model Failed to Load, Exiting
- Stable Diffusion Very Slow on Mac (M1, M2, M3)
- Stable Diffusion Not Using AMD GPU (Slow, CPU Only)
- Stable Diffusion "Couldn't install torch" Error
- Stability AI API 402 Insufficient Credits Error