Nodes/ComfyUI_Workflow_Timer/πŸ•’ Workflow Timer
ComfyUI Node

πŸ•’ Workflow Timer

The stopwatch that just sits on your canvas

By mike420Β·Created 5 months agoΒ·Updated 4 months agoΒ· 1
πŸ•’ Workflow Timer

      If you've ever finished a long Flux or video render and wondered "was that 4 minutes or 12?" - this is the node for that. Workflow Timer is a big live stopwatch that sits on your canvas and times every run, start to finish. No inputs, no outputs, no config. You drag it in, run your workflow, and watch a digital clock tick up in real time. Green when the run finishes clean, orange when it pauses, red when it errors or gets cancelled.

      It sounds too simple to be worth a custom node, and honestly, that's kind of the point. ComfyUI's built-in UI shows you per-node timings in the queue if you squint, but there's no obvious "how long did this whole thing take" readout while it's running. That's the gap this fills.

      How it works

      The name of the game here: this node is not a Python node with a clever algorithm. The actual brains live in a JavaScript extension (js/workflow_timer.js) that ships with the pack. The Python class is a stub - execute() returns an empty dict. Drop it on the canvas and the JS hooks into ComfyUI's global execution events: execution_start starts the clock, execution_success stops it, execution_error/execution_interrupted stop it in red. The time format is MM:SS:mmm, driven by requestAnimationFrame, so it's smooth and cheap.

      A few things worth knowing about what the clock actually measures:

      • It times the whole workflow run from the moment execution starts - including model loading and the first prompt encode. It does not count time spent sitting in the queue.
      • It's a wall-clock timer, not a profiler. If you want per-node breakdowns to hunt down a bottleneck, this isn't the tool - grab a profiling pack (comfyui-profiler, Easy-Use, or the newer Enhancement Utils) for per-node badges. This answers "how long did the whole run take," which is a different question.
      • All timer nodes on your canvas share one global clock, so if you sprinkle several around, they all show the same number and stay in sync.

      It also keeps two properties per node - elapsed_time_str and last_execution_time - which persist in the workflow JSON when you save. Nice for the "well, it took 8 minutes last time" comparison on a saved workflow.

      What you set

      Nothing. The info_schema confirms it: no required inputs, no optional inputs, no outputs. It's marked as an output/terminal node purely so ComfyUI keeps it alive on the graph even though it does literally no data work. The two "hidden" inputs in the source (prompt, unique_id) are ComfyUI plumbing and unused. Just place it, run, read.

      Installing

      It's a zero-dependency, no-model-file pack - just the node and its JS. Install any way you like:

      # Comfy CLI
      comfy node install ComfyUI_Workflow_Timer
      
      # or manual
      cd ComfyUI/custom_nodes
      git clone https://github.com/mike420/ComfyUI_Workflow_Timer.git
      

      ComfyUI Manager works too - search "ComfyUI Workflow Timer" in the Custom Nodes tab. Then restart ComfyUI and refresh the browser. That's it; there's no requirements.txt and no model download to babysit.

      Gotchas

      The big one: it only exists in the browser frontend. The timer is pure JS, so it does nothing when you run workflows headless, via the API, or on a remote setup without the UI open. It's a canvas accessory, not a telemetry tool.

      Also don't expect the number to match a per-node breakdown. It's intentionally coarse - one number for the whole run. And since it keys off the standard execution events, it needs ComfyUI's normal frontend events to fire; if some pack's queue hijacking mangles those events, the clock may sit at zero even though the run finished. That's rare, but it's the classic failure mode for frontend-only nodes, and the "fix" is usually just re-running or restarting the UI.

      For a utility this thin, it does its one job well. Drag one in, run a render, and finally have a number to quote when someone asks how long a workflow takes.

      CategoryπŸͺ„ Magic Tools

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs