favicon-diffusion/README.md at main · neelr/favicon-diffusion
Ever wanted fast diffusion on device? Struggled with compatibility and libraries? Worry no more—favicon diffusor is here! Using WebGPU, its supported on almost any device (that can run chrome) and can diffuse hippos anywhere (even as a favicon)! A quick weekend project where I hacked on a bunch of WebGPU kernels from scratch and tried to optimize them. Building on my last "from scratch DiT" this starts at the kernel level and rewrites diffusion transformers using WGSL. A subsecond 32-step diffusion inference time allows for an awesome demo of actually diffusing the favicon of a website realtime in ~0.7s with a ~11M parameter model https://notebook.neelr.dev/stories/in-browser-favicon-diffusion-scratch-dit-pt-2 Of course.... here are the approximate numbers on an M1 Pro! Currently faster than tf.js and (of course) baseline JS—transformers.js doesn't support custom layer building, so I didn't include it. The implementation includes several key optimizations: The project structure include
favicon diffusor: a high-performance browser diffusion transformer Ever wanted fast diffusion on device? Struggled with compatibility and libraries? Worry no more—favicon diffusor is here! Using WebGPU, its supported on almost any device (that can run chrome) and can diffuse hippos anywhere (even as a favicon)! A quick weekend project where I hacked on a bunch of WebGPU kernels from scratch and tried to optimize them. Building on my last "from scratch DiT" this starts at the kernel level and rewrites diffusion transformers using WGSL. A subsecond 32-step diffusion inference time allows for an
related reading
- in browser favicon diffusion! scratch-dit pt.2notebook.neelr.dev
- dawn - Git at Googledawn.googlesource.com
- Shadersshaders.com
- Speeding Up the Webcola Graph Viz Library with Rust + WebAssembly - Casey Primozic's Homepagecprimozic.net
- Unicorn Studio — No-code WebGL Toolunicorn.studio
- Paper Shaders – Ultra-fast zero-dependency shadersshaders.paper.design
- Lucas Gelfond • Segment Anything 2, in WebGPUlucasgelfond.online
- GitHub - google/hackable_diffusiongithub.com
- GitHub - wafer-ai/gpu-perf-engineering-resources: A curated resource list for learning AI performance engineering, from GPU fundamentals to production inference.github.com
- Hacker Newsnews.ycombinator.com
- Scalable Diffusion Models with Transformersarxiv.org
- Thousands of Styled Rectangles in 120FPS on GPU - tchayen.comtchayen.com