Repository: stable-diffusion-webui
Issue: [Bug]: Just resize (latent upscale) in Inpainting task
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 doing Inpainting, upload an image, choose resize mode:Just resize (latent upscale). if the size is not the same to the image. get ValueError: images do not match

### Steps to reproduce the problem

1. go to inpainting tab
2. upload an image 512*512
3. choose resize mode:Just resize (latent upscale)
4. draw a mask
5. set size to any size except 512*512
6. press generate 
7. get error: ValueError: images do not match


### What should have happened?

should be resize to the size i set in latent space？

### Sysinfo

absl-py                      1.3.0
accelerate                   0.19.0
addict                       2.4.0
aenum                        3.1.11
aiofiles                     23.1.0
aiohttp                      3.8.4
aiosignal                    1.3.1
albumentations               1.3.1
altair                       4.2.2
antlr4-python3-runtime       4.9.3
anyio                        3.6.2
astunparse                   1.6.3
async-timeout                4.0.2
attrs                        22.2.0
backcall                     0.2.0
basicsr                      1.4.2
beautifulsoup4               4.11.2
bitsandbytes                 0.35.4
blendmodes                   2022
boltons                      23.0.0
cachetools                   5.2.0
catboost                     1.1.1
certifi                      2022.9.24
cffi                         1.15.1
chardet                      4.0.0
charset-normalizer           2.1.1
clean-fid                    0.1.35
click                        8.1.3
clip                         1.0
cloudpickle                  2.2.0
colorama                     0.4.6
coloredlogs                  15.0.1
comm                         0.1.2
contourpy                    1.0.6
cssselect2                   0.7.0
cycler                       0.11.0
Cython                       3.0.0
dadaptation                  3.1
debugpy                      1.6.4
decorator                    5.1.1
deepdanbooru                 1.0.2
deprecation                  2.1.0
diffusers                    0.16.1
discord-webhook              1.1.0
easydict                     1.10
einops                       0.4.1
entrypoints                  0.4
facexlib                     0.2.5
fastapi                      0.94.1
ffmpeg                       1.4
ffmpy                        0.3.0
filelock                     3.9.0
filterpy                     1.4.5
flatbuffers                  23.5.9
font-roboto                  0.0.1
fonts                        0.0.3
fonttools                    4.38.0
frozenlist                   1.3.3
fsspec                       2023.3.0
ftfy                         6.1.1
future                       0.18.3
fvcore                       0.1.5.post20221221
gast                         0.4.0
gdown                        4.6.4
gfpgan                       1.3.8
gitdb                        4.0.10
GitPython                    3.1.32
google-auth                  2.15.0
google-auth-oauthlib         1.0.0
google-pasta                 0.2.0
gradio                       3.32.0
gradio_client                0.2.4
graphviz                     0.20.1
grpcio                       1.51.1
h11                          0.12.0
h5py                         3.7.0
httpcore                     0.15.0
httpx                        0.23.3
huggingface-hub              0.14.1
humanfriendly                10.0
idna                         2.10
ifnude                       0.0.3
imageio                      2.26.0
importlib-metadata           5.1.0
importlib-resources          5.12.0
inflection                   0.5.1
insightface                  0.7.3
iopath                       0.1.9
ipykernel                    6.19.2
ipython                      7.34.0
jedi                         0.18.2
Jinja2                       3.1.2
joblib                       1.2.0
jsonmerge                    1.8.0
jsonschema                   4.17.3
jupyter_client               7.4.8
jupyter_core                 5.1.0
keras                        2.13.1
kiwisolver                   1.4.4
kornia                       0.6.7
lark                         1.1.2
lazy_loader                  0.1
libclang                     16.0.6
lightgbm                     3.3.3
lightning-utilities          0.8.0
linkify-it-py                2.0.0
lion-pytorch                 0.1.2
llvmlite                     0.39.1
lmdb                         1.4.0
lpips                        0.1.4
lxml                         4.9.2
Markdown                     3.4.1
markdown-it-py               2.2.0
MarkupSafe                   2.1.1
matplotlib                   3.6.2
matplotlib-inline            0.1.6
mdit-py-plugins              0.3.3
mdurl                        0.1.2
mediapipe                    0.10.0
mpmath                       1.3.0
multidict                    6.0.4
mypy-extensions              1.0.0
nest-asyncio                 1.5.6
netifaces                    0.10.6
networkx                     3.0
numba                        0.56.4
numpy                        1.23.5
oauthlib                     3.2.2
omegaconf                    2.2.3
onnx                         1.14.0
onnxruntime                  1.15.0
onnxruntime-gpu              1.15.1
open-clip-torch              2.20.0
opencv-contrib-python        4.7.0.72
opencv-python                4.8.0.76
opencv-python-headless       4.8.0.74
opt-einsum                   3.3.0
orjson                       3.8.7
packaging                    22.0
pandas                       1.5.2
parso                        0.8.3
pexpect                      4.8.0
pickleshare                  0.7.5
piexif                       1.1.3
Pillow                       9.5.0
pip                          22.3.1
pkgutil_resolve_name         1.3.10
platformdirs                 2.6.0
plotly                       5.11.0
portalocker                  2.7.0
prettytable                  3.8.0
prompt-toolkit               3.0.36
protobuf                     3.20.3
psutil                       5.9.5
ptyprocess                   0.7.0
pyasn1                       0.4.8
pyasn1-modules               0.2.8
pycparser                    2.21
pycryptodome                 3.17
pydantic                     1.10.5
pyDeprecate                  0.3.2
pydub                        0.25.1
Pygments                     2.13.0
pyngrok                      5.2.1
pyparsing                    3.0.9
pyre-extensions              0.0.23
pyrsistent                   0.19.3
PySocks                      1.7.1
python-dateutil              2.8.2
python-multipart             0.0.6
pytorch-lightning            1.9.4
pytz                         2022.6
PyWavelets                   1.4.1
PyYAML                       6.0
pyzmq                        24.0.1
qudida                       0.0.4
realesrgan                   0.3.0
regex                        2022.10.31
reportlab                    3.6.12
requests                     2.31.0
requests-oauthlib            1.3.1
resize-right                 0.0.2
rfc3986                      1.5.0
rsa                          4.9
safetensors                  0.3.1
scikit-image                 0.20.0
scikit-learn                 1.2.0
scipy                        1.9.1
seaborn                      0.12.1
semantic-version             2.10.0
Send2Trash                   1.8.2
sentencepiece                0.1.97
setuptools                   68.0.0
six                          1.16.0
sklearn                      0.0.post1
smmap                        5.0.0
sniffio                      1.3.0
socketio                     0.2.1
socksio                      1.0.0
sounddevice                  0.4.6
soupsieve                    2.4
spyder-kernels               2.4.0
starlette                    0.26.1
svglib                       1.5.1
sympy                        1.12
tabulate                     0.9.0
tb-nightly                   2.13.0a20230306
tenacity                     8.1.0
tensorboard                  2.13.0
tensorboard-data-server      0.7.0
tensorboard-plugin-wit       1.8.1
tensorflow                   2.13.0
tensorflow-estimator         2.13.0
tensorflow-io-gcs-filesystem 0.33.0
termcolor                    2.3.0
threadpoolctl                3.1.0
tifffile                     2023.2.28
timm                         0.6.7
tinycss2                     1.2.1
tokenizers                   0.13.2
tomesd                       0.1.2
toolz                        0.12.0
torch                        1.13.1+cu116
torchaudio                   0.13.1+cu116
torchdiffeq                  0.2.3
torchmetrics                 0.11.3
torchsde                     0.2.5
torchvision                  0.14.1+cu116
tornado                      6.2
tqdm                         4.65.0
traitlets                    5.7.1
trampoline                   0.1.2
transformers                 4.29.2
typing_extensions            4.5.0
typing-inspect               0.8.0
uc-micro-py                  1.0.1
urllib3                      1.26.13
uvicorn                      0.20.0
wcwidth                      0.2.5
webencodings                 0.5.1
websockets                   10.4
Werkzeug                     2.2.2
wheel                        0.37.1
wrapt                        1.15.0
wurlitzer                    3.0.3
xformers                     0.0.16rc425
xgboost                      1.7.2
yacs                         0.1.8
yapf                         0.32.0
yarl                         1.8.2
zipp                         3.11.0

### What browsers do you use to access the UI ?

_No response_

### Console logs

```Shell
Traceback (most recent call last):
      File "/root/stable-diffusion-webui/modules/call_queue.py", line 58, in f
        res = list(func(*args, **kwargs))
      File "/root/stable-diffusion-webui/modules/call_queue.py", line 37, in f
        res = func(*args, **kwargs)
      File "/root/stable-diffusion-webui/modules/img2img.py", line 232, in img2img
        processed = process_images(p)
      File "/root/stable-diffusion-webui/modules/processing.py", line 677, in process_images
        res = process_images_inner(p)
      File "/root/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/batch_hijack.py", line 42, in processing_process_images_hijack
        return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs)
      File "/root/stable-diffusion-webui/modules/processing.py", line 734, in process_images_inner
        p.init(p.all_prompts, p.all_seeds, p.all_subseeds)
      File "/root/stable-diffusion-webui/modules/processing.py", line 1311, in init
        image_masked.paste(image.convert("RGBA").convert("RGBa"), mask=ImageOps.invert(self.mask_for_overlay.convert('L')))
      File "/root/miniconda3/envs/myconda/lib/python3.8/site-packages/PIL/Image.py", line 1732, in paste
        self.im.paste(im, box, mask.im)
    ValueError: images do not match
```


### Additional information

_No response_