diff options
author | catboxanon <122327233+catboxanon@users.noreply.github.com> | 2023-04-17 00:34:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-17 00:34:52 +0000 |
commit | 56f8a6b081e3dbfc93956e5c44e507e74a2ba040 (patch) | |
tree | 8497a3df8210a25c7516549fd06deb8acfd622da /modules/processing.py | |
parent | 22bcc7be428c94e9408f589966c2040187245d81 (diff) | |
download | stable-diffusion-webui-gfx803-56f8a6b081e3dbfc93956e5c44e507e74a2ba040.tar.gz stable-diffusion-webui-gfx803-56f8a6b081e3dbfc93956e5c44e507e74a2ba040.tar.bz2 stable-diffusion-webui-gfx803-56f8a6b081e3dbfc93956e5c44e507e74a2ba040.zip |
Fix sampler schedules with step multiplier
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/processing.py b/modules/processing.py index 6d9c6a8d..f6514637 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -639,8 +639,12 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: processed = Processed(p, [], p.seed, "")
file.write(processed.infotext(p, 0))
- uc = get_conds_with_caching(prompt_parser.get_learned_conditioning, negative_prompts, p.steps, cached_uc)
- c = get_conds_with_caching(prompt_parser.get_multicond_learned_conditioning, prompts, p.steps, cached_c)
+ try:
+ step_multiplier = 2 if sd_samplers.all_samplers_map.get(p.sampler_name).aliases[0] in ['k_dpmpp_2s_a', 'k_dpmpp_2s_a_ka', 'k_dpmpp_sde', 'k_dpmpp_sde_ka', 'k_dpm_2', 'k_dpm_2_a', 'k_heun'] else 1
+ except:
+ step_multiplier = 1
+ uc = get_conds_with_caching(prompt_parser.get_learned_conditioning, negative_prompts, p.steps * step_multiplier, cached_uc)
+ c = get_conds_with_caching(prompt_parser.get_multicond_learned_conditioning, prompts, p.steps * step_multiplier, cached_c)
if len(model_hijack.comments) > 0:
for comment in model_hijack.comments:
|