Query node progress - comfy_get_progress
Description
Queries the progress of a node.
Prerequisites
You have integrated the AI Creation Workshop software development kit (SDK). For more information, see SDK Reference.
Authorization
An AccessKey pair (AK/SK) is required. For information about how to obtain an AccessKey pair, see API authorization.
Endpoint
https://openai.edu-aliyun.comRequest path
/scc/comfy_get_progressRequest parameters
Request protocol
application/json
Request body
Name | Type | Required | Description | |
taskId | string | Required | The task ID. This ID is returned after you submit an image generation task. | |
Response parameters
Name | Type | Description | ||
status | integer | The status code of the gateway. A value of 10 indicates success. A value of 20 indicates failure. | ||
apiInvokeId | string | The ID of the API call. This ID is generated by the system. | ||
errCode | string | Gateway error code. You can ignore this error if the operation is successful. | ||
errMessage | string | The gateway error details have been successfully ignored. | ||
subErrCode | string | This service error code indicates that the operation succeeded and can be ignored. | ||
subErrMessage | string | The service error details have been ignored. | ||
data | object | The result returned by the service. | ||
status | string | The status of the image generation task. This is an enumeration. Valid values: waiting: The task is in a queue. running: The image is being generated. failed: The image generation task failed. succeeded: The image generation task is successful. | ||
progress | double | The progress of the image generation. The value ranges from 0 to 1. | ||
lastQueueRemaining | integer | The length of the waiting queue. This parameter is valid only when `status` is `waiting`. | ||
etaRelative | double | The estimated remaining time for image generation, in seconds. | ||
message | string | A brief description of the image generation progress. | ||
state | object | The detailed progress of the image generation. | ||
nodeLabel | string | The type of the node that is currently running. | ||
step | integer | The current iteration step of the node. | ||
maxSteps | integer | The maximum number of iteration steps for the current node. | ||
Examples
A gateway status code `status` of 10 indicates that the task was submitted successfully. You can then obtain the asynchronous `taskId`.
Example 1: Task in a queue
{
"status": 10, // The status code of the gateway. A value of 10 indicates success. A value of 20 indicates failure.
"apiInvokeId": "i_66c5ad0babc5ab0023d2e1f6",
"data": {
"etaRelative": 0,
"lastQueueRemaining": 1,
"progress": 0,
"taskId": "01j5t2qx82323pswaqykz9eq4",
"status": "waiting"
},
"subErrCode": null, // The error code of the service.
"subErrMessage": null,// The error message of the service.
"errCode": null, // The error code of the gateway.
"errMessage": null, // The error message of the gateway.
"startTime": null,
"endTime": null
}Example 2: Image generation in progress
{
"status": 10, // The status code of the gateway. A value of 10 indicates success. A value of 20 indicates failure.
"apiInvokeId": "i_66c5ad1cabc5ab0023d2e1fe",
"data": {
"etaRelative": 19.087267,
"progress": 0.46666667,
"state": {
"step": 6,
"maxSteps": 20,
"nodeLabel": "IterativeImageUpscale"
},
"message": "Executing node IterativeImageUpscale",
"taskId": "01j5t2qx82323pswaqykz9eq4",
"status": "running"
},
"subErrCode": null, // The error code of the service.
"subErrMessage": null,// The error message of the service.
"errCode": null, // The error code of the gateway.
"errMessage": null, // The error message of the gateway.
}Gateway error codes
Service error codes
Gateway Sub-Error Code (subErrCode) | Error message (subErrMessage) | Description |
B_COMPUTING_CanNotFindTask | Cannot find task:{0} | The task ID is invalid. |