Stable Diffusion in Pure Rust
After porting Whisper and Llama 2 to Rust I felt the next natural step was Stable Diffusion. Whisper and Llama are fairly elegant models so I was expecting more of the same. How I was wrong! Compared with the other two models, Stable Diffusion is a behemoth. There are layers upon layers of modules with relatively complex data flows. Oh yes, there were bugs and bugs within bugs, but after many hours of staring at and hallucinating point numbers I finally typed the most creative thing my sleep deprived mind could think of: a rainbow pony. Behold the fruit of my suffering!:
Suffering on the left and Bliss on the right
Now you can have all the rainbow ponies you desire powered by Rust, just don't even try generating hands or faces lest you come face to face with uncanny valley. However, I included scripts in the project that can dump and convert fine tuned models to Rust's burn format so those of you with, ahem, particular tastes, can fulfill your desires.
Check out the GitHub page: Gadersd/stable-diffusion-burn
If you are interested in this project and want to see more such as Stable Diffusion XL in Rust and web assembly versions that can run in browsers consider supporting me via my Patreon. Patrons will get early access to future projects and have a say in what I do next, but I intend to make most if not all my projects open and free to all. I would absolutely love to do this sort of thing full time, but as a code monkey I've got to put bananas on the table so if you've got a banana to spare let's make it happen!