Sleep
This node technically uses Python's time。
Sleep
The Sleep node is a tool node used to introduce controllable delays in ComfyUI workflows. Its core function is to pause the execution of the workflow for a specified duration and then pass through any received input data unchanged. This node does not process or modify data itself; it serves solely as a "wait" stage within the process.
Node Function
Technically, this node implements the delay using Python's time.sleep() function. It accepts input data of any type (ANY) and allows users to precisely set the delay duration in minutes and seconds. Both the minute and second parameters have reasonable value ranges to ensure the validity and controllability of the delay time. The set time is ultimately converted into total seconds for the pause execution.
Node Parameter Description - Sleep
Connection Inputs (Inputs)
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
input | COMBO | Yes | - | - | input (Input Parameter): Receives data and passes it through unchanged after the delay. |
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
minutes | INT | Yes | 0 | 0 - 1439 | minutes (Input Parameter): Sets the minute component of the delay. Integer. Value range is 0 to 1439. |
seconds | FLOAT | Yes | 0.0 | 0.0 - 59.99 (Step: 0.01) | seconds (Input Parameter): Sets the second component of the delay. Float. Value range is 0.0 to 59.99, with an adjustment step of 0.01. |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| UNKNOWN | UNKNOWN | UNKNOWN (Output Parameter): Outputs data, identical to the input. |
Usage Scenarios
In practical workflows, this node is commonly used in scenarios requiring timed triggering or simulating processing time. For example, in an automated image generation pipeline, a Sleep node can be inserted between consecutive generation tasks to avoid overloading backend services with requests. Alternatively, when debugging complex workflows, it can be used to observe the timing of data transfer between different stages.
Notes
It is important to note that the delay blocks the execution thread of the entire workflow. Excessively long delay times (e.g., close to the maximum of 24 hours) may cause the ComfyUI interface to become temporarily unresponsive, so settings should be chosen carefully. This node is for flow control only and does not alter any properties of the input data.
Sleep Node Source Code Link
The Sleep node is from the ComfyUI-KJNodes node package.
Comments
Sign in with GitHub to join the discussion.