Nodes/ComfyUI-Scripting-Tools/Enhanced UUID Generator
ComfyUI Node

Enhanced UUID Generator

Every UUID flavor in one node — and what v1 is quietly leaking

By cluny85·Created about a year ago·Updated about a year ago· 1
Enhanced UUID Generator
    • STRING
    uuid_typeUUID4
    namespace_typeDNS
    name_stringexample.com
    trigger0
    custom_namespace_uuid
    prefix
    suffix

    You want a unique ID in your workflow - a filename that never collides, a job tag your API can look up, a correlation ID for an automation chain. That's the whole job of the Enhanced UUID Generator, and it does it without touching a model, a network, or any of your VRAM. The name oversells it a little: it's a thin wrapper around Python's built-in uuid module, not some exotic generator. Which is exactly why it's dependable - there's no dependency to break between you and the standard library.

    It ships in a tiny pack called ComfyUI-Scripting-Tools (author cluny85, MIT license, zero external dependencies - the requirements.txt is literally "no external dependencies required"). Don't expect much community chatter around it; it's a hobbyist utility, not a household name. That's fine for what it is.

    How it works

    The node picks one of four UUID versions and hands you the string, with optional prefix and suffix glued on. Which version you pick actually matters:

    • UUID4 (default) - pure randomness. This is what you want 95% of the time.
    • UUID1 - time + MAC-address based. Deterministic-ish and timestamp-ordered, but here's the catch: it embeds your machine's MAC address. Fine for internal tracking, genuinely bad for anything user-facing or public.
    • UUID3 / UUID5 - name-based. Same namespace_type + name_string always yields the same UUID, which makes them useful for stable IDs: same name in, same ID out, every run, on any machine. UUID3 uses MD5, UUID5 uses SHA-1; in practice nobody can tell the difference.

    The inputs that matter

    The four you'll actually touch:

    • uuid_type - UUID1, UUID3, UUID4, or UUID5. Default UUID4.
    • namespace_type - DNS, URL, OID, X500, or CUSTOM. Only means anything for v3/v5.
    • name_string - the name you're hashing (default example.com). Again, v3/v5 only.
    • trigger - an integer (0–1) that does nothing to the output but forces the node to re-run when you change it.

    There's also custom_namespace_uuid for the CUSTOM namespace, plus prefix and suffix for wrapping. Output is a single STRING - wire it into anything that takes text, most usefully a SaveImage filename_prefix or a text node feeding an API.

    Install

    Via ComfyUI Manager (search "ComfyUI-Scripting-Tools"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/cluny85/ComfyUI-Scripting-Tools
    

    Then restart ComfyUI. No model downloads, no pip packages, nothing else to fetch.

    Where people get burned

    The big one: you queue, you get a UUID. You queue again without touching anything, you get the same UUID. ComfyUI caches nodes that don't change inputs, so the node won't re-execute on its own. That's what the trigger is for - bump it 0→1 and the node runs fresh. It feels silly, but it's the standard ComfyUI idiom for "make this run again."

    Second gotcha: if you set namespace_type to CUSTOM but leave custom_namespace_uuid empty (or not in proper UUID format like 123e4567-e89b-12d3-a456-426614174000), the node hard-errors with "Invalid custom namespace UUID string." Give it a valid UUID string or use a named namespace.

    And a light aside on v1: it's convenient for roughly-ordered IDs, but it leaks your MAC address to anyone who sees the ID. Reach for v4 unless you have a reason not to.

    CategoryComfyUI-Scripting-Tools

    Inputs (7)

    NameTypeDefaultDescription
    uuid_typeCOMBOUUID44 options: UUID1, UUID3, UUID4, UUID5
    namespace_typeCOMBODNS5 options: DNS, URL, OID, X500, CUSTOM
    name_stringSTRINGexample.com
    triggerINT00–1
    custom_namespace_uuidoptSTRING
    prefixoptSTRING
    suffixoptSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING