From a5876b64962ce011de04d1b83c3eb00514a9358e Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 16 Aug 2026 16:26:20 +0000 Subject: [PATCH] detailer: skip blank lines when building the fallback prompt pool A blank spacer line between a [CLASS=...] line and a plain fallback line (common when formatting the prompt for readability) was being counted as an empty fallback entry, silently pushing the real fallback text out of position and handing untagged detections an empty prompt. --- modules/detailer/helper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/detailer/helper.py b/modules/detailer/helper.py index 5875d5a1a..cec95229d 100644 --- a/modules/detailer/helper.py +++ b/modules/detailer/helper.py @@ -50,6 +50,8 @@ def parse_prompt_lines(text: str): fallback: list[str] = [] for line in (text or '').split('\n'): line = line.strip() + if len(line) == 0: + continue # blank spacer lines don't count as a fallback entry m = class_tag_re.match(line) if m: names = [n.strip().lower() for n in m.group(1).split(',') if n.strip()]