Skip to content

Commit 681f1ba

Browse files
Add LTX-2 third-party license notices for legal compliance (#1226)
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>
1 parent 24891f0 commit 681f1ba

File tree

12 files changed

+128
-8
lines changed

12 files changed

+128
-8
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ modelopt/torch/utils @NVIDIA/modelopt-torch-utils-codeowners
5454
/examples/vlm_ptq @NVIDIA/modelopt-examples-vlm-codeowners
5555
/examples/vllm_serve @NVIDIA/modelopt-examples-llm_ptq-codeowners
5656
/examples/windows @NVIDIA/modelopt-windows-codeowners
57+
58+
# Requirements files are owned by the setup team regardless of location
59+
requirements*.txt @NVIDIA/modelopt-setup-codeowners

examples/diffusers/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,20 @@ python quantize.py \
118118

119119
#### [LTX-2](https://github.com/Lightricks/LTX-2) FP4
120120

121+
> [!WARNING]
122+
> **Third-Party License Notice — LTX-2**
123+
>
124+
> LTX-2 is a third-party model and set of packages developed and provided by Lightricks. LTX-2
125+
> is **not** covered by the Apache 2.0 license that governs NVIDIA Model Optimizer.
126+
>
127+
> By installing and using LTX-2 packages (`ltx-core`, `ltx-pipelines`, `ltx-trainer`) with
128+
> NVIDIA Model Optimizer, you **must** comply with the
129+
> [LTX Community License Agreement](https://github.com/Lightricks/LTX-2/blob/main/LICENSE).
130+
>
131+
> Any derivative models or fine-tuned weights produced from LTX-2 using NVIDIA Model Optimizer
132+
> (including quantized or distilled checkpoints) remain subject to the LTX Community License
133+
> Agreement and are **not** covered by Apache 2.0.
134+
121135
This example produces three outputs: a PyTorch checkpoint (`--quantized-torch-ckpt-save-path`), a Hugging Face checkpoint (`--hf-ckpt-dir`), and a ComfyUI-compatible merged safetensor (`--extra-param merged_base_safetensor_path`).
122136

123137
```sh

examples/diffusers/distillation/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# LTX-2 Distillation Training with ModelOpt
22

3+
> [!WARNING]
4+
> **Third-Party License Notice — LTX-2**
5+
>
6+
> LTX-2 is a third-party model and set of packages developed and provided by Lightricks. LTX-2
7+
> is **not** covered by the Apache 2.0 license that governs NVIDIA Model Optimizer.
8+
>
9+
> By installing and using LTX-2 packages (`ltx-core`, `ltx-pipelines`, `ltx-trainer`) with
10+
> NVIDIA Model Optimizer, you **must** comply with the
11+
> [LTX Community License Agreement](https://github.com/Lightricks/LTX-2/blob/main/LICENSE).
12+
>
13+
> Any derivative models or fine-tuned weights produced from LTX-2 using NVIDIA Model Optimizer
14+
> (including quantized or distilled checkpoints) remain subject to the LTX Community License
15+
> Agreement and are **not** covered by Apache 2.0.
16+
317
Knowledge distillation for LTX-2 DiT models using NVIDIA ModelOpt. A frozen **teacher** guides a trainable **student** through a combined loss:
418

519
```text

examples/diffusers/distillation/distillation_trainer.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import json
3636
import os
3737
import time
38+
import warnings
3839
from pathlib import Path
3940
from typing import Literal
4041

@@ -51,6 +52,17 @@
5152
import modelopt.torch.opt as mto
5253
import modelopt.torch.quantization as mtq
5354

55+
warnings.warn(
56+
"LTX-2 packages (ltx-core, ltx-pipelines, ltx-trainer) are provided by Lightricks and are "
57+
"NOT covered by the Apache 2.0 license governing NVIDIA Model Optimizer. You MUST comply "
58+
"with the LTX Community License Agreement when installing and using LTX-2 with NVIDIA Model "
59+
"Optimizer. Any derivative models or fine-tuned weights from LTX-2 (including quantized or "
60+
"distilled checkpoints) remain subject to the LTX Community License Agreement, not Apache "
61+
"2.0. See: https://github.com/Lightricks/LTX-2/blob/main/LICENSE",
62+
UserWarning,
63+
stacklevel=1,
64+
)
65+
5466
# Custom quantization configs. Checked before mtq built-in configs.
5567
# Add your own configs here; they take precedence over mtq.* attributes.
5668
CUSTOM_QUANT_CONFIGS: dict[str, dict] = {

examples/diffusers/distillation/requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Third-Party License Notice: LTX-2 packages below are provided by Lightricks and are NOT
2+
# covered by the Apache 2.0 license governing NVIDIA Model Optimizer. You MUST comply with
3+
# the LTX Community License Agreement when installing and using LTX-2 with NVIDIA Model
4+
# Optimizer. Any derivative models or fine-tuned weights produced from LTX-2 (including
5+
# quantized or distilled checkpoints) remain subject to the LTX Community License Agreement,
6+
# not Apache 2.0. See: https://github.com/Lightricks/LTX-2/blob/main/LICENSE
17
ltx-core @ git+https://github.com/Lightricks/LTX-2.git#subdirectory=packages/ltx-core
28
ltx-pipelines @ git+https://github.com/Lightricks/LTX-2.git#subdirectory=packages/ltx-pipelines
39
ltx-trainer @ git+https://github.com/Lightricks/LTX-2.git#subdirectory=packages/ltx-trainer

examples/diffusers/quantization/calibration.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# limitations under the License.
1515

1616
import logging
17+
import warnings
1718
from pathlib import Path
1819
from typing import Any
1920

@@ -120,6 +121,16 @@ def _run_wan_video_calibration(
120121
self.pipe(prompt=prompt_batch, **kwargs).frames
121122

122123
def _run_ltx2_calibration(self, prompt_batch: list[str], extra_args: dict[str, Any]) -> None:
124+
warnings.warn(
125+
"LTX-2 packages (ltx-core, ltx-pipelines, ltx-trainer) are provided by Lightricks and are NOT "
126+
"covered by the Apache 2.0 license governing NVIDIA Model Optimizer. You MUST comply "
127+
"with the LTX Community License Agreement when installing and using LTX-2 with NVIDIA "
128+
"Model Optimizer. Any derivative models or fine-tuned weights from LTX-2 remain "
129+
"subject to the LTX Community License Agreement, not Apache 2.0. "
130+
"See: https://github.com/Lightricks/LTX-2/blob/main/LICENSE",
131+
UserWarning,
132+
stacklevel=2,
133+
)
123134
from ltx_core.model.video_vae import TilingConfig
124135
from ltx_pipelines.utils.constants import (
125136
DEFAULT_AUDIO_GUIDER_PARAMS,

examples/diffusers/quantization/pipeline_manager.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# limitations under the License.
1515

1616
import logging
17+
import warnings
1718
from collections.abc import Iterator
1819
from typing import Any
1920

@@ -227,6 +228,16 @@ def _create_ltx2_pipeline(self) -> Any:
227228
if not gemma_root:
228229
raise ValueError("Missing required extra_param: gemma_root.")
229230

231+
warnings.warn(
232+
"LTX-2 packages (ltx-core, ltx-pipelines, ltx-trainer) are provided by Lightricks and are NOT "
233+
"covered by the Apache 2.0 license governing NVIDIA Model Optimizer. You MUST comply "
234+
"with the LTX Community License Agreement when installing and using LTX-2 with NVIDIA "
235+
"Model Optimizer. Any derivative models or fine-tuned weights from LTX-2 remain "
236+
"subject to the LTX Community License Agreement, not Apache 2.0. "
237+
"See: https://github.com/Lightricks/LTX-2/blob/main/LICENSE",
238+
UserWarning,
239+
stacklevel=2,
240+
)
230241
from ltx_core.loader import LTXV_LORA_COMFY_RENAMING_MAP, LoraPathStrengthAndSDOps
231242
from ltx_core.quantization import QuantizationPolicy
232243
from ltx_pipelines.ti2vid_two_stages import TI2VidTwoStagesPipeline

examples/windows/torch_onnx/diffusers/qad_example/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# LTX-2 QAD Example (Quantization-Aware Distillation)
22

3+
> [!WARNING]
4+
> **Third-Party License Notice — LTX-2**
5+
>
6+
> LTX-2 is a third-party model and set of packages developed and provided by Lightricks. LTX-2
7+
> is **not** covered by the Apache 2.0 license that governs NVIDIA Model Optimizer.
8+
>
9+
> By installing and using LTX-2 packages (`ltx-core`, `ltx-pipelines`, `ltx-trainer`) with
10+
> NVIDIA Model Optimizer, you **must** comply with the
11+
> [LTX Community License Agreement](https://github.com/Lightricks/LTX-2/blob/main/LICENSE).
12+
>
13+
> Any derivative models or fine-tuned weights produced from LTX-2 using NVIDIA Model Optimizer
14+
> (including quantized or distilled checkpoints) remain subject to the LTX Community License
15+
> Agreement and are **not** covered by Apache 2.0.
16+
317
**Note:** This is a **sample script for illustrating the QAD pipeline**. It has been verified to run on a **Linux RTX 5090** system, but runs into **OOM (Out of Memory)** on that configuration.
418

519
This example demonstrates **Quantization-Aware Distillation (QAD)** for [LTX-2](https://github.com/Lightricks/LTX-2) using the native LTX training loop and [NVIDIA ModelOpt](https://github.com/NVIDIA/Model-Optimizer). It combines:
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
accelerate
21
# LTX-2 packages (from Lightricks/LTX-2 monorepo)
2+
# Third-Party License Notice: LTX-2 packages below are provided by Lightricks and are NOT
3+
# covered by the Apache 2.0 license governing NVIDIA Model Optimizer. You MUST comply with
4+
# the LTX Community License Agreement when installing and using LTX-2 with NVIDIA Model
5+
# Optimizer. Any derivative models or fine-tuned weights produced from LTX-2 (including
6+
# quantized or distilled checkpoints) remain subject to the LTX Community License Agreement,
7+
# not Apache 2.0. See: https://github.com/Lightricks/LTX-2/blob/main/LICENSE
38
ltx-core @ git+https://github.com/Lightricks/LTX-2.git#subdirectory=packages/ltx-core
49
ltx-pipelines @ git+https://github.com/Lightricks/LTX-2.git#subdirectory=packages/ltx-pipelines
510
ltx-trainer @ git+https://github.com/Lightricks/LTX-2.git#subdirectory=packages/ltx-trainer
6-
7-
# NVIDIA ModelOpt (quantization & distillation)
8-
nvidia-modelopt
9-
pyyaml
10-
safetensors
11-
12-
torch>=2.0
11+
nvidia-modelopt[hf]

examples/windows/torch_onnx/diffusers/qad_example/sample_example_qad_diffusers.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import os
4545
import struct
4646
import sys
47+
import warnings
4748
from collections import Counter
4849
from pathlib import Path
4950

@@ -66,6 +67,17 @@
6667
from modelopt.torch.distill.distillation_model import DistillationModel
6768
from modelopt.torch.quantization.config import NVFP4_DEFAULT_CFG
6869

70+
warnings.warn(
71+
"LTX-2 packages (ltx-core, ltx-pipelines, ltx-trainer) are provided by Lightricks and are "
72+
"NOT covered by the Apache 2.0 license governing NVIDIA Model Optimizer. You MUST comply "
73+
"with the LTX Community License Agreement when installing and using LTX-2 with NVIDIA Model "
74+
"Optimizer. Any derivative models or fine-tuned weights from LTX-2 (including quantized or "
75+
"distilled checkpoints) remain subject to the LTX Community License Agreement, not Apache "
76+
"2.0. See: https://github.com/Lightricks/LTX-2/blob/main/LICENSE",
77+
UserWarning,
78+
stacklevel=1,
79+
)
80+
6981
logger = logging.getLogger(__name__)
7082

7183
# ─── Constants ────────────────────────────────────────────────────────────────

0 commit comments

Comments
 (0)