aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-07-14 17:54:09 +0300
committerAUTOMATIC1111 <16777216c@gmail.com>2023-07-14 17:54:09 +0300
commit471a5a66b73921d569242daccc5275cb195e3f06 (patch)
tree637a84f2d1eb8f3d11dc94a404f5a33e9fb0a0d1 /modules
parent92a3236161099aca735c3f59f30859750d9e7452 (diff)
add more relevant fields to caching conds
Diffstat (limited to 'modules')
-rw-r--r--modules/processing.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/modules/processing.py b/modules/processing.py
index f01a6907..f68e010d 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -330,8 +330,21 @@ class StableDiffusionProcessing:
caches is a list with items described above.
"""
+
+ cached_params = (
+ required_prompts,
+ steps,
+ opts.CLIP_stop_at_last_layers,
+ shared.sd_model.sd_checkpoint_info,
+ extra_network_data,
+ opts.sdxl_crop_left,
+ opts.sdxl_crop_top,
+ self.width,
+ self.height,
+ )
+
for cache in caches:
- if cache[0] is not None and (required_prompts, steps, opts.CLIP_stop_at_last_layers, shared.sd_model.sd_checkpoint_info, extra_network_data) == cache[0]:
+ if cache[0] is not None and cached_params == cache[0]:
return cache[1]
cache = caches[0]
@@ -339,7 +352,7 @@ class StableDiffusionProcessing:
with devices.autocast():
cache[1] = function(shared.sd_model, required_prompts, steps)
- cache[0] = (required_prompts, steps, opts.CLIP_stop_at_last_layers, shared.sd_model.sd_checkpoint_info, extra_network_data)
+ cache[0] = cached_params
return cache[1]
def setup_conds(self):