fofr / cog-comfyui

Run ComfyUI with an API
https://replicate.com/fofr/any-comfyui-workflow
MIT License
544 stars 124 forks source link

Why does replicate.com need to download the model every time I run it? #70

Closed AzeWZ closed 6 months ago

AzeWZ commented 6 months ago

the same json ,run two times.

fofr commented 6 months ago

You might not always be hitting the same GPU, or if it's restarted. If you hit the same GPU and the model is still warm the weights will be available.

If you have a workflow you frequently use you might want to push a separate model that downloads those weights during setup instead.

drommerkiller commented 6 months ago

"If you have a workflow you frequently use you might want to push a separate model that downloads those weights during setup instead."

I tried that but none of my weights worked in my model. There is some settings somewhere in the code that makes it to look for the weights elsewhere and not from the included models/weights folder. Weights are included in the image file as that do get bigger.

Since you have since included the missing models the only reason to push own model would get the loading faster.

fofr commented 6 months ago

For reference, these repos are examples of how I spun out workflows as specific models:

https://github.com/fofr/cog-face-to-many https://github.com/fofr/cog-stickers https://github.com/fofr/cog-video-morpher