Skip to content

Latest commit

 

History

History
 
 

sd-turbo

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Running Stable Diffusion Turbo in your Browser with WebGPU and ONNX Runtime Web

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.

Model Overview

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.

Getting Started

Prerequisites

Ensure that you have Node.js installed on your machine.

Installation

  1. Install the required dependencies:
npm install

Building the Project

  1. Bundle the code using webpack:
npm run build

This command generates the bundle file ./dist/index.js.

The ONNX Model

The model used in this project is hosted on Hugging Face.

Running the Project

Start a web server to serve the current folder at http://localhost:8888/. To start the server, run:

npm run dev