From dc96a3e79dacb04650d316f63df78b6a2e2432be Mon Sep 17 00:00:00 2001 From: Jonathan <34005131+JPPhoto@users.noreply.github.com> Date: Fri, 4 Aug 2023 22:31:20 -0500 Subject: [PATCH] Fix random number generator Passing in seed=0 is not equivalent to seed=None. The latter will get a new seed from entropy in the OS, and that's what we should be using. --- invokeai/app/util/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/app/util/misc.py b/invokeai/app/util/misc.py index 503f3af4c81..8702d86c67a 100644 --- a/invokeai/app/util/misc.py +++ b/invokeai/app/util/misc.py @@ -18,5 +18,5 @@ def get_datetime_from_iso_timestamp(iso_timestamp: str) -> datetime.datetime: def get_random_seed(): - rng = np.random.default_rng(seed=0) + rng = np.random.default_rng(seed=None) return int(rng.integers(0, SEED_MAX))