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

Google Colab Pro - xfromers needs to be reinstalled #2788

Closed
SDPDVADER opened this issue Mar 13, 2024 · 38 comments
Closed

Google Colab Pro - xfromers needs to be reinstalled #2788

SDPDVADER opened this issue Mar 13, 2024 · 38 comments

Comments

@SDPDVADER
Copy link

WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.1.0+cu121 with CUDA 1202 (you have 2.2.1+cu121)
Python 3.10.12 (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

@HaikenEdge
Copy link

For reference, have this on Google Colab Pro as well.

@SDPDVADER SDPDVADER changed the title xfromers needs to be reinstalled Google Colab Pro - xfromers needs to be reinstalled Mar 13, 2024
@FackJox
Copy link

FackJox commented Mar 13, 2024

Also getting this issue, have tried some old fixes/workarounds resulting in the same error

@KyotoLyon
Copy link

same error here

@Maximb1985
Copy link

Maximb1985 commented Mar 13, 2024

I have the same error:(

@Maximb1985
Copy link

Maximb1985 commented Mar 13, 2024

Found a temporary solution in old records. Pardon my English. You need to insert this text into
"Connect Google Drive":

!pip install lmdb
!pip install torch==2.1.0+cu118 torchvision==0.16.0+cu118 torchaudio==2.1.0 torchtext==0.16.0+cpu torchdata==0.7.0 --index-url https://download.pytorch.org/whl/cu118

@HaikenEdge
Copy link

Found a temporary solution in old records. Pardon my English. You need to insert this text into "Connect Google Drive":

!pip install lmdb !pip install torch==2.1.0+cu118 torchvision==0.16.0+cu118 torchaudio==2.1.0 torchtext==0.16.0+cpu torchdata==0.7.0 --index-url https://download.pytorch.org/whl/cu118

Looks like a working hotfix.

@KyotoLyon
Copy link

Found a temporary solution in old records. Pardon my English. You need to insert this text into "Connect Google Drive":

!pip install lmdb !pip install torch==2.1.0+cu118 torchvision==0.16.0+cu118 torchaudio==2.1.0 torchtext==0.16.0+cpu torchdata==0.7.0 --index-url https://download.pytorch.org/whl/cu118

I used the code and it seems to be working

@Ptentacle1
Copy link

This didn't work for me. Everything loads fine, but as soon as the webui is launched and I try to generate anything, the gradio connection just gets killed and I get the "connection errored out." Then if I try to relaunch SD I get a miles long list of error messages.

@DjNastyMagic
Copy link

NotImplementedError: No operator found for memory_efficient_attention_forward with inputs: query : shape=(2, 6144, 8, 40) (torch.float32) key : shape=(2, 6144, 8, 40) (torch.float32) value : shape=(2, 6144, 8, 40) (torch.float32) attn_bias : <class 'NoneType'> p : 0.0 decoderF is not supported because: xFormers wasn't build with CUDA support attn_bias type is <class 'NoneType'> operator wasn't built - see python -m xformers.info for more info flshattF@0.0.0 is not supported because: xFormers wasn't build with CUDA support requires device with capability > (8, 0) but your GPU has capability (7, 5) (too old) dtype=torch.float32 (supported: {torch.bfloat16, torch.float16}) operator wasn't built - see python -m xformers.info for more info tritonflashattF is not supported because: xFormers wasn't build with CUDA support requires device with capability > (8, 0) but your GPU has capability (7, 5) (too old) dtype=torch.float32 (supported: {torch.bfloat16, torch.float16}) operator wasn't built - see python -m xformers.info for more info triton is not available requires GPU with sm80 minimum compute capacity, e.g., A100/H100/L4 Only work on pre-MLIR triton for now cutlassF is not supported because: xFormers wasn't build with CUDA support operator wasn't built - see python -m xformers.info for more info smallkF is not supported because: max(query.shape[-1] != value.shape[-1]) > 32 xFormers wasn't build with CUDA support operator wasn't built - see python -m xformers.info for more info unsupported embed per head: 40
Time taken: 1.1 sec.

@osm14wave
Copy link

osm14wave commented Mar 14, 2024

Found a temporary solution in old records. Pardon my English. You need to insert this text into "Connect Google Drive":

!pip install lmdb !pip install torch==2.1.0+cu118 torchvision==0.16.0+cu118 torchaudio==2.1.0 torchtext==0.16.0+cpu torchdata==0.7.0 --index-url https://download.pytorch.org/whl/cu118

Unfortunately I got an error. Maybe we need to update the text? 118→121

@momoci0704
Copy link

I got the same error.

@A3734
Copy link

A3734 commented Mar 14, 2024

me too (TT

@HaikenEdge
Copy link

This didn't work for me. Everything loads fine, but as soon as the webui is launched and I try to generate anything, the gradio connection just gets killed and I get the "connection errored out." Then if I try to relaunch SD I get a miles long list of error messages.

Don't know what to say; it's working fine for me with the hotfix.

@olowwwlolololo
Copy link

Hello. Please share screenshots of your notebook with me. I don't understand what to do with the provided code

@TooAiArt
Copy link

Hello. Please share screenshots of your notebook with me. I don't understand what to do with the provided code

In the connect google drive cell I have put under "--#@markdown ---":

!pip install lmdb
!pip install torch==2.1.0+cu118 torchvision==0.16.0+cu118 torchaudio==2.1.0 torchtext==0.16.0+cpu torchdata==0.7.0 --index-url https://download. pytorch.org/whl/cu118

and at the moment it works for me

@olowwwlolololo
Copy link

Hello. Please share screenshots of your notebook with me. I don't understand what to do with the provided code

In the connect google drive cell I have put under "--#@markdown ---":

!pip install lmdb !pip install torch==2.1.0+cu118 torchvision==0.16.0+cu118 torchaudio==2.1.0 torchtext==0.16.0+cpu torchdata==0.7.0 --index-url https://download. pytorch.org/whl/cu118

and at the moment it works for me

I still need a screenshot. 🗿

@A3734
Copy link

A3734 commented Mar 14, 2024

I think this method is fine for now. Please insert the code before "Connect Google Drive" like in the screenshot.

!pip install lmdb
!pip install torch==2.1.0+cu118 torchvision==0.16.0+cu118 torchaudio==2.1.0 torchtext==0.16.0+cpu torchdata==0.7.0 --index-url https://download.pytorch.org/whl/cu118
スクリーンショット 2024-03-14 204144

@momoci0704
Copy link

Installing collected packages: lmdb
Successfully installed lmdb-1.4.1
ERROR: Invalid requirement: '//download.pytorch.org/whl/cu118'
Hint: It looks like a path. File '//download.pytorch.org/whl/cu118' does not exist.

I get this error message

@A3734
Copy link

A3734 commented Mar 14, 2024

How about this code?
!pip install -q torch==2.1.2+cu121 torchvision==0.16.2+cu121 torchaudio==2.1.2+cu121 torchtext==0.16.2 torchdata==0.7.1 --extra-index-url https://download.pytorch.org/whl/cu121 -U

@dymension
Copy link

Found a temporary solution in old records. Pardon my English. You need to insert this text into "Connect Google Drive":

!pip install lmdb !pip install torch==2.1.0+cu118 torchvision==0.16.0+cu118 torchaudio==2.1.0 torchtext==0.16.0+cpu torchdata==0.7.0 --index-url https://download.pytorch.org/whl/cu118

Works great, thanks Maxim

@olowwwlolololo
Copy link

I think this method is fine for now. Please insert the code before "Connect Google Drive" like in the screenshot.

!pip install lmdb !pip install torch==2.1.0+cu118 torchvision==0.16.0+cu118 torchaudio==2.1.0 torchtext==0.16.0+cpu torchdata==0.7.0 --index-url https://download.pytorch.org/whl/cu118 スクリーンショット 2024-03-14 204144

Thank you so much for the screenshot! I didn't understand at all what to do with the provided code, but your screenshot helped me a lot.

@dymension
Copy link

image

@Azura-13
Copy link

Same

@aifantasyglam
Copy link

Found a temporary solution in old records. Pardon my English. You need to insert this text into "Connect Google Drive":

!pip install lmdb !pip install torch==2.1.0+cu118 torchvision==0.16.0+cu118 torchaudio==2.1.0 torchtext==0.16.0+cpu torchdata==0.7.0 --index-url https://download.pytorch.org/whl/cu118

It works, thanks a lot

@osm14wave
Copy link

Works great, thanks Maxim

How about this code? !pip install -q torch==2.1.2+cu121 torchvision==0.16.2+cu121 torchaudio==2.1.2+cu121 torchtext==0.16.2 torchdata==0.7.1 --extra-index-url https://download.pytorch.org/whl/cu121 -U

It works, thanks a lot!

@momoci0704
Copy link

Putting the text in front of or in the "Connect Google Drive" does not change the error.
Thanks a lot for your help.

@aifantasyglam
Copy link

Putting the text in front of or in the "Connect Google Drive" does not change the error. Thanks a lot for your help.

put the code befor the "start stable diffusion"

image

@momoci0704
Copy link

The image can now be generated.
Thank you all!

@TheLastBen
Copy link
Owner

fixed, update to the latest notebook and you won't need to install any additional package

@marsellerai
Copy link

Use rundiffusion.com. I am happy with that.

@LIQUIDMIND111
Copy link

!pip install lmdb
!pip install torch==2.1.0+cu118 torchvision==0.16.0+cu118 torchaudio==2.1.0 torchtext==0.16.0+cpu torchdata==0.7.0 --index-url https://download. pytorch.org/whl/cu118

how do i update to the latest note book? i thought if you click on the collab section it will take you to the latest version of dreambooth? or where do i have to click then?

@TheLastBen
Copy link
Owner

Simply click on the thumbnail on the main page of the repo

@aifantasyglam
Copy link

Hello everyone, there is a new update that is required, what part of the code should I modify...?

Message:
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.2.1+cu121 with CUDA 1201 (you have 2.1.0+cu118)
Python 3.10.13 (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

@aifantasyglam
Copy link

Hello everyone, there is a new update that is required, what part of the code should I modify...?

Message: WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.2.1+cu121 with CUDA 1201 (you have 2.1.0+cu118) Python 3.10.13 (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

Hello again everyone, according the documentation, using only this line is enough to solve the issue:
!pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121

and is true, I tried and it worked

@HaikenEdge
Copy link

Hello everyone, there is a new update that is required, what part of the code should I modify...?
Message: WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.2.1+cu121 with CUDA 1201 (you have 2.1.0+cu118) Python 3.10.13 (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

Hello again everyone, according the documentation, using only this line is enough to solve the issue: !pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121

and is true, I tried and it worked

Fixed for now; I imagine @TheLastBen will make an update to the notebook to resolve the issue in due time.

@aifantasyglam
Copy link

Hello everyone, there is a new update that is required, what part of the code should I modify...?
Message: WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.2.1+cu121 with CUDA 1201 (you have 2.1.0+cu118) Python 3.10.13 (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

Hello again everyone, according the documentation, using only this line is enough to solve the issue: !pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121
and is true, I tried and it worked

Fixed for now; I imagine @TheLastBen will make an update to the notebook to resolve the issue in due time.

I guess so

@TheLastBen
Copy link
Owner

fixed

@aifantasyglam
Copy link

fixed

Thanks a lot

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