aboutsummaryrefslogtreecommitdiff
path: root/scripts/custom_code.py
diff options
context:
space:
mode:
authorme <25877290+Kryptortio@users.noreply.github.com>2023-01-04 22:03:32 +0100
committerme <25877290+Kryptortio@users.noreply.github.com>2023-01-04 22:14:30 +0100
commit5851bc839b6f639cda59e84eb1ee8c706986633d (patch)
tree23eeac4104d9c463541d22c6bd81a84d0f0e9a18 /scripts/custom_code.py
parentbc43293c640aef65df3136de9e5bd8b7e79eb3e0 (diff)
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.py4
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]