From 99ab3d43a71e3f66e57d3cd2013b97c97e7ab69b Mon Sep 17 00:00:00 2001 From: Robert Barron Date: Mon, 14 Aug 2023 00:41:36 -0700 Subject: [PATCH] hires prompt timeline: merge to latests, slightly simplify diff --- modules/processing.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/processing.py b/modules/processing.py index 6d3c93653..75f1d66fa 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -394,7 +394,7 @@ class StableDiffusionProcessing: self.main_prompt = self.all_prompts[0] self.main_negative_prompt = self.all_negative_prompts[0] - def cached_params(self, required_prompts, steps, hires_steps, extra_network_data, use_old_scheduling): + def cached_params(self, required_prompts, steps, extra_network_data, hires_steps=None, use_old_scheduling=False): """Returns parameters that invalidate the cond cache if changed""" return ( @@ -424,7 +424,7 @@ class StableDiffusionProcessing: caches is a list with items described above. """ - cached_params = self.cached_params(required_prompts, steps, hires_steps, extra_network_data, shared.opts.use_old_scheduling) + cached_params = self.cached_params(required_prompts, steps, extra_network_data, hires_steps, shared.opts.use_old_scheduling) for cache in caches: if cache[0] is not None and cached_params == cache[0]: @@ -447,8 +447,8 @@ class StableDiffusionProcessing: self.step_multiplier = total_steps // self.steps self.firstpass_steps = total_steps - self.uc = self.get_conds_with_caching(prompt_parser.get_learned_conditioning, negative_prompts, total_steps, [self.cached_uc], self.extra_network_data, None) - self.c = self.get_conds_with_caching(prompt_parser.get_multicond_learned_conditioning, prompts, total_steps, [self.cached_c], self.extra_network_data, None ) + self.uc = self.get_conds_with_caching(prompt_parser.get_learned_conditioning, negative_prompts, total_steps, [self.cached_uc], self.extra_network_data) + self.c = self.get_conds_with_caching(prompt_parser.get_multicond_learned_conditioning, prompts, total_steps, [self.cached_c], self.extra_network_data) def get_conds(self): return self.c, self.uc