Type | Workflows |
Stats | 26 0 |
Reviews | (3) |
Published | May 12, 2025 |
Base Model | |
Hash | AutoV2 F56D18F2E3 |
Here I show you how to use loops in ComfyUI.
In short:
-Create a list including in a switch the items you want to be executed one at a time (they must be of the same type);
-Your input and output must be in the same format (in the example it is an image);
-You will create the For Loop Start and For Loop End;
-Initial_Value{n} of For Loop Start is the value that will start the loop, Initial_Value{n} (with the same index) of For Loop End is where you will receive the value to continue the loop, Value{n} of For Loop Start is where you will return the value of that loop.
In other words, when starting with a value in Initial_Value1 of For Loop Start, and passing the Value of For Loop Start to the node you want, you must connect its output in the same format to Initial_Value1 of For Loop End, thus creating a perfect loop up to the limit you set in "Total".