mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
update changelog and cleanup
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user