Merge branch 'main' into pr/3917

This commit is contained in:
blessedcoolant 2023-07-24 18:58:34 +12:00
commit 374b4a1b12
3 changed files with 4 additions and 4 deletions

View File

@ -119,8 +119,8 @@ class NoiseInvocation(BaseInvocation):
@validator("seed", pre=True)
def modulo_seed(cls, v):
"""Returns the seed modulo SEED_MAX to ensure it is within the valid range."""
return v % SEED_MAX
"""Returns the seed modulo (SEED_MAX + 1) to ensure it is within the valid range."""
return v % (SEED_MAX + 1)
def invoke(self, context: InvocationContext) -> NoiseOutput:
noise = get_noise(

View File

@ -14,7 +14,7 @@ def get_datetime_from_iso_timestamp(iso_timestamp: str) -> datetime.datetime:
return datetime.datetime.fromisoformat(iso_timestamp)
SEED_MAX = np.iinfo(np.int32).max
SEED_MAX = np.iinfo(np.uint32).max
def get_random_seed():

View File

@ -1,2 +1,2 @@
export const NUMPY_RAND_MIN = 0;
export const NUMPY_RAND_MAX = 2147483647;
export const NUMPY_RAND_MAX = 4294967295;