🦾 UUID with date
Unique, dated filenames for people who batch a lot
- filename_prefix
If you've ever batch-run a couple hundred generations and then spent ten minutes trying to figure out which output file came from which run, 🦾 UUID with date is for you. It generates a unique, timestamped filename prefix that you wire into any Save Image–style node, so every run's files get names that can't collide and sort nicely by date. It's a small quality-of-life win, but a real one.
How it works
Three inputs, all simple:
prefix- a plain string, optional. Whatever you type here goes in front.include_date- a boolean, default on. Adds aYYYYMMDD_HHMMSStimestamp.uuid_len- an integer from 8 to 32, default 32. Controls how many hex characters of the UUID you keep.
The mechanism, straight from the source: it generates a uuid4().hex (32 hex characters, no dashes), truncates it to uuid_len, prepends the date stamp if enabled, then prepends your prefix. So you get something like:
myrun_20260816_143022_9f3ab1c2d4e5...
The single filename_prefix output (a STRING) plugs into any node with a filename_prefix input - Save Image, Save Animated WEBP, video frame savers, whatever. That's the whole integration: one wire.
Why you'd reach for it
ComfyUI's default filename behavior appends a counter, but that counter is shared across all save nodes and all workflows on your machine. "Find the file from the run that used prompt X" quickly becomes a guessing game. A per-run UUID makes each run's outputs self-identifying, and the date stamp means your output folder is time-sorted without you doing anything. It's also handy when something downstream needs a guaranteed-unique name - an API loop, a batch script that ingests files, or any workflow where overwriting is the thing you're trying to avoid.
The honest catches
It generates a new value on every single execution. That's the point, but it has consequences: the node can never cache, and Save Image will write a fresh file every run even if nothing else changed. Your output folder grows without mercy. If you re-run the same workflow fifty times, you get fifty files, not fifty overwrites.
And a warning about the truncated length: the default is the full 32 hex chars, but if you drop uuid_len to the 8 minimum, you're down to 32 bits of entropy. Fine for casual filename uniqueness, not for anything you'd call collision-proof. Keep the prefix too - a bare hex string is cryptic, and the prefix is what makes files recognizable in a file manager.
There's also a pack-level quirk worth knowing: this node's class name is just UUID - no -beyond_nodes suffix, unlike nearly every other node in the pack. ComfyUI resolves duplicate class names by whichever pack loads last, so if another pack ever registers its own UUID node, one of them silently wins. It's a latent collision, not a live one, but it's why the other nodes bothered with suffixes.
Installation
Same pack, same one-time install:
- ComfyUI Manager - search "ComfyUI-Beyond_nodes" (or "Beyond Nodes"), install.
- Or manually:
Restart after. Nocd ComfyUI/custom_nodes git clone https://github.com/beyondprompting/ComfyUI-Beyond_nodesrequirements.txt, no model downloads - it uses Python's stdlibuuidanddatetime, nothing else.
Common issues
- "Save Image makes a new file every run." That's the design, not a bug. Every execution produces a fresh UUID by intent.
- "I wanted a stable name that overwrites." Wrong tool. Use a fixed filename or a plain String node for that - UUID is the opposite philosophy.
- "The filename prefix got rejected." Some consumer nodes expect a folder path or have their own naming rules. Check what the save node wants; the output here is a plain string, so if it complains, it's the consumer, not this node.
For a pack that's mostly about compositing and logic, this is the quiet utility that earns its place. One wire and your batch runs stop eating each other's filenames.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| prefix | STRING | — | |
| include_date | BOOLEAN | true | — |
| uuid_len | INT | 328–32 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| filename_prefix | STRING | — |