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

[Feature Request]: Variable Noise Settings for Masked Regions

Open mr-september opened this issue 2 years ago • 2 comments

Is there an existing issue for this?

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

What would your feature do ?

I am trying to upscale inpainted images with Ultimate Upscale. As per instructions, this is done with their script in img2img mode.

I find setting noise to 0.2-0.3 works great for "touching up" blemishes or weird artifacts, especially along the edges of previously inpainted areas.

However, that will also change the faces, if any, into other people.

If I set noise lower, e.g. to 0.1, the facial identity stays intact, but so do the other blemishes/artifacts.

Ideally, the webui would allow for either automatic face detection and/or manual masking of zones, where different settings could be applied. So in this case, setting noise to 0.1 for the faces, and 0.2-0.3 to the rest of the image.

Proposed workflow

  1. Go to img2img
  2. There is a masking option, maybe multiple masks in different colours.
  3. Each zone could have different settings, perhaps under tabs.
  4. The user can set different settings like before.
  5. Maybe a universal tab for mask 'blending'-related settings.

Additional information

No response

mr-september avatar Mar 04 '23 10:03 mr-september

1.6.0 adds a new extra noise parameter as well as a callback. I made an example script that uses the callback and can be used to mask certain regions. It's only for txt2img and uses the setting's single noise value, but it could theoretically be expanded to do something like you suggest with img2img. https://gist.github.com/catboxanon/69ce64e0389fa803d26dc59bb444af53

catboxanon avatar Aug 26 '23 13:08 catboxanon

Hi. Is this feature developed? What are the future plans for this, if any? I understand I am very late but still curious.

Colin-Antony avatar Feb 06 '25 07:02 Colin-Antony