forked from AI621/ai621
button for negative_prompt removal
This commit is contained in:
parent
5ba5b6043c
commit
b3e13ea6e8
7
bot.py
7
bot.py
|
@ -113,6 +113,12 @@ async def edit_pending(ev):
|
|||
await ev.respond('Something went wrong. Try /start again.')
|
||||
return
|
||||
|
||||
if field == 'negative_prompt':
|
||||
if data == 'no_negative_prompt':
|
||||
conn.execute('UPDATE pending_prompt SET negative_prompt = NULL WHERE user_id = ?', (ev.input_sender.user_id,))
|
||||
conn.execute(f"UPDATE user SET pending_action = NULL WHERE id = ?", (ev.input_sender.user_id,))
|
||||
return await edit_prompt(ev)
|
||||
|
||||
if field == 'number':
|
||||
try:
|
||||
data = int(data)
|
||||
|
@ -460,6 +466,7 @@ desc = {
|
|||
|
||||
desc_buttons = {
|
||||
'seed': [Button.inline(f"Get from last prompt", f"msg_but:last_prompt"),],
|
||||
'negative_prompt': [Button.inline(f"🚫 Remove negative prompt", f"msg_but:no_negative_prompt")],
|
||||
'number': [Button.inline(f"1️⃣", f"msg_but:1"), Button.inline(f"2️⃣", f"msg_but:2"), Button.inline(f"3️⃣", f"msg_but:3"), Button.inline(f"4️⃣", f"msg_but:4")],
|
||||
'detail': [Button.inline(f"S (6.0)", f"msg_but:6"), Button.inline(f"M (10)", f"msg_but:10"), Button.inline(f"L (18)", f"msg_but:18")],
|
||||
'inference_steps': [Button.inline(f"S (20)", f"msg_but:20"), Button.inline(f"M (40)", f"msg_but:40"), Button.inline(f"L (60)", f"msg_but:60")],
|
||||
|
|
Loading…
Reference in New Issue