Nodes/ComfyUI_Node_Pack/Generation Time (SEB)
ComfyUI Node

Generation Time (SEB)

How Long Did That Actually Take? This Node Tells You — and Stamps It on the Image

By Seb-Lis·Created 9 months ago·Updated 9 months ago· 0
Generation Time (SEB)
  • image
  • image
  • text
text
start_time

If you've ever shared a workflow and someone asked "what's your render time?", you know the answer is usually "uh, I didn't time it." Generation Time (SEB) - class GenerationTime - fixes that in the simplest way possible: it appends Time: 3.42s to a text string and passes your image through untouched. It's the second node in this pack's KSampler → overlay chain, and honestly it's the part that makes the whole thing worth it.

How it works

Three inputs, all required:

  • image - the generated image, straight from VAE Decode.
  • text - the text_overlay string from KSamplerControl.
  • start_time - the start_time float from KSamplerControl.

When the node runs it reads the clock, subtracts the start_time, and returns f"{text}\nTime: {duration:.2f}s" alongside the image. That's the whole mechanism. No AI, no inference - it's a stopwatch with a string append.

The clever bit is ComfyUI's execution order. start_time was captured by the bridge node before the KSampler ran, and this node is forced to run after the KSampler because its image input depends on VAE Decode. The dependency graph does the timing for you. The image output is a pure passthrough, and the text output feeds straight into the pack's Text Label node so the time lands visibly on the saved PNG.

The wiring trap

Because the timing depends on when this node executes, you must wire the image input - that dependency is what holds the node back until generation is done. Wire only text and start_time and the node can fire immediately after the bridge, and your "Time" line will be a suspicious 0.00s that makes you think the pack is broken. It isn't; you just took the graph's safety rail away.

Also be aware of what it measures: wall-clock time between the bridge node's execution and this node's. In the intended layout that's the sampling pass plus VAE decode - not pure sampler speed. If you have heavy post-processing (upscaling, face restore) between the KSampler and VAE Decode, that time gets included too. Fine for "roughly how long is this workflow," not fine for benchmarking samplers against each other. If you're on a machine where other processes steal GPU time, expect jitter.

Install and setup

Same single install as the rest of the pack - it's a tiny personal utility pack with no dependencies beyond what ComfyUI already has:

cd ComfyUI/custom_nodes/
git clone https://github.com/Seb-Lis/ComfyUI_Node_Pack

Restart ComfyUI, or use ComfyUI Manager → Install Custom Nodes and search for "ComfyUI_Node_Pack". It shows up in the node picker as "Generation Time (SEB)" under sampling/control.

The intended chain, from the pack's own README:

KSamplerControl → KSampler → VAE Decode → GenerationTime → TextLabel → Save Image

One more thing worth saying: this only works because the bridge node captured start_time in the first place. You can't feed it a random float and expect a meaningful number. If you lose the bridge, the pack also leaves you nothing to time with - the two nodes are designed as a pair.

Categorysampling/control

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
textSTRING
start_timeFLOAT

Outputs (2)

NameTypeDescription
imageIMAGE
textSTRING