mirror of https://github.com/skygpu/skynet.git
fix default model and increments for discord ui
parent
35f8276e4e
commit
75268decc4
|
@ -158,7 +158,7 @@ DEFAULT_GUIDANCE = 7.5
|
|||
DEFAULT_STRENGTH = 0.5
|
||||
DEFAULT_STEP = 28
|
||||
DEFAULT_CREDITS = 10
|
||||
DEFAULT_MODEL = 'stablexl'
|
||||
DEFAULT_MODEL = list(MODELS.keys())[4]
|
||||
DEFAULT_ROLE = 'pleb'
|
||||
DEFAULT_UPSCALER = None
|
||||
|
||||
|
|
|
@ -63,9 +63,9 @@ class Txt2ImgButton(discord.ui.Button):
|
|||
await db_call(
|
||||
'update_user_stats', user.id, 'txt2img', last_prompt=prompt)
|
||||
|
||||
ec = await work_request(user, status_msg, 'txt2img', params, msg)
|
||||
success = await work_request(user, status_msg, 'txt2img', params, msg)
|
||||
|
||||
if ec == None:
|
||||
if success:
|
||||
await db_call('increment_generated', user.id)
|
||||
|
||||
|
||||
|
@ -145,13 +145,13 @@ class Img2ImgButton(discord.ui.Button):
|
|||
last_binary=ipfs_hash
|
||||
)
|
||||
|
||||
ec = await work_request(
|
||||
success = await work_request(
|
||||
user, status_msg, 'img2img', params, msg,
|
||||
file_id=file_id,
|
||||
binary_data=ipfs_hash
|
||||
)
|
||||
|
||||
if ec == None:
|
||||
if success:
|
||||
await db_call('increment_generated', user.id)
|
||||
|
||||
|
||||
|
@ -195,13 +195,13 @@ class RedoButton(discord.ui.Button):
|
|||
'prompt': prompt,
|
||||
**user_config
|
||||
}
|
||||
ec = await work_request(
|
||||
success = await work_request(
|
||||
user, status_msg, 'redo', params, interaction,
|
||||
file_id=file_id,
|
||||
binary_data=binary
|
||||
)
|
||||
|
||||
if ec == None:
|
||||
if success:
|
||||
await db_call('increment_generated', user.id)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue