Release V2.1.5 UI serialization stability fix
This commit is contained in:
+5
-2
@@ -227,8 +227,9 @@ def decode_sequence_with_seam(
|
||||
video_vae: Any,
|
||||
audio_vae: Any,
|
||||
diagnostics_mode: str,
|
||||
automatic: bool = False,
|
||||
) -> tuple[torch.Tensor, dict[str, Any], list[str]]:
|
||||
"""Decode with V2.1 Basic correction while preserving legacy output length."""
|
||||
"""Decode with guarded V2.1 correction while preserving legacy output length."""
|
||||
|
||||
if not entries:
|
||||
raise ValueError("cannot decode an empty Continuum sequence")
|
||||
@@ -275,6 +276,7 @@ def decode_sequence_with_seam(
|
||||
image_buffer[:frame_cursor],
|
||||
limited_raw_images,
|
||||
context_frames=trim_frames,
|
||||
automatic=automatic,
|
||||
)
|
||||
frame_start = frame_cursor - int(decision.cut_rewind_frames)
|
||||
trim_frames -= int(decision.cut_rewind_frames)
|
||||
@@ -385,7 +387,8 @@ def decode_sequence_with_seam(
|
||||
audio = {"waveform": audio_buffer.contiguous(), "sample_rate": audio_rate}
|
||||
reports.append(
|
||||
f"assembled {len(entries)} chunks into {total_retained_frames} frames with "
|
||||
"V2.1 Basic seam correction and cumulative sample-boundary alignment"
|
||||
f"V2.1 {'Auto' if automatic else 'Basic'} seam correction and "
|
||||
"cumulative sample-boundary alignment"
|
||||
)
|
||||
return image_buffer.contiguous(), audio, reports
|
||||
|
||||
|
||||
+5
-3
@@ -8,6 +8,7 @@ from ..constants import (
|
||||
DIAGNOSTICS_OPTIONS,
|
||||
PROMPT_FORMAT_OPTIONS,
|
||||
PROMPT_MODE_OPTIONS,
|
||||
SEAM_CORRECTION_AUTO,
|
||||
SEAM_CORRECTION_OFF,
|
||||
SEAM_CORRECTION_OPTIONS,
|
||||
V2_CONTINUITY_OPTIONS,
|
||||
@@ -198,10 +199,11 @@ class H3ContinuumSamplerV2:
|
||||
"seam_correction": (
|
||||
SEAM_CORRECTION_OPTIONS,
|
||||
{
|
||||
"default": SEAM_CORRECTION_OFF,
|
||||
"default": SEAM_CORRECTION_AUTO,
|
||||
"tooltip": (
|
||||
"Off preserves the V2.0.2 decode path. Basic applies "
|
||||
"conservative decoded A/V boundary correction."
|
||||
"Auto keeps the legacy video boundary unless the guarded candidate "
|
||||
"improves it. Off preserves the V2.0.2 decode path. Basic always runs "
|
||||
"the conservative decoded A/V boundary correction."
|
||||
),
|
||||
},
|
||||
),
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -21,6 +21,7 @@ from ..constants import (
|
||||
DIAGNOSTICS_OPTIONS,
|
||||
FPS,
|
||||
CONTINUUM_ACTUAL_PREFIX_STEPS,
|
||||
SEAM_CORRECTION_AUTO,
|
||||
SEAM_CORRECTION_OFF,
|
||||
SEAM_CORRECTION_OPTIONS,
|
||||
V2_CONTINUITY_AUTO,
|
||||
@@ -467,6 +468,7 @@ def run_sequence(
|
||||
video_vae=video_vae,
|
||||
audio_vae=audio_vae,
|
||||
diagnostics_mode=diagnostics_mode,
|
||||
automatic=seam_correction == SEAM_CORRECTION_AUTO,
|
||||
)
|
||||
duration_report = ""
|
||||
if exact_total_duration:
|
||||
|
||||
Reference in New Issue
Block a user