Nodes/Interval Timer/Interval Timer End
ComfyUI Node

Interval Timer End

Interval Timer End

By aoiro0X0·Created about a month ago·Updated about a month ago· 0
Interval Timer End
  • anything
  • timer_handle
  • wait_for_2
  • wait_for_3
  • wait_for_4
  • wait_for_5
  • wait_for_6
  • wait_for_7
  • wait_for_8
  • anything
  • seconds
  • milliseconds
  • elapsed_text

This is the node where the stopwatch stops. Drop the matching Interval Timer Start before a section of your workflow, wire the End after it, and when the run finishes you get the elapsed wall-clock time printed right on the node - plus clean seconds, milliseconds, and a formatted string you can pipe into a log or a filename. It ships in the small MIT-licensed pack aoiro0X0/ComfyUI-Interval-Timer ("Interval Timer"), and it answers the benchmark question ComfyUI's built-in per-node profiler answers poorly: not "how long did each node take," but "how long did the whole stage cost, end to end."

The neat bit is parallel branches. Because the timer measures real elapsed time between two checkpoints rather than summing per-node durations, an End node can wait on several branches at once and report the total wall-clock while they ran in parallel. That's the feature that makes it genuinely different from reading the server's per-node timings.

How it works

Start stamps a high-resolution perf_counter_ns() timestamp into a timer_handle and passes it to this node. When the End executes, it subtracts that start time from the current clock and formats the difference - sub-minute runs as 2.501 s, longer ones as mm:ss.mmm or hh:mm:ss.mmm. It's an output node, so ComfyUI always executes it, and like its partner it returns NaN from IS_CHANGED to dodge the cache and report fresh numbers every queue. A small bundled frontend extension paints the result onto an "elapsed" readout on the node body, so you don't even have to open the console.

The inputs and outputs that matter

  • anything (required, any type) - the final value of the measured section. Passed through unchanged, so the End can sit at the end of a normal wire.
  • timer_handle (required) - from the matching Interval Timer Start. This is the pairing; each Start mints a fresh handle per run.
  • wait_for_2 through wait_for_8 (optional, any type) - extra branches that must finish before timing stops. Connect the last node of each parallel branch here. The End can't run until every connected input is ready, so parallel work gets folded into the elapsed time naturally.

Outputs, all four:

  • anything - the pass-through value, for keeping the graph honest.
  • seconds (FLOAT) and milliseconds (FLOAT) - raw numbers, ready for math or logging.
  • elapsed_text (STRING) - the formatted 2.501 s string, same thing the node displays.

What do you do with them? Wire elapsed_text into a text-writer node or concatenate it into a filename to stamp render time onto your outputs. Wire seconds into a compare or log node if you're running a benchmark series. The node display alone is usually enough for casual "is my upscaler the bottleneck?" checks.

Where people get burned

  • "Invalid timer handle. Connect Interval Timer Start to this node." - the End got something that isn't a Start's handle: wrong wire, or you fed it a value instead. Route the timer_handle output straight across.
  • "Not run yet" on the readout. The End hasn't executed this session - it's bypassed, muted, or the workflow was just loaded from a PNG. Queue a run.
  • Surprising parallel timings. Each wait_for_* must connect to the final node of that branch, not an early one, or the timer stops before that branch actually finishes.
  • The cache tradeoff. Both timer nodes force re-execution every run, so the timed section re-runs even when inputs are unchanged. That's how you get honest readings, but it means you don't want timers left in a workflow you're iterating on for speed - measure, jot the number, remove the timer.

Install

ComfyUI Manager: search "Interval Timer". Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/aoiro0X0/ComfyUI-Interval-Timer.git

Restart ComfyUI. Zero Python dependencies, no model downloads - the whole pack is two nodes under utils/timing. That's the entire install, and honestly the whole appeal: a benchmark tool that doesn't add a single package to your already fragile dependency stack.

Categoryutils/timing

Inputs (9)

NameTypeDefaultDescription
anything*Connect the final value of the measured section. It is passed through unchanged.
timer_handleINTERVAL_TIMER_HANDLEConnect timer_handle from the matching Interval Timer Start.
wait_for_2opt*Optional additional branch that must finish before timing stops.
wait_for_3opt*Optional additional branch that must finish before timing stops.
wait_for_4opt*Optional additional branch that must finish before timing stops.
wait_for_5opt*Optional additional branch that must finish before timing stops.
wait_for_6opt*Optional additional branch that must finish before timing stops.
wait_for_7opt*Optional additional branch that must finish before timing stops.
wait_for_8opt*Optional additional branch that must finish before timing stops.

Outputs (4)

NameTypeDescription
anything*
secondsFLOAT
millisecondsFLOAT
elapsed_textSTRING