diff options
author | Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com> | 2023-05-23 16:18:09 +0000 |
---|---|---|
committer | Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com> | 2023-05-23 16:18:09 +0000 |
commit | 1601fccebca2dc5a806a0d2f0d33aa2da81a28fb (patch) | |
tree | df909700cfdef281507d8f03ee85f631f3275b94 | |
parent | 27962ded4a5303548559d14fe2cae373d7a5e5ac (diff) | |
download | stable-diffusion-webui-gfx803-1601fccebca2dc5a806a0d2f0d33aa2da81a28fb.tar.gz stable-diffusion-webui-gfx803-1601fccebca2dc5a806a0d2f0d33aa2da81a28fb.tar.bz2 stable-diffusion-webui-gfx803-1601fccebca2dc5a806a0d2f0d33aa2da81a28fb.zip |
Use automatic instead of None/default
-rw-r--r-- | modules/sd_samplers_kdiffusion.py | 6 | ||||
-rw-r--r-- | modules/shared.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index eff2e32d..a4c797c6 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -46,7 +46,7 @@ sampler_extra_params = { k_diffusion_samplers_map = {x.name: x for x in samplers_data_k_diffusion}
k_diffusion_scheduler = {
- 'None': None,
+ 'Automatic': None,
'karras': k_diffusion.sampling.get_sigmas_karras,
'exponential': k_diffusion.sampling.get_sigmas_exponential,
'polyexponential': k_diffusion.sampling.get_sigmas_polyexponential
@@ -296,7 +296,7 @@ class KDiffusionSampler: k_diffusion.sampling.torch = TorchHijack(self.sampler_noises if self.sampler_noises is not None else [])
- if opts.k_sched_type != "None":
+ if opts.k_sched_type != "Automatic":
p.extra_generation_params["KDiffusion Scheduler Type"] = opts.k_sched_type
p.extra_generation_params["KDiffusion Scheduler sigma_max"] = opts.sigma_max
p.extra_generation_params["KDiffusion Scheduler sigma_min"] = opts.sigma_min
@@ -325,7 +325,7 @@ class KDiffusionSampler: if p.sampler_noise_scheduler_override:
sigmas = p.sampler_noise_scheduler_override(steps)
- elif opts.k_sched_type != "None":
+ elif opts.k_sched_type != "Automatic":
sigma_min, sigma_max = (0.1, 10) if opts.use_old_karras_scheduler_sigmas else (self.model_wrap.sigmas[0].item(), self.model_wrap.sigmas[-1].item())
sigmas_func = k_diffusion_scheduler[opts.k_sched_type]
sigmas_kwargs = {
diff --git a/modules/shared.py b/modules/shared.py index b24f52dd..da7f7cfb 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -517,7 +517,7 @@ options_templates.update(options_section(('sampler-params', "Sampler parameters" 's_churn': OptionInfo(0.0, "sigma churn", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}),
's_tmin': OptionInfo(0.0, "sigma tmin", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}),
's_noise': OptionInfo(1.0, "sigma noise", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}),
- 'k_sched_type': OptionInfo("default", "scheduler type", gr.Dropdown, {"choices": ["None", "karras", "exponential", "polyexponential"]}),
+ 'k_sched_type': OptionInfo("Automatic", "scheduler type", gr.Dropdown, {"choices": ["Automatic", "karras", "exponential", "polyexponential"]}),
'sigma_max': OptionInfo(0.0, "sigma max", gr.Number).info("the maximum noise strength for the scheduler. Set to 0 to use the same value which 'xxx karras' samplers use."),
'sigma_min': OptionInfo(0.0, "sigma min", gr.Number).info("the minimum noise strength for the scheduler. Set to 0 to use the same value which 'xxx karras' samplers use."),
'rho': OptionInfo(7.0, "rho", gr.Number).info("higher will make a more steep noise scheduler (decrease faster). default for karras is 7.0, for polyexponential is 1.0"),
|