Loop Start Pixaroma
The bracket that makes a section of your workflow repeat
- value1
- value2
- value3
- value4
- value5
- value1
- value2
- value3
- value4
- value5
- loop
- index
Looping has always been the fiddly corner of ComfyUI. Doing a section of a graph more than once used to mean either copying the nodes by hand or fighting with an execution trick that half the community never got working. Loop Start Pixaroma - paired with its Loop End bracket - is the approachable version: put your nodes between the two brackets, tell it how many rounds, and the whole section re-runs that many times.
Where this actually shines is the two classic cases. First, building a long video in chunks: generate 16 frames per round, carry the accumulated frames forward, and the loop keeps appending until you have a full clip. Second, piling up a batch: run the same image pipeline N times and combine every round's output into one growing stack. Both are things that are miserable to wire by hand and trivial with a loop.
How it works
The trick under the hood is ComfyUI's graph-expansion feature. When Loop End fires, it clones the section between the brackets, re-seeds it with the next round's values, and runs it again - tail recursion driven by a hidden internal node that Loop End spawns for you. You never touch that engine; you just live between the brackets.
One important consequence: because this relies on graph expansion, it needs a reasonably current ComfyUI. On an old install the loop fails loudly with a message telling you exactly that - update ComfyUI and it just works.
The inputs that matter
Most of the schema is carried-value plumbing, but there's really one field a beginner sets:
- total - how many rounds the loop runs. That's it for the widget side. (The rest of the inputs,
value1throughvalue5, are the starting values carried into round 0.)
The outputs you'll actually use:
- loop - a
FLOW_CONTROLwire that pairs this bracket with Loop End. Wire it into Loop End'sloopinput so the two brackets know they belong together. The value on it is a stub; it's purely topological. - index - the round counter, starting at 0 (so round 1 is
1, not 1-based confusion). Handy if you want the round number inside a prompt or filename. - value1…value5 - this round's carried values, which you feed through your nodes and hand back to Loop End, which hands them to the next round.
Putting it together
A minimal loop: Loop Start → your nodes (a sampler, whatever) → Loop End. Set total to however many repeats you want. If a round needs to build on the last one - say, an image batch that grows - wire Loop Start's value1 into your pipeline, wire the result into Loop End's value1, and the Pixaroma Combine node joins each round's output onto the pile. If two things don't fit together (an image and some text), you get a friendly plain-English message instead of a cryptic stack trace.
Install and gotchas
Install via ComfyUI Manager (search "Pixaroma") or:
cd ComfyUI/custom_nodes
git clone https://github.com/pixaroma/ComfyUI-Pixaroma
Restart, done. The pack has no required dependencies or model downloads for this node.
Two things to know. First, the ComfyUI version requirement above is real - if the loop throws "need ComfyUI's graph-expansion feature," update ComfyUI, not the pack. Second, the usual Pixaroma update gotcha applies: if nodes look blank after an update, hard-refresh with Ctrl+Shift+R before assuming anything broke.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| total | INT | 21–100000 | How many times the section between Loop Start and Loop End runs. |
| value1opt | * | Starting value carried into round 0. After that, the matching slot from Loop End takes over each round. Optional. | |
| value2opt | * | Starting value carried into round 0. After that, the matching slot from Loop End takes over each round. Optional. | |
| value3opt | * | Starting value carried into round 0. After that, the matching slot from Loop End takes over each round. Optional. | |
| value4opt | * | Starting value carried into round 0. After that, the matching slot from Loop End takes over each round. Optional. | |
| value5opt | * | Starting value carried into round 0. After that, the matching slot from Loop End takes over each round. Optional. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| value1 | * | Carried value 1 for this round. |
| value2 | * | Carried value 2 for this round. |
| value3 | * | Carried value 3 for this round. |
| value4 | * | Carried value 4 for this round. |
| value5 | * | Carried value 5 for this round. |
| loop | FLOW_CONTROL | Wire this into Loop End's loop input to pair the two brackets. |
| index | INT | Which round we are on, starting at 0 (0, 1, 2 ...). |