diff options
author | me <25877290+Kryptortio@users.noreply.github.com> | 2023-01-04 21:03:32 +0000 |
---|---|---|
committer | me <25877290+Kryptortio@users.noreply.github.com> | 2023-01-04 21:14:30 +0000 |
commit | 5851bc839b6f639cda59e84eb1ee8c706986633d (patch) | |
tree | 23eeac4104d9c463541d22c6bd81a84d0f0e9a18 /scripts/custom_code.py | |
parent | bc43293c640aef65df3136de9e5bd8b7e79eb3e0 (diff) | |
download | stable-diffusion-webui-gfx803-5851bc839b6f639cda59e84eb1ee8c706986633d.tar.gz stable-diffusion-webui-gfx803-5851bc839b6f639cda59e84eb1ee8c706986633d.tar.bz2 stable-diffusion-webui-gfx803-5851bc839b6f639cda59e84eb1ee8c706986633d.zip |
Add element ids for script components and a few more in ui.py
Diffstat (limited to 'scripts/custom_code.py')
-rw-r--r-- | scripts/custom_code.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/custom_code.py b/scripts/custom_code.py index 22e7b77a..841fed97 100644 --- a/scripts/custom_code.py +++ b/scripts/custom_code.py @@ -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]
|