Skip to content

Commit a80f8fb

Browse files
add progress_state event (#111)
1 parent 3bb2e32 commit a80f8fb

7 files changed

Lines changed: 1133 additions & 830 deletions

File tree

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ A simple wrapper that facilitates using [ComfyUI](https://github.com/comfyanonym
3030
- [Probes](#probes)
3131
- [API Configuration Guide](#api-configuration-guide)
3232
- [Environment Variables](#environment-variables)
33+
- [Kubernetes Deployment: Proxy Environment Variables](#kubernetes-deployment-proxy-environment-variables)
3334
- [Configuration Details](#configuration-details)
3435
- [Additional Notes](#additional-notes)
3536
- [Using Synchronously](#using-synchronously)
@@ -45,6 +46,7 @@ A simple wrapper that facilitates using [ComfyUI](https://github.com/comfyanonym
4546
- [System Events](#system-events)
4647
- [status](#status)
4748
- [progress](#progress)
49+
- [progress\_state](#progress_state)
4850
- [executing](#executing)
4951
- [execution\_start](#execution_start)
5052
- [execution\_cached](#execution_cached)
@@ -73,7 +75,7 @@ If you have your own ComfyUI dockerfile, you can add the comfyui-api server to i
7375

7476
```dockerfile
7577
# Change this to the version you want to use
76-
ARG api_version=1.13.3
78+
ARG api_version=1.13.5
7779

7880
# Download the comfyui-api binary, and make it executable
7981
ADD https://github.com/SaladTechnologies/comfyui-api/releases/download/${api_version}/comfyui-api .
@@ -1055,6 +1057,8 @@ The webhook event name for a failed request is `prompt.failed`. The webhook will
10551057

10561058
## System Events
10571059

1060+
> Note: From version 1.13.5, the frontend aggregate progress event `progress_state` is included in the supported system event set and can be forwarded like other events. Use `SYSTEM_WEBHOOK_EVENTS=progress_state` or `SYSTEM_WEBHOOK_EVENTS=all` to subscribe.
1061+
10581062
ComfyUI emits a number of events over websocket during the course of a workflow. These can be configured to be sent to a webhook using the `SYSTEM_WEBHOOK_URL` and `SYSTEM_WEBHOOK_EVENTS` environment variables. Additionally, any environment variable starting with `SYSTEM_META_` will be sent as metadata with the event. From version 1.13.0, these are signed, and can be validated using the `WEBHOOK_SECRET` environment variable and any standard webhook validation library such as `svix`. See [above](#validating-webhooks) for examples.
10591063

10601064
All webhooks have the same format, which is as follows:
@@ -1073,6 +1077,7 @@ The following events are available:
10731077

10741078
- "status"
10751079
- "progress"
1080+
- "progress_state"
10761081
- "executing"
10771082
- "execution_start"
10781083
- "execution_cached"
@@ -1138,6 +1143,27 @@ The following are the schemas for the event data that will be sent to the webhoo
11381143
}
11391144
```
11401145

1146+
### progress_state
1147+
1148+
```json
1149+
{
1150+
"type": "progress_state",
1151+
"data": {
1152+
"prompt_id": "123e4567-e89b-12d3-a456-426614174000",
1153+
"nodes": {
1154+
"42": {
1155+
"value": 5,
1156+
"max": 20,
1157+
"state": "executing",
1158+
"node_id": "42",
1159+
"prompt_id": "123e4567-e89b-12d3-a456-426614174000"
1160+
}
1161+
}
1162+
},
1163+
"sid": "xyz789"
1164+
}
1165+
```
1166+
11411167
### executing
11421168

11431169
```json

docker/api.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ FROM ghcr.io/saladtechnologies/comfyui-api:comfy${comfy_version}-torch${pytorch_
88
ENV WORKFLOW_DIR=/workflows
99
ENV STARTUP_CHECK_MAX_TRIES=30
1010

11-
ARG api_version=1.13.3
11+
ARG api_version=1.13.5
1212

1313
ADD https://github.com/SaladTechnologies/comfyui-api/releases/download/${api_version}/comfyui-api .
1414

0 commit comments

Comments
 (0)