Skip to content

Commit

Permalink
reorder some controls
Browse files Browse the repository at this point in the history
  • Loading branch information
wkpark committed Feb 14, 2024
1 parent 012bf6e commit 01ef029
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions scripts/ddetailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ def ui(self, is_img2img):
elem_id="mudd_" + ("img2img" if is_img2img else "txt2img") + "_neg_prompt",
elem_classes=["prompt"],
)
with gr.Group(visible=False) as model_a_options:
with gr.Group(visible=True) as model_a_options:
with gr.Row():
with gr.Column():
with gr.Row():
Expand Down Expand Up @@ -1078,6 +1078,19 @@ def ui(self, is_img2img):
dd_offset_x_b = gr.Slider(label='X offset (B)', minimum=-200, maximum=200, step=1, value=0, min_width=140)
dd_offset_y_b = gr.Slider(label='Y offset (B)', minimum=-200, maximum=200, step=1, value=0, min_width=140)

with gr.Row():
with gr.Group(visible=False) as model_b_options_2:
with gr.Row():
dd_preprocess_b = gr.Radio(label="Inpaint B detections", choices=[
("before inpainting A", "before"),
("None", "none"),
], info="hands or other detections",
value="none")

with gr.Group(visible=False) as operation:
with gr.Row():
dd_bitwise_op = gr.Radio(label='Bitwise Mask operation', info="Mask operation A and B", choices=['None', 'A&B', 'A-B'], value="None")

with gr.Accordion("Advanced options", open=False):
with gr.Row():
dd_max_per_img_b = gr.Slider(label='Max detections (B) (0: use default)', minimum=0, maximum=100, step=1, value=0, min_width=140)
Expand Down Expand Up @@ -1147,16 +1160,6 @@ def ui(self, is_img2img):
dd_inpaint_height = gr.Slider(label='Inpaint height', minimum=0, maximum=2048, step=32, value=0, min_width=140)
with gr.Row():
inpaint_size_preset = gr.Radio(label="Inpaint w x h presets", choices=["default", "512x512", "640x640", "768x768", "1024x1024"], value="default")
with gr.Group(visible=False) as model_b_options_2:
with gr.Row():
dd_preprocess_b = gr.Radio(label="Inpaint B detections", choices=[
("before inpainting A", "before"),
("None", "none"),
], value="none")

with gr.Group(visible=False) as operation:
with gr.Row():
dd_bitwise_op = gr.Radio(label='Bitwise Mask operation', info="Mask operation A and B", choices=['None', 'A&B', 'A-B'], value="None")

def inpaint_preset(preset):
if "x" in preset:
Expand Down

0 comments on commit 01ef029

Please sign in to comment.