runpod-workers / worker-a1111

Automatic1111 serverless worker.
MIT License
75 stars 109 forks source link

cannot create serverless template #2

Closed harrywang closed 1 year ago

harrywang commented 1 year ago

I want to run WebUI API mode using Runpod serverless GPU using the image in this repo and cannot save template - any pointers?

Do you have a tutorial to show how to run WebUI API mode using Runpod?

Thanks!

https://www.runpod.io/console/serverless/user/templates

Screenshot 2023-05-31 at 3 11 21 PM
justinmerrell commented 1 year ago

Did you build the docker image into your own repository?

harrywang commented 1 year ago

Did you build the docker image into your own repository?

yes at https://hub.docker.com/r/harrywang/a1111-webui-api

justinmerrell commented 1 year ago

Use harrywang/a1111-webui-api:1.0.0 for your image name.

harrywang commented 1 year ago

it did not work: see screencast - thanks for your help. https://github.com/runpod-workers/worker-a1111/assets/595772/3c198889-aa99-4e7c-a37c-ed0c77fe0734

justinmerrell commented 1 year ago

Oh, I see, you can't actually save the template. Are you able to inspect the page and then provide any console log errors you are seeing?

harrywang commented 1 year ago

here you go:

Screenshot 2023-06-01 at 11 07 01 AM
justinmerrell commented 1 year ago

Do you have a non-serverless template with the same name a1111-webui-api by any chance? Even if you do not, may you try again with a different template name?

harrywang commented 1 year ago

changed and name and it saved.

Screenshot 2023-06-01 at 11 18 09 AM
justinmerrell commented 1 year ago

Got it, thank you for helping us debug, I will get that reviewed.

harrywang commented 1 year ago
Screenshot 2023-06-01 at 11 32 32 AM

any idea on what's the endpoint for a1111 api? any pointers to tutorials or docs on this? thanks.

justinmerrell commented 1 year ago

As in, how to send requests? The endpoint URLs are the ones at the bottom RUNSYNC, RUN

harrywang commented 1 year ago

As in, how to send requests? The endpoint URLs are the ones at the bottom RUNSYNC, RUN

for example, how to use the deployed api to generate an image using such as https://github.com/mix1009/sdwebuiapi

Screenshot 2023-06-04 at 4 13 06 PM
harrywang commented 1 year ago

also I cannot see the /docs

https://api.runpod.ai/v2/kq3971qno2npoz/run/docs has nothing - this should be the api docs for the webui.

Thanks.

harrywang commented 1 year ago

As in, how to send requests? The endpoint URLs are the ones at the bottom RUNSYNC, RUN

for example, how to use the deployed api to generate an image using such as https://github.com/mix1009/sdwebuiapi

Screenshot 2023-06-04 at 4 13 06 PM

@justinmerrell can you help please?

justinmerrell commented 1 year ago

As in, how to send requests? The endpoint URLs are the ones at the bottom RUNSYNC, RUN

for example, how to use the deployed api to generate an image using such as https://github.com/mix1009/sdwebuiapi

Screenshot 2023-06-04 at 4 13 06 PM

@justinmerrell can you help please?

Oh, I believe I see now. You Are trying to interface with the internal webui directly. If you wanted to do it that way you will need to deploy Automatic1111 as a standard pod. This is also why you are unable to access the docs URL.

However, if you used this repository as is to launch an endpoint instead of sending the requests like you did here , you would be sending them to the endpoint directly via a HTTP request. Example:

import requests

url = "https://api.runpod.ai/v2/kq3971qno2npoz/runsync"

payload = {"input": {"prompt": "cute cat"}}
headers = {
    "accept": "application/json",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)