Running Stable Diffusion fully in browser with WebGPU with TVM Unity

Hello community,

We are excited to share with folks about the project we released today: Web Stable Diffusion, the world’s first stable diffusion completely running on the browser. Stable diffusion models are heavy and usually take a server to run. While this time, we bring stable diffusion models to the browser side completely. We have a runnable demo that you can try out on the website. And you are welcome to check out our GitHub repo for more details.

This project is not possible without the open-source ecosystems, especially Apache TVM and TVM Unity. We want to thank everyone of the Apache TVM Unity efforts so far. We are excited to see the concept of TVM Unity making changes, bringing machine learning closer to people, and enabling even more opportunities. The Web Stable Diffusion project is of great excitement to us, and we believe that it is starting point of the long journey throughout our development, experiences and pushes for Apache TVM Unity.


This is a great demonstration of what we can do with unity. Would love to see how it also enables other incremental deployment process, such as bringing things to mobile devices.

We are happy to present our work at TVMCon today! Here is the Jupyter notebook that can give you a full view of how we make it with the help of TVM Unity. It contains what we went through about model import in the tutorial “Introduction to Unity: Relax and PyTorch” at TVMCon, and also very detailed guidance on build and deployment. Everyone is welcome to check out!