Improve quality and make it work stable with empty text and large inpaint regions

#31
by AlienM - opened

Hello.
I tested HuggingFace Diffusers and I found some problems

  1. The inpaint quality
    There is what to improve, see for example the dog removal results here:
    https://github.com/antonmilev/MagicInpainter

The region where the dog is removed is missing details and is blurred but also and other parts of the bench are blurred, making it looking "artificial". I don't know if this is the purpose - to change the entire picture not only what is under the mask?. Usually inpaint is understood as filling in only the region under the mask.

  1. Strange results with bigger inpaint regions placed at the edges
    I further tested with a texture of bricks (it is a hard case for the neural networks) and it is producing unpredictable and strange results, for each call.I made the test with the similar to the COLAB example but with the prompt equal to empty text, or "bricks",, "red bricks", etc:

brick_512x512.jpg

brick_512x512_mask.jpg

brick_512x512_diffusers_bricks2.jpg

brick_512x512_diffusers_red_bricks.jpg

brick_512x512_diffusers1_empty_text.jpg

brick_512x512_diffusers2.jpg

brick_512x512_diffusers_empty_text.jpg

Please make it to work consistently - when empty text is provided object has to be just removed (inpaint). It would be nice to show and some text prompts - for example why when I type "red bricks" it is not working? I should be able to display all text prompts and images with text containing the word "bricks". Otherwise how to make it know that I want just to fill in the hole in the bricks wall with the same bricks wall already on the picture? It is confusing.....

Such problems however are not happening with small holes in the middle - the model at least tries to fill it with red bricks even when the text prompt is empty, so I think that it is defect when the inpaint region is big.

Sign up or log in to comment