You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But looking at the Comfy UI message types, there wasn't an obvious message to listen for show that all nodes have completed other than perhaps watching the queue count on the status message.
The immediate workaround is to just use the invoke_polling method, which works fine for my purposes. But thought I'd get your thoughts before trying to fix it in my fork.
The text was updated successfully, but these errors were encountered:
I just tested it and found that the main-wf-loop.ts example code triggers this issue (if using ETN_SendImageWebSocket). It seems I had probably encountered this before but didn't pinpoint the cause at the time 😂
If we want to fix this, I estimate it should be quite simple. We can check the task status each time we detect an "executed" state from a task, instead of immediately considering the workflow as completed.
You're right, there's no direct interface to query the task status. So I've wrapped a function on the client class to do this: client.getPromptStatus(prompt_id).
Would you like to submit a PR? If you've attempted a fix, feel free to share your results.
When using the web-socket client, the first node that returns an output (message type =
executed
) terminates the connection:comfyui-client/src/InvokedWorkflow.ts
Lines 144 to 152 in 32aba55
But looking at the Comfy UI message types, there wasn't an obvious message to listen for show that all nodes have completed other than perhaps watching the queue count on the
status
message.The immediate workaround is to just use the
invoke_polling
method, which works fine for my purposes. But thought I'd get your thoughts before trying to fix it in my fork.The text was updated successfully, but these errors were encountered: