ComfyUI
ComfyUI copied to clipboard
Sync prompt API
Assuming that implementing websocket adds complexity to other systems that use ComfyUI API, having a sync HTTP endpoint that awaits the workflow to finish can be a solution.
To implement, this instructions should work:
- Add
POST /prompt_syncendpoint. This endpoint waits the prompt_id to be executed, adds a callback function on a map. - Add
POST /prompt_finishendpoint. This endpoint triggers a callback function from a map according to prompt_id - Add node
Finish workflow with image. This node trigers/prompt_finishwith the image and prompt_id
+1
I am temporarily using bridge service. https://github.com/RayKitajima/ComfyBridge