A Discord bot interface for Stable Diffusion
To generate an image from text, use the /draw command and include your prompt as the query.
- negative prompts
- swap model/checkpoint (see Notes)
- sampling steps
- height/width (up to 768)
- CFG scale
- sampling method
- seed
- img2img
- denoising strength
- batch count
- /settings command - set per-server defaults for the following (also see Notes!):
- negative prompts
- model/checkpoint
- sampling steps / max steps
- sampling method
- batch count / max batch count
- /stats command - shows how many /draw commands have been used.
- /tips command - basic tips for writing prompts.
- Set up AUTOMATIC1111's Stable Diffusion AI Web UI.
- AIYA is currently tested on commit
198a1ffcfc963a3d74674fad560e87dbebf7949f
of the Web UI.
- AIYA is currently tested on commit
- Run the Web UI as local host with api (
COMMANDLINE_ARGS= --listen --api
). - Clone this repo.
- Create a text file in your cloned repo called ".env", formatted like so:
# .env
TOKEN = put your bot token here
- Run the bot by running launch.bat
- Ensure AIYA has
bot
andapplication.commands
scopes when inviting to your Discord server, and intents are enabled. - As /settings can be abused, consider reviewing who can access the command. This can be done through Apps -> Integrations in your Server Settings.
- React to generated images with โ to delete them.
- Optional .env variables you can set:
URL = set URL if yours is not default (http://127.0.0.1:7860)
DIR = set folder to save images, otherwise the default is \outputs
# only set USER and PASS if you use --share and --gradio-auth
USER = your username
PASS = your password
COPY = set to anything if you want the bot to output the command that was used to produce the image instead of the prompt
- On first launch, AIYA will generate a models.csv with a default dummy value. If you'd like to add more models/checkpoints, replace the default value and add lines following the header format.
- Display name is anything you want. Full name is how it would appear in the Web UI. An example may look like:
display_name|model_full_name
SD 1.5|v1-5-pruned-emaonly.ckpt [81761151]
WD 1.3|wd-v1-3-float32.ckpt [4470c325]
- In the Web UI, there is a setting named "Checkpoints to cache in RAM". If you have enough RAM, this value can be increased to speed up swapping.
AIYA only exists thanks to these awesome people:
- AUTOMATIC1111, and all the contributors to the Web UI repo.
- harubaru, my entryway into Stable Diffusion (with Waifu Diffusion) and foundation for the AIYA Discord bot.
- gingivere0, for PayloadFormatter class for the original API. Without that, I'd have given up from the start. Also has a great Discord bot as a no-slash-command alternative.
- You, for using AIYA and contributing with PRs, bug reports, feedback, and more!