atatakun commited on
Commit
26ed789
β€’
1 Parent(s): 3a0b4ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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", elem_id="inputmask")
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"]))