Update app.py
Browse files
app.py
CHANGED
|
@@ -242,7 +242,8 @@ def inpaint(image, invert):
|
|
| 242 |
|
| 243 |
def predict(im):
|
| 244 |
# return im["composite"]
|
| 245 |
-
return im["inputmask"]
|
|
|
|
| 246 |
|
| 247 |
block = gr.Blocks().queue()
|
| 248 |
with block:
|
|
@@ -269,7 +270,7 @@ with block:
|
|
| 269 |
gr.Markdown("## Inpaint \n<p>Mochi Diffusion v4.1γ§δ½Ώγγγγγ«γͺγγΎγγ")
|
| 270 |
with gr.Row():
|
| 271 |
with gr.Column():
|
| 272 |
-
input_image = gr.ImageMask(sources="upload", type="numpy", height="auto"
|
| 273 |
im_preview = gr.Image()
|
| 274 |
input_image.change(predict, outputs=im_preview, inputs=input_image, show_progress="hidden")
|
| 275 |
# input_image = gr.ImageEditor(sources="upload", type="numpy", height="auto", layers="False", brush=gr.Brush(colors=["#000000"]))
|
|
|
|
| 242 |
|
| 243 |
def predict(im):
|
| 244 |
# return im["composite"]
|
| 245 |
+
# return im["inputmask"] # bad
|
| 246 |
+
return im["layers"][0]
|
| 247 |
|
| 248 |
block = gr.Blocks().queue()
|
| 249 |
with block:
|
|
|
|
| 270 |
gr.Markdown("## Inpaint \n<p>Mochi Diffusion v4.1γ§δ½Ώγγγγγ«γͺγγΎγγ")
|
| 271 |
with gr.Row():
|
| 272 |
with gr.Column():
|
| 273 |
+
input_image = gr.ImageMask(sources="upload", type="numpy", height="auto")
|
| 274 |
im_preview = gr.Image()
|
| 275 |
input_image.change(predict, outputs=im_preview, inputs=input_image, show_progress="hidden")
|
| 276 |
# input_image = gr.ImageEditor(sources="upload", type="numpy", height="auto", layers="False", brush=gr.Brush(colors=["#000000"]))
|