hires prompt timeline: merge to latests, slightly simplify diff
This commit is contained in:
parent
d61e31bae6
commit
99ab3d43a7
|
@ -394,7 +394,7 @@ class StableDiffusionProcessing:
|
||||||
self.main_prompt = self.all_prompts[0]
|
self.main_prompt = self.all_prompts[0]
|
||||||
self.main_negative_prompt = self.all_negative_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"""
|
"""Returns parameters that invalidate the cond cache if changed"""
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -424,7 +424,7 @@ class StableDiffusionProcessing:
|
||||||
caches is a list with items described above.
|
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:
|
for cache in caches:
|
||||||
if cache[0] is not None and cached_params == cache[0]:
|
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.step_multiplier = total_steps // self.steps
|
||||||
self.firstpass_steps = total_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.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, None )
|
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):
|
def get_conds(self):
|
||||||
return self.c, self.uc
|
return self.c, self.uc
|
||||||
|
|
Loading…
Reference in New Issue