{"id":13456107,"url":"https://github.com/Kilvoctu/aiyabot","last_synced_at":"2025-03-24T09:31:24.864Z","repository":{"id":62087657,"uuid":"550547446","full_name":"Kilvoctu/aiyabot","owner":"Kilvoctu","description":"A neat Discord bot for AUTOMATIC1111's Web UI","archived":false,"fork":false,"pushed_at":"2024-03-11T17:55:50.000Z","size":1379,"stargazers_count":288,"open_issues_count":4,"forks_count":76,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-03-11T19:04:34.469Z","etag":null,"topics":["bot","discord","discord-bot","stable-diffusion"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"harubaru/discord-stable-diffusion","license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kilvoctu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-10-13T00:24:14.000Z","updated_at":"2024-04-14T19:37:51.834Z","dependencies_parsed_at":"2023-12-03T06:24:32.915Z","dependency_job_id":"1a080bd7-5916-455a-880d-c4409f5d1419","html_url":"https://github.com/Kilvoctu/aiyabot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kilvoctu%2Faiyabot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kilvoctu%2Faiyabot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kilvoctu%2Faiyabot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kilvoctu%2Faiyabot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kilvoctu","download_url":"https://codeload.github.com/Kilvoctu/aiyabot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245243284,"owners_count":20583600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","discord","discord-bot","stable-diffusion"],"created_at":"2024-07-31T08:01:16.273Z","updated_at":"2025-03-24T09:31:24.518Z","avatar_url":"https://github.com/Kilvoctu.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# AIYA\n\nA Discord bot interface for Stable Diffusion\n\n\u003cimg src=https://raw.githubusercontent.com/Kilvoctu/kilvoctu.github.io/master/pics/preview.png  width=50% height=50%\u003e\n\n## Usage\n\nTo generate an image from text, use the /draw command and include your prompt as the query.\n\n\u003cimg src=https://raw.githubusercontent.com/Kilvoctu/kilvoctu.github.io/master/pics/preview2.png\u003e\n\nTo generate a prompt from a couple of words, use the /generate command and include your text as the query.\n\n![image](https://github.com/wizz13150/aiyabot/assets/22177081/20c34f36-1b7d-412b-8e53-4e4b25562167)\n\n\n### Currently supported options\n\n- live preview\n- negative prompts\n- swap model/checkpoint (_[see wiki](https://github.com/Kilvoctu/aiyabot/wiki/Model-swapping)_)\n- sampling steps\n- width/height\n- CFG scale\n- sampling method\n- seed\n- Web UI styles\n- extra networks (hypernetwork, LoRA)\n- face restoration\n- high-res fix\n- CLIP skip\n- img2img\n- denoising strength\n- batch count\n- compatibility with [SD.Next](https://github.com/vladmandic/automatic)\n  - \"Full quality\" VAE toggle\n\n#### Bonus features\n\n- /settings command - set per-channel defaults for supported options (_[see Notes](https://github.com/Kilvoctu/aiyabot#notes)!_):\n  - also can set maximum steps limit and max batch count limit\n  - refresh (update AIYA's options with any changes from Web UI)\n- /identify command - create a caption for your image.\n- /generate command - generate a prompt from text, using https://huggingface.co/Gustavosta/MagicPrompt-Stable-Diffusion\n- /stats command - shows how many /draw commands have been used.\n- /queue command - shows the size of each queue.\n- /info command - basic usage guide, other info, and download batch images.\n- /upscale command - resize your image.\n- buttons - certain outputs will contain buttons.\n  - 🖋 - edit prompt, then generate a new image with same parameters.\n  - 🎲 - randomize seed, then generate a new image with same parameters.\n  - 📋 - view the generated image's information.\n  - ⬆️ - upscale the generated image with defaults. Batch grids require use of the drop downs\n  - ❌ - deletes the generated image. In Live preview this button interrupts generation process\n  - ➡️ - skips the current image generation in live preview and go to next batch (if there's more than 1)\n- dropdown menus - batch images produce two drop down menus for the first 25 images.\n  - The first menu prompts the bot to send only the images that you select at single images\n  - The second menu prompts the bot to upscale the selected image from the batch.\n- context menu options - commands you can try on any message.\n  - Get Image Info - view information of an image generated by Stable Diffusion.\n  - Quick Upscale - upscale an image without needing to set options.\n  - Batch Download - download all images of a batch set without needing to specify batch_id and image_id\n- mark image as spoiler\n  - Per image (on `/draw`)\n  - Set channel-wide default or force based on role with `/settings`\n- [configuration file](https://github.com/Kilvoctu/aiyabot/wiki/Configuration) - can change some of AIYA's operational aspects. \n\n\n## Setup requirements\n\n- Set up [AUTOMATIC1111's Stable Diffusion AI Web UI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) OR [SD.Next](https://github.com/vladmandic/automatic)\n  - AIYA is currently tested on commit `20ae71faa8ef035c31aa3a410b707d792c8203a3` of the Web UI.\n  - For SD.Next currently tested on master branch at [2024-03-01](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md#update-for-2024-03-01) (`325ed10a04775c49c36fc3308559507a4a82271b`)\n- Run the Web UI as local host with API (`COMMANDLINE_ARGS= --api`).\n- Clone this repo.\n- Create a file in your cloned repo called \".env\", formatted like so:\n```dotenv\n# .env\nTOKEN = put your bot token here\n```\n- Run AIYA by running launch.bat (or launch.sh for Linux)\n\n## Deploy with Docker\n\nAIYA can be deployed using Docker.\n\nThe docker image supports additional configuration by adding environment variables or config file updates detailed in the [wiki](https://github.com/Kilvoctu/aiyabot/wiki/Configuration).\n\n### Docker run\n\n```bash\ndocker 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\n```\n\nNote the following environment variables work with the docker image:\n\n- `TOKEN` - **[Required]** Discord bot token.\n- `URL` - URL of the Web UI API. Defaults to `http://localhost:7860`.\n- `TZ` - Timezone for the container in the format `America/New_York`. Defaults to `America/New_York`\n- `APIUSER` - API username if required for your Web UI instance.\n- `APIPASS` - API password if required for your Web UI instance.\n- `USER` - Username if required for your Web UI instance.\n- `PASS` - Password if required for your Web UI instance.\n- `USE_GENERATE` - Set whether the `/generate` command is enabled as well as if required package (`torch nvidia transformers`) are installed\n\n### Docker compose\n\n- Clone the repo and refer to the `docker-compose.yml` file in the `deploy` directory.\n- Rename the `/deploy/.env.example` file to `.env` and update the `TOKEN` variable with your bot token (and any other configuration as desired).\n- Run `docker-compose up -d` to start the bot.\n\n## Notes\n\n- [See wiki for notes on additional configuration.](https://github.com/Kilvoctu/aiyabot/wiki/Configuration)\n- [See wiki for notes on swapping models.](https://github.com/Kilvoctu/aiyabot/wiki/Model-swapping)\n- [📋 requires a Web UI script. Please see wiki for details.](https://github.com/Kilvoctu/aiyabot/wiki/Frequently-asked-questions-and-other-tips-(setup)#the--and-other-png-info-related-commands-are-not-working)\n- Ensure AIYA has `bot` and `application.commands` scopes when inviting to your Discord server, and intents are enabled.\n- As /settings can be abused, consider reviewing who can access the command. This can be done through Apps -\u003e Integrations in your Server Settings. Read more about /settings [here.](https://github.com/Kilvoctu/aiyabot/wiki/settings-command)\n- 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`\n- For systems with less memory/cpu, or if the `/generate` command is not needed, it can be disabled by setting the environmental variable `USE_GENERATE=false` for docker/cli.\n\n## Credits\n\n#### Foundation\nAIYA only exists thanks to these awesome people:\n- AUTOMATIC1111, and all the contributors to the Web UI repo.\n  - https://github.com/AUTOMATIC1111/stable-diffusion-webui\n- vladmandic and all SD.Next contributors\n  - https://github.com/vladmandic/automatic\n- harubaru, my entryway into Stable Diffusion (with Waifu Diffusion) and foundation for the AIYA Discord bot.\n  - https://github.com/harubaru/waifu-diffusion\n  - https://github.com/harubaru/discord-stable-diffusion\n\n#### Great Contributors\nThese people played a large role in AIYA's development in some way:\n- solareon, for developing a more sensible way to display and interact with batches of images.\n- danstis, for dockerizing AIYA.\n- ashen-sensored, for developing a workaround for Discord removing PNG info to image uploads. *edit* Discord is no longer doing this at the moment, but credit is still due.\n  - https://github.com/ashen-sensored/sd_webui_stealth_pnginfo \n- 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.\n  - https://github.com/gingivere0/dalebot\n- You, for using AIYA and contributing with PRs, bug reports, feedback, and more!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKilvoctu%2Faiyabot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKilvoctu%2Faiyabot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKilvoctu%2Faiyabot/lists"}