Submitted by Norlax_42 t3_xuojma in MachineLearning
Stable Diffusion in the diffusers library became x3 times faster thanks to a set of optimizations tips, some of which require minimal code changes, making it the fastest implementation of Stable Diffusion out there!
You can now generate 3 images of size 512x512 with 50 steps in less than 26 seconds - beating the Keras' implementation. All you have to do is run this notebook in free colab.
The best thing about these optimisations is that they work for most Deep Learning models (as long as you're using Pytorch), so feel free to try them on other models as well!
To understand better how these optimisations work, you can check either:
- This recent tweet explaining the optimisations made
- The diffusers library docs about optimisation
​
Generating 3 images with 50 steps takes less than 26 seconds on colab's Tesla T4
veb101 t1_iqzmeka wrote
What if Flash attention was also integrated with these updates? A couple of days ago Labml.ai posted this: Speed Up Stable Diffusion by ~50% Using Flash Attention
I'm just curious.