This repository contains an example of running Stability AI's Stable Diffusion Turbo Model in yor browser using ONNX Runtime Web with WebGPU.
You can try out the live demo here.
SD-Turbo is a fast generative text-to-image model that can synthesize photorealistic images from a text prompt in a single network evaluation. This is a reseach oriented model to study small, distilled text-to-image models. For more details checkout Stabilities research report.
Ensure that you have Node.js installed on your machine.
- Install the required dependencies:
npm install
- Bundle the code using webpack:
npm run build
This command generates the bundle file ./dist/index.js
.
The model used in this project is hosted on Hugging Face.
Start a web server to serve the current folder at http://localhost:8888/. To start the server, run:
npm run dev