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

Issue with colors #15

Open
DenkingOfficial opened this issue Sep 16, 2022 · 13 comments
Open

Issue with colors #15

DenkingOfficial opened this issue Sep 16, 2022 · 13 comments
Labels
bug Something isn't working

Comments

@DenkingOfficial
Copy link

Selected area of the image has a magenta tint after outpainting.

image

@lkwq007
Copy link
Owner

lkwq007 commented Sep 16, 2022

Can this color issue be reproduced with patch_match init_mode?

@lkwq007 lkwq007 added the bug Something isn't working label Sep 16, 2022
@DenkingOfficial
Copy link
Author

Yes, it is:

ad

@DenkingOfficial
Copy link
Author

DenkingOfficial commented Sep 16, 2022

It goes crazy with colors when you covering the same area a couple of times

image

@lkwq007
Copy link
Owner

lkwq007 commented Sep 16, 2022

I see. How about install scikit-image and import it import skimage; then uncomment these two line in the run_outpaint

            mask=skimage.measure.block_reduce(mask,(8,8),np.max)
            mask=mask.repeat(8, axis=0).repeat(8, axis=1)

@agustincaniglia
Copy link

agustincaniglia commented Sep 16, 2022

that's a known problem every repo had. I think they are fixed the red and then hey got the cyan bad... I don't know where they are now known repos like hlky or automatic but they did face this problem too. Sorry for bothering I don't know code I just know what I say.

@DenkingOfficial
Copy link
Author

I see. How about install scikit-image and import it import skimage; then uncomment these two line in the run_outpaint

            mask=skimage.measure.block_reduce(mask,(8,8),np.max)
            mask=mask.repeat(8, axis=0).repeat(8, axis=1)

Nope, that's not working :(

image

image

@lkwq007
Copy link
Owner

lkwq007 commented Sep 17, 2022

that's a known problem every repo had. I think they are fixed the red and then hey got the cyan bad... I don't know where they are now known repos like hlky or automatic but they did face this problem too. Sorry for bothering I don't know code I just know what I say.

@agustincaniglia
Thanks for your information. It seems that's a bug of the current version stable diffusion.

@DenkingOfficial
If that's a bug of stable diffusion, I think I might be unable to fix it.
However, I just came up with a possible workaround: photometric correction via Poisson image editing. I will try it later.

@badcode6
Copy link

I am having this same issue with the edge pad

@fractaltr33
Copy link

Say more, each next generation enhances the contrast of each frame contour. Every new generation, periodically, the result in the whole picture becomes worse.

@lkwq007
Copy link
Owner

lkwq007 commented Oct 5, 2022

@DenkingOfficial

Some updates:

The major issue is that diffusers's inpainting doesn't preserve unmasked content well. It will slightly change the existing regions and therefore results in this color issue.

I just added photometric correction to suppress this color issue. Not sure if it work or not.
The current implementation only works on Linux/MacOS.

Before:
before

After:
after

@DenkingOfficial
Copy link
Author

I just added photometric correction to suppress this color issue. Not sure if it work or not. The current implementation only works on Linux/MacOS.

That's amazing!
I'm gonna try it on WSL tomorrow
Thank you for your work!

@Rolli700
Copy link

Using Photometric correction replys something like:
PIE: Iter 5000, abs error [11.975403 21.68322 7.70292 ]

Ubuntu 20.04, fresh setup as discribed in your linux documentation.

@lkwq007
Copy link
Owner

lkwq007 commented Oct 17, 2022

Using Photometric correction replys something like: PIE: Iter 5000, abs error [11.975403 21.68322 7.70292 ]

Ubuntu 20.04, fresh setup as discribed in your linux documentation.

It's not an error. Just some metrics reported by fpie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants