Nodes/Mikey Nodes/Seed String (Mikey)
ComfyUI Node

Seed String (Mikey)

Seed String (Mikey Nodes) — get your seed as text, not just a number

By bash-j·Created 3 years ago·Updated 10 months ago· 188
Seed String (Mikey)
    • seed
    • seed_string
    seed0

    Small node, single job, and it solves a specific annoyance: ComfyUI's seeds are integers, but half the places you'd actually want to use a seed - filenames, PNG metadata, a text overlay on the image - need it as a string. Seed String bridges that gap in one node instead of making you fumble with a type-conversion workaround every time.

    What it does

    Straight from the README: it creates a random number (or takes the seed you give it) and outputs it two ways at once - as an integer, exactly like ComfyUI's native seed widget, and as a string version of the same number. That's the entire mechanism. It's not doing anything clever with the number itself; it's a single source of truth for "this run's seed," expressed in both types so you're not forced to reach for a separate int-to-string converter node downstream.

    The inputs and outputs that matter

    One input: seed, an integer, same range as ComfyUI's standard seed widgets (0 up to the usual 64-bit ceiling). Two outputs: seed (INT) and seed_string (STRING). Wire the INT output into your KSampler's seed input, and wire the STRING output anywhere you're building text - Mikey Nodes' own Save Image With Prompt Data node has a parameters field that's a natural home for it, and FileNamePrefix's custom_text field works just as well if you want the seed baked into every saved filename.

    The practical pattern: put one Seed String node early in your graph, feed its INT output to every sampler that needs the same seed, and feed the STRING output to every metadata/filename node that should record it. One node, one number, no risk of your filename and your actual sampler seed drifting out of sync because you typed the number in twice.

    Installing

    Comes with the full Mikey Nodes pack. Through ComfyUI Manager: search "Mikey Nodes," install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/bash-j/mikey_nodes, restart ComfyUI. It's a trivial utility node with zero external dependencies - no models, no extra Python packages beyond whatever the rest of the pack already pulls in.

    What actually goes wrong here

    Honestly, not much - this is about as simple as a custom node gets, so most "problems" trace back to something else in the graph rather than this node itself:

    • Seed drift between the sampler and the saved filename. This happens when people type a seed by hand into two separate widgets instead of routing both from one Seed String node - the classic reason a filename says one seed and the image was actually generated with another. Route both from the same node and the problem disappears structurally.
    • Node not appearing after install. The standard custom-node symptom: you installed the pack but didn't restart ComfyUI (a browser refresh alone won't pick up new Python-side nodes), or ComfyUI Manager hit an install error worth checking its log for.
    • Randomized seed changing every queue when you didn't want it to. That's controlled by the widget's own randomize-on-queue setting in ComfyUI's UI, not by anything Seed String itself does - right-click the seed widget if you need it fixed across runs instead of incrementing.
    CategoryMikey/Utils

    Inputs (1)

    NameTypeDefaultDescription
    seedINT00–18446744073709550000

    Outputs (2)

    NameTypeDescription
    seedINT
    seed_stringSTRING