Nodes/BV Node Pack/BV Detailer Loop Advance (internal)
ComfyUI Node

BV Detailer Loop Advance (internal)

The loop's counter — the i++ you'll never type

By BlackVortexAI·Created 9 months ago·Updated 3 days ago· 7
BV Detailer Loop Advance (internal)
  • loop_state
  • processed_image
  • next_loop_state
  • continue_loop

Every for-loop has a hidden line that nobody thinks about: the i++. In the BV Detailer Loop, that line is a node - BV Detailer Loop Advance (internal) - and like the other (internal) nodes in this pack, it's created for you during graph expansion, lives in the __hidden__ category, and should never be placed by hand.

What it does is as mechanical as an increment: take the current loop state and the image that just got processed, bump the job index by one, make that processed image the new current image, and report whether there are more jobs left to run.

How it works

Its two inputs tell the whole story:

  • loop_state (BV_DETAILER_LOOP_STATE) - the state at the end of the current iteration.
  • processed_image (IMAGE) - the image that just came out of your detailer.

And it produces the loop's heartbeat:

  • next_loop_state (BV_DETAILER_LOOP_STATE) - the same state with job_index advanced and current_image replaced by the processed image.
  • continue_loop (BOOLEAN) - True if the new index is still inside the plan's job list, False once you've run out.

That boolean is the entire loop condition. The internal While End node reads continue_loop and either runs the body again or exits. The image continuity is the subtle part worth appreciating: because the advance node hands the processed image forward as the new current_image, every job after the first starts from a canvas that already includes earlier detail fixes. That chaining is why the loop composes fixes across regions instead of fighting them.

Where it sits

This node is expanded into existence by the public BV Detailer Loop End at queue time, alongside the while-end and result internals. Its inputs come from the loop's current state and the End node's processed_image input - which is your Impact Detailer's output. If you ever see a graph mid-run with (internal) nodes like this one flashing by, that's the recursion machinery doing its normal work, not an error.

The practical takeaway

Nothing to configure, nothing to wire, nothing to fix. If the loop runs the wrong number of times, the culprit is upstream - the BV Regional Detailer Plan produced more (or fewer) jobs than you thought. Check its plan_summary output, which lists the jobs and their order; that's the readable view of what this node is counting through.

Installation is the one step that applies to you: BV Node Pack via ComfyUI Manager (search BV Node Pack) or:

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

Restart ComfyUI and hard-refresh with Ctrl+F5. Then ignore this node with confidence - it's doing its job precisely because you never touch it.

Category__hidden__

Inputs (2)

NameTypeDefaultDescription
loop_stateBV_DETAILER_LOOP_STATE
processed_imageIMAGE

Outputs (2)

NameTypeDescription
next_loop_stateBV_DETAILER_LOOP_STATE
continue_loopBOOLEAN