in browser favicon diffusion! scratch-dit pt.2
So… this project mostly started with me knowing ~0 about diffusion models to building a diffusion model from scratch and now port it to the browser (from scratch again)! The pitch here is basically—you can generate interesting icons, do fun things, all on local GPUs! WebGPU is still relatively new (and not supported by a lot of browsers), but the full capacity definitely isn’t used on the web. Think native performance, mixed into whatever application you need—no need for LMStudio or local diffusion models. These are really approximate and not exhaustive, ran on an m1 pro and done with 100 passes + averaged Using some basic benchmarks (averaged over 100 runs) we get our implementation being 45% faster than a naive tensorflow.js implementation or 88% faster than a baseline JS implementation… how do we get these performance benefits? Awesome kernel optimizations + buffer optimizations! Each kernel is tiled to optimize for caching + tries to minimize the amount of loops possible. Tiling is
in browser favicon diffusion! scratch-dit pt.2 My Notebook # project # programming 6 in browser favicon diffusion! scratch-dit pt.2 2025-02-19 · 10 min read a fun side project to learn more about kernel development + optimization 🧨 TLDR; Implemented a ~11M parameter diffusion model in WebGPU that does 32 steps (350M params) in ~0.7 seconds! Worked on kernel optimization, training/distilling a diffusion model, and fun code stuff. All of this for… 🥁🥁🥁 IN BROWSER FAVICON DIFFUSION So… this project mostly started with me knowing ~0 about diffusion models to building a diffusion model from scra
Explore this link on the map →related reading
- favicon-diffusion/README.md at main · neelr/favicon-diffusion · GitHubgithub.com
- What are Diffusion Models? | Lil'Loglilianweng.github.io
- Diffusion models from scratchchenyang.co
- ⭐️ Diffusion Modelsandrewkchan.dev
- Speeding Up the Webcola Graph Viz Library with Rust + WebAssembly - Casey Primozic's Homepagecprimozic.net
- PiTorch: ML on Baremetal Raspberry Pis | projectsmasonjwang.com
- Bare-bones Diffusion Modelsmadebyoll.in
- 2409.02908arxiv.org
- francesco215.github.io/autoregressive_diffusion/francesco215.github.io
- A Visual Guide to DiffusionGemma - by Maarten Grootendorstnewsletter.maartengrootendorst.com
- Diffusion model - Wikipediaen.wikipedia.org
- GitHub - google/hackable_diffusion · GitHubgithub.com