Nodes/BV Node Pack/πŸŒ€ BV LUT Loop End
ComfyUI Node

πŸŒ€ BV LUT Loop End

The feedback wire that keeps the loop honest

By BlackVortexAIΒ·Created 8 months agoΒ·Updated a day agoΒ· 6
πŸŒ€ BV LUT Loop End
  • flow
  • processed_image
  • final_image

If BV LUT Loop Start is the loop's top, this is the bottom: the node that takes whatever your current job produced, hands it to the next job as its input image, and - when the plan is done - hands you the accumulated final image. Without it the loop is just a stack that never returns anything.

You use it in the middle of the regional LUT loop pattern: Start β†’ Loop Job Resolver β†’ BV Apply LUT β†’ Loop End β†’ (back into the loop) β†’ final image out. The interesting thing is that nothing about this node's inputs says "LUT." It takes a flow signal and a processed processed_image, and everything LUT-specific lives in the loop state it's carrying along. That's the design: the loop is generic, the jobs are LUT-flavored.

How it works

Under the hood this node is a tiny piece of graph programming. When it runs, it expands itself into three hidden prototype nodes:

  1. BV LUT Loop Advance (Prototype internal) - takes the current loop state and the processed image, validates the image shape is unchanged, and bumps the job index. It outputs the next state and a continue_loop boolean (true while there are jobs left).
  2. BV LUT While End (Prototype internal) - checks that boolean. If the loop should continue, it re-runs the contained subgraph with the new state; if not, it passes the state through.
  3. BV LUT Loop Result (Prototype internal) - pulls the final image out of the finished state.

You'll see these three appear in the node graph if you enable debug/legacy views, but you never wire them yourself. Loop End is the single human-facing surface.

There's one shape rule that will bite you eventually: processed_image must keep the same B, H, W, C shape as the loop's current image. The advance node checks this and errors if your Apply step resized the image. Keep your grade resolution-stable across loop iterations.

The inputs and outputs that matter

  • flow - connect the flow output from BV LUT Loop Start. It's marked with rawLink, meaning the node reads the actual upstream node to find the loop state - one more reason to keep this wiring exact.
  • processed_image - the output of your Apply LUT (or whatever processing sits inside the loop body).
  • final_image - the single output: the accumulated result after every job in the plan has run. This is what you preview or save.

How to install

Ships in BV Node Pack:

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

Restart ComfyUI and hard-refresh. Or ComfyUI Manager β†’ "BV Node Pack". No models to fetch.

Common issues

  • "requires processed IMAGE with unchanged B,H,W,C shape" - your loop body resized the image between iterations. Either don't resize inside the loop, or restructure so the resize happens after Loop End.
  • "BV LUT Loop ended before every job was processed" - this comes from the hidden Result node when the loop collapsed early; usually a sign the plan or flow wiring got disconnected mid-loop. Re-check the Start ↔ End flow link.
  • No final image at all - the flow input isn't connected to the Start node. It's easy to wire only processed_image and wonder why nothing returns.

This is one of those nodes where the "ah, I get it" moment is realizing the loop isn't a feature of ComfyUI - it's a feature this pack builds for you. Loop End is where it seals the deal.

CategoryπŸŒ€ BV Node Pack/regional/LUT

Inputs (2)

NameTypeDefaultDescription
flowFLOW_CONTROLβ€”
processed_imageIMAGEβ€”

Outputs (1)

NameTypeDescription
final_imageIMAGEβ€”