kiri-art / stable-diffusion-react-nextjs-mui-pwa

PWA Web App front end for Stable Diffusion, on React/NextJS with Material UI
https://kiri.art/
MIT License
127 stars 32 forks source link
materialui mui stable-diffusion stablediffusion

stable-diffusion-react-nextjs-mui-pwa

PWA Web App front end for Stable Diffusion, on React/NextJS with Material UI

Copyright (c) 2022 by Gadi Cohen dragon@wastelands.net. MIT Licensed.

kiri.art

New Project in Active Development (since Aug 31st, 2022)

super dog

Why? Make this fun stuff more accessible to web developers and friends :) See the live demo, run on your own PC for free, or deploy!

If you have a background in web dev / dev ops, and have wanted to experiment a bit with machine learning / latent diffusion (AI image generation), this is a great project to get involved in :)

Doing this in my very limited spare time, PRs more likely to get responses than issues, but try me :)

To Develop

  1. Clone repo
  2. yarn install
  3. edit .env.local (or just set local vars - per below)
  4. yarn dev

Note: you'll need at least one destination / target from the list below where Stable Diffusion will run.

Destinations / Targets

REQUIRE_REGISTRATION

By default, registration (i.e. sign up, log in, use credits) is required in production only. You can turn it on in development (to test the auth flow), or turn it off in production (if you're deploying somewhere private).

REQUIRE_REGISTRATION=1
NEXT_PUBLIC_REQUIRE_REGISTRATION=1

Note: NEXT_PUBLIC_ vars are compiled at build time! So if you want to deploy to production without requiring registration, set it to 0 before building and deploying.

TODO

i18n

We use NextJS's built-in i18n routing and Lingui for translations.

Useful commands:

See also lingui.config.js and locales dir.

Refs