Release V2.1.5 UI serialization stability fix
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user