Release V2.1.5 UI serialization stability fix

This commit is contained in:
ukr8b3g-cmyk
2026-08-10 19:56:07 +09:00
parent adaca9789b
commit 28b5b751a6
20 changed files with 508 additions and 353 deletions
+18
View File
@@ -271,6 +271,7 @@ def correct_seam(
next_raw_images: torch.Tensor,
*,
context_frames: int,
automatic: bool = False,
) -> tuple[torch.Tensor, SeamDecision, torch.Tensor | None]:
rewind, legacy, selected = choose_adaptive_cut(
previous_images,
@@ -317,6 +318,23 @@ def correct_seam(
None,
)
absolute_improvement = legacy.score - corrected.score
if automatic and (
improvement < MIN_RELATIVE_IMPROVEMENT
or absolute_improvement < MIN_ABSOLUTE_IMPROVEMENT
):
fallback = next_raw_images[int(context_frames) :].clone().contiguous()
return (
fallback,
SeamDecision(
legacy_score=legacy.score,
cut_score=selected.score,
corrected_score=legacy.score,
fallback_reason="Auto kept the legacy video seam; improvement was below threshold",
),
None,
)
decision = SeamDecision(
cut_rewind_frames=rewind,
legacy_score=legacy.score,