Stage 1 (diag): dump both splits on SCENE SPLIT MISMATCH

The mismatch is structural, not a transform: generation splits the EXPANDED
prompt (qcut/cut already replaced by their expansions) while attribution
splits the RAW prompt (qcut/cut still live as triggers). Dump both splits'
scene texts + keys so we can see exactly which words cause the raw split to
over-count, before building the unified raw-first splitter.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
digital-garbage
2026-06-15 10:05:50 +03:00
co-authored by Claude Opus 4.8
parent d1458eb681
commit 95c97123dd
+12 -4
View File
@@ -12648,11 +12648,19 @@ class FunPackVideoRefinerV2(FunPackVideoRefiner):
if len(canonical_scene_keys) == len(split_scene_texts):
scene_refinement_keys = canonical_scene_keys
else:
# DIAGNOSTIC: dump both splits so we can see exactly where they diverge. The text
# split is on the EXPANDED prompt (generation), the key split is on the RAW prompt
# (split_scenes). Trimmed to 80 chars/scene.
_canon = split_scenes(_raw_positive_prompt).get("scenes", [])
print(
f"[FunPackVideoRefinerV2] SCENE SPLIT MISMATCH: text split has "
f"{len(split_scene_texts)} scene(s) but the raw key split has "
f"{len(canonical_scene_keys)} — a prompt transform changed the scene structure. "
f"Falling back to default-key attribution for this run."
f"[FunPackVideoRefinerV2] SCENE SPLIT MISMATCH: expanded/text split = "
f"{len(split_scene_texts)} scene(s), raw/key split = {len(canonical_scene_keys)}. "
f"Falling back to default-key attribution for this run.\n"
f" RAW key-split scenes ({len(_canon)}):\n" +
"\n".join(f" [{i}] keys={sorted(s.get('keys') or [])} :: {(s.get('raw') or '')[:80]!r}"
for i, s in enumerate(_canon)) +
f"\n EXPANDED text-split scenes ({len(split_scene_texts)}):\n" +
"\n".join(f" [{i}] {str(t)[:80]!r}" for i, t in enumerate(split_scene_texts))
)
scene_refinement_keys = [set() for _ in split_scene_texts]