update changelog and cleanup

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-03-27 11:53:03 -04:00
parent 2c58d3b36c
commit 2a18890235
2 changed files with 23 additions and 24 deletions
+3 -4
View File
@@ -11,10 +11,10 @@ def set_cache(faster_cache=None, pyramid_attention_broadcast=None):
return
faster_cache = faster_cache if faster_cache is not None else shared.opts.faster_cache_enabled
pyramid_attention_broadcast = pyramid_attention_broadcast if pyramid_attention_broadcast is not None else shared.opts.pab_enabled
if not faster_cache and not pyramid_attention_broadcast:
if (not faster_cache) and (not pyramid_attention_broadcast):
return
if not hasattr(shared.sd_model.transformer, 'enable_cache') or not hasattr(shared.sd_model.transformer, 'disable_cache'):
shared.log.debug(f'Transformer cache: cls={shared.sd_model.transformer.__class__.__name__} not supported')
if (not hasattr(shared.sd_model.transformer, 'enable_cache')) or (not hasattr(shared.sd_model.transformer, 'disable_cache')):
shared.log.debug(f'Transformer cache: cls={shared.sd_model.transformer.__class__.__name__} fc={faster_cache} pab={pyramid_attention_broadcast} not supported')
return
try:
if faster_cache: # https://github.com/huggingface/diffusers/pull/10163
@@ -32,7 +32,6 @@ def set_cache(faster_cache=None, pyramid_attention_broadcast=None):
shared.sd_model.transformer.disable_cache()
shared.sd_model.transformer.enable_cache(config)
shared.log.debug(f'Transformer cache: type={config.__class__.__name__}')
shared.log.critical(f'HERE: {vars(config)}')
debug(f'Transformer cache: {vars(config)}')
elif pyramid_attention_broadcast: # https://github.com/huggingface/diffusers/pull/9562
config = diffusers.PyramidAttentionBroadcastConfig(