fofr / cog-comfyui

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

Impact on Replicate Run time #28

Closed gregorym closed 8 months ago

gregorym commented 8 months ago

Let's say I create 100 predictions using the Replicate API, how does it impact the run time cost?

Does the queue time in comfyui is counted toward the Replicate run time?

fofr commented 8 months ago

Each Replicate API request will be queued. This is different to queuing within ComfyUI itself. So if you make 100 API predictions, you will be charged only for the time it takes to generate each of them, not the queue time.

Essentially there is no queue time in ComfyUI, just the Replicate API queue.

Does that make sense?

gregorym commented 8 months ago

Perfect, TY.

fofr commented 8 months ago

Small follow up to this, I have added some changes to guarantee that the ComfyUI server has no running workflows or queues at the start of any prediction:

https://github.com/fofr/cog-comfyui/commit/8ae95f53ca463d54216e3406fbe3769e122a0515