Avoid model download on docker build
Hi, im building a docker image following blib-la's comfyui runpod-worker-comfy and I have to indicate multiple models to download in the Dockerfile. The problem is this takes ages to download and then upload the full image from my PC.
Is there a way of having the models download only when I deploy the docker in Runpod. I already tried moving the models download to start.sh, but this will cause the models to download every time a new worker is called.
2 Replies
Yes, you can either build the models into your image (by having the Dockerfile copy them in at build time) or you can use a network volume and load the models on it. Either way you will have to modify your code to use such models, and not to download them.
There is an image with the tag
runpod-worker-comfy:3.1.0-base
, which only contains ComfyUI. Then you would have to attach a network volume and download the models you want manually.
But I guess it would be a good thing to have a feature, that when you do some env-variable magic, that it will download the models into the network volume.
Why the network volume? If the models are not baked into the image, then it would try to download the models over and over, increasing your cold-start time.
I created an issue for this feature: https://github.com/blib-la/runpod-worker-comfy/issues/60GitHub
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...