Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -90,7 +90,7 @@ def inpaint(ip, image_editor, prompt, neg_prompt, width, height, ip_scale, stren
|
|
90 |
num_inference_steps=steps,
|
91 |
).images
|
92 |
|
93 |
-
return images[0]
|
94 |
|
95 |
|
96 |
with gr.Blocks() as demo:
|
@@ -116,6 +116,8 @@ with gr.Blocks() as demo:
|
|
116 |
inpaint_button = gr.Button("Generate")
|
117 |
|
118 |
output_image = gr.Image(label='Result')
|
|
|
|
|
119 |
|
120 |
with gr.Accordion("Advanced Settings", open=False):
|
121 |
neg_prompt = gr.Textbox(label='Negative Prompt', value='ugly, deformed, nsfw')
|
@@ -128,6 +130,6 @@ with gr.Blocks() as demo:
|
|
128 |
|
129 |
text_button.click(text_to_image, inputs=[text_ip, text_prompt, neg_prompt, width_slider, height_slider, ip_scale_slider, strength_slider, guidance_slider, steps_slider], outputs=output_image)
|
130 |
image_button.click(image_to_image, inputs=[image_ip, image_image, image_prompt, neg_prompt, width_slider, height_slider, ip_scale_slider, strength_slider, guidance_slider, steps_slider], outputs=output_image)
|
131 |
-
inpaint_button.click(inpaint, inputs=[inpaint_ip, inpaint_editor, inpaint_prompt, neg_prompt, width_slider, height_slider, ip_scale_slider, strength_slider, guidance_slider, steps_slider], outputs=output_image)
|
132 |
|
133 |
demo.launch()
|
|
|
90 |
num_inference_steps=steps,
|
91 |
).images
|
92 |
|
93 |
+
return images[0], image, mask
|
94 |
|
95 |
|
96 |
with gr.Blocks() as demo:
|
|
|
116 |
inpaint_button = gr.Button("Generate")
|
117 |
|
118 |
output_image = gr.Image(label='Result')
|
119 |
+
output1_image = gr.Image(label='Result')
|
120 |
+
output2_image = gr.Image(label='Result')
|
121 |
|
122 |
with gr.Accordion("Advanced Settings", open=False):
|
123 |
neg_prompt = gr.Textbox(label='Negative Prompt', value='ugly, deformed, nsfw')
|
|
|
130 |
|
131 |
text_button.click(text_to_image, inputs=[text_ip, text_prompt, neg_prompt, width_slider, height_slider, ip_scale_slider, strength_slider, guidance_slider, steps_slider], outputs=output_image)
|
132 |
image_button.click(image_to_image, inputs=[image_ip, image_image, image_prompt, neg_prompt, width_slider, height_slider, ip_scale_slider, strength_slider, guidance_slider, steps_slider], outputs=output_image)
|
133 |
+
inpaint_button.click(inpaint, inputs=[inpaint_ip, inpaint_editor, inpaint_prompt, neg_prompt, width_slider, height_slider, ip_scale_slider, strength_slider, guidance_slider, steps_slider], outputs=[output_image,output1_image,output2_image])
|
134 |
|
135 |
demo.launch()
|