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

View File

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