Loop Node
In a workflow, a loop node is a node that processes data items one by one in sequence, suitable for scenarios that require ordered execution or the accumulation of results.
Timeline (last 90 days)
Coze's batch node is used for one-time parallel operations on a dataset and suits batch tasks; the loop node processes items one by one in order and suits scenarios that require sequential execution.
ComfyUI officially added a set of general-purpose loop nodes, enabling workflows to have logic for repeated execution.
Loop nodes allow tasks that previously required external scripts or manual repetition to now be completed entirely within the graph using core nodes.
Loop nodes can be used for automated iterative image editing, where a multimodal large model (MLLM) evaluates the result and automatically revises the image repeatedly until the condition is met.
After introducing loops, cycles appear in the graph, topological sorting fails, and the execution engine requires additional mechanisms to manage the number of passes through nodes and the termination condition.
The author considers loop nodes harder to get started with than most features in ComfyUI, because they change the way one reads a workflow.
The author expects that as loop nodes become more widespread, the community will see an increasing number of workflows that make use of loops.
The most error-prone aspects of loops are infinite loops and states not being correctly reset.
The key to building loop workflows lies in distinguishing variables that need to accumulate across rounds from variables that should be reset each round.
Loop nodes typically require accompanying counter nodes, conditional judgment nodes, and a clear exit signal.
1 more timeline events
All Facts (11)
Coze's batch node is used for one-time parallel operations on a dataset and suits batch tasks; the loop node processes items one by one in order and suits scenarios that require sequential execution.
50%UnverifiedLoop nodes allow tasks that previously required external scripts or manual repetition to now be completed entirely within the graph using core nodes.
50%UnverifiedLoop nodes can be used for automated iterative image editing, where a multimodal large model (MLLM) evaluates the result and automatically revises the image repeatedly until the condition is met.
50%UnverifiedAfter introducing loops, cycles appear in the graph, topological sorting fails, and the execution engine requires additional mechanisms to manage the number of passes through nodes and the termination condition.
50%UnverifiedLoop nodes typically require accompanying counter nodes, conditional judgment nodes, and a clear exit signal.
50%UnverifiedThe author considers loop nodes harder to get started with than most features in ComfyUI, because they change the way one reads a workflow.
50%UnverifiedThe most error-prone aspects of loops are infinite loops and states not being correctly reset.
50%UnverifiedThe key to building loop workflows lies in distinguishing variables that need to accumulate across rounds from variables that should be reset each round.
50%UnverifiedIn Coze workflows, loop nodes are equivalent to a single machine processing items one by one, while batch processing is equivalent to multiple machines processing simultaneously—batch processing is more efficient but consumes more resources and has more restrictions.
50%UnverifiedComfyUI officially added a set of general-purpose loop nodes, enabling workflows to have logic for repeated execution.
50%UnverifiedThe author expects that as loop nodes become more widespread, the community will see an increasing number of workflows that make use of loops.
50%