UniControl icon indicating copy to clipboard operation
UniControl copied to clipboard

Can't draw a mask on Inpainting tab of Gradio Demo

Open edtjulien opened this issue 2 years ago • 2 comments

Hello!

Thanks for this great work. I got some good results.

Btw, I would like to try the inpainting with your Gradio Demo in HF. But it seems it's no visual tools to create the mask on the original image? How to try inpainting in Gradio HF?

edtjulien avatar Jul 26 '23 19:07 edtjulien

Good idea! We can easily enable rectangular mask on this gradio demo. But the interactive masking with irregular contours would be super challenging.

Please let me know if you have noticed similar demos that have interactive masking.

canqin001 avatar Jul 27 '23 00:07 canqin001

Fortunately it seems to be an option for this in Gradio Image object:

https://www.gradio.app/docs/image

The option is tool="sketch" and the result is a dictionary with "image" and "mask" keys

An example of use: https://github.com/lllyasviel/ControlNet-v1-1-nightly/blob/main/gradio_inpaint.py

edtjulien avatar Jul 27 '23 07:07 edtjulien