Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/harubaru/discord-stable-diffusion
A neat Discord bot to run Stable Diffusion locally
https://github.com/harubaru/discord-stable-diffusion
Last synced: 4 months ago
JSON representation
A neat Discord bot to run Stable Diffusion locally
- Host: GitHub
- URL: https://github.com/harubaru/discord-stable-diffusion
- Owner: harubaru
- License: gpl-2.0
- Created: 2022-08-25T16:09:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-07T21:13:47.000Z (over 2 years ago)
- Last Synced: 2024-07-31T08:14:23.817Z (7 months ago)
- Language: Python
- Size: 155 KB
- Stars: 180
- Watchers: 8
- Forks: 42
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - harubaru/discord-stable-diffusion - A neat Discord bot to run Stable Diffusion locally (Python)
README
# Shanghai - AI Powered Art in a Discord Bot!
### Any questions or need help? Come hop on by to our Discord server!
[](https://discord.gg/Sx6Spmsgx7)
## Setup
Make sure you have the [CUDA Toolkit](https://developer.nvidia.com/cuda-downloads) installedClone 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 administratorIf 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](https://huggingface.co/settings/tokens))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](https://huggingface.co/settings/tokens))Run `./run.sh`
### Quickstart
#### Text to ImageTo 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 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.


#### (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.
