From 39dba21f9fa2ff5ce823280b170219aee67023ff Mon Sep 17 00:00:00 2001 From: digital-garbage <133010426+digital-garbage@users.noreply.github.com> Date: Fri, 22 May 2026 18:45:29 +0300 Subject: [PATCH] Remove single-word transition markers from builtin list Single words like "next", "suddenly", "later", "finally" etc. fire on normal prompt text and cause spurious scene splits. Removed the entire single-word temporal markers block. Shortest triggers are now two words minimum. Also removes "and suddenly" and "and next" which were similarly too vague. Stray article-comma cleanup ("the, next" -> "the next") also applied when building transition segments to handle commas left by the split. Co-Authored-By: Claude Sonnet 4.6 --- conditioning.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/conditioning.py b/conditioning.py index a83c9c9a..1efc59d6 100644 --- a/conditioning.py +++ b/conditioning.py @@ -460,15 +460,8 @@ _PROMPT_TRANSITION_PHRASES = sorted([ "in the meantime", "in the meanwhile", "at the same time", "at the same moment", "by this point", "at this point", "at that point", - "and then", "but then", "and suddenly", "and next", + "and then", "but then", "and finally", "and eventually", - # Single-word temporal markers - "next", "subsequently", "thereafter", - "suddenly", "abruptly", "instantly", - "meanwhile", "elsewhere", "simultaneously", - "later", "afterwards", "afterward", - "eventually", "finally", "ultimately", - "soon", "shortly", ], key=len, reverse=True) _GENERIC_SCENE_LABEL_PATTERN = r"\bscene\s+(?:[-+]?\d+|minus\s+[a-z][\w-]*|[a-z][\w-]*)\b" @@ -6140,7 +6133,7 @@ class FunPackVideoRefinerV2(FunPackVideoRefiner): following = following.strip().lstrip(",;.:").strip() if current: segments.append(current) - current = (trans_word + " " + following).strip().strip(",;.:").strip() + current = re.sub(r"\b(a|an|the),\s*", r"\1 ", (trans_word + " " + following).strip().strip(",;.:").strip(), flags=re.IGNORECASE).strip() i += 2 if current: segments.append(current)