Repository: stable-diffusion-webui
Issue: [Bug]: Inpainting mask does not adhere to correct boundaries
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?

When using inpainting->only masked, instead of using the precise mask, a rectangle is drawn at the resolution requested, but everything within the rectangle is denoised and replaced.
![image](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/17459396/d2dafb27-f63e-4c2e-bb43-1a044f5ac474)
![image](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/17459396/a2ceda22-981e-489e-94e6-fe2f3adc4554)

You can see from the above that I've very deliberately drawn an oddly shaped mask but the result shows that a rectangle around the mask is affected.


### Steps to reproduce the problem

1. Use inpainting mask
2. Draw mask
3. hit generate
4. ???
5. see that a rectangle the that covers the x-y bounds of the mask has been affected

### What should have happened?

The mask should precisely mark the edges of area affected.

### Version or Commit where the problem happens

1.4.0.

### What Python version are you running on ?

Python 3.10.x

### What platforms do you use to access the UI ?

Windows

### What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

### Cross attention optimization

sdp-no-mem

### What browsers do you use to access the UI ?

Google Chrome

### Command Line Arguments

```Shell
--ckpt-dir 'F:\\models\\stable-diffusion' --embeddings-dir 'F:\\embeddings' --vae-dir 'F:\\models\\VAE' --listen --enable-insecure-extension-access
```


### List of extensions

![image](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/17459396/6b08318d-23c9-48d5-b2b1-06a342634b0f)
Issue exists with all extensions turned off.

### Console logs

```Shell
venv "F:\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.4.0
Commit hash: 394ffa7b0a7fff3ec484bcd084e673a8b301ccc8
Installing requirements

Checking diffusers version in requriments.txt
Correct diffusers version in requriments.txt
Current diffusers version: 0.17.1
diffusers is already up to date.



Check roop requirements
Install insightface==0.7.3
Installing sd-webui-roop requirement: insightface==0.7.3
Install onnx==1.14.0
Installing sd-webui-roop requirement: onnx==1.14.0
Install onnxruntime==1.15.0
Installing sd-webui-roop requirement: onnxruntime==1.15.0
Install tensorflow==2.12.0
Installing sd-webui-roop requirement: tensorflow==2.12.0
Install opencv-python==4.7.0.72
Installing sd-webui-roop requirement: opencv-python==4.7.0.72
Install diffusers==0.17.1
Installing sd-webui-roop requirement: diffusers==0.17.1


Installing requirements for TemporalKit extension

Launching Web UI with arguments: --ckpt-dir F:\\models\\stable-diffusion --embeddings-dir F:\\embeddings --vae-dir F:\\models\\VAE --listen --enable-insecure-extension-access
No module 'xformers'. Proceeding without it.
[-] ADetailer initialized. version: 23.6.2, num models: 8
[AddNet] Updating model hashes...
100%|█████████████████████████████████████████████████████████████████████████████| 111/111 [00:00<00:00, 20156.19it/s]
[AddNet] Updating model hashes...
100%|█████████████████████████████████████████████████████████████████████████████| 111/111 [00:00<00:00, 24155.22it/s]
2023-06-27 12:40:56,276 - ControlNet - INFO - ControlNet v1.1.224
ControlNet preprocessor location: F:\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2023-06-27 12:40:56,393 - ControlNet - INFO - ControlNet v1.1.224
Loading weights [eafac48936] from F:\\models\\stable-diffusion\pb_finetune_and_notphoto.ckpt
Creating model from config: F:\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Couldn't find VAE named vae-ft-mse-840000-ema-pruned.ckpt; using None instead
Textual inversion embeddings loaded(41): 7dirtywords, Asian-Less-Neg, bad-artist, bad-hands-5, bad-picture-chill-1v, bad-picture-chill-32v, bad-picture-chill-75v, bad_prompt, corneo_runny_makeup, CyberRealistic_Negative-neg, easynegative, ng_deepnegative_v1_75t, rz-neg-15-foranalog, style-widow, Unspeakable-Horrors-16v, Unspeakable-Horrors-Composition-4v, verybadimagenegative_v1.3, vnappi_2, vnappi_2-000001, vnappi_2_2, was-mecha, xzfv-woman
Textual inversion embeddings skipped(16): CandyPunk, ChemPunk-96, InkPunk768, InkPunkHeavy768, InkPunkLandscapes768, InkPunkLite768, kanliu, Kipaki-125, Kipaki-150, nartfixer, nfixer, nrealfixer, PhotoHelper, PortraitHelper, rz-neg-general, VintageHelper
Model loaded in 3.3s (load weights from disk: 0.7s, create model: 0.3s, apply weights to model: 0.3s, apply half(): 0.5s, move model to device: 0.7s, calculate empty prompt: 0.7s).
2023-06-27 12:41:00,892 - roop - INFO - roop v0.0.1
2023-06-27 12:41:00,893 - roop - INFO - roop v0.0.1
Image Browser: ImageReward is not installed, cannot be used.
Applying attention optimization: sdp... done.
preload_extensions_git_metadata for 18 extensions took 0.87s
Running on local URL:  http://0.0.0.0:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 19.2s (import torch: 3.2s, import gradio: 0.8s, import ldm: 0.4s, other imports: 0.9s, list SD models: 0.1s, load scripts: 8.6s, create ui: 1.0s, gradio launch: 4.3s).
```


### Additional information

_No response_