Nodes/h4_Live/h4 - Seed Generator
ComfyUI Node

h4 - Seed Generator

A seed that moves when you want it to

By m3rr·Created 9 months ago·Updated 10 days ago· 1
h4 - Seed Generator
    • Scheduled_Seed
    â—„start_seed0â–ş
    â—„modeIncrementalâ–ş
    â—„broadcastfalseâ–ş

    Every KSampler has a seed widget, and every beginner has been bitten by its control_after_generate dropdown - the setting that silently rolls a new seed at the end of a run, which is how you "lock in" a great seed and immediately lose it. The h4 - Seed Generator is a cleaner way to own your seeds: it's a dedicated node that emits a seed as a real output, with explicit modes for sweeping, testing, or exploring. Wire it into a sampler's seed input (via convert-to-input) and the randomness is a thing you control, not a thing that surprises you.

    It's part of h4_Live's MissionControl family, which means it also understands the toolkit's loop counter - that's the feature that makes it more than a repackaged randomizer.

    How it works

    The node reads h4_Live's global loop count and produces a seed from three modes:

    • Incremental - start_seed + loop_count. Run 0 gives you the starting seed, run 1 gives seed+1, and so on. This is the sweep mode: each pass in a refinement loop gets a deterministic, adjacent seed so you can explore variations methodically.
    • Fixed - always start_seed, no matter the loop count. Perfect for testing logic where you want identical conditions every run.
    • Random - pure entropy, a fresh seed every time. The node marks itself always-changed internally so it re-rolls on every run instead of getting cached by ComfyUI's executor.

    Then there's broadcast, the aggressive option: turn it on and this seed overwrites all other seed widgets in the workflow. One source of truth for every sampler, even the ones you didn't wire directly. It's convenient and also exactly the kind of global override that will confuse you later if you forget it's on.

    The inputs and outputs

    • start_seed - the anchor number. Used directly by Fixed mode and as the base for Incremental.
    • mode - Incremental, Fixed, or Random.
    • broadcast - whether this seed rules the whole workflow.

    One output: Scheduled_Seed (INT), which you convert-to-input onto your KSampler's seed field.

    Installing it

    It's part of h4_Live:

    cd ComfyUI/custom_nodes
    git clone https://github.com/m3rr/h4_Live
    # restart ComfyUI
    

    or ComfyUI Manager → search "h4_Live." No extra dependencies.

    Where it can bite you

    The loop count is global to the whole h4_Live toolkit, so Incremental mode advances on whatever shared counter Mission Control or the Loop Incrementer is driving - two independent workflows will step the same seed together. That's the architecture working as designed, but it's a head-scratcher until you know it. And while broadcast is powerful, it's also a landmine: leave it on and every seed widget in your graph becomes cosmetic. In the Fixed mode plus a broadcast seed, you've built a workflow that can only ever reproduce one image - which is a great debugging posture and a terrible default. Use the modes deliberately: Incremental to sweep, Fixed to debug, Random to explore, broadcast sparingly.

    Categoryh4_Live/MissionControl

    Inputs (3)

    NameTypeDefaultDescription
    start_seedINT00–18446744073709550000The starting seed.
    modeCOMBOIncrementalIncremental: Start + Loop Count. Fixed: Always Start. Random: Pure Entropy.
    broadcastBOOLEANfalseIf True, this seed will overwrite ALL other seed widgets in the workflow.

    Outputs (1)

    NameTypeDescription
    Scheduled_SeedINT—