Warning: Latest version of xformers and subsequent Pytorch compatibility issues broke my ComfyUI
mozophe opened this issue · 1 comments
The latest version of xformers is built for Pytorch 2.3.0.
Issue
The first error that I got was "Torch not compiled with CUDA enabled".
Installing Pytorch 2.3.0 with CUDA to fix this broke my ComfyUI. Rolling back to an older Pytorch version using the command on ComfyUI github page brought ComfyUI back to life, but now xformers was not compatible with this version of Pytorch anymore.
Creating this issue so that others who face the same problem have a solution readily available.
Solution:
Install an older version of Pytorch as per the instructions on the ComfyUI github page: https://github.com/comfyanonymous/ComfyUI
As I have Nvidia GPU, for me it was below command. This installs Pytorch 2.1.2 + cu121
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121
Install a version of xformers compatible with Pytorch installed on the system
For Pytorch 2.1.2, it's xformers v0.0.23.post1 (https://github.com/facebookresearch/xformers/releases)
pip install xformers==0.0.23.post1
Now, ComfyUI is running without any issues.
Thank you for sharing this info!