hidiffusion disable embeds cache

This commit is contained in:
Vladimir Mandic
2024-06-05 17:36:43 -04:00
parent 45d1cddbce
commit 8a9c10e665
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ def apply_hidiffusion(p, model_type):
shared.log.warning(f'HiDiffusion: class={shared.sd_model.__class__.__name__} not supported')
return
remove_hidiffusion(p)
if p.hidiffusion:
if getattr(p, 'hidiffusion', False) is True:
t0 = time.time()
hidiffusion.is_aggressive_raunet = shared.opts.hidiffusion_steps > 0
hidiffusion.aggressive_step = shared.opts.hidiffusion_steps
+2
View File
@@ -130,6 +130,8 @@ def get_tokens(msg, prompt):
def encode_prompts(pipe, p, prompts: list, negative_prompts: list, steps: int, clip_skip: typing.Optional[int] = None):
if getattr(p, 'hidiffusion', False) is True:
cache.clear()
if 'StableDiffusion' not in pipe.__class__.__name__ and 'DemoFusion' not in pipe.__class__.__name__ and 'StableCascade' not in pipe.__class__.__name__:
shared.log.warning(f"Prompt parser not supported: {pipe.__class__.__name__}")
return