• Stars
    star
    178
  • Rank 214,989 (Top 5 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created about 2 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A neat Discord bot to run Stable Diffusion locally

Shanghai - AI Powered Art in a Discord Bot!

Any questions or need help? Come hop on by to our Discord server!

Discord Server

Setup

Make sure you have the CUDA Toolkit installed

Clone the repository and enter it

git clone https://github.com/harubaru/discord-stable-diffusion.git
cd discord-stable-diffusion

WINDOWS SETUP

Run setup.bat. If you run into any errors, try running the file as administrator

If you are on a Windows 10 system, run win10patch.bat

Modify the run.bat file, where

  • --model_path is the path to the model (make sure to replace any backslashes with double backslashes),
  • --token= is the token to the Discord bot
  • --hf_token= is your huggingface token (can be found here)

Run the run.bat file

LINUX SETUP

Run ./setup.sh. If you run into any errors, try using sudo ./setup.sh

Modify the run.sh file, where

  • --model_path is the path to the model,
  • --token= is the token to the Discord bot
  • --hf_token= is your huggingface token (can be found here)

Run ./run.sh

Quickstart

Text to Image

To generate an image from text, use the /dream command and include your prompt as the query. There's tons of parameters to play with so go wild!

image

image

Image to Image

To generate an image from another image, use the /dream command and include the init_image and strength parameters. The image needs to be attached to the message.

image

image

(Experimental) Inpainting

To fill in a mask in an image, supply a prompt, the init_image, mask_image and strength parameters. The mask needs to consist of black pixels in a transparent image.

image