Nodes/BV Node Pack/BV LUT While Start (Prototype internal)
ComfyUI Node

BV LUT While Start (Prototype internal)

The hidden gate that opens a ComfyUI loop

By BlackVortexAI·Created 8 months ago·Updated a day ago· 6
BV LUT While Start (Prototype internal)
  • initial_value0
  • flow
  • loop_state
conditiontrue

ComfyUI doesn't have loops. Not in the way you want, anyway - the graph is a DAG, and a DAG can't revisit a node with new input. BV Node Pack's LUT loop system gets around that by having BV LUT Loop Start expand into a pair of hidden nodes at runtime, and this is the top of that pair: BV LUT While Start (Prototype internal).

It's the gate. When the loop should run, it opens and passes the loop's initial state through. When the loop shouldn't run, it closes and blocks everything below it. You'll never add it from a menu - it lives in the __hidden__ category and is assembled automatically by Loop Start's graph expansion.

How it works

Two inputs:

  • condition - a BOOLEAN, default true. This is the gate. If true, the loop body runs; if false, the node returns an ExecutionBlocker, which tells ComfyUI to skip the downstream subgraph entirely.
  • initial_value0 - a wildcard (*) slot for the loop's starting state. In the LUT loop, Loop Start injects the BV_LUT_LOOP_STATE (plan + initial image + job index 0) here.

Outputs: flow (a FLOW_CONTROL signal that the while-end node tracks) and loop_state (the state, or the blocker). The blocker is the clever bit: ComfyUI's graph executor understands it natively, so "don't run this body" costs nothing and skips the whole loop cleanly.

In the actual LUT workflow, Loop Start always sets the condition to true for the first pass - the real gating happens at the bottom, where BV LUT While End (Prototype internal) decides whether to re-run.

When you'd see it

Only in debug/legacy views of an expanded LUT loop, right below BV LUT Loop Start. Knowing it exists helps you read those expansions instead of being spooked by phantom nodes. And if you ever see a loop body that renders nothing at all, check whether this gate got its state wired correctly upstream - a false condition silences the entire body by design.

How to install

It ships with BV Node Pack:

cd ComfyUI/custom_nodes
git clone https://github.com/BlackVortexAI/bv_nodepack.git

Restart ComfyUI, hard-refresh. Or ComfyUI Manager → "BV Node Pack".

Common issues

  • Loop body never runs - the condition resolved false (or an ExecutionBlocker is propagating). In normal LUT loops Loop Start controls this; if you're hand-wiring, double-check the condition input.
  • Wiring it manually - don't. It's a runtime scaffold; Loop Start builds it. Hand-built versions get stale and no consumer can read them properly.

It's invisible by design, which is the right call: you should be thinking about your grade plan, not about DAG re-execution semantics.

Category__hidden__

Inputs (2)

NameTypeDefaultDescription
conditionBOOLEANtrue
initial_value0opt*

Outputs (2)

NameTypeDescription
flowFLOW_CONTROL
loop_state*