diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-10-10 17:32:37 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-10-10 17:32:44 +0000 |
commit | 39919c40dd18f5a14ae21403efea1b0f819756c7 (patch) | |
tree | aeb949900463f50d99412daa25ebd07e5dee7da1 /modules/processing.py | |
parent | ed769977f0d0f201d8e361d365102f18775fc62c (diff) | |
download | stable-diffusion-webui-gfx803-39919c40dd18f5a14ae21403efea1b0f819756c7.tar.gz stable-diffusion-webui-gfx803-39919c40dd18f5a14ae21403efea1b0f819756c7.tar.bz2 stable-diffusion-webui-gfx803-39919c40dd18f5a14ae21403efea1b0f819756c7.zip |
add eta noise seed delta option
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/processing.py b/modules/processing.py index 50ba4fc5..698b3069 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -207,7 +207,7 @@ def create_random_tensors(shape, seeds, subseeds=None, subseed_strength=0.0, see # enables the generation of additional tensors with noise that the sampler will use during its processing.
# Using those pre-generated tensors instead of simple torch.randn allows a batch with seeds [100, 101] to
# produce the same images as with two batches [100], [101].
- if p is not None and p.sampler is not None and len(seeds) > 1 and opts.enable_batch_seeds:
+ if p is not None and p.sampler is not None and (len(seeds) > 1 and opts.enable_batch_seeds or opts.eta_noise_seed_delta > 0):
sampler_noises = [[] for _ in range(p.sampler.number_of_needed_noises(p))]
else:
sampler_noises = None
@@ -247,6 +247,9 @@ def create_random_tensors(shape, seeds, subseeds=None, subseed_strength=0.0, see if sampler_noises is not None:
cnt = p.sampler.number_of_needed_noises(p)
+ if opts.eta_noise_seed_delta > 0:
+ torch.manual_seed(seed + opts.eta_noise_seed_delta)
+
for j in range(cnt):
sampler_noises[j].append(devices.randn_without_seed(tuple(noise_shape)))
@@ -301,6 +304,7 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments, iteration "Denoising strength": getattr(p, 'denoising_strength', None),
"Eta": (None if p.sampler is None or p.sampler.eta == p.sampler.default_eta else p.sampler.eta),
"Clip skip": None if clip_skip <= 1 else clip_skip,
+ "ENSD": None if opts.eta_noise_seed_delta == 0 else opts.eta_noise_seed_delta,
}
generation_params.update(p.extra_generation_params)
|