Add scene transition phrases

This commit is contained in:
digital-garbage
2026-05-21 00:23:27 +03:00
parent 87db442476
commit 0a5eb94db6
2 changed files with 10 additions and 4 deletions
+3 -2
View File
@@ -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",
+7 -2
View File
@@ -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):