Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/diffusers/schedulers/scheduling_ltx_euler_ancestral_rf.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,14 @@ def set_timesteps(
if sigmas_tensor.ndim != 1:
raise ValueError(f"`sigmas` must be a 1D tensor, got shape {tuple(sigmas_tensor.shape)}.")

if len(sigmas_tensor) > 1 and not torch.all(sigmas_tensor[:-1] >= sigmas_tensor[1:]):
raise ValueError(
"`sigmas` must be monotonically non-increasing (each sigma must be >= the next). "
"A non-monotone sigma schedule violates the CONST parametrization invariant of "
"LTXEulerAncestralRFScheduler: `step()` computes `sigma_down` from adjacent pairs, "
"and a schedule increase causes `alpha_down < 0`, which corrupts denoising silently."
)

if sigmas_tensor[-1].abs().item() > 1e-6:
logger.warning(
"The last sigma in the schedule is not zero (%.6f). "
Expand Down
Loading