Stable-Diffusion-React-App

A Simple React WebApp and a FastAPI backend that uses Stable Diffusion Pipelines to generate images.

Imgur

Features

  • Simple and intuitive UI
  • Enter any prompt (maximum 77 tokens)
  • Select model from various diffusion models
  • All generated images are saved locally

To-Be-Implemented

  • Save button to download generated image
  • Generate images with more inference steps
  • Enter custom heights and/or widths for images

How To Use

Add Token:

create 'auth_token.py' in /api and add variable "auth_token" with your huggingface token.

Run API : uvicorn api:app --reload

Run Client : npm start

API Routes

Generate

  GET /generate
Parameter Type Description
prompt string Required. The text prompt of an image

Select Model

  GET /selectmodel
Parameter Type Description
model string Required. The model to be used

References

Models