Visit ComfyUI Online for ready-to-use ComfyUI environment
Conclusion node for iterative loops, passing data between prompts and caching for next iteration.
The CycleEnd node is designed to conclude a Cycle, a type of loop that iterates each time a prompt is executed. This node is essential for workflows that require iterative data processing, as it allows information to be passed forward into subsequent prompts. By connecting the CYCLE input of this node to a Cycle's CYCLE output, you establish a loop where data from Data and Aux Inputs flows through the CYCLE line and is cached for retrieval in the next iteration. The node outputs the current loop counter value and indicates whether the loop has finished based on the specified end value.
The CYCLE input parameter is a dictionary that holds the state of the loop, including the current index, start, end, step, and other auxiliary data. This parameter is crucial for maintaining the loop's state across iterations. It must be connected to a Cycle node's CYCLE output to function correctly.
The index_override parameter allows you to manually set the loop counter to a specific value. This can be useful for debugging or for specific use cases where you need to control the loop index directly. If not provided, the loop will continue with its current index.
The index output parameter returns the current value of the loop counter after the step is applied. This value is essential for tracking the progress of the loop and can be used in subsequent nodes to make decisions based on the current iteration.
The finished output parameter returns a boolean value indicating whether the loop counter has reached or surpassed the specified end value. This is useful for determining when the loop has completed its iterations and can be used to trigger other actions or nodes in your workflow.
© Copyright 2024 RunComfy. All Rights Reserved.