From 2430fc20f10715b93a27638c21f83b2d3fa97398 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Sun, 18 Sep 2022 23:43:37 +0300 Subject: [PATCH] fixed a bug with seed reproducibility with bacth_size>0 and bacth_count>0 --- modules/sd_samplers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py index 1b3dc302..af6811a1 100644 --- a/modules/sd_samplers.py +++ b/modules/sd_samplers.py @@ -255,6 +255,7 @@ class KDiffusionSampler: self.model_wrap_cfg.nmask = p.nmask self.model_wrap_cfg.init_latent = p.init_latent self.model_wrap.step = 0 + self.sampler_noise_index = 0 if hasattr(k_diffusion.sampling, 'trange'): k_diffusion.sampling.trange = lambda *args, **kwargs: extended_trange(*args, **kwargs) @@ -269,6 +270,7 @@ class KDiffusionSampler: x = x * sigmas[0] self.model_wrap_cfg.step = 0 + self.sampler_noise_index = 0 if hasattr(k_diffusion.sampling, 'trange'): k_diffusion.sampling.trange = lambda *args, **kwargs: extended_trange(*args, **kwargs)