-
Notifications
You must be signed in to change notification settings - Fork 27k
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
[Bug]: xformers can't be installed by default on Ubuntu 20.02 #4942
Comments
build xformer manually in this case, u better upgrade pip first https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Xformers |
The link says "If you use a Pascal, Turing, Ampere, Lovelace or Hopper card with Python 3.10, you shouldn't need to build manually anymore. Uninstall your existing xformers and launch the repo with --xformers. A compatible wheel will be installed." This is wrong, btw: $ ./webui.sh --port=1234 --xformers
################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################
################################################################
Running on XXXX user
################################################################
################################################################
Repo already cloned, using it as install directory
################################################################
################################################################
Create and activate python venv
################################################################
################################################################
Launching launch.py...
################################################################
Python 3.10.4 (main, Sep 21 2022, 21:03:14) [GCC 11.3.0]
Commit hash: 828438b4a190759807f9054932cae3a8b880ddf1
Installing xformers
Traceback (most recent call last):
File "/home/strube1/stable-diffusion-webui/launch.py", line 250, in <module>
prepare_enviroment()
File "/home/strube1/stable-diffusion-webui/launch.py", line 192, in prepare_enviroment
run_pip("install xformers", "xformers")
File "/home/strube1/stable-diffusion-webui/launch.py", line 63, in run_pip
return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
File "/home/strube1/stable-diffusion-webui/launch.py", line 34, in run
raise RuntimeError(message)
RuntimeError: Couldn't install xformers.
Command: "/home/strube1/stable-diffusion-webui/venv/bin/python3" -m pip install xformers --prefer-binary
Error code: 1
stdout: Collecting xformers
Using cached xformers-0.0.13.tar.gz (292 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
stderr: error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-5lhfgy4w/xformers_c5a25e633f80438abd1c242588724677/setup.py", line 239, in <module>
ext_modules=get_extensions(),
File "/tmp/pip-install-5lhfgy4w/xformers_c5a25e633f80438abd1c242588724677/setup.py", line 157, in get_extensions
raise RuntimeError(
RuntimeError: CUTLASS submodule not found. Did you forget to run `git submodule update --init --recursive` ?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
|
I'm getting this behaviour as well. After pulling the latest and restarting, I got the message:
This message goes away and I can generate images again if I delete the xformers repository. If I run Re-installing xformers manually by deleting the repository directory and rebuilding it goes smoothly. But also results in the 'NotImplementedError' again. |
it works for ubuntu 22.04 and python 3.10:
|
I'm still having this issue on win10, WSL, ubuntu 20.04.5
|
It works!! thanks! |
Works on 20.04 but using compilation instead wheel: |
Having same issue Ubuntu 22.04.1 LTS |
For anyone like myself who initially attempted the fix here #2073 you may need to do a bit of cleanup. For context: I am on Ubuntu 22.04 with an RTX 3080. I have several versions of CUDA installed although none of it is hard referenced in environment variables. First I had to unset the environment variables: unset FORCE_CUDA
unset TORCH_CUDA_ARCH_LIST I'm not sure if the second one was necessary, but the first was actually causing the build to fail strangely indicating it couldn't find CUDA. Like the windows xformers build process described in the wiki here I used a venv to build xformers (adjusting to I'm not clear if this was necessary or even worked in the end, but at some point I had success building xformers by installing CUDA 11.7 (it worked with 11.8 but had a ton of warnings and resulting install didn't seem to work - but maybe I did something different) and running Once I got a successful build the trick was source ../../venv/bin/activate
pip install -e . --install-option develop finally I was able to get it up and running with no errors bash webui.sh --xformers not sure if there's any advantage to this over using |
Closing as stale. |
Is there an existing issue for this?
What happened?
Running
./webui.sh --xformers
causes application to crash. Full error output:Steps to reproduce the problem
Run
./webui.sh --xformers
What should have happened?
It should launch the thing with xformers.
Commit where the problem happens
828438b
What platforms do you use to access UI ?
Ubuntu 20.02
What browsers do you use to access the UI ?
Naenara
Command Line Arguments
Additional information, context and logs
I was able to force installation of xformers by explicitly stating version 0.0.12 in
launch.py
:However, it doesn't work, and produces following output:
The text was updated successfully, but these errors were encountered: