GithubHelp home page GithubHelp logo

zfitness / aiyabot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kilvoctu/aiyabot

0.0 0.0 0.0 1.28 MB

A neat Discord bot for AUTOMATIC1111's Web UI

License: GNU General Public License v2.0

Shell 0.27% Python 99.65% Batchfile 0.08%

aiyabot's Introduction

AIYA

A Discord bot interface for Stable Diffusion

Usage

To generate an image from text, use the /draw command and include your prompt as the query.

Currently supported options

  • 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

Bonus features

  • /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 and other info.
  • /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.
    • โŒ - deletes the generated image.
  • 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.
  • configuration file - can change some of AIYA's operational aspects.

Setup requirements

  • Set up AUTOMATIC1111's Stable Diffusion AI Web UI.
    • AIYA is currently tested on commit 955df7751eef11bb7697e2d77f6b8a6226b21e13 of the Web UI.
  • 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)

Deploy with Docker

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

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 to http://localhost:7860.
  • TZ - Timezone for the container in the format America/New_York. Defaults to America/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.

Docker compose

  • Clone the repo and refer to the docker-compose.yml file in the deploy directory.
  • Rename the /deploy/.env.example file to .env and update the TOKEN variable with your bot token (and any other configuration as desired).
  • Run docker-compose up -d to start the bot.

Notes

  • See wiki for notes on additional configuration.
  • See wiki for notes on swapping models.
  • Ensure AIYA has bot and application.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

Credits

AIYA only exists thanks to these awesome people:

aiyabot's People

Contributors

kilvoctu avatar harubaru avatar pyrotuna avatar philpax avatar saltaccount avatar danstis avatar yoinked-h avatar auwowauwu avatar cyberofficial avatar eidenz avatar btcookies avatar dependabot[bot] avatar pseudobunny avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.