Skip to content

Add regression tests for LTX multi-window fusion and LoRA conversion error paths#28

Draft
cursor[bot] wants to merge 5 commits into
mainfrom
cursor/regression-test-coverage-8067
Draft

Add regression tests for LTX multi-window fusion and LoRA conversion error paths#28
cursor[bot] wants to merge 5 commits into
mainfrom
cursor/regression-test-coverage-8067

Conversation

@cursor

@cursor cursor Bot commented Jul 2, 2026

Copy link
Copy Markdown

What does this PR do?

Consolidates prior regression coverage from cursor/regression-test-coverage-042e (not yet on main) and adds new tests for the highest-risk gaps identified this run.

Risky behavior now covered

  • LTX long multi-prompt pipeline — multi-window fusion path: exercises temporal sliding windows with overlap (temporal_overlap > 0, 2+ windows), inter-window tail injection, and linear_overlap_fuse output assembly. Compares multi-window vs single-window latent output to prove the fusion path runs.
  • convert_all_state_dict_to_peft error paths: validates the UNet fallback when type inference fails, raises when conversion yields no LoRA keys, and re-raises unexpected errors instead of silently swallowing them.
  • Prior branch coverage (042e): CogVideoX schedulers, DDPM Wuerstchen, FlowMatch Euler, Helios, LTX RF, DDIM/DDPM guards, loading_utils, remote_utils, state_dict_utils, and LTX helper unit tests.

Test files added/updated

File Change
tests/pipelines/ltx/test_ltx_i2v_long_multi_prompt.py Multi-window inference regression test
tests/others/test_state_dict_utils.py PEFT conversion error-path tests
tests/others/test_loading_utils.py New (from 042e)
tests/others/test_remote_utils.py New (from 042e)
tests/schedulers/test_scheduler_cogvideox.py New (from 042e)
tests/schedulers/test_scheduler_ddpm_wuerstchen.py New (from 042e)
tests/schedulers/test_scheduler_flow_match_euler_discrete.py New (from 042e)
tests/schedulers/test_scheduler_helios.py New (from 042e)
tests/schedulers/test_scheduler_ltx_euler_ancestral_rf.py New (from 042e)
tests/schedulers/test_scheduler_ddim.py Guard test (from 042e)
tests/schedulers/test_scheduler_ddpm.py Guard test (from 042e)
utils/check_copies.py Scoped copy check for test-only PRs (from 042e)

Why these tests materially reduce regression risk

  • The LTX long pipeline is a complex autoregressive loop; helper tests alone do not prove the multi-window denoising + fusion loop works end-to-end. The new test catches regressions in overlap injection and window stitching that would produce silent shape/continuity bugs.
  • convert_all_state_dict_to_peft is a shared LoRA loading utility with fallback logic; incorrect error handling would either crash valid loads or accept invalid state dicts.
  • Scheduler and utility tests cover high-blast-radius shared code paths used across many pipelines.

Validation

174 targeted tests pass locally:

python3 -m pytest -n auto --dist=loadfile -s -v \
  tests/others/test_loading_utils.py \
  tests/others/test_remote_utils.py \
  tests/others/test_state_dict_utils.py \
  tests/pipelines/ltx/test_ltx_i2v_long_multi_prompt.py \
  tests/schedulers/test_scheduler_cogvideox.py \
  tests/schedulers/test_scheduler_ddim.py \
  tests/schedulers/test_scheduler_ddpm.py \
  tests/schedulers/test_scheduler_ddpm_wuerstchen.py \
  tests/schedulers/test_scheduler_flow_match_euler_discrete.py \
  tests/schedulers/test_scheduler_helios.py \
  tests/schedulers/test_scheduler_ltx_euler_ancestral_rf.py

Before submitting

  • Did you use an AI agent (Claude Code, Codex, Cursor, etc.) to help with this PR? If so:
  • Did you write any new necessary tests?
Open in Web View Automation 

cursoragent and others added 5 commits June 29, 2026 02:03
Cover FlowMatchEulerDiscreteScheduler, HeliosScheduler, and
LTXEulerAncestralRFScheduler contract behavior, DDIM/DDPM
set_timesteps validation guards, state_dict LoRA conversion paths,
and remote_utils encode/decode helpers.

Co-authored-by: Simon Lynch <srlynch1@users.noreply.github.com>
…g_utils

Cover high-blast-radius code paths that previously only had indirect
pipeline coverage:
- CogVideoXDDIMScheduler SNR shift and set_timesteps guard
- CogVideoXDPMScheduler multi-step API (old_pred_original_sample)
- DDPMWuerstchenScheduler float timestep schedule and add_noise
- loading_utils path/URL validation and submodule resolution

Use python -m ruff in check_copies so the commit hook works when ruff
is installed as a Python package but not on PATH.

Co-authored-by: Simon Lynch <srlynch1@users.noreply.github.com>
Cover temporal windowing helpers and a fast latent-output inference path
for LTXI2VLongMultiPromptPipeline. Extend state_dict_utils PEFT conversion
tests. Skip check_copies when only non-src/diffusers files change so
test-only PRs are not blocked by pre-existing fork copy drift.

Co-authored-by: Simon Lynch <srlynch1@users.noreply.github.com>
Co-authored-by: Simon Lynch <srlynch1@users.noreply.github.com>
Co-authored-by: Simon Lynch <srlynch1@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant