Comfy-Org / Comfy-Org/ComfyUI

Sync prompt API

Open
#728 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.