๐ Dynamic Value Generator
A timestamp, counter, or UUID on demand โ the refresh trigger that keeps previews honest
- dynamic_value
This node does one tiny thing: it generates a string that changes every time the workflow runs. A timestamp, an incrementing counter, a short UUID, a random number, or a custom value. It's the kind of "utility" node that looks pointless until you understand why it exists - it's the refresh trigger for the pack's HTML Previewer.
Remember that ComfyUI only re-runs a node when its inputs actually change. If your preview page is built from static content, the HTML Previewer has no reason to rebuild it - the URL stays the same, so the panel shows stale results. But if you append a changing value to that URL via auto_refresh_token, the preview reloads on every queue. That's precisely what the Dynamic Value Generator produces.
How it works
Pick a value_type and it hands back a dynamic_value string:
timestamp- current date/time formatted withformat_string(default%Y%m%d_%H%M%S, standard strftime). The workhorse choice for refresh tokens; every run differs.counter- increments by one each run, starting fromcounter_start(default 1). Also changes every run, and it reads nicely if you're logging "generation #7".uuid- an 8-character slice of a UUID. Unique every time, no state involved.random- a random number between 1000 and 9999.custom- a unix timestamp, useful when you want a big stable-ish number.
custom_prefix (optional) prepends any text - handy for making tokens readable, e.g. job_20260816_114523.
How you'd actually use it
The intended loop is dead simple:
DynamicValueGenerator โ dynamic_value โ HTMLPreviewer.auto_refresh_token
Feed the output into the HTML Previewer's refresh-token input and your preview panel updates every run, no manual reloading. You can also drop it into a Text Template node ({{value1}} and friends) to stamp generated content with a timestamp, or use it to build unique filenames and IDs elsewhere in the graph. The pack's html_previewer_workflow.json and hitem3d_history_workflow.json examples show it wired up.
Installing
Same pack as everything else - ComfyUI Manager (search "ComfyUI HiTem3D Integration") or:
cd ComfyUI/custom_nodes
git clone https://github.com/GeekatplayStudio/comfyui-hitem3d
cd comfyui-hitem3d
pip install -r requirements.txt
Restart ComfyUI. Nothing to download, no API keys needed - this node is pure local utility and works even if you never configure a HiTem3D account.
Where people get burned
- "My preview never refreshes." If the token isn't actually changing, the preview won't either. Make sure you're feeding this node's output into
auto_refresh_token, and thatvalue_typeisn't set to something static. - Counter quirks. The counter lives on the node instance for the session, so it resets when ComfyUI restarts - and it behaves a little differently on first run versus later ones. For a pure "always changes" token,
timestamporuuidis more predictable. - It's a string. Everything it outputs is text. That's the feature, but it's worth remembering when you wire it somewhere expecting a number.
It's a four-line tool doing a four-line job - but as the heartbeat for auto-refreshing previews, it's the difference between a dashboard that updates itself and a stale tab you have to babysit.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| value_type | COMBO | timestamp | 5 options: timestamp, counter, uuid, random, custom |
| custom_prefixopt | STRING | โ | |
| counter_startopt | INT | 10โ999999 | โ |
| format_stringopt | STRING | %Y%m%d_%H%M%S | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| dynamic_value | STRING | โ |