Add LTX-2 third-party license notices for legal compliance#1226
Add LTX-2 third-party license notices for legal compliance#1226kevalmorabia97 merged 2 commits intomainfrom
Conversation
LTX-2 (ltx-core, ltx-pipelines, ltx-trainer) is a third-party dependency
from Lightricks governed by the LTX Community License Agreement, not Apache
2.0. Per legal guidance, users must be clearly informed of this at every
integration point.
Changes:
- Add `[!WARNING]` license notice blocks to all LTX-2-related READMEs
(examples/diffusers, examples/diffusers/distillation,
examples/windows/diffusers/qad_example)
- Add `warnings.warn(UserWarning)` at every LTX package import site in
Python files (both top-level and lazy imports), covering:
examples/diffusers/distillation/distillation_trainer.py
examples/diffusers/quantization/calibration.py
examples/diffusers/quantization/pipeline_manager.py
examples/windows/diffusers/qad_example/sample_example_qad_diffusers.py
modelopt/torch/export/diffusers_utils.py
modelopt/torch/quantization/plugins/diffusion/ltx2.py
- Add license notice comment to requirements.txt files listing LTX packages
- Update .github/CODEOWNERS so all requirements*.txt files across the repo
are owned by @NVIDIA/modelopt-setup-codeowners (last-match-wins rule)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
📝 WalkthroughWalkthroughThis PR adds licensing notices and warnings for LTX-2 packages across documentation, requirements files, and Python code. It clarifies that LTX-2 ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@modelopt/torch/quantization/plugins/diffusion/ltx2.py`:
- Around line 41-51: The warning about LTX-2 licensing should be emitted before
attempting to import the LTX modules in the lazy import path; move the
warnings.warn call so it runs prior to the import statement that references
ltx_core (the lazy import block in ltx2.py) so the notice is always shown (or
visible when import fails) before any ltx_core import is attempted.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8858adef-d2eb-481f-8c14-e5621a94e15b
📒 Files selected for processing (12)
.github/CODEOWNERSexamples/diffusers/README.mdexamples/diffusers/distillation/README.mdexamples/diffusers/distillation/distillation_trainer.pyexamples/diffusers/distillation/requirements.txtexamples/diffusers/quantization/calibration.pyexamples/diffusers/quantization/pipeline_manager.pyexamples/windows/diffusers/qad_example/README.mdexamples/windows/diffusers/qad_example/requirements.txtexamples/windows/diffusers/qad_example/sample_example_qad_diffusers.pymodelopt/torch/export/diffusers_utils.pymodelopt/torch/quantization/plugins/diffusion/ltx2.py
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1226 +/- ##
==========================================
+ Coverage 75.42% 77.33% +1.91%
==========================================
Files 353 353
Lines 40603 40604 +1
==========================================
+ Hits 30623 31400 +777
+ Misses 9980 9204 -776
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
LTX-2 (`ltx-core`, `ltx-pipelines`, `ltx-trainer`) is a third-party dependency developed and provided by Lightricks. It is governed by the [LTX Community License Agreement](https://github.com/Lightricks/LTX-2/blob/main/LICENSE), **not** the Apache 2.0 license that covers NVIDIA Model Optimizer. Per legal guidance, all integration points must clearly surface this to users. - Add `[!WARNING]` license notice blocks at the top of all LTX-2-related READMEs (`examples/diffusers`, `examples/diffusers/distillation`, `examples/windows/diffusers/qad_example`) - Add `warnings.warn(UserWarning)` at every LTX package import site in Python files, covering both top-level and lazy imports: - `examples/diffusers/distillation/distillation_trainer.py` - `examples/diffusers/quantization/calibration.py` - `examples/diffusers/quantization/pipeline_manager.py` - `examples/windows/diffusers/qad_example/sample_example_qad_diffusers.py` - `modelopt/torch/export/diffusers_utils.py` - `modelopt/torch/quantization/plugins/diffusion/ltx2.py` - Add license notice comment to `requirements.txt` files that list LTX packages, so the obligation is visible at install time - Update `.github/CODEOWNERS` so all `requirements*.txt` files (covering variants like `requirements-dev.txt`) are owned by `@NVIDIA/modelopt-setup-codeowners` regardless of location, via a last-match-wins rule **Design notes:** - For library files (`diffusers_utils.py`, `ltx2.py`), the warning is placed at the lazy import site inside functions — it fires only when LTX-2 code paths are actually invoked, not at module import time, to avoid polluting non-LTX users - For example entry-point scripts that are LTX-2-only, the warning fires at module load time (after all imports, to satisfy ruff E402) - [ ] Confirm `pre-commit run --all-files` passes (ruff, mypy, markdownlint, bandit all clean) - [ ] Verify warning appears at runtime when running an LTX-2 quantization or distillation example - [ ] Confirm non-LTX code paths (FLUX, SDXL, SD3) do not emit the warning 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> * **Documentation** * Added third-party license notices across documentation and requirements files clarifying LTX-2 packages are governed by the LTX Community License Agreement rather than NVIDIA Model Optimizer's Apache 2.0 license. * **Chores** * Updated code ownership configuration for requirements files. * Added runtime warnings to notify when LTX-2 dependencies are accessed. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
Summary
LTX-2 (
ltx-core,ltx-pipelines,ltx-trainer) is a third-party dependency developed and provided by Lightricks. It is governed by the LTX Community License Agreement, not the Apache 2.0 license that covers NVIDIA Model Optimizer. Per legal guidance, all integration points must clearly surface this to users.[!WARNING]license notice blocks at the top of all LTX-2-related READMEs (examples/diffusers,examples/diffusers/distillation,examples/windows/diffusers/qad_example)warnings.warn(UserWarning)at every LTX package import site in Python files, covering both top-level and lazy imports:examples/diffusers/distillation/distillation_trainer.pyexamples/diffusers/quantization/calibration.pyexamples/diffusers/quantization/pipeline_manager.pyexamples/windows/diffusers/qad_example/sample_example_qad_diffusers.pymodelopt/torch/export/diffusers_utils.pymodelopt/torch/quantization/plugins/diffusion/ltx2.pyrequirements.txtfiles that list LTX packages, so the obligation is visible at install time.github/CODEOWNERSso allrequirements*.txtfiles (covering variants likerequirements-dev.txt) are owned by@NVIDIA/modelopt-setup-codeownersregardless of location, via a last-match-wins ruleDesign notes:
diffusers_utils.py,ltx2.py), the warning is placed at the lazy import site inside functions — it fires only when LTX-2 code paths are actually invoked, not at module import time, to avoid polluting non-LTX usersTest plan
pre-commit run --all-filespasses (ruff, mypy, markdownlint, bandit all clean)🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores