Workflow Timer
How Long Did That Run Take? Ask the Node That Was in the Room.
- passthrough
- passthrough
- time_string
- seconds
The WorkflowTimer answers a question that every long video render eventually produces: "okay, how long did that actually take?" The console logs are buried, the wall clock wasn't watched, and the answer matters when you're deciding whether to bump resolution or go to bed. Drop this node in, and it measures the time from when the workflow started executing to the moment the node itself runs, and hands it back as a formatted string and a number.
The subtle part is in that sentence: to the moment the node runs. ComfyUI executes nodes in dependency order, not top-to-bottom, so a timer that runs first tells you nothing. The design gets this right - you route your final output through its passthrough input, so the timer executes after the slow work it's timing.
How it works
The node installs a module-level hook that wraps PromptServer.send_sync and watches for the execution_start event, recording a start timestamp per prompt. When the timer executes, it reads the current prompt from the execution context and diffs. The IS_CHANGED method returns NaN, which forces it to re-run every queue pass even if the rest of the graph is cached - so you always get a fresh number.
Inputs and outputs
- format -
hms(e.g.1h 23m 45.6s),clock(1:23:45.6), orseconds(a bare float). - passthrough (optional) - any type. Wire your pipeline's final output through here so the timer runs last.
- Outputs: passthrough (whatever you put in, unchanged), time_string, and seconds (float, so you can branch on it or log it).
Troubleshooting
The two things that trip people up are both timing semantics, not bugs. First, the timer measures from execution_start to its own execution - anything scheduled after it (a downstream save, a second sampler) is not counted. Second, if it ever reports "unknown (start not captured)" with seconds of −1, the execution_start hook didn't fire for that prompt - usually a headless or unusual server context - and the node can't measure what it never saw. Neither is fixable from the widget; both are just "read the semantics." Otherwise it's genuinely zero-config: no models, no downloads, pure Python timing.
Installing
Ships in TrentNodes under Trent/Utils. ComfyUI Manager → "Trent Nodes" → Install, or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/TrentHunter82/TrentNodes
cd TrentNodes
pip install -r requirements.txt
Restart after. If Manager flags the pack (a day-one repo rename left a registry duplicate it still distrusts), the manual clone is the reliable path.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| format | COMBO | hms | 3 options: hms, clock, seconds |
| passthroughopt | * | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| passthrough | * | — |
| time_string | STRING | — |
| seconds | FLOAT | — |