fast-stable-diffusion
fast-stable-diffusion copied to clipboard
huge ram issue when changing models
most of the time when you want to change a model, the max RAM memory is reached. even if loading a 2gb model. Why is there so much loaded in ra? This is a huge issue
It's a known bug that the google colab team hasn't been able to fix yet https://github.com/googlecolab/colabtools/issues/3363
Man, hope they fix it soon. I've been having the issue as well.
@TheLastBen thanks for letting us know.
same here, 100% crash on model load :(
uff they closed the colab issue 😭
try with the latest colab, hopefully this commit will fix it https://github.com/TheLastBen/fast-stable-diffusion/commit/67145d8e54c9128f3981ddc763282f6485ab47e9
It works now, no more RAM problem when changing models. but To load, it takes 60sec for a 2GB model and 256 sec for a 7GB model.
the long loading is caused in colab by extensions, if you have many of them installed they cause a delay
I don't know because I just tested it without login my google drive so it was a fresh new install on the google colab kernel without extension installed.
I have no extensions and loading is super slow now. Anything I can do?
for a 2GB model ?
Yes, 187 seconds
Still got RAM issues/crashes too, basically after every merge it will ^C after trying to load the new model :(
Actually, it came back to normal loading time for me (using google drive).
Soon there will be alternative notebooks for different cloud providers.
Kaggle? :)
Paperspace and Runpod, Kaggle probably won't allow thousands of users using 2xT4 for free.
I've only just come up with this (Honestly repulsive) workaround, which involves rolling back a few specific dependancies. It's not pretty, at all, and I don't even know how much of it is needed, but if you add the following cell to the notebook, and run it at least once (Preferably first), the memory behavior seems to go back to how it used to be.
!wget http://launchpadlibrarian.net/367274644/libgoogle-perftools-dev_2.5-2.2ubuntu3_amd64.deb
!wget https://launchpad.net/ubuntu/+source/google-perftools/2.5-2.2ubuntu3/+build/14795286/+files/google-perftools_2.5-2.2ubuntu3_all.deb
!wget https://launchpad.net/ubuntu/+source/google-perftools/2.5-2.2ubuntu3/+build/14795286/+files/libtcmalloc-minimal4_2.5-2.2ubuntu3_amd64.deb
!wget https://launchpad.net/ubuntu/+source/google-perftools/2.5-2.2ubuntu3/+build/14795286/+files/libgoogle-perftools4_2.5-2.2ubuntu3_amd64.deb
!apt install -qq libunwind8-dev
!dpkg -i *.deb
%env LD_PRELOAD=libtcmalloc.so
I'll try that thanks