Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -152,7 +152,7 @@ def prepare_image_and_mask(image, width, height, overlap_percentage, resize_opti
|
|
152 |
|
153 |
return background, mask
|
154 |
|
155 |
-
@spaces.GPU(duration=
|
156 |
def infer(image, width, height, overlap_percentage, num_inference_steps, resize_option, custom_resize_percentage, prompt_input, alignment, overlap_left, overlap_right, overlap_top, overlap_bottom, selected_model):
|
157 |
background, mask = prepare_image_and_mask(image, width, height, overlap_percentage, resize_option, custom_resize_percentage, alignment, overlap_left, overlap_right, overlap_top, overlap_bottom)
|
158 |
|
@@ -246,7 +246,7 @@ h1 {
|
|
246 |
title = """<h1 align="center">Diffusers Image Outpaint Lightning</h1>
|
247 |
"""
|
248 |
|
249 |
-
with gr.Blocks(css=css) as demo:
|
250 |
with gr.Column():
|
251 |
gr.HTML(title)
|
252 |
|
@@ -333,10 +333,10 @@ with gr.Blocks(css=css) as demo:
|
|
333 |
|
334 |
gr.Examples(
|
335 |
examples=[
|
336 |
-
["./examples/
|
337 |
-
["./examples/
|
338 |
-
["./examples/
|
339 |
-
["./examples/
|
340 |
],
|
341 |
inputs=[input_image, width_slider, height_slider, alignment_dropdown],
|
342 |
)
|
|
|
152 |
|
153 |
return background, mask
|
154 |
|
155 |
+
@spaces.GPU(duration=20)
|
156 |
def infer(image, width, height, overlap_percentage, num_inference_steps, resize_option, custom_resize_percentage, prompt_input, alignment, overlap_left, overlap_right, overlap_top, overlap_bottom, selected_model):
|
157 |
background, mask = prepare_image_and_mask(image, width, height, overlap_percentage, resize_option, custom_resize_percentage, alignment, overlap_left, overlap_right, overlap_top, overlap_bottom)
|
158 |
|
|
|
246 |
title = """<h1 align="center">Diffusers Image Outpaint Lightning</h1>
|
247 |
"""
|
248 |
|
249 |
+
with gr.Blocks(with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo: css=css) as demo:
|
250 |
with gr.Column():
|
251 |
gr.HTML(title)
|
252 |
|
|
|
333 |
|
334 |
gr.Examples(
|
335 |
examples=[
|
336 |
+
["./examples/1.png", 1280, 720, "Middle"],
|
337 |
+
["./examples/2.png", 1440, 810, "Left"],
|
338 |
+
["./examples/3.png", 1024, 1024, "Top"],
|
339 |
+
["./examples/4.png", 1024, 1024, "Bottom"],
|
340 |
],
|
341 |
inputs=[input_image, width_slider, height_slider, alignment_dropdown],
|
342 |
)
|