kohya-ss / sd-scripts

Apache License 2.0
5.12k stars 853 forks source link

No such operator xformers::efficient_attention_forward_cutlass #362

Open kopyl opened 1 year ago

kopyl commented 1 year ago

How to fix it?

Here is the full code: https://pastebin.com/d3xEGEhC

Running Python 3.10.10 and don't want to re-build and re-push and re-download a docker container just to fix this issue.

kopyl commented 1 year ago

This helped:

  1. Uninstalling xformers by pip uninstall xformers
  2. Removing --xformers from the train command

Maybe just removing --xformers from the command could have helped, but i did not test it.

But still need a better fix...

kopyl commented 1 year ago

Maybe it really doesn't work for python3.10.10

Re-building image with python3.10.6 -___–

kopyl commented 1 year ago

Fuck, i spent so much time rebuilding it with python 3.10.6 instead of 3.10.10 and still getting the same error:

No such operator xformers::efficient_attention_forward_cutlass - did you forget to build xformers with `python setup.py develop`

I also tried: apt-get install libgl1 -y apt-get install libglib2.0-0 -y python setup.py develop

Nothing works

kopyl commented 1 year ago

Holly shit.

I just ran pip uninstall xformers and pip install xformers and it worked. Why?

And removed in ubuntu_setup.sh this: pip install -U -I --no-deps https://github.com/C43H66N12O12S2/stable-diffusion-webui/releases/download/linux/xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl

kopyl commented 1 year ago

And also why you don't include apt-get install libgl1 -y and apt-get install libglib2.0-0 -y in the ubuntu_setup.sh script if it's required?

kgonia commented 1 year ago

I had same issue, seems like it's not possible to run without xformers.

I see you mention also ubuntu_setup.sh so you probably refering to different repo (old version, ubuntu_setup.sh is no longer present) with GUI version:

https://github.com/bmaltais/kohya_ss

kopyl commented 1 year ago

@kgonia seems like I am using https://github.com/bmaltais/kohya_ss . Just checked, they removed ubuntu_setup.sh yesterday for some reason...

@kohya-ss sorry

kgonia commented 1 year ago

@kopyl bmaltais/kohya_ss now have new script for installtion setup.sh

kopyl commented 1 year ago

@kopyl bmaltais/kohya_ss now have new script for installtion setup.sh

Yeah, but it does not work :(

potatoker commented 1 year ago

same issue here, can I really run without xformers?

kohya-ss commented 1 year ago

You can use --mem_eff_attn option, instead of --xformers. This option will be slow, but reduce the memory usage same as xformers.

mio7690 commented 1 year ago

I also meet this question under ubuntu 20.04, finally I fix it by using the command pip install xformers==0.0.19