Comfy-Org / comfy-cli

Command Line Interface for Managing ComfyUI
https://docs.comfy.org/comfy-cli/getting-started
GNU General Public License v3.0
288 stars 48 forks source link

comfy run --workflow WebSocketTimeoutException #200

Open kning opened 1 month ago

kning commented 1 month ago

Describe the bug Occasionally for long-running workflows triggered via API, the websocket connection gets lost.

To Reproduce Difficult to reproduce because it only happens occasionally, with long running workflows in particular.

Expected behavior I would expect much more durable performance from comfy run --workflow. This command also seems fairly undocumented so would be nice to know how mature this feature is.

Nice to have This issue is well documented in our repo here.

Additional context I work at Modal, a serverless compute / gpu platform. We have a lot of inbound customers searching for "comfyui api" that land on our ComfyUI example, which uses comfy-cli. Even before comfy-cli, we've anecdotally had many customers run into this websocket timeout issue for long-running workflows triggered via API. It would be great to understand if this is a known issue and/or if you have any official workarounds. For instance, many of our customers have just reverted back to using the basic HTTP api example and avoid web sockets entirely.