From 0a5eb94db619385cbff7d5b11511ab1f126d2aff Mon Sep 17 00:00:00 2001 From: digital-garbage <133010426+digital-garbage@users.noreply.github.com> Date: Thu, 21 May 2026 00:23:27 +0300 Subject: [PATCH] Add scene transition phrases --- conditioning.py | 5 +++-- tests/test_v2_category_alignment.py | 9 +++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/conditioning.py b/conditioning.py index 4685a7fb..2bcbb7d7 100644 --- a/conditioning.py +++ b/conditioning.py @@ -423,8 +423,9 @@ _PROMPT_TRANSITION_PHRASES = sorted([ # Explicit scene-boundary phrases "after a brief scene cut", "as the scene transitions", "the scene begins with", "in the next scene", - "as the action continues", "the final sequence shows", - "in the final moments", "the camera then shifts", + "as the action continues", "as the video progresses", + "the final sequence shows", "in the final moments", + "the camera then shifts", "the camera shifts to", "the scene shifts to", "in the next segment", "later, another scene shows", "another scene shows", "the video concludes", diff --git a/tests/test_v2_category_alignment.py b/tests/test_v2_category_alignment.py index fe2c3745..a5d0c2fa 100644 --- a/tests/test_v2_category_alignment.py +++ b/tests/test_v2_category_alignment.py @@ -2395,9 +2395,12 @@ def test_new_transition_phrases_and_then_handling(): refiner = FunPackVideoRefinerV2() prompt = ( "character anchor, as the action continues she runs, " + "as the video progresses she turns, " "the final sequence shows her smiling, " "in the final moments she waves, " "the camera then shifts to the sky, " + "the camera shifts to the window, " + "the scene transitions to a rooftop, " "the scene shifts to a hallway, " "in the next segment she sits" ) @@ -2405,9 +2408,11 @@ def test_new_transition_phrases_and_then_handling(): segments = refiner._v2_split_prompt_by_transitions(prompt) texts = refiner._v2_transition_scene_texts(segments) - assert len(texts) == 6 + assert len(texts) == 9 assert all(text.startswith("character anchor") for text in texts) - assert "the camera then shifts to the sky" in texts[3] + assert "the camera then shifts to the sky" in texts[4] + assert "the camera shifts to the window" in texts[5] + assert "the scene transitions to a rooftop" in texts[6] def test_split_by_transitions_has_no_hard_scene_cap(tmp_path):