Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -72,7 +72,7 @@ pipe.to("cuda")
|
|
| 72 |
# )
|
| 73 |
# pipe_inpaint.to("cuda")
|
| 74 |
|
| 75 |
-
@spaces.GPU(duration=
|
| 76 |
def fill_image(prompt, image, model_selection, paste_back):
|
| 77 |
(
|
| 78 |
prompt_embeds,
|
|
@@ -240,7 +240,7 @@ def preview_image_and_mask(image, width, height, overlap_percentage, resize_opti
|
|
| 240 |
return preview
|
| 241 |
|
| 242 |
|
| 243 |
-
@spaces.GPU(duration=
|
| 244 |
def inpaint(prompt, image, inpaint_model, paste_back):
|
| 245 |
global pipe
|
| 246 |
if pipe.config.model_name != MODELS[model_name]:
|
|
@@ -264,7 +264,7 @@ def inpaint(prompt, image, inpaint_model, paste_back):
|
|
| 264 |
|
| 265 |
return result
|
| 266 |
|
| 267 |
-
@spaces.GPU(duration=
|
| 268 |
def outpaint(image, width, height, overlap_percentage, num_inference_steps, resize_option, custom_resize_percentage, prompt_input, alignment, overlap_left, overlap_right, overlap_top, overlap_bottom):
|
| 269 |
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)
|
| 270 |
|
|
@@ -298,7 +298,7 @@ def outpaint(image, width, height, overlap_percentage, num_inference_steps, resi
|
|
| 298 |
|
| 299 |
yield background, cnet_image
|
| 300 |
|
| 301 |
-
@spaces.GPU(duration=
|
| 302 |
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):
|
| 303 |
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)
|
| 304 |
|
|
|
|
| 72 |
# )
|
| 73 |
# pipe_inpaint.to("cuda")
|
| 74 |
|
| 75 |
+
@spaces.GPU(duration=12)
|
| 76 |
def fill_image(prompt, image, model_selection, paste_back):
|
| 77 |
(
|
| 78 |
prompt_embeds,
|
|
|
|
| 240 |
return preview
|
| 241 |
|
| 242 |
|
| 243 |
+
@spaces.GPU(duration=12)
|
| 244 |
def inpaint(prompt, image, inpaint_model, paste_back):
|
| 245 |
global pipe
|
| 246 |
if pipe.config.model_name != MODELS[model_name]:
|
|
|
|
| 264 |
|
| 265 |
return result
|
| 266 |
|
| 267 |
+
@spaces.GPU(duration=12)
|
| 268 |
def outpaint(image, width, height, overlap_percentage, num_inference_steps, resize_option, custom_resize_percentage, prompt_input, alignment, overlap_left, overlap_right, overlap_top, overlap_bottom):
|
| 269 |
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)
|
| 270 |
|
|
|
|
| 298 |
|
| 299 |
yield background, cnet_image
|
| 300 |
|
| 301 |
+
@spaces.GPU(duration=12)
|
| 302 |
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):
|
| 303 |
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)
|
| 304 |
|