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/sd_upscale.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/sd_upscale.py')
-rw-r--r-- | scripts/sd_upscale.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/sd_upscale.py b/scripts/sd_upscale.py index 9739545c..9f483a67 100644 --- a/scripts/sd_upscale.py +++ b/scripts/sd_upscale.py @@ -17,10 +17,12 @@ class Script(scripts.Script): return is_img2img
def ui(self, is_img2img):
+ elem_prefix = ('i2i' if is_img2img else 't2i') + '_script_sd_upscale_'
+
info = gr.HTML("<p style=\"margin-bottom:0.75em\">Will upscale the image by the selected scale factor; use width and height sliders to set tile size</p>")
- overlap = gr.Slider(minimum=0, maximum=256, step=16, label='Tile overlap', value=64)
- scale_factor = gr.Slider(minimum=1.0, maximum=4.0, step=0.05, label='Scale Factor', value=2.0)
- upscaler_index = gr.Radio(label='Upscaler', choices=[x.name for x in shared.sd_upscalers], value=shared.sd_upscalers[0].name, type="index")
+ overlap = gr.Slider(minimum=0, maximum=256, step=16, label='Tile overlap', value=64, elem_id=elem_prefix + "overlap")
+ scale_factor = gr.Slider(minimum=1.0, maximum=4.0, step=0.05, label='Scale Factor', value=2.0, elem_id=elem_prefix + "scale_factor")
+ upscaler_index = gr.Radio(label='Upscaler', choices=[x.name for x in shared.sd_upscalers], value=shared.sd_upscalers[0].name, type="index", elem_id=elem_prefix + "upscaler_index")
return [info, overlap, upscaler_index, scale_factor]
|