aboutsummaryrefslogtreecommitdiff
path: root/modules/ui.py
diff options
context:
space:
mode:
authorCodeHatchling <steve@codehatch.com>2023-11-28 16:15:36 -0700
committerCodeHatchling <steve@codehatch.com>2023-11-28 16:15:36 -0700
commitdebf836fcc8d9becc3da8b1a29e33f40b0d9ef3e (patch)
treeebb1ef883d7feab707b874c4e18fa9a1f229e63f /modules/ui.py
parenta6e584645305c0a91a3d46f73546e191b249210f (diff)
Added UI elements to control blending parameters.
Diffstat (limited to 'modules/ui.py')
-rw-r--r--modules/ui.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/ui.py b/modules/ui.py
index 579bab98..86c13086 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -732,6 +732,9 @@ def create_ui():
with FormRow():
mask_blur = gr.Slider(label='Mask blur', minimum=0, maximum=64, step=1, value=4, elem_id="img2img_mask_blur")
mask_alpha = gr.Slider(label="Mask transparency", visible=False, elem_id="img2img_mask_alpha")
+ mask_blend_power = gr.Slider(label='Mask blend power', minimum=0, maximum=8, step=0.1, value=1, elem_id="img2img_mask_blend_power")
+ mask_blend_scale = gr.Slider(label='Mask blend scale', minimum=0, maximum=8, step=0.1, value=1, elem_id="img2img_mask_blend_scale")
+ mask_blend_offset = gr.Slider(label='Mask blend offset', minimum=-4, maximum=4, step=0.1, value=0, elem_id="img2img_mask_blend_offset")
with FormRow():
inpainting_mask_invert = gr.Radio(label='Mask mode', choices=['Inpaint masked', 'Inpaint not masked'], value='Inpaint masked', type="index", elem_id="img2img_mask_mode")
@@ -781,6 +784,9 @@ def create_ui():
sampler_name,
mask_blur,
mask_alpha,
+ mask_blend_power,
+ mask_blend_scale,
+ mask_blend_offset,
inpainting_fill,
batch_count,
batch_size,
@@ -879,6 +885,9 @@ def create_ui():
(toprow.ui_styles.dropdown, lambda d: d["Styles array"] if isinstance(d.get("Styles array"), list) else gr.update()),
(denoising_strength, "Denoising strength"),
(mask_blur, "Mask blur"),
+ (mask_blend_power, "Mask blend power"),
+ (mask_blend_scale, "Mask blend scale"),
+ (mask_blend_offset, "Mask blend offset"),
*scripts.scripts_img2img.infotext_fields
]
parameters_copypaste.add_paste_fields("img2img", init_img, img2img_paste_fields, override_settings)