mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-08 19:40:33 -08:00
Add element ids for script components and a few more in ui.py
This commit is contained in:
parent
bc43293c64
commit
5851bc839b
10 changed files with 63 additions and 46 deletions
|
|
@ -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]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue