GithubHelp home page GithubHelp logo

jakeukalane / stable-diffusion-react-nextjs-mui-pwa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kiri-art/stable-diffusion-react-nextjs-mui-pwa

0.0 1.0 0.0 4.3 MB

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

Home Page: sd-mui.vercel.app

License: MIT License

Shell 0.31% JavaScript 0.35% TypeScript 61.51% HTML 37.83%

stable-diffusion-react-nextjs-mui-pwa's Introduction

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 [email protected]. MIT Licensed.

sd-mui.vercel.app

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

super dog

  • Web interface to run Stable Diffusion queries on:
    • Local PC / local installation
    • Banana.dev serverless GPU containers (roughly $1 = 200 requests, YMMV)
    • Local banana.dev docker container (see docs/banana-local.md)
    • Others?

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

  • Local Exec

    • If you already have Stable Diffusion installed locally, this will run the Python script via node spawn. Set STABLE_DIFFUSION_HOME (to e.g. /home/user/src/stable-diffusion).
  • Local BananaDev docker image

  • Remote BananaDev container (serverless GPU)

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

  • Docker image for super easy start
  • Vercel clone button

i18n

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

Useful commands:

  • yarn i18n:extract to extract strings.
  • Send locales/*/messages.po to translators, resave.
  • yarn i18n:compile before deploy.

See also lingui.config.js and locales dir.

Refs

stable-diffusion-react-nextjs-mui-pwa's People

Contributors

gadicc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.