auto-sd-paint-ext icon indicating copy to clipboard operation
auto-sd-paint-ext copied to clipboard

Possible to use running on a remote Runpod instance?

Open 07minkim opened this issue 3 years ago • 6 comments

I followed the instructions in the here to try to get the plugin working based on a remote instance of the AUTOMATIC1111 WebUI running on Runpod. I actually successfully use the plugin on a local installation, so the plugin works fine on Krita, but connecting to the remote server doesn't seem to work. I have the WebUI starting up with both --api and --listen, and I put in the public URL for accessing the remote WebUI interface into the "Backend URL" section of the Krita plugin, it says "Network error: Forbidden" under "Status" in the Krita plugin directly above the "Backend URL" field.

Am I doing something wrong in entering that URL, or perhaps there are more steps I have to take to expose the remotely running WebUI to my locally running Krita plugin? The remote install instructions say to run ipconfig on the remote machine to get its IP address, but on the Runpod instance, the IP that's returned looks like the local network IP, which is why I'm entering the URL.

The AUTOMATIC WebUI git hash is: 4b3c5bc24bffdf429c463a465763b3077fe55eb8 The auto-sd-paint-ext git hash is: 183cb961b4e964ccac4908ef67211e8c06528edf

07minkim avatar Dec 05 '22 21:12 07minkim

I assume the public URL is able to access the webUI and that the webUI works. Can you paste what you pasted as the URL?

Interpause avatar Dec 06 '22 00:12 Interpause

I'm afraid I'd rather not post the precise URL here publicly, because it presents a security risk, since I'm not using authentication for it at the moment since it seemed the Krita plugin didn't work with that. The URL is in the form of https://randomletters-3000.proxy.runpod.net/, where the "randomletters" part are random letters. I can indeed access the URL through my web browser and use it as normal, just like when I'm running the . The command that I use to launch the WebUI is:

python webui.py --port 3000 --xformers --api --ckpt /workspace/stable-diffusion-webui/models/Stable-diffusion/768-v-ema.ckpt --opt-split-attention --listen

I'm not that familiar with the underlying technology, but I'm wondering if it's possible there's some sort of port forwarding issue because the launch parameters set the port to 3000, but the https port is 443.

07minkim avatar Dec 06 '22 01:12 07minkim

Try removing the trailing "/" on the URL. Otherwise it might be a https issue as I haven't really tested with https before.

Interpause avatar Dec 06 '22 02:12 Interpause

Hm, removing the "/" didn't seem to make a difference, and I still get the same "Network error: Forbidden" message. I do understand that mine is an unusual use case, so it just might not be doable at this point. Thank you for looking into it.

07minkim avatar Dec 06 '22 03:12 07minkim

Could you share your instructions on how you set AUTO up on Runpod? I will try and see if I can reproduce the issue. If the webUI works per normal, given both uses the same API server instance, I don't see why the plugin wouldn't work even with https.

Interpause avatar Dec 10 '22 03:12 Interpause

The AUTOMATIC1111 WebUI came pre-installed (Runpod offers them pre-installed with either 1.5 or 2.0 - I chose 2.0), but I've run a "git pull" command to update the installation to the latest version from Github. The command to actually run the Webui is:

python webui.py --port 3000 --xformers --opt-split-attention --listen --enable-insecure-extension-access --api

After it runs, I am able to access the WebUI through my web browser by going to the URL https://randomletters-3000.proxy.runpod.net/, where the "randomletters" part depends on the pod I'm using. Here, the WebUI is essentially identical as if I'm running on my own computer.

I installed the auto-sd-paint-ext extension and restarted the pod, which resulted in the "auto-sd-paint-ext Guide/Panel" tab appearing at the top of the WebUI, to the right of the "Train" tab. It has all the instructions I expect, including creating symlinks for the local Krita installation, which I had followed before when I set up the extension on my local WebUI installation (which still works great!).

Then, in my Krita, I went to the "SD Plugin" pane, clicked on the "Config" tab and changed the "Backend URL" field from the default "http://127.0.0.1:7860" to the same URL as above, "https://randomletters-3000.proxy.runpod.net/." When I type that in, both with and without the "/" at the end, the Status message directly above the "Backend URL" Field displays "Network error: Forbidden."

I'm assuming RunPod has some backend system of forwarding the public-facing HTTPS port to port 3000 in their local network for my instance.

07minkim avatar Dec 11 '22 23:12 07minkim