GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ansemjo/diffusionbooth: photobooth experiment with stable-diffusion styles

BranchesTags
Open more actions menu

Latest commit

 

History

38 Commits
38 Commits

Folders and files

NameName
Last commit message
Last commit date
fileserver
fileserver
 
 
public
public
 
 
src
src
 
 
.gitignore
.gitignore
 
 
NOTES.md
NOTES.md
 
 
README.md
README.md
 
 
env.d.ts
env.d.ts
 
 
example.gif
example.gif
 
 
example.jpg
example.jpg
 
 
example.mp4
example.mp4
 
 
index.html
index.html
 
 
models.md
models.md
 
 
models_sha256sum
models_sha256sum
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
vite.config.ts
vite.config.ts
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

Diffusion Booth

Photobooth × Stable Diffusion
Take a photo and let the AI create a fun and unique portrait of you!

a GIF with examples from the science night

This project was a two-week hack for the 2023 Digital Science Night
See also: trAIding-cards

The Setup

You'll need:

  1. one computer with a powerful GPU and an installation of the stable-diffusion-webui
  2. a thin-client computer with a webcam, which can run the frontend in "kiosk mode"
  3. lots of light and some props for a scenerey

1. Stable-Diffusion-WebUI

For the general installation, just follow the setup instructions in their Wiki. You must enable the API with --api in the COMMANDLINE_ARGS variable. If you don't run the frontend on the same computer, you also need to listen on a reachable IP with --listen.

Then, the ControlNets extension is required because control nets are an essential part of getting pictures with some resemblance at all. Open the Web UI and navigate to Extensions > "Install from URL".

And finally, you need all the models of course. I don't want to make my University's GitLab team angry, so I won't put them into the repository. But you can find the models on huggingface.co and civtai.com; the names, direct download links and hashes of the necessary models are noted in models.md.

You should enable larger cache for ControlNet models! Otherwise they need to be reloaded for every API call, which takes unecessarily long time. Go to Settings > ControlNet (left) > increase "Model cache size".

During the Digital Science Night, we used a computer with an Nvidia RTX 4070 Ti, which was snappy enough to be fun. An 1080 Ti was "fine" but already a little too slow.

2. Run the Frontend

The frontend is built with Vue.js and can be built with yarn install && yarn run dev, followed by opening the link in your favourite browser. Preferably, use Firefox in Kiosk mode and just remove the keyboard:

firefox -kiosk http://localhost:5173/

You'll want to change two things in the code:

  • Point the /sdapi proxy in vite.config.ts to your own Stable-Diffusion-WebUI API.
  • Host your own fileserver/fileserver.py somewhere and point the URL in App.vue's upload() function to it.

The user interface should hopefully be self-explanatory. Picture capture is additionally bound to Shift-S, which can be triggered with a programmable foot pedal, for example.

3. Fun

Let your guests have fun with it.

If you hosted your own fileserver, you can also open its URL on another monitor to show the pictures taken so far in a random gallery.

About

photobooth experiment with stable-diffusion styles

Topics

generative-aigenerative-artphoto-manipulationphotoboothstable-diffusionstable-diffusion-webui

Resources

Readme
Activity

Stars

22 stars

Watchers

1 watching

Forks

3 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.