Giter Site home page Giter Site logo

Comments (19)

TheLastBen avatar TheLastBen commented on May 19, 2024 4

if you have the K80 and want to add it to the supported list, run :

!pip install git+https://github.com/facebookresearch/xformers@51dd119#egg=xformers

after around 40min, and the installation is done, navigate to /usr/local/lib/python3.7/dist-packages/xformers

save the two files : "_C_flashattention.so" and "_C.so", upload them to any host and send me the link and I will integrate them in the Colab for K80 users.

the files might not show in the colab explorer, so you will have to rename them

!cp /usr/local/lib/python3.7/dist-packages/xformers/_C.so /usr/local/lib/python3.7/dist-packages/xformers/C.py

!cp /usr/local/lib/python3.7/dist-packages/xformers/_C_flashattention.so /usr/local/lib/python3.7/dist-packages/xformers/C_flashattention.py

from fast-stable-diffusion.

TheLastBen avatar TheLastBen commented on May 19, 2024 2

The C/C++/Cuda code responsible for the xformers-specific operations (memory efficient attention included) for the underlying machine (python version, cuda, ..)

from fast-stable-diffusion.

TheLastBen avatar TheLastBen commented on May 19, 2024 2

Sorry, I completely forgot about it, I'll add it as soon as I'm done with the new Dreambooth method

from fast-stable-diffusion.

TheLastBen avatar TheLastBen commented on May 19, 2024 1

In a few hours it will be added to the colabs

from fast-stable-diffusion.

Aivean avatar Aivean commented on May 19, 2024 1

did you make a clean run with an update colab from the repo ?

Not sure, will try it now and report back.

... or perhaps not now, but when I get A100 again 🤷‍♂️

from fast-stable-diffusion.

askiiart avatar askiiart commented on May 19, 2024 1

For the K80 ? 287 KB looks a bit small, it should be at least 19mb, maybe it didn't compile well. try compiling it with google colab if you get the K80

I'll let you know if I can get the files from a K80 colab. Right now all my accounts have a usage limit of no GPU, or are getting T4s, though, so it might be a while.

from fast-stable-diffusion.

misiek75 avatar misiek75 commented on May 19, 2024

Hi. I am using collab pro and very often I have a100 gpu assigned. How can you add to the gpu ?

from fast-stable-diffusion.

Aivean avatar Aivean commented on May 19, 2024

Perhaps this is the right issue. Running on A100 (colab), getting spammed in the output:

FATAL: this function is for sm80, but was built for sm600

from fast-stable-diffusion.

TheLastBen avatar TheLastBen commented on May 19, 2024

did you make a clean run with an update colab from the repo ?

from fast-stable-diffusion.

Aivean avatar Aivean commented on May 19, 2024

@TheLastBen , actually, that doesn't seem to be A100-specific issue.

On V100 I see:

FATAL: this function is for sm70, but was built for sm600

Running freshly opened:
https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb

Is it a regression?


Will try to reproduce on clean AUTOMATIC1111 UI without attention patch.

UPD: confirmed, clean AUTOMATIC1111 works on V100, the issue is introduced by the patch.

from fast-stable-diffusion.

TheLastBen avatar TheLastBen commented on May 19, 2024

try to reproduce the error with a T4 (free colab)

from fast-stable-diffusion.

TheLastBen avatar TheLastBen commented on May 19, 2024

also try other colabs if the same issue happens

from fast-stable-diffusion.

askiiart avatar askiiart commented on May 19, 2024

save the two files : "_C_flashattention.so" and "_C.so", upload them to any host and send me the link and I will integrate them in the Colab for K80 users

I did this, but am using conda, so the directories don't match up. I found /home/ben/.conda/envs/my-env/lib/python3.10/site-packages/xformers, but there's no _C_flashattention.so in it, or anywhere on the system.

I did find _C.so, though; it's here

from fast-stable-diffusion.

TheLastBen avatar TheLastBen commented on May 19, 2024

For the K80 ?
287 KB looks a bit small, it should be at least 19mb, maybe it didn't compile well. try compiling it with google colab if you get the K80

from fast-stable-diffusion.

askiiart avatar askiiart commented on May 19, 2024

@TheLastBen I was able to install xformers with a bigger _C.so file (13.1 MB) by un-init-ing conda, and got this. I still don't have a _C_flashattention.so anywhere on my system, though.

from fast-stable-diffusion.

TheLastBen avatar TheLastBen commented on May 19, 2024

GPUs unsupported by flash attention don't produce a _C_flashattention.so after compiling, but they still benefit from a speed increase

from fast-stable-diffusion.

askiiart avatar askiiart commented on May 19, 2024

GPUs unsupported by flash attention don't produce a _C_flashattention.so after compiling, but they still benefit from a speed increase

Ok, thanks. Quick question: what is _C_flashattention.so for/what does it do?

from fast-stable-diffusion.

askiiart avatar askiiart commented on May 19, 2024

@TheLastBen Would you be able to make the whl using that file and add it? I'd make the whl and do a new PR, but it's not working for me.

from fast-stable-diffusion.

TheLastBen avatar TheLastBen commented on May 19, 2024

@TheLastBen Would you be able to make the whl using that file and add it? I'd make the whl and do a new PR, but it's not working for me.

Just added, if you get the K80 try it in A1111 Colab and let me know if the wheel works.

from fast-stable-diffusion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.