Commit 3db22e6e authored by AUTOMATIC's avatar AUTOMATIC

rename masking to inpaint in UI

make inpaint go to the right place for users who don't have it in config string
parent 30cfe4ed
...@@ -116,7 +116,7 @@ restricted_opts = { ...@@ -116,7 +116,7 @@ restricted_opts = {
} }
ui_reorder_categories = [ ui_reorder_categories = [
"masking", "inpaint",
"sampler", "sampler",
"dimensions", "dimensions",
"cfg", "cfg",
......
...@@ -570,9 +570,9 @@ def create_sampler_and_steps_selection(choices, tabname): ...@@ -570,9 +570,9 @@ def create_sampler_and_steps_selection(choices, tabname):
def ordered_ui_categories(): def ordered_ui_categories():
user_order = {x.strip(): i for i, x in enumerate(shared.opts.ui_reorder.split(","))} user_order = {x.strip(): i * 2 + 1 for i, x in enumerate(shared.opts.ui_reorder.split(","))}
for i, category in sorted(enumerate(shared.ui_reorder_categories), key=lambda x: user_order.get(x[1], x[0] + 1000)): for i, category in sorted(enumerate(shared.ui_reorder_categories), key=lambda x: user_order.get(x[1], x[0] * 2 + 0)):
yield category yield category
...@@ -889,7 +889,7 @@ def create_ui(): ...@@ -889,7 +889,7 @@ def create_ui():
with FormGroup(elem_id="img2img_script_container"): with FormGroup(elem_id="img2img_script_container"):
custom_inputs = modules.scripts.scripts_img2img.setup_ui() custom_inputs = modules.scripts.scripts_img2img.setup_ui()
elif category == "masking": elif category == "inpaint":
with FormGroup(elem_id="inpaint_controls", visible=False) as inpaint_controls: with FormGroup(elem_id="inpaint_controls", visible=False) as inpaint_controls:
with FormRow(): with FormRow():
mask_blur = gr.Slider(label='Mask blur', minimum=0, maximum=64, step=1, value=4, elem_id="img2img_mask_blur") mask_blur = gr.Slider(label='Mask blur', minimum=0, maximum=64, step=1, value=4, elem_id="img2img_mask_blur")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment