How can I cause models to download on initialization?
My internet connection doesn't support uploading massive dockerbuilds to the hub. How can i get the models to download on runpod using a strategy similar to this?
16 Replies
So you call the download inside the script /content/ComfyUI/startup.sh
it will be called every runtime right
make sure you add logic to check if some file exists it wont download or something alike
Trying to launch this on serverless worker https://github.com/camenduru/flux.1-dev-tost
GitHub
GitHub - camenduru/flux.1-dev-tost
Contribute to camenduru/flux.1-dev-tost development by creating an account on GitHub.
.
Did you do that
And what's not working btw
Yeah thanks I saw your message. I am a bit stupid. First time using runpod
Nothing downloads
I'm going to sleep soon sorry hope someone can check on this
I think I have something wrong in my setup
Yeah me too lol. Been trying all night
But you can use wget or any download command in your start script
If you get a chance later, would be much appreciated
Hahaha of course yeah I'll try to
❤️
What is your actual use case for using ComfyUI with Flux? Do you want an API to use ComfyUI or do you want to play around with Flux?
Because if you are doing this in serverless, then every time your endpoint is shut down as there is no activity, you will then have to download the models again when a request comes in.
So I would first love to know what your goal is with Flux! Then we can take a look on how we can achieve this.
I just want to use it as an API, sent a request, get some images. Same as one would do with the comfyui runpod worker/serverless
I was trying to use a download script within my code rather than pushing all the files to docker at once. hence the setup. Not sure if it's required though. If anyone has a working image would happily use that(flux).
So I think it's best to use network storage then
I was working on the image for runpod-worker-comfy yesterday and it seems it is working. Will have to update the README + provide an example workflow. Then I will ping you!
@gnarley_farley. both FLUX.1 dev and schnell are released (including example workflows): https://github.com/blib-la/runpod-worker-comfy?tab=readme-ov-file#quickstart
GitHub
GitHub - blib-la/runpod-worker-comfy: ComfyUI as a serverless API o...
ComfyUI as a serverless API on RunPod. Contribute to blib-la/runpod-worker-comfy development by creating an account on GitHub.
For the other idea related to download models when the serverless endpoint does init: https://github.com/blib-la/runpod-worker-comfy/issues/60
GitHub
Download models on the fly · Issue #60 · blib-la/runpod-worker-comfy
Is your feature request related to a problem? Please describe. The Docker images are very huge and users would like to just use the base image (which doesn't contain any models). This would mak...