how to deploy custom image gen model on serverless?
https://blog.runpod.io/custom-models-with-serverless-and-automatic-stable-diffusion/
i read this but can i do it without the a1111? would it make it more simple to set up? i want to deploy a custom image model for image generation on serverless.
i plan on just using the sdxl API.
RunPod Blog
Create a custom AUTOMATIC1111 serverless deployment with your custo...
Have you ever wanted to create your own serverless AUTOMATIC1111 endpoint with a custom model that can scale up and down? Now you can do so without much hassle by following this guide!
Pre-requisites
A computer (local or cloud) with the following:
* docker installed
* git installed
* a relatively fast upload
Solution:Jump to solution
For A1111, this one is better, its more up-to-date:
https://github.com/ashleykleynhans/runpod-worker-a1111...
GitHub
GitHub - ashleykleynhans/runpod-worker-a1111: RunPod Serverless Wor...
RunPod Serverless Worker for the Automatic1111 Stable Diffusion API - ashleykleynhans/runpod-worker-a1111
40 Replies
Solution
For A1111, this one is better, its more up-to-date:
https://github.com/ashleykleynhans/runpod-worker-a1111
GitHub
GitHub - ashleykleynhans/runpod-worker-a1111: RunPod Serverless Wor...
RunPod Serverless Worker for the Automatic1111 Stable Diffusion API - ashleykleynhans/runpod-worker-a1111
Otherwise for SDXL you can use this and switch out the model:
https://github.com/runpod-workers/worker-sdxl
GitHub
GitHub - runpod-workers/worker-sdxl: RunPod worker for Stable Diffu...
RunPod worker for Stable Diffusion XL. Contribute to runpod-workers/worker-sdxl development by creating an account on GitHub.
Yeah both works, but I think if you wanna use loras, embedding and other things on a1111, you can't do that all in sdxl worker
Yeah it just does plain inference, not even ControlNet etc
so if i want to do the loras and stuff through API i would have to go with the a1111 right, so i might as well just follow the tutorial?
yeah, not sure if that tutorial has updated templates
better to use ashleyk's template
ok ill check out the ashleyk github link
im using ashleyk's image container and used my network volume that i installed the a1111 on but its like stuck on initializing?
got to this final step in the jupyter notebook terminal when installing the a1111 on network volume
so the network volume should be good?
@digigoblin
nevermind--- i got it up, just had to switch gpu to available ones
does cold start time billable? seems like the cold start runs up to like 2 minutes 🥶 @digigoblin @! what does this do?
Yes it is
is there access to webUI after deploying a1111 to serverless?
or just API
Just API, Serverless is an API , its not designed for Web UI. If you want a frontend, you have to build it yourself
okie, but i can just spin up a pod and open the webUI right
i just need to check if adetailer models came installed or not
Yes
How did you install it in serverless? if you use this, it includes ADetailer:
https://github.com/ashleykleynhans/runpod-worker-a1111
GitHub
GitHub - ashleykleynhans/runpod-worker-a1111: RunPod Serverless Wor...
RunPod Serverless Worker for the Automatic1111 Stable Diffusion API - ashleykleynhans/runpod-worker-a1111
yes its included but i dont see any adetailer models in the folder
leme check volume again
yeah i dont see anything in the workspace/stable-diffusion-webui/models/adetailer
directory, which i think is where models should be?
im checking webUI
check the {YOURWEBUIPATH}/extensions/adetailer @BBAzn
it looks like this
check adetailer folder
is it not there in your webui
im trying to figure out how to load my UI
hmm im not sure but it says in the ext its should be in models/adetailer
download them from https://huggingface.co/Bingsu/adetailer/tree/main
okie
should it be in the
workspace/stable-diffusion-webui/extensions/adetailer/adetailer
or just
workspace/stable-diffusion-webui/extensions/adetailer
models path
stable-diffusion-webui/models
workspace/stable-diffusion-webui/models/adetailer
yep should be there
/workspace/stable-diffusion-webui/models/adetailer
@nerdylive if there are two API requests going to my A1111 serverless endpoint that uses two different SD models, would it be two instances of A1111? or would the A1111 instance have to swap out models? im asking just curious whether there would be a generation speed
i mean i could test it but
figured id ask ;D
It works fine if you use the override to set the model in the serverless request
eg:
yes swapping seems to be no issue, but i noticed that the generation queue is lined up one by one, so when i send generation requests from VSC terminal, i would open up multiple terminals and send requests one at a time, and the serverless endpoint would generate one image, then start the other and so on
i thought it was supposed to scale with the workers?
Depends on your endpoint configuration
You can set scale type in your endpoint to queue delay to be 1
oh ok, should i change the request count?
No, just select it on queue delay
oh ok its working
@digigoblin hey guys so i deleted my previous volume and did a fresh reinstall but now the adetailer wont trigger through API ;-; i have the adetailer models in
/workspace/stable-diffusion-webui/models/adetailer
and i was able to get it working in the webui on a pod, but the API just doesnt seem to pick it up? my code is the same too ;-;i did a GET extensions call and i saw the adetailer extension is there
so the adetailer is installed
i mean i was able to get the adetailer working in the webui so its definitely installed lol
nvm i figured it out, it had something to do with an adetailer config
"ad_tab_enable": true,
after removing that it was good