aboutsummaryrefslogtreecommitdiffstats
path: root/modules/processing.py
diff options
context:
space:
mode:
authorRobert Barron <rubberbaron@robustspread.com>2023-08-14 07:41:36 +0000
committerRobert Barron <rubberbaron@robustspread.com>2023-08-14 07:43:27 +0000
commit99ab3d43a71e3f66e57d3cd2013b97c97e7ab69b (patch)
treeec57ea7e414aeb8e677b98679210250a06d05044 /modules/processing.py
parentd61e31bae620632c026c927cf6538180447c6918 (diff)
downloadstable-diffusion-webui-gfx803-99ab3d43a71e3f66e57d3cd2013b97c97e7ab69b.tar.gz
stable-diffusion-webui-gfx803-99ab3d43a71e3f66e57d3cd2013b97c97e7ab69b.tar.bz2
stable-diffusion-webui-gfx803-99ab3d43a71e3f66e57d3cd2013b97c97e7ab69b.zip
hires prompt timeline: merge to latests, slightly simplify diff
Diffstat (limited to 'modules/processing.py')
-rw-r--r--modules/processing.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/processing.py b/modules/processing.py
index 6d3c9365..75f1d66f 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