Add regression tests for LoRA utils, remote VAE, schedulers, and FirstBlockCache#18
Draft
cursor[bot] wants to merge 2 commits into
Draft
Add regression tests for LoRA utils, remote VAE, schedulers, and FirstBlockCache#18cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
…tBlockCache Cover high-blast-radius paths that lacked dedicated unit tests: - LoRA state dict key conversion (every adapter load) - Remote VAE encode/decode validation and postprocessing - FlowMatch, Helios, and LTX scheduler contracts - FirstBlockCache skip/compute threshold logic Co-authored-by: Simon Lynch <srlynch1@users.noreply.github.com>
Co-authored-by: Simon Lynch <srlynch1@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds targeted regression tests for high-blast-radius code paths that lacked dedicated unit coverage.
Risky behavior now covered
state_dict_utils) — key remapping for PEFT/Diffusers/legacy formats on every adapter loadremote_utils) — input validation, encode/decode payload shaping, and response postprocessingTest files added/updated
tests/others/test_state_dict_utils.pytests/others/test_remote_utils.pytests/schedulers/test_scheduler_flow_match_euler_discrete.pytests/schedulers/test_scheduler_helios.pytests/schedulers/test_scheduler_ltx_euler_ancestral_rf.pytests/hooks/test_first_block_cache.pyWhy these tests materially reduce regression risk
Recent merges were mostly documentation, but the library still ships critical shared utilities and schedulers without direct unit tests. LoRA key conversion and remote VAE validation are on every load/encode path; scheduler math bugs silently corrupt generation; FirstBlockCache skip logic had mixin-level integration tests but no focused unit tests proving threshold behavior (unlike MagCache). These tests are deterministic, fast, and assert concrete numeric contracts.
Before submitting
Validation
All 47 new tests pass locally: