Nodes/ComfyAngel/ComfyAngel_LoopStartAdvanced
ComfyUI Node

ComfyAngel_LoopStartAdvanced

The 10-slot loop that's hiding in plain sight

By ThepExcel·Created 8 months ago·Updated about a month ago· 14
ComfyAngel_LoopStartAdvanced
  • items
  • initial_value0
  • initial_value1
  • initial_value2
  • initial_value3
  • initial_value4
  • initial_value5
  • initial_value6
  • initial_value7
  • initial_value8
  • initial_value9
  • flow
  • item
  • index
  • total
  • is_last
  • value0
  • value1
  • value2
  • value3
  • value4
  • value5
  • value6
  • value7
  • value8
  • value9

Loop Start Advanced is the ComfyAngel loop for people who need to carry a pile of state around a loop. The simple Loop Start hands you item and nothing else; this one hands you item, plus index, total, is_last, and ten value0value9 slots you can use to pass data through the loop across iterations. It's the version you'd reach for when each pass needs to remember what earlier passes produced.

What you get out

  • flow - the control wire to a Loop End (Advanced).
  • item - the current element, same as the simple version.
  • index - the 0-based iteration number. Useful for filenames, conditionals, progress.
  • total - how many items the loop will run through.
  • is_last - a boolean that's true on the final pass. The classic use is "only do X on the last iteration," like stitching together all results or saving a combined image.
  • value0value9 - ten pass-through slots, seeded from the initial_value0initial_value9 inputs. Each iteration you feed the updated value back in, and it carries forward.

That ten-slot design is the whole point: it's a tiny state machine. The simple loop only accumulates two values internally (the results); the advanced loop lets you decide what state travels.

The catch: it's currently hidden

Straight from the source: the advanced nodes are marked DEPRECATED = True, so they're not in the node menu right now. The simple pair is what the author recommends - the display names only register "Loop Start 🪽" and "Loop End 🪽", and the README's example flows all use the simple version. The advanced nodes still exist and load fine if a workflow references them (that's how they're preserved), but you won't stumble on them in search unless you enable "Show deprecated."

So here's my honest take: if you can get away with the simple loop, use it. It's what's tested, it's what the docs cover, and its two result slots cover most real batch work. Where the advanced version earns its keep is the index/total/is_last outputs - if you genuinely need to know which pass you're on or act only on the last one, the simple loop has no way to tell you. That's the only case I'd dig the hidden nodes out for.

How it works and installing it

Mechanically it's the same dynamic-graph recursion as the simple loop - Loop End (Advanced) rebuilds the loop body with the next index, and the ten values ride through the flow state so nothing is lost between passes. It needs a modern ComfyUI with the comfy_execution module.

Install is the pack, once:

cd ComfyUI/custom_nodes
git clone https://github.com/ThepExcel/ComfyAngel.git

Restart ComfyUI, or search "ComfyAngel" in ComfyUI Manager. Only dependency is Pillow - no models to fetch.

One reminder, since this node invites cleverness: the same accumulation memory rules apply. Ten value slots plus accumulating results is ten times the RAM pressure, so keep an eye on batch size.

CategoryComfyAngel/Loop

Inputs (11)

NameTypeDefaultDescription
items*Batch/list to iterate over
initial_value0opt*
initial_value1opt*
initial_value2opt*
initial_value3opt*
initial_value4opt*
initial_value5opt*
initial_value6opt*
initial_value7opt*
initial_value8opt*
initial_value9opt*

Outputs (15)

NameTypeDescription
flowFLOW_CONTROL
item*
indexINT
totalINT
is_lastBOOLEAN
value0*
value1*
value2*
value3*
value4*
value5*
value6*
value7*
value8*
value9*