mirror of
https://github.com/5shekel/stable-diffusion-telegram-bot.git
synced 2024-05-22 19:33:14 +03:00
Compare commits
No commits in common. "9bce6f989ef07ceb6e7ad5f264d938093d0f331c" and "76b529b468a11610a8b1b9a2cb02a8543b9a977f" have entirely different histories.
9bce6f989e
...
76b529b468
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,3 @@
|
|||
*.png
|
||||
.env
|
||||
.session
|
||||
*.session
|
|
@ -6,12 +6,12 @@ this is a txt2img bot running on tami telegram channel
|
|||
|
||||
supported invocation:
|
||||
`/draw <text>` - send prompt text to the bot and it will draw an image
|
||||
you can add `negative_prompt` using `ng: <text>`
|
||||
you can add `negative_prompt` using `ng <text>`
|
||||
|
||||
examples:
|
||||
`/draw a city street`
|
||||
and without people
|
||||
`/draw a city street ng: 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.
|
||||
|
|
4
main.py
4
main.py
|
@ -28,7 +28,7 @@ app = Client("stable", api_id=API_ID, api_hash=API_HASH, bot_token=TOKEN)
|
|||
|
||||
|
||||
def slice_positive_negative(string):
|
||||
delimiter = "ng:"
|
||||
delimiter = "ng"
|
||||
if delimiter in string:
|
||||
index = string.index(delimiter)
|
||||
positive = string[:index].rstrip()
|
||||
|
@ -43,7 +43,7 @@ def draw(client, message):
|
|||
msgs = message.text.split(" ", 1)
|
||||
if len(msgs) == 1:
|
||||
message.reply_text(
|
||||
"Format :\n/draw < text to image >\nng: < negative (optional) >"
|
||||
"Format :\n/draw < text to image >\nng < negative (optional) >"
|
||||
)
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user