Create AI Art using Telegram bot. Uses Stable Diffusion WebUI
Prompt languages: any.
Bot response languages available: English, Russian.
- Stable-Diffusion-WebUI installed and configured
- Bot token from Telegram Bot
git clone https://github.com/dvarkless/art-generation-telegram-bot.git
Linux:
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Windows:
python -m venv venv
./venv/bin/Activate.ps1
pip install -r requirements.txt
Activate powershell scripts if necessary
- Paste bot token into
./info/tg_token.txt - You can restrict user access to this bot by either using a whitelist or blacklist of users.
Write user's nicknames or ids into
whitelist.txtorblacklist.txtand choose an appropriate restriction method by modifying the config file./configs/usage_modes.yml - You can change bot's settings in the
./configs/usage_modes.ymlfile.
You can do that by simply downloading model's weights into WebUI's folder and modifying bot's config to be able to use this model properly.
For example, let's install this cute generating network:
- Download model's weights
- Move it into
./stable-diffusion-webui/models/Stable-diffusion/in WebUI repo - Open config file
./configs/models.ymland write the parameters you want to use. Just folow the example structure in this file and you'll be fine.
You can change any phrase in the ./configs/dialogs.yml file.
Syntax of YAML files are mostly similar to python.
- Run Stable-Diffusion-WebUI with the
--apiargument:
python launch.py --api
- Run the bot itself:
python bot.py
Feel free to contribute to this project. I'll be glad to accept your pull requests.
Distributed under the MIT License. See LICENSE.txt for more information.