Nodes/ComfyUI-xiaozhuguang/小珠光随机种子
ComfyUI Node

小珠光随机种子

A seed node that remembers its history and lets you randomize cleanly

By xiaozhuguang·Created 2 months ago·Updated a day ago· 56
小珠光随机种子
    • SEED
    seed0

    Every workflow starts with a number nobody wants to think about. The seed is ComfyUI's reproducibility anchor - same seed, same noise, same image - and the built-in KSampler seed widget is where most people lose track of it, thanks to the classic control_after_generate trap the plumbing KB documents: the box shows the seed for the next run, not the one that just produced the image you're staring at. XiaozhuguangSeed (小珠光随机种子) is this pack's answer: a dedicated seed node, styled after rgthree's and the official one, with seed history and a clean randomize, so the seed is one named place in your graph instead of a buried widget.

    Under the hood it's as simple as a seed node gets. One integer input (seed, 0 to the full 64-bit range), passed straight through to a single output (SEED). The frontend adds the value: a randomize control and a history of recently used seeds you can click back to. The pack's changelog mentions an interception flag (_xzgQueuePromptIntercepted) so the randomize doesn't double-fire when a run is queued - a genuinely common bug in homegrown seed nodes, where one click of "run" rolls the seed twice and your "fixed" seed isn't fixed.

    Why a dedicated node over the KSampler widget? Three reasons, all practical:

    • One seed, many consumers. Wire this one output into every sampler, the H3 prompt node, and the TTS node's seed. Change it once; every downstream stays in sync. The plumbing KB's "one source, many consumers" pattern, exactly.
    • The seed survives as data. It's an explicit INT output, so you can convert to input, log it, or compare it - it's a value in the graph, not a widget attached to a sampler.
    • History. Randomize until you land on something good, then click back through your history to recover the exact seed that made it. That's the anti-trap: it hands you the undo that the widget's "after" behavior denies.

    Inputs and output: just seed (INT, default 0) in, SEED (INT) out. That's the whole node.

    The one thing to know about any seed node like this: set control_after_generate on the randomize control to the behavior you want, and if you're new, consider the global "widget control mode = Before" setting the plumbing KB recommends. Otherwise the randomization semantics here are the same as everywhere else in ComfyUI.

    Install: ComfyUI Manager → ComfyUI-xiaozhuguang → restart, or clone it into custom_nodes. No dependencies, no models. It landed in v11.4.0, so if you've got an older pack install, update. This isn't a flashy node - it's the unglamorous fix for the single most common beginner injury in ComfyUI, and for that it does its job well.

    Categoryxiaozhuguang

    Inputs (1)

    NameTypeDefaultDescription
    seedINT00–18446744073709550000

    Outputs (1)

    NameTypeDescription
    SEEDINT