AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
140.84k stars 26.64k forks source link

[Feature Request]: API support http callback #12576

Open huaizong opened 1 year ago

huaizong commented 1 year ago

Is there an existing issue for this?

What would your feature do ?

I expect to add an HTTP callback capability for the "txt2img" and "img2img" interfaces in order to provide HTTP callbacks. This should include the ability to report progress and completion of tasks.

Proposed workflow

  1. support http callback when task finished
  2. support progress change report by http callback

Additional information

No response

w-e-w commented 1 year ago

so what's wrong with /sdapi/v1/progress?

huaizong commented 1 year ago

so what's wrong with /sdapi/v1/progress?

In kubernetes deploy environment, we need to achieve the capability of submitting a task while simultaneously querying its progress status within the same Pod. Utilizing /sdapi/v1/progress doesn't readily facilitate this scenario. If support for asynchronous callbacks might present itself as a potential solution.