fix(ltx): Soften Schedule — log real step count from the wired schedule

PR #266 review finding P3 (diagnostic accuracy). The fallback kept only
connected_ref = sigmas[0] from the wired SIGMAS, so when a run omitted
extra_options["sigmas"] the coverage log fabricated a [ref, 0.0] schedule
and reported "first 1 of 1 steps" — even though the wired 16-step curve
covers "first 7 of 16". That contradicted the PR/changelog promise that
the same coverage line is logged each run.

Keep the WHOLE wired schedule (connected_sigmas) and report coverage
against whichever schedule is actually in force: the runtime one, else
the wired one we anchored to. Anchoring behavior is unchanged.

Verified: with extra_options={} and a wired 16-step front-loaded curve,
the log now reads "first 7 of 16 steps", matching the info output; the
mask still softens (0.2 -> 0.28 at peak gain). 21/21 tests, ruff clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
AI Machine
2026-07-19 20:08:57 +02:00
co-authored by Claude Opus 4.8
parent 61abfece8e
commit cabaec4107
+12 -8
View File
@@ -170,13 +170,16 @@ class LTXKeyframeSoftenSchedule:
return (m, info)
prev_fn = m.model_options.get("denoise_mask_function")
# Fallback anchor from the connected preview SIGMAS (if wired). Used only
# when a run omits extra_options["sigmas"] — gives the wired input a real
# runtime role, not just the info readout.
# Fallback from the connected SIGMAS (if wired). Used when a run omits
# extra_options["sigmas"] — gives the wired input a real runtime role,
# not just the info readout. Keep the WHOLE schedule, not only the anchor:
# the coverage log needs the real step count to stay honest (a wired
# 16-step schedule must report "of 16 steps", not a synthetic 1).
try:
connected_ref = float(sigmas[0]) if sigmas is not None else None
connected_sigmas = [float(s) for s in sigmas] if sigmas is not None else None
except Exception:
connected_ref = None
connected_sigmas = None
connected_ref = connected_sigmas[0] if connected_sigmas else None
logged = [False]
warned = [False]
@@ -225,10 +228,11 @@ class LTXKeyframeSoftenSchedule:
if not logged[0]:
logged[0] = True
nested = getattr(denoise_mask, "is_nested", False)
# Report coverage against the schedule actually in force: the
# runtime one, else the wired one we anchored to.
cov = rt if rt is not None else connected_sigmas
try:
count, n_steps = steps_in_range(
rt if rt is not None else [ref, 0.0], soften_range
)
count, n_steps = steps_in_range(cov, soften_range)
except Exception:
count, n_steps = 0, 0
log.info(