Conversation
Signed-off-by: Jingyu Xin <jingyux@nvidia.com>
📝 WalkthroughWalkthroughThis PR updates default model configurations to reference the OpenVid dataset instead of SD Prompts for LTX_VIDEO_DEV and LTX2 models, and updates the LTX-Video model filter pattern to match additional transformer block references at specific indices. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
examples/diffusers/quantization/models_utils.py (1)
152-165:⚠️ Potential issue | 🟠 MajorDefaulting to OpenVid here makes calibration load the full split into memory.
examples/diffusers/quantization/utils.py::load_calib_prompts()doeslist(dataset[split][column])before batching. After switching these defaults to_OPENVID_DATASET, a standard LTX calibration run will eagerly materialize the OpenVid training captions up front, which can dominate startup time and memory. Please bound the sampled rows or move the loader toselect/streaming before making this the default.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@examples/diffusers/quantization/utils.py`:
- Around line 70-75: Revert the shared helper filter_func_ltx_video back to its
original LTX-Video pattern (so it continues to serve ModelType.LTX_VIDEO_DEV
unchanged), and add a new LTX2-specific filter (e.g., filter_func_ltx2_video)
that includes the extra transformer_blocks.(0|1|2|45|46|47) alternation; then
update the recipe usage so ModelType.LTX2 uses filter_func_ltx2_video while
ModelType.LTX_VIDEO_DEV continues to use filter_func_ltx_video. Ensure you only
change the pattern in the new filter_func_ltx2_video and swap references where
ModelType.LTX2 is handled, leaving filter_func_ltx_video’s signature and
behavior untouched.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 19c84f2d-7e70-441d-afde-86e383197543
📒 Files selected for processing (2)
examples/diffusers/quantization/models_utils.pyexamples/diffusers/quantization/utils.py
| def filter_func_ltx_video(name: str) -> bool: | ||
| """Filter function specifically for LTX-Video models.""" | ||
| pattern = re.compile( | ||
| r".*(proj_in|time_embed|caption_projection|proj_out|patchify_proj|adaln_single).*" | ||
| r".*(proj_in|time_embed|caption_projection|proj_out|patchify_proj|adaln_single|transformer_blocks\.(0|1|2|45|46|47)\.).*" | ||
| ) | ||
| return pattern.match(name) is not None |
There was a problem hiding this comment.
This also changes the LTX_VIDEO_DEV recipe.
filter_func_ltx_video() is reused for both ModelType.LTX_VIDEO_DEV and ModelType.LTX2, so adding transformer_blocks.(0|1|2|45|46|47) here widens the higher-precision exclusion list for both models, not just LTX2. If the intent is the PR description’s LTX2-only recipe update, this needs a separate LTX2-specific filter instead of changing the shared LTX helper.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@examples/diffusers/quantization/utils.py` around lines 70 - 75, Revert the
shared helper filter_func_ltx_video back to its original LTX-Video pattern (so
it continues to serve ModelType.LTX_VIDEO_DEV unchanged), and add a new
LTX2-specific filter (e.g., filter_func_ltx2_video) that includes the extra
transformer_blocks.(0|1|2|45|46|47) alternation; then update the recipe usage so
ModelType.LTX2 uses filter_func_ltx2_video while ModelType.LTX_VIDEO_DEV
continues to use filter_func_ltx_video. Ensure you only change the pattern in
the new filter_func_ltx2_video and swap references where ModelType.LTX2 is
handled, leaving filter_func_ltx_video’s signature and behavior untouched.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1010 +/- ##
==========================================
- Coverage 71.73% 71.71% -0.03%
==========================================
Files 211 211
Lines 23949 23949
==========================================
- Hits 17181 17175 -6
- Misses 6768 6774 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
What does this PR do?
Type of change: minor code change
Usage
Testing
Before your PR is "Ready for review"
Make sure you read and follow Contributor guidelines and your commits are signed (
git commit -s -S).Make sure you read and follow the Security Best Practices (e.g. avoiding hardcoded
trust_remote_code=True,torch.load(..., weights_only=False),pickle, etc.).CONTRIBUTING.md: ✅ / ❌ / N/AAdditional Information
Summary by CodeRabbit