ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Sync prompt API

Open filipemeneses opened this issue 2 years ago • 2 comments

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_sync endpoint. This endpoint waits the prompt_id to be executed, adds a callback function on a map.
  • Add POST /prompt_finish endpoint. This endpoint triggers a callback function from a map according to prompt_id
  • Add node Finish workflow with image. This node trigers /prompt_finish with the image and prompt_id

filipemeneses avatar Jun 02 '23 21:06 filipemeneses

+1

abaybektursun avatar Apr 16 '24 21:04 abaybektursun

I am temporarily using bridge service. https://github.com/RayKitajima/ComfyBridge

RayKitajima avatar Apr 29 '24 08:04 RayKitajima