Skip to content

Commit

Permalink
Merge pull request #10 from limithit/limithit-patch-1
Browse files Browse the repository at this point in the history
fix  "This method is deprecated. Please set these arguments in the co…
  • Loading branch information
limithit authored Sep 26, 2023
2 parents 65dd095 + eb943a3 commit 6c53351
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/inpaint_anything.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,21 +158,21 @@ def on_ui_tabs():
get_mask_btn = gr.Button("Get mask", elem_id="get_mask_btn")
with gr.Row():
with gr.Column():
mask_out_image = gr.Image(label="Get mask image", elem_id="mask_out_image", type="numpy", interactive=False).style(height=480)
mask_out_image = gr.Image(label="Get mask image", elem_id="mask_out_image", type="numpy", interactive=False, height=480)
with gr.Row():
with gr.Column():
mask_send_to_inpaint_btn = gr.Button("Send to img2img inpaint", elem_id="mask_send_to_inpaint_btn")

with gr.Column():
with gr.Row():
sam_image = gr.Image(label="Fill the background image", elem_id="sam_image", type="numpy", tool="sketch", brush_radius=8,
interactive=True).style(height=480)
interactive=True, height=480)
with gr.Row():
with gr.Column():
select_btn = gr.Button("Create mask", elem_id="select_btn")
with gr.Row():
sel_mask = gr.Image(label="Create mask image", elem_id="sel_mask", type="numpy", tool="sketch", brush_radius=12,
interactive=True).style(height=480)
interactive=True, height=480)

input_image.upload(input_image_upload, inputs=[input_image, sam_image, sel_mask], outputs=[sam_image, sel_mask, sam_btn])
sam_btn.click(run_sam, inputs=[input_image, sam_image], outputs=[sam_image, status_text]).then(
Expand Down Expand Up @@ -204,4 +204,4 @@ def on_ui_settings():
127, "Fill value used when Padding is set to constant", gr.Slider, {"minimum":0, "maximum":255, "step":1}, section=section))

script_callbacks.on_ui_settings(on_ui_settings)
script_callbacks.on_ui_tabs(on_ui_tabs)
script_callbacks.on_ui_tabs(on_ui_tabs)

0 comments on commit 6c53351

Please sign in to comment.