- 随机种
FxAiRandomSeed is about as small as a node gets: no inputs, one output, one job. It hands you a fresh random integer every time you run the graph, and you wire that number into the seed port of your sampler. ComfyUI's built-in RandomNoise already does this, so why does the 凤希AI pack ship its own? Because this one is built for loop workflows, and in a loop the built-in behavior gets annoying fast.
The trick is in the implementation. The node returns random.randint(0, 1125899906842624) - that upper bound is roughly 2^50, so collisions are a rounding error - and it marks itself as always-changed by keying off the current time. That last part is the whole point. A normal node only re-runs when its inputs change, which means a static seed node reuses one number across a batch. This one is dirty on every single execution, so each iteration of a looping workflow - the segment-by-segment long-video pipelines this pack is built around - gets a genuinely new seed without you manually nudging the widget between runs.
You'll find it under the 凤希AI/工具 (Tools) category. There's nothing to configure; it just sits there. The single output is 随机种 (Random Seed), an INT you drag into KSampler, KSamplerAdvanced, or any sampler's seed input. In the packaged long-video flows it usually sits next to the frame/segment counters, so every segment you render starts from different noise - which is what you want when you're batch-rendering and hunting for variety rather than reproducing one shot.
Which brings up the one caveat worth knowing: this node is deliberately non-reproducible. If you need the same seed again - to re-roll a lucky segment, or to A/B a sampler change fairly - you can't get it back from the node because it regenerates constantly. Grab the number out of the widget or the console log before you change anything. For reproducible work you'd use a fixed-seed node anyway.
Install-wise it comes as part of the whole fxai-toolkit pack (by 凤希AI / fxai.site), so you don't install it separately. ComfyUI Manager → search "fxai-toolkit" or "凤希", or clone it into custom_nodes/:
cd ComfyUI/custom_nodes
git clone https://github.com/fxai666/fxai-toolkit
Then restart ComfyUI. The pack auto-installs its two small Python deps (soundfile, psutil) on first load, so you may see pip chatter in the console. That's it - a one-wire utility node, honest about what it does, and the simplest thing in the pack to understand.
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 随机种 | INT | — |