Repository: stable-diffusion-webui
Issue: [Bug]: --gradio-img2img-tool color-sketch breaks "send to img2img" button + weird bug on inpaint tab + Image Browser extension "Send to.." bug
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?

I have --gradio-img2img-tool color-sketch on set COMMANDLINE_ARGS=

When I press the "send to img2img" button, the image in the img2img tab appears and after 1 second becomes a solid color.

![image](https://user-images.githubusercontent.com/18109442/210881669-5fa9326d-cb9e-419c-9879-a4ce1f421d7d.png)

Removing --gradio-img2img-tool color-sketch from set COMMANDLINE_ARGS= makes the send to img2img button works properly and the image appears as it should.

![image](https://user-images.githubusercontent.com/18109442/210883002-69d164d4-1bb4-4d81-9e0d-65955a5da390.png)

But, If I open an image directly on img2img tab, I can use the "paint tool" without a problem.
It only happens with --gradio-img2img-tool color-sketch and using the send to img2img button.

![image](https://user-images.githubusercontent.com/18109442/210884354-648e33ac-c98d-413f-9f44-db0f165efcb2.png)


A second bug  (not related with --gradio-img2img-tool color-sketch ARG) occurs on inpaint tab. it doubles the image after I start painting the mask.

![image](https://user-images.githubusercontent.com/18109442/210881575-ceca3808-a95a-4f36-bfef-9960b6cc1122.png)

![image](https://user-images.githubusercontent.com/18109442/210885092-572c84e8-5755-4b55-94b6-dd1d0093e0ae.png)

The third bug  (not related with --gradio-img2img-tool color-sketch ARG):

None of the "send to.." buttons of Image browser extension works. they send the image info but not the image.


### Steps to reproduce the problem

> Send to img2img button bug:

1. Add --gradio-img2img-tool color-sketch to "set COMMANDLINE_ARGS="
2. Run the WebUI
3. Generate an image on txt2image
4. Click on "send to img2img"
5. Image will break after 1 second.

1. Remove --gradio-img2img-tool color-sketch from "set COMMANDLINE_ARGS="
2. Run the WebUI
3. Generate an image on txt2image
4. Click on "send to img2img"
5. Image appears as it should.

> Inpaint tab bug (not related with --gradio-img2img-tool color-sketch ARG):

1. Generate an image on txt2image
2. Click on "send to Inpaint"
3. Image appears as it should.
4. Start Painting a mask.
5. Image gets resized and doubled.

> Image browser extension (not related to --gradio-img2img-tool color-sketch ARG):

1. Open "browser Extension" tab
2. Select an image
3. click on any of the "send to..." buttons




### What should have happened?

Images appearing as they should on img2img with the --gradio-img2img-tool color-sketch argument active and using the send to img2img button.

Inpaint without a double

Image Browser "send to..." buttons to send images to destination.

### Commit where the problem happens

310b71f669e4f2cea11b023c47f7ffedd82ab464

### What platforms do you use to access UI ?

Windows

### What browsers do you use to access the UI ?

Google Chrome

### Command Line Arguments

```Shell
--precision full --no-half --no-half-vae --medvram --opt-split-attention --xformers --opt-channelslast --api --deepdanbooru --gradio-img2img-tool color-sketch --theme=dark --autolaunch

--gradio-img2img-tool color-sketch breaking the send to img2img button
```


### Additional information, context and logs

Google chrome console Log after Using "send to img2img" from txt2img 

```

Sketch.svelte:119 Uncaught DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0.
    at HTMLImageElement.<anonymous> (http://127.0.0.1:7860/assets/index.eee29f42.js:1:8332)
(anonymous) @ Sketch.svelte:119


```