fast-stable-diffusion icon indicating copy to clipboard operation
fast-stable-diffusion copied to clipboard

Google Colab Pro - xfromers needs to be reinstalled

Open SDPDVADER opened this issue 1 year ago • 32 comments

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

SDPDVADER avatar Mar 13 '24 18:03 SDPDVADER

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

HaikenEdge avatar Mar 13 '24 19:03 HaikenEdge

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

FackJox avatar Mar 13 '24 19:03 FackJox

same error here

KyotoLyon avatar Mar 13 '24 19:03 KyotoLyon

I have the same error:(

Maximb1985 avatar Mar 13 '24 20:03 Maximb1985

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

Maximb1985 avatar Mar 13 '24 20:03 Maximb1985

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.

HaikenEdge avatar Mar 13 '24 21:03 HaikenEdge

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

KyotoLyon avatar Mar 13 '24 21:03 KyotoLyon

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.

Ptentacle1 avatar Mar 14 '24 00:03 Ptentacle1

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 [email protected] 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.

DjNastyMagic avatar Mar 14 '24 03:03 DjNastyMagic

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

osm14wave avatar Mar 14 '24 05:03 osm14wave

I got the same error.

momoci0704 avatar Mar 14 '24 06:03 momoci0704

me too (TT

A3734 avatar Mar 14 '24 07:03 A3734

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.

HaikenEdge avatar Mar 14 '24 07:03 HaikenEdge

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

olowwwlolololo avatar Mar 14 '24 10:03 olowwwlolololo

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

TooAiArt avatar Mar 14 '24 10:03 TooAiArt

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. 🗿

olowwwlolololo avatar Mar 14 '24 11:03 olowwwlolololo

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

A3734 avatar Mar 14 '24 11:03 A3734

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

momoci0704 avatar Mar 14 '24 11:03 momoci0704

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

A3734 avatar Mar 14 '24 12:03 A3734

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

dymension avatar Mar 14 '24 13:03 dymension

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.

olowwwlolololo avatar Mar 14 '24 14:03 olowwwlolololo

image

dymension avatar Mar 14 '24 14:03 dymension

Same

Azura-13 avatar Mar 14 '24 22:03 Azura-13

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

aifantasyglam avatar Mar 15 '24 00:03 aifantasyglam

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!

osm14wave avatar Mar 15 '24 01:03 osm14wave

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

momoci0704 avatar Mar 15 '24 03:03 momoci0704

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

aifantasyglam avatar Mar 15 '24 06:03 aifantasyglam

The image can now be generated. Thank you all!

momoci0704 avatar Mar 15 '24 06:03 momoci0704

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

TheLastBen avatar Mar 15 '24 15:03 TheLastBen

Use rundiffusion.com. I am happy with that.

marsellerai avatar Mar 25 '24 02:03 marsellerai