Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with inpainting #740

Closed
svumme opened this issue Sep 21, 2022 · 7 comments
Closed

problem with inpainting #740

svumme opened this issue Sep 21, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@svumme
Copy link

svumme commented Sep 21, 2022

Capture1

I'm trying the inpainting and I think there is a problem, I'll post the image as a test. In this image I simply wanted to create a lake in the center. I have done several exports from photoshop with different opacities of the mask, from 100% opacity (black), up to gray to 50%. But it never succeeds. I tried both -I image_with_ alpha, and -I image -M image_with_alpha. But it does not work. Out of curiosity I have tried other versions like that of Automatic 1111 and it works well. But they work well with the Euler a sampler, with ddmi they have the same problem. I noticed that in your version the sampler always switches to ddmi ... is it correct or am I wrong something ?. I also believe there is a problem with the "fit to width / height" I don't remember right now, so I could be wrong, it seems to me that if I take a horizontal image it doesn't work well.

@psychedelicious
Copy link
Collaborator

We don't have support for samplers other than DDIM with img2img just yet, which includes img2img. There is work in progress to improve both img2img sampler support and inpainting.

@Ratinod
Copy link

Ratinod commented Sep 22, 2022

@svumme There is one trick that allows you to do what you need.
You need (example for GIMP):

  1. open your image in gimp and add a new empty layer
  2. change the layer mode for example to "color LCH"
  3. choose the right color (It is important!) for a future request and paint over the right place
    paint
  4. merge layers
  5. follow the original instructions

as a result we get (small pond near the house -I./outputs/img-samples/test2.png):
000004 189923373
If you just paint it solid blue like this:
justblue
You get something like this:
000001 3623544023
The only pity is that even a part of the image not marked with a mask changes and the quality degrades (the more you use "inpainting" on one image the more noticeable the degradation).
This issue is known. Hope it gets fixed in the future.

@svumme
Copy link
Author

svumme commented Sep 22, 2022

thanks for the answers. regarding the trick I had deduced the problem and reported here :#555. , and thank you so much for help. the In my opinion it does not completely solve the problem, because creating a more complex shape is sometimes difficult. I'll give you an example that I have already tried, if I wanted to create a table with chairs starting from an empty room, it is not easy to design and predict the shape and this is not the meaning of inpainting. This stable version is in my opinion the best, but if I can give you some advice, I would give priority to inpainting and img2img which are together with text2IMG the most important functions.

@lstein
Copy link
Collaborator

lstein commented Sep 22, 2022

I will get back to working on inpainting and support for the k* samplers in img2img over the coming weekend, unless someone beats me to it.

@svumme
Copy link
Author

svumme commented Sep 22, 2022

thank you for all the work you are doing!

@lstein lstein self-assigned this Sep 23, 2022
@psychedelicious psychedelicious added the enhancement New feature or request label Oct 20, 2022
@psychedelicious
Copy link
Collaborator

This issue is still technically pending our stable implementation of k* samplers, but maybe it can be closed.

@lstein
Copy link
Collaborator

lstein commented Oct 20, 2022

There is in fact a public branch in which the k_lms sampler has been adapted for inpainting, but it is producing weird (like, really weird) results in my hands. See https://discord.com/channels/1020123559063990373/1020839344170348605/threads/1031763399408889936 for some details, as well as instructions for how to test the branch.

@lstein lstein closed this as completed Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants