diff options
author | Greendayle <Greendayle> | 2022-10-07 16:31:49 +0000 |
---|---|---|
committer | Greendayle <Greendayle> | 2022-10-07 16:31:49 +0000 |
commit | 537da7a304adff95fb2ed8337f7a764d08f67c46 (patch) | |
tree | 4a8b2c23d7c870314083d70e2d82edd9acbe677c /scripts/outpainting_mk_2.py | |
parent | 4320f386d9641c7c234589c4cb0c0c6cbeb156ad (diff) | |
parent | f7c787eb7c295c27439f4fbdf78c26b8389560be (diff) | |
download | stable-diffusion-webui-gfx803-537da7a304adff95fb2ed8337f7a764d08f67c46.tar.gz stable-diffusion-webui-gfx803-537da7a304adff95fb2ed8337f7a764d08f67c46.tar.bz2 stable-diffusion-webui-gfx803-537da7a304adff95fb2ed8337f7a764d08f67c46.zip |
Merge branch 'master' into dev/deepdanbooru
Diffstat (limited to 'scripts/outpainting_mk_2.py')
-rw-r--r-- | scripts/outpainting_mk_2.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/outpainting_mk_2.py b/scripts/outpainting_mk_2.py index 11613ca3..a6468e09 100644 --- a/scripts/outpainting_mk_2.py +++ b/scripts/outpainting_mk_2.py @@ -85,8 +85,11 @@ def get_matched_noise(_np_src_image, np_mask_rgb, noise_q=1, color_variation=0.0 src_dist = np.absolute(src_fft)
src_phase = src_fft / src_dist
+ # create a generator with a static seed to make outpainting deterministic / only follow global seed
+ rng = np.random.default_rng(0)
+
noise_window = _get_gaussian_window(width, height, mode=1) # start with simple gaussian noise
- noise_rgb = np.random.random_sample((width, height, num_channels))
+ noise_rgb = rng.random((width, height, num_channels))
noise_grey = (np.sum(noise_rgb, axis=2) / 3.)
noise_rgb *= color_variation # the colorfulness of the starting noise is blended to greyscale with a parameter
for c in range(num_channels):
|