Add element ids for script components and a few more in ui.py

This commit is contained in:
me
2023-01-04 22:03:32 +01:00
parent bc43293c64
commit 5851bc839b
10 changed files with 63 additions and 46 deletions

View File

@@ -14,7 +14,9 @@ class Script(scripts.Script):
return cmd_opts.allow_code
def ui(self, is_img2img):
code = gr.Textbox(label="Python code", lines=1)
elem_prefix = ('i2i' if is_img2img else 't2i') + '_script_custom_code_'
code = gr.Textbox(label="Python code", lines=1, elem_id=elem_prefix + "code")
return [code]