-
Notifications
You must be signed in to change notification settings - Fork 63
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
Using Koila with Big Sleep? #24
Comments
Hi, thanks for the write up! As a poor student, I feel you, the constant struggle to reduce memories so that our machines can handle it :( As it stands, I could not make it work on Google Colab, which uses With that said, regarding your problem, since |
@rentruewang thanks for your reply! Now I understand things a little better. I believe that Big Sleep is already using gradient accumulation. I tried increasing that number to much higher values, but it didn't help, and I always received "RuntimeError: CUDA out of memory". If so, well thanks anyway for your help... at least I learnt more about how Koila works and gradient accumulation, and probably I might be able to apply these concepts to other projects until Koila reaches a more mature state. |
@illtellyoulater Actually, the gradient accumulation methods are quite different, so using koila in big sleep may not help. Let me explain. Disclaimer: This analysis is my explanation after a quick read over big sleep's source code. Big sleep works by passing in a list of text samples, using gradient descent to find the best images that minimize the 'distance' that Here's how It is used to increase the Compare to that, koila works by splitting up a batch by
So you see, it works by reducing batch sizes in forward passes, but uses gradient accumulation to maintain the same effective batch size. That means it has the following deficiencies:
Hope this explanation makes sense! |
Great info, thanks! Probably it could be useful to add this to the repository README! |
Good idea. Thanks! |
Hi, this project could be revolutionary, if only I knew how to use it :)
You surely heard of Big Sleep, right? Using CLIP and BIGGAN, from just a line of text it's capable of generating amazing visuals and unique works of art, which is why is getting more and more popular among an ever growing number of artists and curious people who have been deeply fascinated by the potential of these techniques...
However many of us have not been able to run these kind of projects on our machines because of low VRAM in consumer GPUs and crazy market prices and ended up stumbling almost immediately on the infamous CUDA Memory Error... (Yes, Google Colab is nice and all, but running this projects locally makes for a totally different kind of "technological chill" if you know what I mean :) )
So, I was thinking, would it be possible to apply Koila to Big Sleep, to fix those errors?
If so, that'd be a game changer! It would at the same time benefit a huge number of users, and translate into massive traction for Koila!
Looking at the README I thought the whole process would have been very simple so I tried looking at it myself... but in the end I had to give up because I've just approached this field and I still miss much of the necessary background to figure out these kind of details.
So yeah, would you consider providing a short example for this use case of Koila + Big Sleep, if feasible? In that case just a few lines of code could potentially mean the beginning of a little revolution :)
The text was updated successfully, but these errors were encountered: