ComfyUI Node

Seed Generator

A real seed source that remembers what it gave you

By kinorax·Created 5 months ago·Updated about a month ago· 2
Seed Generator
    • seed
    generation_modeKSampler Standard
    generated_seed

    Every serious workflow eventually needs a seed you can actually hold onto. The default KSampler just rolls a new one each run, and once you're iterating - "change one variable, keep everything else fixed" is the closest thing diffusion has to a scientific method - you want a seed node that tells you what it generated instead of making you read it off the console. That's what IPT-SeedGenerator is: a small, single-output seed source that can also lock a seed you've decided on.

    It belongs to the Info-Prompt-Toolkit/ImageInfo family from the kinorax pack, which is built around carrying your generation settings (model, LoRAs, sampler, seed) in image_info metadata so a trial run is reusable in the next pass. The seed is one of the first things that metadata records, so this node is usually sitting at the top of one of those graphs.

    How it works

    Under the hood it's about as simple as a node gets, which is the point. There's no sampling logic and no model involved - it just produces an integer and hands it to whatever sampler you wire it into.

    The generation_mode dropdown gives you three flavors:

    • KSampler Standard (default) - a fresh random seed in the full 0 to 2^64-1 range. This is what you want for ordinary runs.
    • Sampler Safe (0-4294967293) - the same idea, capped at the 32-bit-safe ceiling that ComfyUI's own sampler widgets use. Handy if you're passing seeds around through other tools that choke on big integers.
    • Fixed - the node stops generating and instead uses whatever integer you type into the generated_seed field. This is your "lock it in" mode.

    When it does generate, it pulls from the OS-level cryptographic random source rather than Python's predictable default RNG. That's the same class of randomness the OS uses for security tokens, so you won't accidentally run two runs on the same seed because a weak RNG got seeded identically.

    The inputs and output that matter

    Honestly, only one thing matters and it's the output: seed, a plain INT that plugs straight into a KSampler, the pack's Sampler Params, or anything else that takes a seed.

    On the input side, generated_seed is worth understanding because it's a bit of a trap: it's a display-only field ("copy-only display" is the author's own wording). The node generates a seed, shows it to you in that box, and you copy it out if you want to reproduce the run. To actually force a specific seed, switch generation_mode to Fixed and type the number in - only then does the field become the source of truth. Try to use it in any other mode and it just sits there looking pretty.

    Installing it

    It ships in the kinorax/comfyui-info-prompt-toolkit pack. Easiest path is ComfyUI Manager - search for "Info-Prompt-Toolkit" and install. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/kinorax/comfyui-info-prompt-toolkit.git
    cd comfyui-info-prompt-toolkit
    pip install -r requirements.txt
    

    Restart ComfyUI after. No model files needed for this node - it's pure Python.

    Where people get burned

    The main gotcha is the display-vs-lock confusion above: people type a seed into generated_seed while still in "KSampler Standard" mode, see the box fill in, and assume it's being used. It isn't. If your runs are producing different images no matter what you type, check that the mode says Fixed.

    Also note the node is deliberately not idempotent - it regenerates a fresh seed on every single execution, even if nothing upstream changed. That's a feature (it's a seed source, not a memory), but it means it won't hold a value across runs the way rgthree's Seed node does. If you want stability across runs, the pattern is: let it generate, copy the value, switch to Fixed, paste. Two clicks, and now that seed is reproducible forever - which is the entire point of the node.

    CategoryInfo-Prompt-Toolkit/ImageInfo

    Inputs (2)

    NameTypeDefaultDescription
    generation_modeCOMBOKSampler StandardSelect seed generation mode
    generated_seedSTRINGGenerated seed (copy-only display)

    Outputs (1)

    NameTypeDescription
    seedINT