Skip to content

Commit 982138c

Browse files
fix gradio warnings (#195)
1 parent b5be424 commit 982138c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/sam.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ def ui_sketch(sam_input_image, is_img2img):
463463
def ui_dilation(sam_output_mask_gallery, sam_output_chosen_mask, sam_input_image):
464464
sam_dilation_checkbox = gr.Checkbox(value=False, label="Expand Mask")
465465
with gr.Column(visible=False) as dilation_column:
466-
sam_dilation_amt = gr.Slider(minimum=0, maximum=100, default=0, value=0, label="Specify the amount that you wish to expand the mask by (recommend 30)")
466+
sam_dilation_amt = gr.Slider(minimum=0, maximum=100, value=0, label="Specify the amount that you wish to expand the mask by (recommend 30)")
467467
sam_dilation_output_gallery = gr.Gallery(label="Expanded Mask", columns=3)
468468
sam_dilation_submit = gr.Button(value="Update Mask")
469469
sam_dilation_submit.click(
@@ -491,7 +491,7 @@ def ui_inpaint(is_img2img, max_cn):
491491

492492

493493
def ui_batch(is_dino):
494-
dino_batch_dilation_amt = gr.Slider(minimum=0, maximum=100, default=0, value=0, label="Specify the amount that you wish to expand the mask by (recommend 0-10)")
494+
dino_batch_dilation_amt = gr.Slider(minimum=0, maximum=100, value=0, label="Specify the amount that you wish to expand the mask by (recommend 0-10)")
495495
dino_batch_source_dir = gr.Textbox(label="Source directory")
496496
dino_batch_dest_dir = gr.Textbox(label="Destination directory")
497497
with gr.Row():
@@ -777,8 +777,8 @@ def layout_show(mode):
777777
inputs=[],
778778
outputs=[])
779779
uncheck.click(
780-
fn=lambda _: (gr.update(value=False), gr.update(value=False), gr.update(value=False)),
781-
inputs=None,
780+
fn=lambda: (gr.update(value=False), gr.update(value=False), gr.update(value=False)),
781+
inputs=[],
782782
outputs=[sam_inpaint_upload_enable, cnet_seg_enable_copy, crop_inpaint_enable],
783783
show_progress=False)
784784

0 commit comments

Comments
 (0)