telegram bot on aiogram python 3.10.6 to generate images using automatic1111 fast api
Go to file
Mikhail Guseletov f6fb06d8f1 move show thumbs in function
add infinity script
2023-06-27 12:41:35 +07:00
bot.py move show thumbs in function 2023-06-27 12:41:35 +07:00
LICENSE Initial commit 2023-06-15 12:33:09 +07:00
README.md move show thumbs in function 2023-06-27 12:41:35 +07:00

sd_telegram

telegram bot on aiogram python 3.10.6 to generate images in automatic1111 locally

create bot from BotFather and use token in API_TOKEN

the bot is installed in automatic1111 via extensions or use git clone into C:\stable-diffusion-webui\extensions\sd_telegram

pip install aiogram  
pip install webuiapi  
pip install transformers  
cd C:\stable-diffusion-webui\extensions\sd_telegram\  
python bot.py

Commands
start
_SD
__ = off, = on Stable Diffusion
_opt
__sttngs
___change_param
change JSON parameters
img_thumb/img_tg/img_real - little/original from tg/real size from doc
___reset_param
reset to default
__scrpts
___get_lora
get list LORA`s from stable-diffusion-webui/models/Lora
___rnd_mdl
script for generating images for all models in random order, taking into account JSON settings
___rnd_smp
script for generating images for one models with all samplers
___inf
Endless script with random width, height, scale, model, sampler, steps, prompt(1. random-word-api.herokuapp.com/word?lang=en, 2.GPT2Tokenizer, 3. lexica.art/api/v1/search?q=2, 4 = 2 + 3)
__mdl
change model from list
__smplr
change sampler from list
__hr
change hr_upscale from list
__prompt
___get
get settings in string
___random_prompt
get random prompt from GPT2Tokenizer FredZhang7 distilgpt2
___lxc_prompt
get random prompt from lexica.art (+ your prompt begin)
_gen
generate images
_skip
skip one or all generations
_help
help

drawing

TODO

  1. use share link (not yet possible, because the API is running in the background)
  2. uploading Lora from TG
  3. uploading models from TG (~4gb)
  4. Logging
  5. show error in tg
  6. translate
  7. Get all files/pictures from the computer for today (preview and seeds)
  8. Several prompts in one via ;
  9. Ability to send everything with one command with settings
  10. Preloading photos when waiting for a long time so that you can skip
  11. Uploading random.json from export TG channel
  12. Progress in script

TNX
AUTOMATIC1111
API
aiogram
And respect for Santa 🎅

Donations are not needed. Who wants to subscribe to my generations

© Mishgen