[FE] Fix default value for guidance scale
This commit is contained in:
parent
7e84144432
commit
4a9d60e00b
|
|
@ -109,6 +109,7 @@ def update_quota(c, apikey, quota):
|
|||
result = c.fetchone()
|
||||
if result is not None:
|
||||
c.execute("UPDATE users SET quota=? WHERE apikey=?", (quota, apikey))
|
||||
raise ValueError(f"{apikey} does not exist")
|
||||
|
||||
|
||||
def update_username(c, apikey, username):
|
||||
|
|
@ -212,6 +213,8 @@ def manage(args):
|
|||
)
|
||||
elif args.table_action == "show":
|
||||
modify_table(c, args.table_name, args.table_action)
|
||||
elif args.update_type == "quota":
|
||||
update_quota(c, args.apikey, args.quota)
|
||||
elif args.action == "delete":
|
||||
if args.delete_type == "user":
|
||||
delete_user(c, args.username)
|
||||
|
|
@ -248,6 +251,11 @@ def main():
|
|||
update_user_parser.add_argument("username")
|
||||
update_user_parser.add_argument("apikey")
|
||||
|
||||
# Sub-parser for updating a quota
|
||||
update_quota_parser = update_subparsers.add_parser("quota")
|
||||
update_quota_parser.add_argument("apikey")
|
||||
update_quota_parser.add_argument("quota")
|
||||
|
||||
# Sub-parser for updating a table
|
||||
update_table_parser = update_subparsers.add_parser("table")
|
||||
update_table_subparsers = update_table_parser.add_subparsers(
|
||||
|
|
|
|||
|
|
@ -366,7 +366,7 @@
|
|||
}
|
||||
var guidanceScaleVal = parseFloat($('#inputGuidanceScale').val())
|
||||
if (isNaN(guidanceScaleVal)) {
|
||||
guidanceScaleVal = 25.0;
|
||||
guidanceScaleVal = 12.5;
|
||||
}
|
||||
var stepsVal = parseInt($('#inputSteps').val());
|
||||
if (isNaN(stepsVal)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue