Skip to content

Commit

Permalink
Fix random number generator
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JPPhoto authored and psychedelicious committed Aug 5, 2023
1 parent c076f13 commit dc96a3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion invokeai/app/util/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

0 comments on commit dc96a3e

Please sign in to comment.