ComfyUI Node

GU TimerOFF

How long did that actually take? Read it off a wire — GU TimerOFF

By alexguryev·Created 4 months ago·Updated 23 days ago· 2
GU TimerOFF
  • any_i
  • time
  • time_raw

This is the node that answers "how long did that take?" - as data, not as a wall-clock guess. GU TimerOFF is the second half of the GU_Nodepack stopwatch pair: its sibling TimerON stamps a start time somewhere upstream, and this node stops the clock, computes the difference, and hands you the elapsed time as both a formatted string and a raw integer. If you're building an image-info block, a benchmark graph, or just curious whether sampler X is actually faster than sampler Y, this is the readout.

The author's placement note says it all: "Place before GU Image Label!" In the GU workflow this node is designed to feed the pack's Image Label node, which takes an elapsed-time string and bakes it into the caption it renders on the image. But the outputs are plain strings and ints, so you can send them anywhere - a filename, a text preview, a concat node building an info file.

How it works

Both nodes talk through a single module-level variable. TimerON records time.time() when it runs; TimerOFF, when it runs, reads that value, computes the difference, and formats it into hh:mm:ss. Then it resets the stored start time to None, so a second TimerOFF in the same run finds nothing to measure and returns an empty string and zero. The formatting is zero-padded (00:07:03, not 7:3), which keeps filenames and captions tidy and sorts correctly in Explorer.

TimerOFF is also an output node, which matters for the always-run behavior: output nodes execute on every queue, so the readout is always fresh even if ComfyUI's cache would otherwise skip mid-graph nodes.

The inputs and outputs

Only one input: any_i, a wildcard that's forced to a connection - you hang the node off the tail of the work you measured (e.g. the sampler's latent or image output), purely to position it in the execution order.

  • time - the elapsed time as a HH:MM:SS string. This is the one you'll wire into an info block or label node.
  • time_raw - the same elapsed time as an integer number of seconds, for math or comparisons (e.g. logging a benchmark, averaging run times).

Installing it

Ships in GU_Nodepack:

cd ComfyUI/custom_nodes
git clone https://github.com/alexguryev/ComfyUI-GU_Nodepack

Restart ComfyUI, or use ComfyUI Manager → search "GU_Nodepack". Pip deps (psutil, requests, gu-funclib) come along; no models.

Gotchas

The pairing is the trap. TimerOFF only works if a TimerON actually ran earlier in the same queue run - the two share one global, so they're a matched set. Miss the TimerON, or let a run get interrupted between them, and you get an empty string and a zero with no error to tell you why. Also note the reset behavior: because TimerOFF clears the stored start time when it runs, don't try to read it twice. And keep the pair within one run - timers don't survive across separate queues. Windows is the tested platform and single-user installs are the target; the shared-global design is exactly what a multi-user server could trip over.

CategoryGU_Nodepack

Inputs (1)

NameTypeDefaultDescription
any_i*

Outputs (2)

NameTypeDescription
timeSTRING
time_rawINTElapsed time string `HH:MM:SS`