mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'main' into pr/3917
This commit is contained in:
commit
374b4a1b12
@ -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(
|
||||
|
@ -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():
|
||||
|
@ -1,2 +1,2 @@
|
||||
export const NUMPY_RAND_MIN = 0;
|
||||
export const NUMPY_RAND_MAX = 2147483647;
|
||||
export const NUMPY_RAND_MAX = 4294967295;
|
||||
|
Loading…
Reference in New Issue
Block a user