aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_samplers.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-10-06 23:27:01 +0300
committerAUTOMATIC <16777216c@gmail.com>2022-10-06 23:27:01 +0300
commitb34b25b4c941819d34f29be6c4c1ec01e64585b4 (patch)
tree21babd7b90fa7f892900e122dc63bc2f23775b4a /modules/sd_samplers.py
parent405c8171d1acbb994084d98770bbcb97d01d9406 (diff)
karras samplers for img2img?
Diffstat (limited to 'modules/sd_samplers.py')
-rw-r--r--modules/sd_samplers.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py
index 497df943..df17e93c 100644
--- a/modules/sd_samplers.py
+++ b/modules/sd_samplers.py
@@ -338,9 +338,11 @@ class KDiffusionSampler:
steps, t_enc = setup_img2img_steps(p, steps)
if p.sampler_noise_scheduler_override:
- sigmas = p.sampler_noise_scheduler_override(steps)
+ sigmas = p.sampler_noise_scheduler_override(steps)
+ elif self.config is not None and self.config.options.get('scheduler', None) == 'karras':
+ sigmas = k_diffusion.sampling.get_sigmas_karras(n=steps, sigma_min=0.1, sigma_max=10, device=shared.device)
else:
- sigmas = self.model_wrap.get_sigmas(steps)
+ sigmas = self.model_wrap.get_sigmas(steps)
noise = noise * sigmas[steps - t_enc - 1]
xi = x + noise