Nodes/ComfyUI_BadgerTools/GetUUID-badger
ComfyUI Node

GetUUID-badger

A guaranteed-unique string for filenames and temp dirs — seed input does nothing

By AbyssBadger0·Created 3 years ago·Updated 2 years ago· 8
GetUUID-badger
    • STRING
    append
    seed0

    If your workflow runs more than once, you've felt it: the output filename collision. Run the graph twice and the second run overwrites the first, or the temp folder name clashes with a previous run's leftovers. GetUUID-badger is the fix - it spits out a fresh random identifier (a UUID hex string) every time it runs, ready to bolt onto a filename or a directory name so that no two runs ever clobber each other. One node, one string, problem gone.

    The pack's own file-helper cluster is built for this. mkdir-badger makes subfolders, deleteDir-badger cleans them up, and this node gives every run its own unique name so the whole dance stays collision-free: mkdir with a name like run_ + UUID → frames land in a per-run folder → deleteDir wipes it at the end. Or the simpler everyday use: append the UUID to your save filename so every export is unique and you never have to think about overwrites again.

    How it works

    It calls Python's uuid.uuid4() and takes the hex form - 32 random hex characters, which is a lot of entropy for a filename. Then it appends whatever you put in the append input.

    Here's the quirk worth knowing before you trust the node's UI: the seed input exists in the schema and does absolutely nothing. The code never reads it. The UUID comes from uuid4(), which is random by design - there is no way to make it deterministic, and the seed widget is pure decoration left over from the author's template. So: don't set a seed expecting reproducible output. You can't get one, and you shouldn't want one - the entire point is that the string is different every run.

    Inputs and outputs

    • append - a STRING, default empty, appended directly to the UUID. Use it for readability: "hero_" gives you a3f8...hero_-style names, or use "_frame" as a suffix.
    • seed - an INT. Ignored by the code. Leave it alone.

    One output: a STRING - the UUID plus your append.

    Installing it

    In ComfyUI_BadgerTools: ComfyUI Manager → search "BadgerTools" → install, or

    cd ComfyUI/custom_nodes
    git clone https://github.com/AbyssYuan0/ComfyUI_BadgerTools
    

    Restart after install. No models. The pack's heavyweight requirements import at startup regardless of which node you grab - the standard tax.

    Gotchas

    • The seed input is a lie. It's in the schema, it's on the widget, and the code ignores it. If you see people (or your own notes) treating this node as seedable, that's the misunderstanding to correct.
    • It's random, not sequential. If you wanted run_1, run_2, you want a counter node, not this. UUIDs are for "never the same twice," not "nicely ordered."
    • It generates, it doesn't save. The string comes out of the output port; wire it into a filename builder or save node yourself.

    No community threads exist for this node - it's a personal-pack utility in a pack with a two-line README. But unique-per-run naming is the kind of small fix that quietly prevents a whole class of "my outputs keep overwriting each other" pain, and this is the smallest possible version of it.

    Categorybadger

    Inputs (2)

    NameTypeDefaultDescription
    appendSTRING
    seedINT00–18446744073709550000

    Outputs (1)

    NameTypeDescription
    STRINGSTRING