Can't install Xformers on WSL2 Ubuntu #5827
Replies: 2 comments 2 replies
-
This is because in WSL there's no official CUDA support until cuda 1.2, however, pytorch is currently at Cuda 1.17. So you're NOT gonna be able to get xformers to work in WSL. I've spent several hours on this before elected to doing it natively instead on Windows. If you're on windows, just do it natively using the same guide for linux, this works for Windows too go to the webui directory For the last step, you might hit an error with the link, let me know if you do. |
Beta Was this translation helpful? Give feedback.
-
You still need to install VS build tools 2022 as described in the wiki https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Xformers Then install cuda 1.17, then you start the venv from Windows command prompt (Do not use WSL). Then try the build process again, I would remove the venv entirely and start fresh. Make sure you activate the venv before building. For the last step, you will run into an issue with linking the library files, you will then need to edit this file \venv\Lib\site-packages\torch\include\ATen\Parallel.h and comment the block for the lazy_init_num() inline TORCH_API void lazy_init_num_threads() { Then xformers will be built correctly and you can invoke it from the command line args. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm getting an error I'm having trouble parsing when trying to install Xformers according to the instructions on the Wiki.
I'm running Ubuntu 22.04.1 LTS on WSL2 in Windows 11.
Would love some help if anyone has suggestions. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions