Skip to content

Commit

Permalink
Modify step multiplier flow
Browse files Browse the repository at this point in the history
  • Loading branch information
catboxanon authored Apr 17, 2023
1 parent 81b276a commit 4d0c816
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions modules/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,12 @@ def get_conds_with_caching(function, required_prompts, steps, cache):
processed = Processed(p, [], p.seed, "")
file.write(processed.infotext(p, 0))

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
step_multiplier = 1
if shared.opts.fix_second_order_samplers_schedule:
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:
pass
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)

Expand Down

0 comments on commit 4d0c816

Please sign in to comment.