For Loop Start
Actual for-loops inside a ComfyUI graph
- initial_value1
- initial_value2
- initial_value3
- initial_value4
- initial_value5
- initial_value6
- initial_value7
- initial_value8
- initial_value9
- initial_value10
- initial_value11
- initial_value12
- initial_value13
- initial_value14
- initial_value15
- initial_value16
- initial_value17
- initial_value18
- initial_value19
- flow
- index
- value1
- value2
- value3
- value4
- value5
- value6
- value7
- value8
- value9
- value10
- value11
- value12
- value13
- value14
- value15
- value16
- value17
- value18
- value19
ComfyUI graphs are supposed to be acyclic - data flows one way and nothing loops back. easy forLoopStart (with its partner easy forLoopEnd) bends that rule: it lets you run a chunk of your graph a fixed number of times, carrying values from one iteration into the next. If you've ever wanted to "do this N times, feeding each result back in," this is how you do it in Easy-Use. It's a genuine feature, and it's also genuinely fiddly - loops in a node graph are an advanced move, so expect to spend a few minutes getting the wiring right.
How it works
forLoopStart opens the loop and forLoopEnd closes it. Start emits a flow control token plus the current index, and Start/End pass a set of values around the loop body each pass - think of them as accumulators. On each iteration the body runs, whatever you feed back into forLoopEnd becomes the values forLoopStart hands out on the next pass, and after total iterations the loop exits with the final values. The index output counts your position (0, 1, 2, …), which you can use to pick a different input each pass, offset a seed, or index into a list.
The inputs and outputs that matter
total- how many times to run the loop. This is the required input and the main thing you set.initial_value1–initial_value19(optional, type*) - the starting values for whatever you're carrying around the loop. Wire in the seed, image, latent, counter, or accumulator you want to iterate on. Whatever you don't need, leave unconnected.
Outputs mirror that: flow (the FLOW_CONTROL token - wire it into forLoopEnd), index (the current iteration count), and value1–value19 (the carried values for this pass). The pack caps loops at 20 inputs/outputs, which is plenty.
Installing it
It's built into the pack. Install ComfyUI-Easy-Use via ComfyUI Manager (search ComfyUI Easy Use, restart) or by cloning:
cd ComfyUI/custom_nodes
git clone https://github.com/yolain/ComfyUI-Easy-Use
Install requirements, restart. No models needed - this is pure control flow.
Where people get stuck
The single biggest one: you must pair it with easy forLoopEnd. forLoopStart alone does nothing useful - the flow output has to reach the End node, and the End node is what actually drives the iteration and feeds values back. A loop that "only runs once" is almost always a Start with a dangling flow wire.
Second, be careful with what you carry vs. what you recompute. The value slots are for state that should persist across iterations; anything wired in from outside the loop gets re-evaluated per pass, which can be slow or surprising. Keep the loop body lean.
And a reality check: loops are the least-worn corner of ComfyUI, and frontend rewrites have historically been rough on custom control-flow nodes (the pack's changelog is full of loop and widget fixes for new ComfyUI versions). If a loop that used to work suddenly misbehaves after an update, suspect version drift first. For a lot of "repeat this" needs, a plain batch or a list-driven sampler is simpler and less breakable - reach for the loop when you specifically need each iteration to depend on the last.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| total | INT | 11–100000 | — |
| initial_value1opt | * | — | |
| initial_value2opt | * | — | |
| initial_value3opt | * | — | |
| initial_value4opt | * | — | |
| initial_value5opt | * | — | |
| initial_value6opt | * | — | |
| initial_value7opt | * | — | |
| initial_value8opt | * | — | |
| initial_value9opt | * | — | |
| initial_value10opt | * | — | |
| initial_value11opt | * | — | |
| initial_value12opt | * | — | |
| initial_value13opt | * | — | |
| initial_value14opt | * | — | |
| initial_value15opt | * | — | |
| initial_value16opt | * | — | |
| initial_value17opt | * | — | |
| initial_value18opt | * | — | |
| initial_value19opt | * | — |
Outputs (21)
| Name | Type | Description |
|---|---|---|
| flow | FLOW_CONTROL | — |
| index | INT | — |
| value1 | * | — |
| value2 | * | — |
| value3 | * | — |
| value4 | * | — |
| value5 | * | — |
| value6 | * | — |
| value7 | * | — |
| value8 | * | — |
| value9 | * | — |
| value10 | * | — |
| value11 | * | — |
| value12 | * | — |
| value13 | * | — |
| value14 | * | — |
| value15 | * | — |
| value16 | * | — |
| value17 | * | — |
| value18 | * | — |
| value19 | * | — |