From 1969ac96bbef8397af39cfff862c7c87b4f38a06 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 28 Mar 2025 21:24:05 -0400 Subject: [PATCH] skip prompt enhance on interrupt Signed-off-by: Vladimir Mandic --- scripts/prompt_enhance.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/prompt_enhance.py b/scripts/prompt_enhance.py index 15a9d5d88..a218e081d 100644 --- a/scripts/prompt_enhance.py +++ b/scripts/prompt_enhance.py @@ -199,6 +199,8 @@ class Script(scripts.Script): apply_auto, llm_model, prompt_system, max_tokens, do_sample, temperature, repetition_penalty = args if not apply_auto and not p.enhance_prompt: return + if shared.state.skipped or shared.state.interrupted: + return p.prompt = shared.prompt_styles.apply_styles_to_prompt(p.prompt, p.styles) p.negative_prompt = shared.prompt_styles.apply_negative_styles_to_prompt(p.negative_prompt, p.styles) shared.prompt_styles.apply_styles_to_extra(p)