Automated PR - 2026-07-07

This commit is contained in:
github-actions[bot]
2026-07-07 16:57:50 +00:00
parent 780984275f
commit 63fd9a4f86
157 changed files with 15976 additions and 5043 deletions
+18
View File
@@ -94,11 +94,29 @@ packages/ltx-trainer/
│ ├── audio_inpainting_lora.yaml # Audio inpainting
│ ├── a2a_ic_lora.yaml # Audio-to-audio IC-LoRA
│ ├── av2av_ic_lora.yaml # AV2AV IC-LoRA
│ ├── README.md # Configs index + training-modes table (see note below)
│ └── accelerate/ # FSDP, DDP configs
├── tests/ # Pytest tests
└── docs/ # Documentation
```
### Configs Directory Documentation
The `configs/` directory is documented in two places that both contain a training-modes table linking to the
`.yaml` files:
- **[`configs/README.md`](configs/README.md)** — a short index with a training-modes table linking to each config
file in the directory (relative links like `./t2v_lora.yaml`).
- **[`docs/training-modes.md`](docs/training-modes.md)** — the full training-modes guide, whose "Quick Reference"
table and per-mode sections link to the configs (relative links like `../configs/t2v_lora.yaml`).
> **⚠️ When changing the contents of `configs/`:**
>
> - If you **rename, move, or delete** a `.yaml` config, update the links in **both** `configs/README.md` and
> `docs/training-modes.md` so no link is broken.
> - If you **add** a new `.yaml` config, add a corresponding row (or config link) to the tables in **both**
> `configs/README.md` and `docs/training-modes.md`, and add it to the directory tree above.
### Key Architectural Patterns
**Model Loading:**
+27
View File
@@ -0,0 +1,27 @@
# Training Configs
Example training configurations for the LTX-2 trainer. Each file is a ready-to-run config for one training mode,
expressed through the unified **flexible** strategy (`name: "flexible"`). Pick the one closest to your use case and
adjust paths, dataset, and hyperparameters.
> 📖 For more information about using each training mode, see [Training Modes Guide](../docs/training-modes.md).
## Training Modes
| Mode | Video | Audio | Conditions | Config |
|-----------------------|-----------|-----------|---------------------|--------|
| **T2V** | Generated | Generated | — | [`t2v_lora.yaml`](./t2v_lora.yaml), [`t2v_lora_low_vram.yaml`](./t2v_lora_low_vram.yaml) (low VRAM) |
| **I2V** | Generated | Generated | `first_frame` | [`i2v_lora.yaml`](./i2v_lora.yaml) |
| **Video Extension** | Generated | Generated | `prefix`/`suffix` | [`video_extend_lora.yaml`](./video_extend_lora.yaml) (forward), [`video_suffix_lora.yaml`](./video_suffix_lora.yaml) (backward) |
| **V2V IC-LoRA** | Generated | — | `reference` | [`v2v_ic_lora.yaml`](./v2v_ic_lora.yaml) |
| **A2V** | Generated | Frozen | — | [`a2v_lora.yaml`](./a2v_lora.yaml) |
| **V2A (Foley)** | Frozen | Generated | — | [`v2a_lora.yaml`](./v2a_lora.yaml) |
| **Video Inpainting** | Generated | — | `mask` | [`video_inpainting_lora.yaml`](./video_inpainting_lora.yaml) |
| **Video Outpainting** | Generated | — | `spatial_crop` | [`video_outpainting_lora.yaml`](./video_outpainting_lora.yaml) |
| **T2A** | — | Generated | — | [`t2a_lora.yaml`](./t2a_lora.yaml) |
| **Audio Extension** | — | Generated | `prefix`/`suffix` | [`audio_extend_lora.yaml`](./audio_extend_lora.yaml) (forward), [`audio_suffix_lora.yaml`](./audio_suffix_lora.yaml) (backward) |
| **Audio Inpainting** | — | Generated | `mask` | [`audio_inpainting_lora.yaml`](./audio_inpainting_lora.yaml) |
| **A2A IC-LoRA** | — | Generated | `reference` | [`a2a_ic_lora.yaml`](./a2a_ic_lora.yaml) |
| **AV2AV IC-LoRA** | Generated | Generated | `reference` (both) | [`av2av_ic_lora.yaml`](./av2av_ic_lora.yaml) |
The [`accelerate/`](./accelerate) directory holds the Accelerate launch configs (FSDP, DDP) for multi-GPU training.
+2 -2
View File
@@ -1,6 +1,6 @@
[project]
name = "ltx-trainer"
version = "1.1.6"
version = "1.1.7"
description = "LTX-2 training, democratized."
readme = "README.md"
authors = [
@@ -54,7 +54,7 @@ build-backend = "hatchling.build"
[tool.ruff]
target-version = "1.1.6"
target-version = "1.1.7"
line-length = 120
# Restrict isort first-party detection to src/ so stray dirs (e.g. wandb/ run output)
# next to pyproject.toml don't get classified as first-party packages. See ruff#10519.
@@ -774,7 +774,11 @@ class ValidationRunner:
stg_guider = STGGuider(cfg.stg_scale)
stg_perturbation_config = (
self._build_stg_perturbation_config(cfg.stg_blocks, cfg.stg_mode) if stg_guider.enabled() else None
self._build_stg_perturbation_config(
cfg.stg_blocks, cfg.stg_mode, transformer.num_blocks, device, next(transformer.parameters()).dtype
)
if stg_guider.enabled()
else None
)
x0_model = X0Model(transformer)
@@ -1072,7 +1076,11 @@ class ValidationRunner:
@staticmethod
def _build_stg_perturbation_config(
stg_blocks: list[int] | None, stg_mode: Literal["stg_av", "stg_v"]
stg_blocks: list[int] | None,
stg_mode: Literal["stg_av", "stg_v"],
num_blocks: int,
device: torch.device,
dtype: torch.dtype,
) -> BatchedPerturbationConfig:
"""Build STG perturbation config that skips self-attention in the specified blocks."""
perturbations: list[Perturbation] = [
@@ -1080,7 +1088,7 @@ class ValidationRunner:
]
if stg_mode == "stg_av":
perturbations.append(Perturbation(type=PerturbationType.SKIP_AUDIO_SELF_ATTN, blocks=stg_blocks))
return BatchedPerturbationConfig(perturbations=[PerturbationConfig(perturbations=perturbations)])
return BatchedPerturbationConfig([PerturbationConfig(perturbations=perturbations)], num_blocks, device, dtype)
@staticmethod
def _load_first_frame(media_path: Path) -> Tensor: