Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

xformers not working via install script #127

Open
raziel2001au opened this issue Apr 10, 2023 · 7 comments
Open

xformers not working via install script #127

raziel2001au opened this issue Apr 10, 2023 · 7 comments

Comments

@raziel2001au
Copy link

Using the install script on Windows, it looks like there is a version mismatch with the dependencies it sets up in the environment, when I start up the software straight after using the install script, I get the following warning, and from what I can tell, many features aren't working, likely related to xformers:

Environment name is set as "ST" as per environment.yaml
anaconda3/miniconda3 detected in C:\Users\Francois\anaconda3
Starting conda environment "ST" from C:\Users\Francois\anaconda3
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
    PyTorch 1.13.1+cu117 with CUDA 1107 (you have 2.0.0+cu117)
    Python  3.10.10 (you have 3.10.0)
  Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
  Memory-efficient attention, SwiGLU, sparse and more won't be available.
  Set XFORMERS_MORE_DETAILS=1 for more details

The warning can be fixed by uninstalling xformers, and then installing the latest version with:

pip uninstall xformers
pip install xformers

I'm not 100% sure how to check, but I think it's working after doing this... Can we please get the dependencies corrected so others don't run into this issue...

@rafstahelin
Copy link

Ran into this as well. Do I just run this pip in StableTuner.cmd?

@raziel2001au
Copy link
Author

I have Anaconda installed, from memory, when you set up StableTuner, it creates an environment called ST, I activated that environment, then ran the pip commands. After that it worked and did some training as well.

@rafstahelin
Copy link

no i am still getting the xformers error

@rafstahelin
Copy link

Ok, small workaround, I copied
pip uninstall xformers
pip install xformers
into the StableTuner.cmd file, at the very end before ::set HasChanges=0
Ran the cmd, it uninstalled and reinstalled the correct version. Then remvoed the pip lines, since no longer needed.
Worked for, thanks to Raziel

@moon47usaco
Copy link

Thank you @rafstahelin

That was easier than activating the env by hand... =]

@raziel2001au
Copy link
Author

raziel2001au commented May 31, 2023

Thank you @rafstahelin

That was easier than activating the env by hand... =]

I'm surprised this is still an issue. Sorry for pinging you directly @devilismyfriend, but is it possible to ask you to look into this? Everyone seems to be running into this issue and I suspect many who haven't fixed it manually probably don't even realise they are running without xformers...

@alenknight
Copy link

this didn't seem to fix for me.... i'm now getting this error

Environment name is set as "ST" as per environment.yaml
anaconda3/miniconda3 detected in C:\ProgramData\anaconda3
Starting conda environment "ST" from C:\ProgramData\anaconda3
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
    PyTorch 2.0.1+cu118 with CUDA 1108 (you have 2.0.1+cpu)
    Python  3.10.11 (you have 3.10.0)
  Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
  Memory-efficient attention, SwiGLU, sparse and more won't be available.
  Set XFORMERS_MORE_DETAILS=1 for more details
warning: redirecting to https://github.com/devilismyfriend/StableTuner.git/
Latest git hash: 4c63853

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants