Nodes/comfyui_cv/CV Random Seed
ComfyUI Node

CV Random Seed

Seeds cv2's global random number generator, then passes its input straight through unchanged. Put it on the wire IMMEDIATELY before the node whose randomness you want to pin - cv2.kmeans' initial centres, cv2.randu/randn, RANSAC - and the same seed gives the same result every run. It has to sit in the data path: execution order follows the links, so a seed node feeding nothing may run after the node it was meant to seed. The passthrough accepts ANY type (image, mask, array, contours, model, string, ...), so it can be inserted wherever the wire into the randomised node happens to be.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Random Seed
  • value
  • value
seed0
Categoryimage/CV/low-level

Inputs (2)

NameTypeDefaultDescription
value*Any value, passed through untouched (not even copied) - it is here only to force this node to run BEFORE the one you are seeding. Route a wire that already feeds the randomised node through here; the type does not matter.
seedINT00–2147483647Any value; the same seed reproduces the same sequence. Note this is cv2's ONE global RNG, so the result also depends on what other cv2 nodes drew from it in between.

Outputs (1)

NameTypeDescription
value*The input value, unchanged.