Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
#1
by
LPX55
- opened
app.py
CHANGED
|
@@ -489,7 +489,7 @@ with gr.Blocks(css=css, fill_height=True) as demo:
|
|
| 489 |
|
| 490 |
with gr.Row():
|
| 491 |
with gr.Column():
|
| 492 |
-
|
| 493 |
type="pil",
|
| 494 |
label="Input Image"
|
| 495 |
)
|
|
@@ -573,7 +573,7 @@ with gr.Blocks(css=css, fill_height=True) as demo:
|
|
| 573 |
["./examples/example_3.jpg", 1024, 1024, "Top"],
|
| 574 |
["./examples/example_3.jpg", 1024, 1024, "Bottom"],
|
| 575 |
],
|
| 576 |
-
inputs=[
|
| 577 |
)
|
| 578 |
|
| 579 |
|
|
@@ -597,7 +597,7 @@ with gr.Blocks(css=css, fill_height=True) as demo:
|
|
| 597 |
use_as_input_button.click(
|
| 598 |
fn=use_output_as_input,
|
| 599 |
inputs=[result],
|
| 600 |
-
outputs=[
|
| 601 |
)
|
| 602 |
|
| 603 |
# Set up event handlers
|
|
@@ -641,7 +641,7 @@ with gr.Blocks(css=css, fill_height=True) as demo:
|
|
| 641 |
outputs=result,
|
| 642 |
).then( # Generate the new image
|
| 643 |
fn=infer,
|
| 644 |
-
inputs=[
|
| 645 |
resize_option, custom_resize_percentage, prompt_input, alignment_dropdown,
|
| 646 |
overlap_left, overlap_right, overlap_top, overlap_bottom],
|
| 647 |
outputs=result,
|
|
@@ -661,7 +661,7 @@ with gr.Blocks(css=css, fill_height=True) as demo:
|
|
| 661 |
outputs=result,
|
| 662 |
).then( # Generate the new image
|
| 663 |
fn=infer,
|
| 664 |
-
inputs=[
|
| 665 |
resize_option, custom_resize_percentage, prompt_input, alignment_dropdown,
|
| 666 |
overlap_left, overlap_right, overlap_top, overlap_bottom],
|
| 667 |
outputs=result,
|
|
@@ -677,7 +677,7 @@ with gr.Blocks(css=css, fill_height=True) as demo:
|
|
| 677 |
|
| 678 |
preview_button.click(
|
| 679 |
fn=preview_image_and_mask,
|
| 680 |
-
inputs=[
|
| 681 |
overlap_left, overlap_right, overlap_top, overlap_bottom],
|
| 682 |
outputs=preview_image,
|
| 683 |
queue=False
|
|
@@ -685,7 +685,7 @@ with gr.Blocks(css=css, fill_height=True) as demo:
|
|
| 685 |
|
| 686 |
runout_button.click(
|
| 687 |
fn=infer,
|
| 688 |
-
inputs=[
|
| 689 |
resize_option, custom_resize_percentage, prompt_input, alignment_dropdown,
|
| 690 |
overlap_left, overlap_right, overlap_top, overlap_bottom],
|
| 691 |
outputs=result,
|
|
@@ -693,7 +693,7 @@ with gr.Blocks(css=css, fill_height=True) as demo:
|
|
| 693 |
|
| 694 |
preview_button.click(
|
| 695 |
fn=preview_image_and_mask,
|
| 696 |
-
inputs=[
|
| 697 |
overlap_left, overlap_right, overlap_top, overlap_bottom],
|
| 698 |
outputs=preview_image,
|
| 699 |
queue=False
|
|
|
|
| 489 |
|
| 490 |
with gr.Row():
|
| 491 |
with gr.Column():
|
| 492 |
+
outpaint_input_image = gr.Image(
|
| 493 |
type="pil",
|
| 494 |
label="Input Image"
|
| 495 |
)
|
|
|
|
| 573 |
["./examples/example_3.jpg", 1024, 1024, "Top"],
|
| 574 |
["./examples/example_3.jpg", 1024, 1024, "Bottom"],
|
| 575 |
],
|
| 576 |
+
inputs=[outpaint_input_image, width_slider, height_slider, alignment_dropdown],
|
| 577 |
)
|
| 578 |
|
| 579 |
|
|
|
|
| 597 |
use_as_input_button.click(
|
| 598 |
fn=use_output_as_input,
|
| 599 |
inputs=[result],
|
| 600 |
+
outputs=[outpaint_input_image]
|
| 601 |
)
|
| 602 |
|
| 603 |
# Set up event handlers
|
|
|
|
| 641 |
outputs=result,
|
| 642 |
).then( # Generate the new image
|
| 643 |
fn=infer,
|
| 644 |
+
inputs=[outpaint_input_image, width_slider, height_slider, overlap_percentage, num_inference_steps,
|
| 645 |
resize_option, custom_resize_percentage, prompt_input, alignment_dropdown,
|
| 646 |
overlap_left, overlap_right, overlap_top, overlap_bottom],
|
| 647 |
outputs=result,
|
|
|
|
| 661 |
outputs=result,
|
| 662 |
).then( # Generate the new image
|
| 663 |
fn=infer,
|
| 664 |
+
inputs=[outpaint_input_image, width_slider, height_slider, overlap_percentage, num_inference_steps,
|
| 665 |
resize_option, custom_resize_percentage, prompt_input, alignment_dropdown,
|
| 666 |
overlap_left, overlap_right, overlap_top, overlap_bottom],
|
| 667 |
outputs=result,
|
|
|
|
| 677 |
|
| 678 |
preview_button.click(
|
| 679 |
fn=preview_image_and_mask,
|
| 680 |
+
inputs=[outpaint_input_image, width_slider, height_slider, overlap_percentage, resize_option, custom_resize_percentage, alignment_dropdown,
|
| 681 |
overlap_left, overlap_right, overlap_top, overlap_bottom],
|
| 682 |
outputs=preview_image,
|
| 683 |
queue=False
|
|
|
|
| 685 |
|
| 686 |
runout_button.click(
|
| 687 |
fn=infer,
|
| 688 |
+
inputs=[outpaint_input_image, width_slider, height_slider, overlap_percentage, num_inference_steps,
|
| 689 |
resize_option, custom_resize_percentage, prompt_input, alignment_dropdown,
|
| 690 |
overlap_left, overlap_right, overlap_top, overlap_bottom],
|
| 691 |
outputs=result,
|
|
|
|
| 693 |
|
| 694 |
preview_button.click(
|
| 695 |
fn=preview_image_and_mask,
|
| 696 |
+
inputs=[outpaint_input_image, width_slider, height_slider, overlap_percentage, resize_option, custom_resize_percentage, alignment_dropdown,
|
| 697 |
overlap_left, overlap_right, overlap_top, overlap_bottom],
|
| 698 |
outputs=preview_image,
|
| 699 |
queue=False
|