When using the web-socket client, the first node that returns an output (message type = executed) terminates the connection:
|
this.client.on("executed", (data) => { |
|
if (data.prompt_id !== task_id) { |
|
return; |
|
} |
|
this.resolve_to_result(data); |
|
this.executed = true; |
|
resolve(this._result); |
|
done(); |
|
}), |
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.
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
statusmessage.The immediate workaround is to just use the
invoke_pollingmethod, which works fine for my purposes. But thought I'd get your thoughts before trying to fix it in my fork.