Nodes/h4_Live/h4 - Loop Incrementer
ComfyUI Node

h4 - Loop Incrementer

The clicker that runs your refinement loop

By m3rr·Created 9 months ago·Updated 10 days ago· 1
h4 - Loop Incrementer
  • pulse
  • pass_through
wireless_resetfalse

ComfyUI doesn't do loops natively. You run the graph once and it's done - which is why h4_Live's whole pitch is "make workflows feel like actual processes instead of one-shot vending machines." The Loop Incrementer is the engine behind that. It's a tiny node whose entire job is to bump a shared loop counter every time it runs, and it's the piece that lets everything else in the pack know which pass you're on.

Think of it as the clicker from a board game. It doesn't do the interesting work; it just counts, loudly and reliably.

How it works

h4_Live keeps a global loop count in memory for as long as ComfyUI runs. This node reads that counter, adds one, and stores it back. It marks itself as always-changed internally (the standard always-rerun trick utility nodes use), so ComfyUI's executor will never cache it - every queue run fires the increment. The pulse input is a wildcard: wire any output into it to trigger the increment, and the node passes whatever came in straight through so your logic chain doesn't break.

It also has a wireless_reset toggle. Flip it on and the node checks the toolkit's shared "orbit storage" for a reset signal - set by the Wireless Reset Button node - and zeroes the counter when it finds one. That's how you restart a sweep without manually clearing state.

The inputs and outputs

  • pulse - any-type input. Connect anything (a latent, an image, a string - whatever's flowing through your loop) to make the counter tick.
  • wireless_reset - boolean. On, the node watches for a wireless reset signal; off, it ignores them.
  • pass_through - the one output, which just mirrors pulse. Wire it onward to keep your data flowing.

Why you'd use this instead of Mission Control

The pack actually has two ways to drive a loop: Mission Control (which increments and also collects scheduler values) and this. The difference is separation of concerns. If your loop is simple and you want the dashboard, use Mission Control. If you want the "action" - the actual sampling/processing - in one part of the graph and the counter bump in another, this node is the standalone version. It's the incremental choice for people who like their graphs tidy.

Installing it

It ships in h4_Live, install the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/m3rr/h4_Live
# restart ComfyUI

or ComfyUI Manager → search "h4_Live." No extra dependencies.

Where it can bite you

The loop count is global to the whole toolkit and lives in memory. If you have two different loop workflows loaded, they share the same counter - you can't have two independent loops in one session without resetting between them. Also remember the count only advances when this node actually runs, so if a workflow error halts the graph before it reaches the incrementer, your counter is whatever it last was. And if things ever feel stuck, check the console: the pack logs every increment with timestamped "[h4_Live][CORE]" lines, which is genuinely handy for debugging a loop that isn't looping.

Categoryh4_Live/Logic

Inputs (2)

NameTypeDefaultDescription
pulse*Connect any output to trigger increment.
wireless_resetBOOLEANfalseON=Check orbit storage for reset signal (no wire needed).

Outputs (1)

NameTypeDescription
pass_through*