mirror of https://github.com/skygpu/skynet.git
Bump version, fix redo help text and add media group response on img2img
parent
aaecd41fb6
commit
4b2d8a3525
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
VERSION = '0.1a7'
|
VERSION = '0.1a8'
|
||||||
|
|
||||||
DOCKER_RUNTIME_CUDA = 'skynet:runtime-cuda'
|
DOCKER_RUNTIME_CUDA = 'skynet:runtime-cuda'
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ config is individual to each user!
|
||||||
|
|
||||||
/txt2img TEXT - request an image based on a prompt
|
/txt2img TEXT - request an image based on a prompt
|
||||||
|
|
||||||
/redo - re ont
|
/redo - redo last command (only works for txt2img for now!)
|
||||||
|
|
||||||
/help step - get info on step config option
|
/help step - get info on step config option
|
||||||
/help guidance - get info on guidance config option
|
/help guidance - get info on guidance config option
|
||||||
|
|
|
@ -11,7 +11,7 @@ import pynng
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from trio_asyncio import aio_as_trio
|
from trio_asyncio import aio_as_trio
|
||||||
|
|
||||||
from telebot.types import InputFile
|
from telebot.types import InputFile, InputMediaPhoto
|
||||||
from telebot.async_telebot import AsyncTeleBot
|
from telebot.async_telebot import AsyncTeleBot
|
||||||
|
|
||||||
from ..constants import *
|
from ..constants import *
|
||||||
|
@ -38,7 +38,7 @@ def prepare_metainfo_caption(tguser, meta: dict) -> str:
|
||||||
meta_str += f'step: {meta["step"]}\n'
|
meta_str += f'step: {meta["step"]}\n'
|
||||||
meta_str += f'guidance: {meta["guidance"]}\n'
|
meta_str += f'guidance: {meta["guidance"]}\n'
|
||||||
if meta['strength']:
|
if meta['strength']:
|
||||||
meta_str += f'strength: {meta["strength"]}'
|
meta_str += f'strength: {meta["strength"]}\n'
|
||||||
meta_str += f'algo: \"{meta["algo"]}\"\n'
|
meta_str += f'algo: \"{meta["algo"]}\"\n'
|
||||||
if meta['upscaler']:
|
if meta['upscaler']:
|
||||||
meta_str += f'upscaler: \"{meta["upscaler"]}\"\n'
|
meta_str += f'upscaler: \"{meta["upscaler"]}\"\n'
|
||||||
|
@ -174,10 +174,15 @@ async def run_skynet_telegram(
|
||||||
logging.info(f'got image of size: {len(img_raw)}')
|
logging.info(f'got image of size: {len(img_raw)}')
|
||||||
img = Image.open(io.BytesIO(img_raw))
|
img = Image.open(io.BytesIO(img_raw))
|
||||||
|
|
||||||
await bot.send_photo(
|
await bot.send_media_group(
|
||||||
GROUP_ID,
|
GROUP_ID,
|
||||||
caption=prepare_metainfo_caption(message.from_user, result['meta']['meta']),
|
media=[
|
||||||
photo=img,
|
InputMediaPhoto(file_id),
|
||||||
|
InputMediaPhoto(
|
||||||
|
img,
|
||||||
|
caption=prepare_metainfo_caption(message.from_user, result['meta']['meta'])
|
||||||
|
)
|
||||||
|
],
|
||||||
reply_to_message_id=reply_id
|
reply_to_message_id=reply_id
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue