Repository: stable-diffusion-webui
Issue: [Bug]: Inpaint Sketch not working
Labels: bug-report

### Checklist

- [ ] The issue exists after disabling all extensions
- [ ] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [ ] The issue exists in the current version of the webui
- [ ] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

Whenever I try to use inpaint sketch, it doesn't work and instead sends this on my console,
![image](https://github.com/user-attachments/assets/264bf0eb-2e8b-41c1-8657-dce18b728fb1)
In this example I'm using a picture taken from my phone but this is what happens not matter what picture I use, whether it's from my phone, PC or the internet.

In the logs I attempted it multiple times.

### Steps to reproduce the problem

1.Open WebUI
2.Go to img2img
3.Go to inpaint sketch
4.Insert img and paint it
5.Press generate
6.It doesn't work and sends this message

### What should have happened?

It should normally generate the picture

### What browsers do you use to access the UI ?

_No response_

### Sysinfo

[sysinfo-2024-08-28-10-19.json](https://github.com/user-attachments/files/16781939/sysinfo-2024-08-28-10-19.json)


### Console logs

```Shell
Version: v1.10.1
Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2
Launching Web UI with arguments: --no-half-vae
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
==============================================================================
You are running torch 2.0.1+cu118.
The program is tested to work with torch 2.1.2.
To reinstall the desired version, run with commandline flag --reinstall-torch.
Beware that this will cause a lot of large files to be downloaded, as well as
there are reports of issues with training tab on the latest version.

Use --skip-version-check commandline argument to disable this check.
==============================================================================
Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.
[-] ADetailer initialized. version: 24.6.0, num models: 10
CivitAI Browser+: Aria2 RPC started
sd-webui-prompt-all-in-one background API service started successfully.
Loading weights [059934ff58] from C:\Users\Vag\stable-diffusion-webui\models\Stable-diffusion\ponyRealism_v21VAE.safetensors
Creating model from config: C:\Users\Vag\stable-diffusion-webui\repositories\generative-models\configs\inference\sd_xl_base.yaml
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 28.6s (prepare environment: 5.6s, import torch: 4.6s, import gradio: 2.2s, setup paths: 2.2s, initialize shared: 0.3s, other imports: 1.6s, load scripts: 2.2s, create ui: 5.3s, gradio launch: 2.9s, app_started_callback: 1.8s).Applying attention optimization: Doggettx... done.
Model loaded in 14.4s (load weights from disk: 0.6s, create model: 0.7s, apply weights to model: 12.4s, apply half(): 0.1s, calculate empty prompt: 0.4s).
Traceback (most recent call last):
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1429, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1239, in preprocess_data
    processed_input.append(block.preprocess(inputs[i]))
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\components\image.py", line 270, in preprocess
    assert isinstance(x, dict)
AssertionError
Traceback (most recent call last):
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "C:\Users\Vag\stable-diffusion-webui\modules\ui.py", line 560, in update_orig
    has_exact_match = np.any(np.all(np.array(image) == np.array(state), axis=-1))
ValueError: operands could not be broadcast together with shapes (151,84,3) (910,512,3)
Traceback (most recent call last):
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "C:\Users\Vag\stable-diffusion-webui\modules\ui.py", line 560, in update_orig
    has_exact_match = np.any(np.all(np.array(image) == np.array(state), axis=-1))
ValueError: operands could not be broadcast together with shapes (24,12,3) (910,512,3)
Traceback (most recent call last):
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1429, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1239, in preprocess_data
    processed_input.append(block.preprocess(inputs[i]))
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\components\image.py", line 270, in preprocess
    assert isinstance(x, dict)
AssertionError
Traceback (most recent call last):
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1429, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1239, in preprocess_data
    processed_input.append(block.preprocess(inputs[i]))
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\components\image.py", line 270, in preprocess
    assert isinstance(x, dict)
AssertionError
Traceback (most recent call last):
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1429, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1239, in preprocess_data
    processed_input.append(block.preprocess(inputs[i]))
  File "C:\Users\Vag\stable-diffusion-webui\venv\lib\site-packages\gradio\components\image.py", line 270, in preprocess
    assert isinstance(x, dict)
AssertionError
```


### Additional information

_No response_