Visit ComfyUI Online for ready-to-use ComfyUI environment
Measure generation cycle duration, track total time, optimize iterative processes, provide timing insights for workflow efficiency.
The CyclistTimer node is designed to measure the duration of the last generation cycle and accumulate the total time across multiple cycles within a session. This node is particularly useful for tracking and optimizing the performance of iterative processes, such as those found in AI art generation workflows. By providing precise timing information, CyclistTimer helps you understand the time efficiency of your generation tasks, enabling you to make informed decisions to improve your workflow. The node operates by capturing the time intervals of each cycle and converting them into various time units, such as hours, minutes, seconds, or milliseconds, based on your preference.
The loop_id
parameter is a string that uniquely identifies the loop or cycle you want to measure. This identifier ensures that the timing data is correctly associated with the specific loop, allowing for accurate tracking and reporting. The default value for this parameter is DEFAULT_LOOP_ID
. By using a unique loop_id
, you can manage multiple loops independently, ensuring that the timing data does not get mixed up between different processes.
The mode
parameter specifies the unit of time in which the results will be reported. The available options are hours
, minutes
, seconds
, and milliseconds
, with the default being seconds
. This parameter allows you to choose the most appropriate time unit for your needs, making it easier to interpret the timing data. For example, if you are interested in very short cycles, you might choose milliseconds
, whereas for longer processes, hours
or minutes
might be more suitable.
The last gen time
output parameter provides the duration of the most recent generation cycle. This value is reported in the time unit specified by the mode
parameter. Understanding the duration of the last cycle can help you identify any anomalies or inefficiencies in your process, allowing you to make adjustments as needed.
The total loop time
output parameter gives the cumulative duration of all generation cycles within the current session. This value is also reported in the time unit specified by the mode
parameter. By tracking the total time, you can gain insights into the overall efficiency of your workflow and identify opportunities for optimization over multiple cycles.
loop_id
. This will prevent timing data from different loops from being mixed up.mode
parameter based on the expected duration of your cycles. For very short cycles, milliseconds
might be more appropriate, while for longer processes, minutes
or hours
could be more useful.total loop time
to identify trends in your workflow's performance. This can help you pinpoint areas that may need optimization.loop_id
does not exist in the current session's memory.loop_id
and that it has been initialized properly before attempting to measure its time.mode
parameter is set to a value that is not one of the allowed options (hours
, minutes
, seconds
, milliseconds
).mode
parameter is set to one of the valid options and correct it if necessary.loop_id
.© Copyright 2024 RunComfy. All Rights Reserved.