Repository: stable-diffusion-webui
Issue: [Bug]: img2img Inpaint upload generates erroneous images with the mask
Labels: bug-report

### Is there an existing issue for this?

- [x] I have searched the existing issues and checked the recent builds/commits

### What happened?

There seems to be a bug in the "Inpaint upload" feature of img2img in combination with a mask which is not completely white.
In short, the mask seems to drastically influence the generated content, even the content which is only located on the pure white part of the mask.
The white part of the mask should not influence the content though, e.g. the content should still be unrelated to source image with "Denoising Strength" parameter set to 1. But it isn't as depicted below.
In general, I should still be able to influence the content, it should not (nearly) only be influenced by the present image if a (not only white) mask is set.

### Steps to reproduce the problem

For demonstration purposes, I used "Denoising Strength" = 1 here, so I'd always expect to get a completely "unrelated image" at the part of the image where only white mask pixels are located.

a) If no mask is used (or only white mask) together with "Denoising Strength" set to 1, simply the whole image should be generated unrelated to the source image.
This works as expected as you can see here:
![image](https://user-images.githubusercontent.com/22403961/217203275-62d4fc6f-d4cc-486c-8134-3d6e7297865d.png)

b) If a mask is used with a black gradient border together with "Denoising Strength" set to 1, the part of the image with white mask should be generated unrelated to the source image. The border should be faded accordingly.
This works **not** as expected as you can see here:
![image](https://user-images.githubusercontent.com/22403961/217203618-9260a61a-68ee-4fda-bcb6-00a802da1d84.png)
Please note, that the border is not touched resp. faded (which is working as expected) and the part of the image with white mask **is** modified. But this is by no means a "Denoising Strength" of 1 here. Instead, it is only modified in a very minor way! I'd expect something similar to (a) here instead.

Since I only changed the mask between case (a) and (b), I think something is going wrong here...

By the way, the issue is gone with only white mask, similar to no mask at all:
![image](https://user-images.githubusercontent.com/22403961/217204194-e27357a2-4462-4a2c-afcb-693581d61739.png)

Example source image and mask:
![1](https://user-images.githubusercontent.com/22403961/217205506-2b45141d-e480-4008-afec-698759a9da2e.png)
![2](https://user-images.githubusercontent.com/22403961/217205527-4df1e8eb-ecf7-468f-8159-d844e92cf034.png)


### What should have happened?

With "Denoising Strength" of 1, the image should always be unrelated - apart from the black parts of the mask of course.

### Commit where the problem happens

ea9bd9fc

### What platforms do you use to access the UI ?

Windows

### What browsers do you use to access the UI ?

Google Chrome, Brave

### Command Line Arguments

```Shell
--listen --enable-insecure-extension-access --xformers --api
```


### List of extensions

No

### Console logs

```Shell
################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on user user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
Commit hash: ea9bd9fc7409109adcd61b897abc2c8881161256
Installing requirements for Web UI

Launching Web UI with arguments: --listen --enable-insecure-extension-access --xformers --api
Loading weights [c6bbc15e32] from /home/user/stable-diffusion-webui/models/Stable-diffusion/sd-v1-5-inpainting.ckpt
Creating model from config: /home/user/stable-diffusion-webui/configs/v1-inpainting-inference.yaml
LatentInpaintDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.54 M params.
Applying xformers cross attention optimization.
Textual inversion embeddings loaded(0):
Model loaded in 23.4s (load weights from disk: 4.8s, create model: 1.6s, apply weights to model: 13.2s, apply half(): 0.9s, load VAE: 2.1s, move model to device: 0.6s).
Running on local URL:  http://0.0.0.0:7860

To create a public link, set `share=True` in `launch()`.
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:06<00:00,  2.97it/s]
Total progress: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:05<00:00,  3.59it/s]
```


### Additional information

_No response_