Update modules/api/api.py

Suggested change by @akx

Co-authored-by: Aarni Koskela <akx@iki.fi>
This commit is contained in:
Yea Chen 2023-03-07 04:04:35 +08:00 committed by GitHub
parent c48bbccf12
commit f85a192f99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 8 deletions

View File

@ -177,14 +177,8 @@ class Api:
return script, script_idx
def get_scripts_list(self):
t2ilist = []
i2ilist = []
for a in scripts.scripts_txt2img.titles:
t2ilist.append(str(a.lower()))
for b in scripts.scripts_img2img.titles:
i2ilist.append(str(b.lower()))
t2ilist = [str(title.lower()) for title in scripts.scripts_txt2img.titles]
i2ilist = [str(title.lower()) for title in scripts.scripts_img2img.titles]
return ScriptsList(txt2img = t2ilist, img2img = i2ilist)