stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: (but actually useful) color correction + backup applies face restoration to "before" picture

Open jmp909 opened this issue 3 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

after ticking Apply color correction to img2img and save a copy face restoration is being applied to the "before" image

this is actually useful, but is an accidental side-effect and would be better as a specific feature (see screenshots below)

(However note face restore is not applied to final output image. Theoretically if I'm not inpainting the face and I'm only inpainting outside the face, then you might not want face restore, but in some cases it is actually useful to clean up bad quality photos)

Steps to reproduce the problem

  1. Go to settings
  2. Tick "Apply color correction to img2img" and "Save a copy..." and apply settings
  3. Go to inpainting, and mask a face.
  4. tick "restore face"
  5. add an appropriate prompt
  6. Select "Inpaint not masked" and generate
  7. observe output images

What should have happened?

face restoration should theoretically not be applied to the image (but it can actually be useful here)

original (30% jpg): beckham-grain-25

masking: (note we are going to inpaint the background outside the face here) image

backup image (before color correction)... note how much better the face quality is 00090-Euler a-steps40-cfg16-seed107774316-20221023031155-before-color-correction

*final image (color corrected).. note it is low quality again 00091-Euler a-steps40-cfg16-seed107774316-20221023031156

Commit where the problem happens

48dbf99e84045ee7af55bc5b1b86492a240e631e

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--xformers

Additional information, context and logs

No response

jmp909 avatar Oct 23 '22 02:10 jmp909

I've realised that just doing codeformer on an image is available in the "Extras" tab, so the main issue here is that the Backup & Output images have it applied differently... and whether codeformer should be applied to a masked face that isn't itself being inpainted

jmp909 avatar Oct 23 '22 18:10 jmp909

Closing as stale.

catboxanon avatar Aug 03 '23 16:08 catboxanon