diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-14 18:48:05 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-14 18:48:05 +0000 |
commit | 45be87afc6b173ebda94f427b8d396a2842ddf3c (patch) | |
tree | 551fb5f7c7fab608fdda4c32abe11768ee5fb109 | |
parent | 5daf7983d141d3c79c03cc65238194383e6334c8 (diff) | |
download | stable-diffusion-webui-gfx803-45be87afc6b173ebda94f427b8d396a2842ddf3c.tar.gz stable-diffusion-webui-gfx803-45be87afc6b173ebda94f427b8d396a2842ddf3c.tar.bz2 stable-diffusion-webui-gfx803-45be87afc6b173ebda94f427b8d396a2842ddf3c.zip |
correctly add Eta DDIM to infotext when it's 1.0 and do not add it when it's 0.0.
-rw-r--r-- | modules/sd_samplers_common.py | 3 | ||||
-rw-r--r-- | modules/sd_samplers_timesteps.py | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/modules/sd_samplers_common.py b/modules/sd_samplers_common.py index 07fc4434..8886de7e 100644 --- a/modules/sd_samplers_common.py +++ b/modules/sd_samplers_common.py @@ -217,6 +217,7 @@ class Sampler: self.eta_option_field = 'eta_ancestral'
self.eta_infotext_field = 'Eta'
+ self.eta_default = 1.0
self.conditioning_key = shared.sd_model.model.conditioning_key
@@ -273,7 +274,7 @@ class Sampler: extra_params_kwargs[param_name] = getattr(p, param_name)
if 'eta' in inspect.signature(self.func).parameters:
- if self.eta != 1.0:
+ if self.eta != self.eta_default:
p.extra_generation_params[self.eta_infotext_field] = self.eta
extra_params_kwargs['eta'] = self.eta
diff --git a/modules/sd_samplers_timesteps.py b/modules/sd_samplers_timesteps.py index c1f534ed..66e83ff7 100644 --- a/modules/sd_samplers_timesteps.py +++ b/modules/sd_samplers_timesteps.py @@ -76,6 +76,7 @@ class CompVisSampler(sd_samplers_common.Sampler): self.eta_option_field = 'eta_ddim'
self.eta_infotext_field = 'Eta DDIM'
+ self.eta_default = 0.0
self.model_wrap_cfg = CFGDenoiserTimesteps(self)
|