Open jacobEAdamson opened 3 weeks ago
It does work like that, kind of. The selection mask is taken into account (including transparency/feather), but it is split into denoising mask (>35% opacity) and alpha mask (below 35% opacity). The alpha mask is what you see applied to the layer, while the denoising mask is processed during generation and reduces the amount of change that happens to existing content according to the mask. #557 has more details.
In most cases blending denoising strength is superior to alpha blending.
I find there's a noticeable difference in the alpha mask version vs the mix of alpha mask and denoising mask. Not to say the denoising mask is bad, but I tend to notice the edge more. Here's some examples. In the examples, I've turned off all feathering from the global settings, so only the selection mask's feathering is being used:
A freshly generated image, all of one piece:
The same image where the selection area (without feathering, padding, or anything) has been regenerated. This one has a hard edge, which is expected because there's no feathering for the selection:
The same image, but the selection mask has been feathered by 10 pixels, and the resulting inpainted image is applied without any other changes. Notice the area on the hand and the neck where you can see an edge:
Finally, the same inpainted image is applied, but the original feathered selection mask is applied as an opacity layer on the generated layer:
I believe the last image is the best result, as it's much more difficult to see the "edge" of the inpainted selection on the neck and hand
In addition, as you start inpainting at higher resolutions, the difference becomes more noticeable:
When inpainting an image with a selection mask, if the selection mask has semi-opaque parts, I'd like an option so that when applying the generated image, the selection mask's opacity is applied to the generated image. For example, if I have a selection mask with a feathered edge, I'd like the generated image layer (when accepting the result) to be feathered according to the selection mask. I usually get around this limitation by applying the selection mask as an opacity mask for the generated layer, but with the new region system, I would need to apply the selection mask as opacity mask to the layer generated in every single region. It would be nicer if I could automate this process.