A Discord bot interface for Vladmandic Stable Diffusion SD.Next
To generate an image from text, use the /draw command and include your prompt as the query.
- negative prompts
- swap model/checkpoint (see wiki)
- sampling steps
- width/height
- CFG scale
- sampling method
- seed
- Web UI styles
- extra networks (hypernetwork, LoRA)
- face restoration
- high-res fix
- CLIP skip
- img2img
- denoising strength
- batch count
- /settings command - set per-channel defaults for supported options (see Notes!):
- also can set maximum steps limit and max batch count limit
- refresh (update AIYA's options with any changes from Web UI)
- /identify command - create a caption for your image.
- /stats command - shows how many /draw commands have been used.
- /info command - basic usage guide, other info, and download batch images.
- /upscale command - resize your image.
- buttons - certain outputs will contain buttons.
- 🖋 - edit prompt, then generate a new image with same parameters.
- 🎲 - randomize seed, then generate a new image with same parameters.
- 📋 - view the generated image's information.
- ⬆️ - upscale the generated image with defaults. Batch grids require use of the drop downs
- ❌ - deletes the generated image.
- dropdown menus - batch images produce two drop down menus for the first 25 images.
- The first menu prompts the bot to send only the images that you select at single images
- The second menu prompts the bot to upscale the selected image from the batch.
- context menu options - commands you can try on any message.
- Get Image Info - view information of an image generated by Stable Diffusion.
- Quick Upscale - upscale an image without needing to set options.
- Batch Download - download all images of a batch set without needing to specify batch_id and image_id
- configuration file - can change some of AIYA's operational aspects.
- Set up Vladmandic's SD.Next.
- Run the Web UI as local host with API (
COMMANDLINE_ARGS= --api
). - Clone this repo.
- Create a file in your cloned repo called ".env", formatted like so:
# .env
TOKEN = put your bot token here
- Run AIYA by running launch.bat (or launch.sh for Linux)
To use a Diffusers model, within models.csv you must enter the string found in System -> System info:
AIYA can be deployed using Docker.
The docker image supports additional configuration by adding environment variables or config file updates detailed in the wiki.
docker run --name aiyabot --network=host --restart=always -e TOKEN=your_token_here -e TZ=America/New_York -v ./aiyabot/outputs:/app/outputs -v ./aiyabot/resources:/app/resources -d ghcr.io/kilvoctu/aiyabot:latest
Note the following environment variables work with the docker image:
TOKEN
- [Required] Discord bot token.URL
- URL of the Web UI API. Defaults tohttp://localhost:7860
.TZ
- Timezone for the container in the formatAmerica/New_York
. Defaults toAmerica/New_York
APIUSER
- API username if required for your Web UI instance.APIPASS
- API password if required for your Web UI instance.USER
- Username if required for your Web UI instance.PASS
- Password if required for your Web UI instance.
- Clone the repo and refer to the
docker-compose.yml
file in thedeploy
directory. - Rename the
/deploy/.env.example
file to.env
and update theTOKEN
variable with your bot token (and any other configuration as desired). - Run
docker-compose up -d
to start the bot.
- See wiki for notes on additional configuration.
- See wiki for notes on swapping models.
- 📋 requires a Web UI script. Please see wiki for details.
- 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. Read more about /settings here.
- AIYA uses Web UI's legacy high-res fix method. To ensure this works correctly, in your Web UI settings, enable this option:
For hires fix, use width/height sliders to set final resolution rather than first pass
AIYA only exists thanks to these awesome people:
- AUTOMATIC1111, and all the contributors to the Web UI repo.
- vladmandic, and all the contributors to the SD.Next 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.
- ashen-sensored, for developing a workaround for Discord removing PNG info to image uploads.
- Kilvoctu, for making the main repo -https://github.com/Kilvoctu/aiyabot
- You, for using AIYA and contributing with PRs, bug reports, feedback, and more!