Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -168,7 +168,7 @@ def preview_image_and_mask(image, width, height, overlap_percentage, resize_opti
|
|
168 |
|
169 |
return preview
|
170 |
|
171 |
-
@spaces.GPU(
|
172 |
def infer(
|
173 |
image,
|
174 |
width,
|
@@ -212,7 +212,7 @@ def infer(
|
|
212 |
- The intermediate ControlNet input image (showing the masked area).
|
213 |
- The final generated image with the inpainted region.
|
214 |
"""
|
215 |
-
gr.Info("10 seconds will be used from your daily ZeroGPU time credits.")
|
216 |
background, mask = prepare_image_and_mask(
|
217 |
image, width, height, overlap_percentage,
|
218 |
resize_option, custom_resize_percentage, alignment,
|
@@ -247,7 +247,7 @@ def infer(
|
|
247 |
image = image.convert("RGBA")
|
248 |
cnet_image.paste(image, (0, 0), mask)
|
249 |
|
250 |
-
|
251 |
|
252 |
|
253 |
def clear_result():
|
|
|
168 |
|
169 |
return preview
|
170 |
|
171 |
+
@spaces.GPU()
|
172 |
def infer(
|
173 |
image,
|
174 |
width,
|
|
|
212 |
- The intermediate ControlNet input image (showing the masked area).
|
213 |
- The final generated image with the inpainted region.
|
214 |
"""
|
215 |
+
#gr.Info("10 seconds will be used from your daily ZeroGPU time credits.")
|
216 |
background, mask = prepare_image_and_mask(
|
217 |
image, width, height, overlap_percentage,
|
218 |
resize_option, custom_resize_percentage, alignment,
|
|
|
247 |
image = image.convert("RGBA")
|
248 |
cnet_image.paste(image, (0, 0), mask)
|
249 |
|
250 |
+
return background, cnet_image
|
251 |
|
252 |
|
253 |
def clear_result():
|