Go to file
2023-03-18 15:12:50 +02:00
.gitignore ADD choose model 2023-03-18 00:04:54 +02:00
Google Colab Run.ipynb colab is valid, but untested and old 2023-03-18 15:12:50 +02:00
LICENSE Initial commit 2023-01-12 09:52:08 +05:30
main.py add to negative prompt 2023-03-18 12:58:05 +02:00
Procfile Create Procfile 2023-01-12 10:09:36 +05:30
README.md howto 2023-03-18 15:09:38 +02:00
requirements.txt Create requirements.txt 2023-01-12 10:09:08 +05:30

AI Powered Art in a Telegram Bot!

this is a txt2img bot running on tami telegram channel

How to

supported invocation:
/draw <text> - send prompt text to the bot and it will draw an image
you can add negative_prompt using ng[<text>]

examples:
/draw a city street
and without people
/draw a city street ng[people]

to change the model use:
/getmodels - to get a list of models and then click to set it.

Setup

Install requirements

conda create -n sdw python=3.8
conda activate sdw
pip install -r requirements.txt

(note: conda is not strictly necessary, but it is recommended)

Original readme

My Bot uses Automatic1111's WebUI as the backend. Follow the directions on their repo for setup instructions.

Once you have WebUI set up, run webui.sh with the --api argument. You can also add other arguments such as --xformers to use xformers memory efficient attention.

You can use the web ui interface that Automatic1111 provides to select the model and VAE to use. Their repo has documentation on how to do so. I also recommend doing a test generation

Create a file called .env in the same folder as main.py. Inside the .env file, create a line TOKEN = xxxx, where xxxx is your telegram bot token. create a line API_ID = xxxx, where xxxx is your telegram id api id. create a line API_HASH = xxxx, where xxxx is your telegram id api hash. create a line SD_URL = xxxx, where xxxx is your sd api url.

Now, you can run the bot

python main.py