Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic 1111 is able to use xformers on windows can this repo use it as well? #29

Open
aniketgore opened this issue Oct 9, 2022 · 5 comments

Comments

@aniketgore
Copy link

We are able to run automatic 1111 SD repo with xformers on windows, and it's saving half the VRAM on my laptop. Can this repo run on windows?

@nerdyrodent
Copy link

I would have thought so as Facebook fixed the issue with MS Windows failing just recently :)

@Echolink50
Copy link

Echolink50 commented Oct 9, 2022

Thomas-MMJ posted this on the xformers GitHub

"Can confirm it works and gives speed up. Using https://github.com/ShivamShrirao/diffusers/ - which uses xformers in the attention path for diffusers, I get about a 40% speedup on windows.

Currently trying to get it working on the AUTOMATIC1111 fork and it is not working yet. See discussion here,

AUTOMATIC1111/stable-diffusion-webui#1003"

So I guess someone has already used it. Hopefully that means the same <10gb vram usage.

@78Alpha
Copy link

78Alpha commented Oct 20, 2022

Xformers had been up and running on automatic since a few days ago, should be ready for here.

@KhoaVo
Copy link

KhoaVo commented Oct 23, 2022

I tried to install the xformers windows build (provided by automatic) here
https://github.com/C43H66N12O12S2/stable-diffusion-webui/releases/download/f/xformers-0.0.14.dev0-cp310-cp310-win_amd64.whl

However when I run train_dreambooth.py i get

Could not find module 'C:\Users\user1\.conda\envs\diffusersDreamboth\Lib\site-packages\xformers\_C.pyd' (or one of its dependencies). Try using the full path with constructor syntax.
WARNING:root:WARNING: Could not find module 'C:\Users\user1\.conda\envs\diffusersDreamboth\Lib\site-packages\xformers\_C.pyd' (or one of its dependencies). Try using the full path with constructor syntax.
Need to compile C++ extensions to get sparse attention suport. Please run python setup.py build develop

You can also get this error by doing
import xformers
in the python terminal

I noticed that the automatic repo imports it like this instead
import xformers.ops and it works fine there

Any idea what's going on?

@Echolink50
Copy link

I tried to install the xformers windows build (provided by automatic) here https://github.com/C43H66N12O12S2/stable-diffusion-webui/releases/download/f/xformers-0.0.14.dev0-cp310-cp310-win_amd64.whl

However when I run train_dreambooth.py i get

Could not find module 'C:\Users\user1\.conda\envs\diffusersDreamboth\Lib\site-packages\xformers\_C.pyd' (or one of its dependencies). Try using the full path with constructor syntax.
WARNING:root:WARNING: Could not find module 'C:\Users\user1\.conda\envs\diffusersDreamboth\Lib\site-packages\xformers\_C.pyd' (or one of its dependencies). Try using the full path with constructor syntax.
Need to compile C++ extensions to get sparse attention suport. Please run python setup.py build develop

You can also get this error by doing import xformers in the python terminal

I noticed that the automatic repo imports it like this instead import xformers.ops and it works fine there

Any idea what's going on?

Not sure but You might need Visual Studio with c++ extension.

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

No branches or pull requests

5 participants