glucauze / sd-webui-faceswaplab

Extended faceswap extension for StableDiffusion web-ui with multiple faceswaps, inpainting, checkpoints, ....
https://glucauze.github.io/sd-webui-faceswaplab/
GNU Affero General Public License v3.0
715 stars 92 forks source link

Request for improvement in inpaint function #81

Closed watdomo closed 11 months ago

watdomo commented 11 months ago

Thank you from the bottom of my heart for providing us with a great extension.

Inpainting must always be done at a size of 512x512, no matter what the original image size is, or the result will be corrupted. Perhaps the current inpainting is always done at the image size, so if the original image size is larger than 512x512, the result will be deformed beyond the learned range. Especially when Lora is specified at the prompt with an image size of 1024 or larger, it produces a noticeably worse image than expected. This is the same behavior as when inpainting with img2img's inpaint function for sizes larger than 512.

It would be perfect if you could fix the inpaint width and height to 512x512 no matter what size the source image is, like ADetailer does.

Therefore, currently, using this inpainting function will produce unexpected results when using img2img for large size finishing, when using Hires.fix to improve quality, or when generating images in non-square sizes such as 512x768.

Pre-Inpainting (before swapping), Post-Inpainting (After swapping), and Global-Inpainting (all faces) all give the same result.

-- It would be more complete if the size of Inpaint mask blur and Inpaint only masked padding, pixels could also be changed for the ADetailer.