mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-02-02 22:37:24 +00:00
Update rng.py
This commit is contained in:
@@ -11,6 +11,7 @@ def randn(seed, shape, generator=None):
|
||||
if generator is not None:
|
||||
# If generator is not none, we must use another seed to
|
||||
# avoid global torch.rand to get same noise again.
|
||||
# Note: removing this will make DDPM sampler broken.
|
||||
manual_seed((seed + 262144) % 65536)
|
||||
else:
|
||||
manual_seed(seed)
|
||||
|
||||
Reference in New Issue
Block a user