Skip to content

armgit / LTX-2

Public Imported from GitHub
0

Official Python inference and LoRA trainer package for the LTX-2 audio–video generative model.

Automated PR - 2026-08-11

github-actions[bot]2362161611a6
diff --git a/.claude/skills/train-model/SKILL.md b/.claude/skills/train-model/SKILL.md
index 896c715..a20239e 100644
--- a/.claude/skills/train-model/SKILL.md
+++ b/.claude/skills/train-model/SKILL.md
@@ -1,6 +1,6 @@
---
name: train-model
-description: End-to-end agent for training LTX-2 models. Probes filesystem and GPU, picks the right conditioning mode from the user's intent, prepares the dataset (scenes, captions, references), preprocesses, autotunes, launches, and monitors training. Use when the user wants to train, fine-tune, LoRA, or otherwise produce a custom LTX-2 model.
+description: End-to-end agent for training LTX models. Probes filesystem and GPU, picks the right conditioning mode from the user's intent, prepares the dataset (scenes, captions, references), preprocesses, autotunes, launches, and monitors training. Use when the user wants to train, fine-tune, LoRA, or otherwise produce a custom LTX model.
argument-hint: [optional source path or run name]
user-invocable: true
allowed-tools: Bash, Read, Grep, Glob, Edit, Write, Agent, AskUserQuestion, TodoWrite
@@ -104,7 +104,8 @@ No questions in this phase. Inspect what's already there. Use `references/onboar
### Prerequisite probe (first-run sanity)
- `uv` installed (`command -v uv`).
- Workspace synced (lockfile present + `ltx-trainer` import works).
-- LTX-2 `.safetensors` and Gemma text encoder dir present in `/models/`, `~/models/`, or `$LTX_MODELS_DIR`.
+- LTX `.safetensors` checkpoint and matching Gemma text encoder dir present in `/models/`, `~/models/`, or `$LTX_MODELS_DIR`.
+- For LTX 2.5, `text_encoder_path` must point to the LTX-specific fine-tuned Gemma 4 root, not Google's vanilla Gemma 4 model.
- Captioner availability: Gemini auth (`GEMINI_API_KEY`/`GOOGLE_API_KEY` or gcloud/Vertex) OR a ≥40 GiB GPU to host the Qwen3-Omni-30B vLLM server (FP8; bf16 needs ≥66 GiB). On typical consumer GPUs (24/32 GB), Gemini is effectively the only local-free option — see `references/onboarding.md`.
For any missing prerequisite, **do not silently fail in a later phase**. Present the finding in chat with the specific next step from `references/onboarding.md`. The skill may offer to auto-install / auto-download missing pieces — but only ever after asking the user explicitly, one item at a time (model downloads are tens of GB each). Never auto-modify shell rc files or system config without consent.
@@ -125,7 +126,7 @@ Principle: only ask when reuse-vs-regenerate is a genuine judgment call with cos
Ask only what cannot be inferred. Use `AskUserQuestion` with multiple-choice when possible. Typical questions:
-- **Target resolution / frame count** — propose a default per mode (e.g., `768x512x49` for T2V LoRA on consumer GPUs); offer overrides.
+- **Target resolution / frame count** — propose a default per mode (e.g., `960x544x49` from the T2V LoRA config); offer overrides.
- **Training steps** — if dataset size doesn't pin it, propose a default (e.g., 2000 for small LoRA datasets).
- **LoRA trigger word / concept name** — only for style/concept LoRAs. Ask **only** for the word itself (or whether they want one). **Never** ask or mention *how* it's injected — it's always the `--lora-trigger` flag (passed to `process_dataset.py`, which forwards it to `process_captions.py` where the prepend happens); this is a fixed implementation detail. Presenting caption-injection as an option creates unnecessary confusion.
- **Captioner backend** — only if more than one path is viable (e.g. a ≥40 GiB GPU can host the Qwen3-Omni-30B server *and* Gemini auth is available). On typical consumer GPUs, default to `gemini_flash` and surface that Gemini auth is required rather than asking.
diff --git a/.claude/skills/train-model/phases/post-train-validate.md b/.claude/skills/train-model/phases/post-train-validate.md
index fb8bdfd..4717a8b 100644
--- a/.claude/skills/train-model/phases/post-train-validate.md
+++ b/.claude/skills/train-model/phases/post-train-validate.md
@@ -66,7 +66,8 @@ validation:
# so the output filenames make the category obvious.
- prompt: "[CAT1-IND] <caption from dataset.json>"
# ... repeat for each prompt in all three categories
- # Keep video_dims, frame_rate, guidance/STG settings as the trained config.
+ # Keep video_dims, frame_rate, and validation guidance fields
+ # (video/audio CFG, STG, guidance_rescale, and modality guidance) as the trained config.
# Keep generate_audio consistent with the trained modality config.
checkpoints:
diff --git a/.claude/skills/train-model/phases/preprocess-dataset.md b/.claude/skills/train-model/phases/preprocess-dataset.md
index f84aa4e..4bd0d0a 100644
--- a/.claude/skills/train-model/phases/preprocess-dataset.md
+++ b/.claude/skills/train-model/phases/preprocess-dataset.md
@@ -36,6 +36,9 @@ If `<workspace>/<run-name>/dataset/.precomputed/` already exists:
uv run python -c "import torch; t = torch.load('<path>'); print(t.shape if hasattr(t, 'shape') else {k: v.shape for k, v in t.items()})"
```
3. Compare shapes against the target resolution from the plan.
+4. Confirm the data was produced with the same `model_path` and `text_encoder_path` in the approved plan. In
+ particular, never reuse `conditions/` produced with another LTX checkpoint or Gemma root; LTX 2.5 requires its
+ matching fine-tuned Gemma 4 root, and Google's vanilla Gemma 4 is not a substitute.
**On any mismatch or missing subdirectory: STOP. Do not run `process_dataset.py`.** Ask the user via `AskUserQuestion`:
- Reuse the existing data at its current resolution (update plan + config accordingly).
@@ -57,6 +60,8 @@ uv run python scripts/process_dataset.py \
--load-text-encoder-in-8bit # on 32GB tier (low-VRAM config), per t2v_lora_low_vram.yaml
```
+For LTX 2.5, `<absolute-gemma-path>` must be the matching fine-tuned Gemma 4 root, not Google's vanilla Gemma 4.
+
Add as needed:
- `--skip-audio` — if mode doesn't use audio (T2V video-only variants).
- `--audio-durations "<list>"` — for T2A from a captions-only file.
diff --git a/.claude/skills/train-model/references/config-patching.md b/.claude/skills/train-model/references/config-patching.md
index a9d8bd2..7d41354 100644
--- a/.claude/skills/train-model/references/config-patching.md
+++ b/.claude/skills/train-model/references/config-patching.md
@@ -17,6 +17,9 @@ How to safely produce `<workspace>/<run-name>/config.yaml` from an example in `p
| `data.preprocessed_data_root` | `<workspace>/<run-name>/dataset/.precomputed` (absolute). |
| `output_dir` | `<workspace>/<run-name>/outputs` (absolute). |
+For LTX 2.5, `model.text_encoder_path` must resolve to the matching LTX-specific fine-tuned Gemma 4 root, not
+Google's vanilla Gemma 4 model. The checkpoint and text encoder are separate local paths.
+
## Hardware-Driven Patches
Apply per the matched VRAM tier in `references/hardware-profiles.md`. After autotune (Phase 6), patch the winning trial's deltas in.
diff --git a/.claude/skills/train-model/references/onboarding.md b/.claude/skills/train-model/references/onboarding.md
index 358b8d5..4f9a469 100644
--- a/.claude/skills/train-model/references/onboarding.md
+++ b/.claude/skills/train-model/references/onboarding.md
@@ -6,12 +6,12 @@ What the orchestrator's Phase 2 probe checks for, what to do when something is m
| Prerequisite | How to detect | If missing |
|--------------|---------------|------------|
-| CUDA GPU visible | `nvidia-smi` returns ≥1 GPU | Stop. Training requires CUDA — point the user at non-LTX-2 docs. |
+| CUDA GPU visible | `nvidia-smi` returns ≥1 GPU | Stop. Training requires CUDA — point the user at non-LTX docs. |
| Linux | `uname -s` returns `Linux` | Stop. Trainer uses Triton (Linux-only). |
| `uv` installed | `command -v uv` | Offer to install (see "Auto-setup" below). |
| Workspace synced | `[ -f uv.lock ] && uv pip list \| grep -q ltx-trainer` | Offer to run `uv sync` from repo root. |
-| LTX-2 model weights | Search `/models/`, `~/models/`, `$LTX_MODELS_DIR` for a `.safetensors` matching `*ltx*2*` | Offer to download (see "Model downloads"). |
-| Gemma text encoder dir | Search same locations for a directory containing Gemma config | Offer to download. |
+| LTX model weights | Search `/models/`, `~/models/`, `$LTX_MODELS_DIR` for a `.safetensors` matching `*ltx*2*` | Offer to locate or download (see "Model downloads"). |
+| Matching Gemma text encoder dir | Search same locations for a directory containing Gemma config and checkpoint metadata | Offer to locate the matching encoder. |
| Captioner backend | Gemini auth (`GEMINI_API_KEY`/`GOOGLE_API_KEY` or gcloud/Vertex), OR a ≥40 GiB GPU to host the Qwen3-Omni-30B vLLM server (FP8), OR captions already in the dataset | See "Captioner graceful degradation" below. **Check the HF cache for an already-downloaded Qwen model before assuming a download is needed** (see note below the table). |
| W&B login (optional) | `uv run python -c "import wandb; print(bool(wandb.Api().api_key))"` → `True` means logged in. Uses wandb's own credential resolution (env/netrc/settings). **Don't** use `wandb status` (reports `api_key: null` even when logged in). | Not a blocker. If `False`: disabled in config + flagged in plan. If the check errors/ambiguous: ask the user, don't assume off. |
| Disk space | `df -h $WORKSPACE` | Surface available space alongside what a run consumes (preprocessed latents, several-GB checkpoints, validation samples). Flag concerns to the user; don't enforce a hard threshold. |
@@ -52,24 +52,26 @@ After install, ask the user to restart their shell or `source ~/.bashrc` before
### Model downloads
-Use `huggingface-cli` (comes with `huggingface-hub`, transitively pulled by `uv sync`). Default destination: `$LTX_MODELS_DIR` if set, else `~/models/` (create if missing). Surface destination in the prompt — never download into the repo or into the workspace.
+Use the official model URLs listed in the repository root `README.md` as the source of truth. Read that section before
+offering or running any download command; do not invent URLs or substitute a different release. Use `huggingface-cli`
+(comes with `huggingface-hub`, transitively pulled by `uv sync`) when the root README specifies a Hugging Face artifact.
+Default destination: `$LTX_MODELS_DIR` if set, else `~/models/` (create if missing). Surface destination in the prompt —
+never download into the repo or into the workspace.
-**LTX-2 base model:**
+**LTX model checkpoint:**
-```bash
-huggingface-cli download Lightricks/LTX-2.3 \
- ltx-2.3-22b-dev.safetensors \
- --local-dir ~/models/ltx-2.3
-```
+Read the root `README.md` and use the official LTX 2.5 checkpoint URL listed there. The 2.5 checkpoint and its
+matching text-encoder URL are the canonical pair; do not silently substitute an older model when either is unavailable.
+Ask the user before downloading each artifact.
-Public reference: <https://huggingface.co/Lightricks/LTX-2.3>.
+**LTX 2.5 text encoder:**
-**Gemma text encoder:**
+Read the root `README.md` and use the official URL listed there for the LTX 2.5-specific fine-tuned Gemma 4 root
+(for example, `gemma4-12b-ltx-v1`). Do **not** download Google's vanilla Gemma 4 model: it is not the text encoder
+used by LTX 2.5 and can fail the checkpoint/Gemma compatibility check. Ask the user before downloading it.
-```bash
-huggingface-cli download google/gemma-3-12b-it-qat-q4_0-unquantized \
- --local-dir ~/models/gemma-3-12b
-```
+Older LTX checkpoints may use a matching Gemma 3 root. Select the text encoder from the checkpoint's metadata and
+the user's chosen model release.
**Qwen3-Omni captioner (only if the GPU can host it):**
@@ -104,12 +106,13 @@ Wait for the user's choice. Don't pick one automatically — but make the hardwa
## Configuration Inheritance
-After downloads, the skill records the resolved paths into the plan's Assumptions section and into `config.yaml`:
+After approved downloads or when using existing model files, the skill records the resolved paths into the plan's
+Assumptions section and into `config.yaml`:
```yaml
model:
- model_path: "/home/<user>/models/ltx-2.3/ltx-2.3-22b-dev.safetensors"
- text_encoder_path: "/home/<user>/models/gemma-3-12b"
+ model_path: "/home/<user>/models/ltx-checkpoint.safetensors"
+ text_encoder_path: "/home/<user>/models/matching-gemma-root"
```
Suggest (don't enforce) setting `LTX_MODELS_DIR=~/models` in their shell rc for future runs.
diff --git a/.claude/skills/train-model/references/troubleshooting.md b/.claude/skills/train-model/references/troubleshooting.md
index 26acc4b..704d4c2 100644
--- a/.claude/skills/train-model/references/troubleshooting.md
+++ b/.claude/skills/train-model/references/troubleshooting.md
@@ -52,6 +52,12 @@ Common offenders:
- `text_encoder_path` directory missing the Gemma config → ensure the path is to the Gemma model dir, not its parent.
- `preprocessed_data_root` doesn't contain expected subdirs → re-verify Phase 7 ran for the chosen mode (see `phases/preprocess-dataset.md`).
+## Checkpoint/Gemma Compatibility Error
+
+If loading fails with `Gemma version mismatch` or a missing `gemma_source_checkpoint`, stop and re-check the model
+pair. LTX 2.5 requires the LTX-specific fine-tuned Gemma 4 root supplied with the checkpoint; Google's vanilla
+Gemma 4 model is not interchangeable. Do not proceed with a substitute or alter checkpoint metadata.
+
## Resume Stops Working
The trainer **does not auto-resume from `output_dir`**. Resume happens only when `model.load_checkpoint` is explicitly set to a checkpoint file; the trainer then loads those weights and looks for a `training_state_step_*.pt` next to that file to restore optimizer/scheduler/step. Common pitfalls:
diff --git a/.gitignore b/.gitignore
index 8ddf321..0a13e7c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -49,10 +49,22 @@ wandb/
!packages/ltx-pipelines/tests/assets/full_e2e/*.mp4
!packages/ltx-pipelines/tests/assets/full_e2e/*.wav
!packages/ltx-pipelines/tests/assets/full_e2e/expected_hdr_ic_lora_exr/frame_*.exr
+!packages/ltx-pipelines/tests/assets/full_e2e/expected_native_hdr_*_exr/
+!packages/ltx-pipelines/tests/assets/full_e2e/expected_native_hdr_*_exr/frame_*.exr
+!packages/ltx-pipelines/tests/assets/full_e2e/native_hdr_cow_rain_retake_source_exr/
+!packages/ltx-pipelines/tests/assets/full_e2e/native_hdr_cow_rain_retake_source_exr/frame_*.exr
+
+# Native HDR EXR e2e inputs (checked in via Git LFS)
+!packages/ltx-pipelines/tests/assets/cow_pasture.exr
+!packages/ltx-pipelines/tests/assets/native_hdr_cow_rain_exr_small/
+!packages/ltx-pipelines/tests/assets/native_hdr_cow_rain_exr_small/frame_*.exr
# HDR IC-LoRA e2e test input clip (checked in via Git LFS)
!packages/ltx-pipelines/tests/assets/hdr_ic_lora_test_input.mp4
+# DurationHead e2e test input (real connector-token output; checked in via Git LFS)
+!packages/ltx-core/tests/assets/duration_head_input.safetensors
+
# Fast integration-profile goldens (bit-exact decoded video/audio; checked in via Git LFS)
!packages/ltx-pipelines/tests/assets/integration/
!packages/ltx-pipelines/tests/assets/integration/*.safetensors
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..652b3fa
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,70 @@
+# Changelog
+
+## 1.2.0 - 2026-08-11
+
+Support for LTX 2.5
+
+### Added
+
+- Added support for newer LTX checkpoints, including Gemma 4 text encoders, checkpoint-driven architecture selection, compatibility checks between checkpoints and Gemma roots, and LTX 2.5 training workflows.
+- Added diffusion-based video VAE decoding with single- and multi-GPU support, optional NATTEN acceleration, and `chunked_eager`, `chunked_compile`, `combined_compile`, and datacenter-Blackwell DSL optimization modes.
+- Added caption-based automatic duration prediction for distilled, text-to-audio, and text/image-to-video pipelines. Use `--auto-duration MIN_SECONDS MAX_SECONDS`, or omit `--num-frames` with a compatible checkpoint.
+- Added checkpoint-aware `--vae-checkpoint-path` overrides and `--diffvae-optimization` pipeline options.
+- Added optional dedicated prompt-enhancement Gemma models through `--prompt-enhancer-gemma-root`, plus `--enhance-static-cache` for reusable enhancement KV caches.
+- Added self-managed CUDA graph capture for compiled transformers with `capture=true`, alongside controls for dynamic sequence dimensions and perturbed-block recompilation.
+- Added Euler ancestral diffusion sampling.
+- Added checkpoint-aware size-, count-, and automatic-tiling APIs that support non-default VAE compression factors.
+- Added reusable model-shell caching, configurable independently from checkpoint-weight caching, through `ModelRegistry`.
+- Added disposable model support so cached module structure and non-persistent buffers can survive weight offloading.
+- Added fused CuTe DSL diffusion-VAE kernels for datacenter Blackwell GPUs.
+- Added model-version-aware image-conditioning compression defaults and expanded checkpoint metadata utilities.
+- Added NVFP4 quantization, which cuts transformer memory use and speeds up inference on Blackwell GPUs. `--quantization nvfp4-cast` quantizes a BF16 checkpoint while loading it, and `--quantization nvfp4-prequant` loads an already-quantized NVFP4 checkpoint. Requires a Blackwell GPU and the `ltx-kernels` package.
+- Added `DFRPipeline`, which raises output quality and holds detail together noticeably better on fast motion. It generates interior keyframes, adds a full-resolution detailing pass, and can run up to two temporal upsampling rounds for smoother movement. Adds `--detailing-lora`, `--temporal-upsampler-path`, `--temporal-upsample-rounds`, and `--num-generated-keyframes`.
+- Added split-checkpoint loading, so you can download only the components a pipeline needs and mix them freely, such as a quantized transformer with a BF16 VAE. Each component has its own flag: `--transformer-path`, `--text-encoder-path`, `--video-vae-path`, `--audio-vae-path`, and `--duration-head-path`. Single-file checkpoints keep working through `--checkpoint-path` and `--distilled-checkpoint-path`.
+- Added HDR conditioning and output, so generated video can go into a colour-grading or VFX pipeline without a lossy intermediate. `--hdr` selects the colour space for EXR conditioning and HDR encoding, which writes scene-linear EXR frames alongside a BT.2020/HLG video, and `--video-conditioning` accepts a conditioning video as either SDR or EXR frames.
+
+### Changed
+
+- Upgraded `ltx-core` to Transformers 5.8 or newer and added CUDA 13.2-compatible PyTorch, cuDNN, TorchCodec, NATTEN, and kernel-build dependency handling.
+- Gemma loading now derives model structure from each local Hugging Face configuration, supports Gemma 3 and Gemma 4, and validates that the text encoder matches the LTX checkpoint.
+- Gemma tokenization now consistently inserts a leading BOS token while avoiding duplicate BOS tokens for Gemma 3.
+- Pipeline image-condition CRF defaults now come from checkpoint metadata: newer checkpoints use their trained value, while explicit CRF values remain unchanged.
+- Pipeline constructors now accept a separate VAE checkpoint, diffusion-VAE optimization policy, prompt-enhancement model, and enhancement-cache setting.
+- Direct construction of the former convolutional `VideoDecoder` now uses `ConvVideoDecoder`; `VideoDecoder` is now the common protocol implemented by convolutional and diffusion decoders.
+- Trainer preprocessing, conditioning, validation, and latent decoding now derive spatial and temporal compression factors from checkpoint metadata instead of assuming 32x32x8.
+- Trainer validation now uses separate video and audio CFG/STG controls, modality guidance, guidance rescaling, and checkpoint-aware frozen-modality handling.
+- Trainer validation defaults now use 960x544x89 output, 24 fps, 30 inference steps, STG block 28, and a substantially expanded negative prompt.
+- Legacy trainer validation guidance settings remain readable and are migrated automatically to their per-modality replacements.
+- Model configurators now receive complete checkpoint metadata through `from_metadata`, enabling architecture and version-dependent construction.
+- LoRA fusion and model reuse now preserve clean cached weights, avoid unnecessary tensor cloning, and support retained CPU weights.
+- Transformer compilation modes that use CUDA graphs now require GPU-resident weights and fail early when used with incompatible offloading.
+
+### Fixed
+
+- Fixed multi-GPU video decoding applying pixel normalization twice, using a diffusion decoder's single-step forward path, and incorrectly rejecting temporal tiling configurations that do not actually split a worker's tile.
+- Fixed multi-GPU prompt enhancement when encoding and enhancement use different Gemma roots, while retaining shared residency when they use the same root.
+- Fixed Gemma 4 text encoding without a leading BOS token.
+- Fixed trainer validation guidance for frozen audio or video, audio-only and video-only generation, cross-modal isolation, and modality-specific STG.
+- Fixed trainer masks, spatial crops, reference-video alignment, and prefix/suffix validation for checkpoints with non-default VAE scale factors.
+- Fixed LoRA fusion corrupting registry-cached weights and blockwise quantization failures when companion scale tensors remained on CPU.
+- Fixed diffusion-VAE tiled decoding and multi-GPU blending to use checkpoint-specific geometry with lower peak host memory.
+- Fixed 8-bit Gemma loading to resolve standard tokenizer assets and use architecture-agnostic Hugging Face model loading.
+- Fixed CUDA builds using mismatched system toolkits or cuDNN sublibraries.
+
+### Removed
+
+- Removed `StateDictRegistry`; use `ModelRegistry`.
+- Removed `SpatialTilingConfig` and `TemporalTilingConfig`; use `DimensionSizeConfig` with `TileSizeConfig`.
+- Removed the old `TilingConfig` constructor fields `spatial_config` and `temporal_config`; use the new per-axis size/count tiling configuration.
+- Removed `ltx_core.model.video_vae.tiling`; import tiling APIs from `ltx_core.tiling` or `ltx_core.model.video_vae`.
+- Removed `GemmaTextEncoder`; use `LTXGemmaTextEncoder`.
+- Removed `LTXVGemmaTokenizer`; use `LTXGemmaTokenizer`.
+- Removed `GEMMA_LLM_KEY_OPS` and `GEMMA_MODEL_OPS`; use `get_gemma_ops()` for the selected Gemma root.
+- Removed the hard-coded `Gemma3RopeScaling`, `Gemma3TextConfig`, `Gemma3VisionConfig`, `Gemma3ConfigData`, and `GEMMA3_CONFIG_FOR_LTX` definitions; Gemma configuration is now loaded from the model root through `gemma_model_config()`.
+- Removed `ModelConfigurator.from_config()`; implement and call `from_metadata()`.
+- Removed `DiffusionStage.model_context()` and `DiffusionStage.run()`; call the stage directly so it manages transformer construction and disposal.
+- Removed `ltx_pipelines.utils.allocator_trim_strategy.AllocatorTrimStrategy`; import it from `ltx_core.allocator_trim_strategy`.
+- Removed `ltx_trainer.training_strategies.VIDEO_SCALE_FACTORS`; use checkpoint-derived scale factors or `ltx_core.types.VIDEO_SCALE_FACTORS` when the legacy default is explicitly required.
+- Removed trainer validation fields `guidance_scale`, `stg_scale`, and `stg_mode` from the current schema; use `video_cfg_scale`/`audio_cfg_scale` and `video_stg_scale`/`audio_stg_scale`. Legacy configuration files are migrated automatically.
+- Removed the generic `gemma_i2v_system_prompt.txt` and `gemma_t2v_system_prompt.txt` names; use the `gemma3_*` or `gemma4_*` prompt files matching the encoder family.
+- Removed `LipDubPipeline` and the `ltx_pipelines.lipdub` module; use `DubItPipeline` from `ltx_pipelines.dubit`.
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index b0d79e2..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,381 +0,0 @@
- LTX-2 Community License Agreement
- License date: January 5, 2026
-
-
-By using or distributing any portion or element of LTX-2, you agree
-to be bound by this Agreement.
-
- 1. Definitions.
-
- "Agreement" means the terms and conditions for the license, use,
- reproduction, and distribution of LTX-2 and the Complementary
- Materials, as specified in this document.
-
- "Control" means the direct or indirect ownership of more than
- fifty percent (50%) of the voting securities or other ownership
- interests, or the power to direct the management and policies of
- such Entity through voting rights, contract, or otherwise.
-
- "Data" means a collection of information and/or content extracted
- from the dataset used with LTX-2, including to train, pretrain,
- or otherwise evaluate LTX-2. The Data is not licensed under this
- Agreement.
-
- "Derivatives of LTX-2" means all modifications to LTX-2, works
- based on LTX-2, or any other model which is created or initialized
- by transfer of patterns of the weights, parameters, activations or
- output of LTX-2, to the other model, in order to cause the other
- model to perform similarly to LTX-2, including – but not limited
- to - distillation methods entailing the use of intermediate data
- representations or methods based on the generation of synthetic
- data by LTX-2 for training the other model. For clarity, Derivatives
- of LTX-2 include: (i) any fine-tuned or adapted weights, parameters,
- or checkpoints derived from LTX-2; (ii) derivative model architectures
- that incorporate or are based upon LTX-2's architecture; and
- (iii) any modified or extended versions of the Complementary
- Materials. All intellectual property rights in Derivatives of LTX-2
- shall be subject to the terms of this Agreement, and you may not
- claim exclusive ownership rights in any Derivatives of LTX-2 that
- would restrict the rights granted herein.
-
- "Entity" means any individual, corporation, partnership, limited
- liability company, or other legal entity. For purposes of this
- Agreement, an Entity shall be deemed to include, on an aggregative
- basis, all subsidiaries, affiliates, and other companies under
- common Control with such Entity. When determining whether an Entity
- meets any threshold under this Agreement (including revenue
- thresholds), all subsidiaries, affiliates, and companies under
- common Control shall be considered collectively.
-
- "Harm" includes but is not limited to physical, mental,
- psychological, financial and reputational damage, pain, or loss.
-
- "Licensor" or "Lightricks" means the owner that is granting the
- license under this Agreement. For the purposes of this Agreement,
- the Licensor is Lightricks Ltd.
-
- "LTX-2" means the large language models, text/image/video/audio/3D
- generation models, and multimodal large language models and their
- software and algorithms, including trained model weights, parameters
- (including optimizer states), machine-learning model code,
- inference-enabling code, training-enabling code, fine-tuning
- enabling code, accompanying source code, scripts, documentation,
- tutorials, examples, and all other elements of the foregoing
- distributed and made publicly available by Lightricks (including,
- for example, at https://github.com/Lightricks/LTX-2) for the LTX-2
- model released on January 5, 2026. This license is applicable to
- all LTX-2 versions released since January 5, 2026, and all future
- releases of LTX-2 under this license.
-
- "Output" means the results of operating LTX-2 as embodied in
- informational content resulting therefrom.
-
- "you" (or "your") means an individual or legal Entity licensing
- LTX-2 in accordance with this Agreement and/or making use of LTX-2
- for whichever purpose and in any field of use, including usage of
- LTX-2 in an end-use application - e.g. chatbot, translator, image
- generator.
-
- 2. Grant of License. Subject to the terms and conditions of this
- Agreement, you are granted a non-exclusive, worldwide,
- non-transferable and royalty-free limited license under Licensor's
- intellectual property or other rights owned by Licensor embodied
- in LTX-2 to use, reproduce, prepare, distribute, publicly display,
- publicly perform, sublicense, copy, create derivative works of,
- and make modifications to LTX-2, for any purpose, subject to the
- restrictions set forth in Attachment A; provided however, that
- Entities with annual revenues of at least $10,000,000 (the
- "Commercial Entities") are required to obtain a paid commercial
- use license in order to use LTX-2 and Derivatives of LTX-2,
- subject to the terms and provisions of a different license (the
- "Commercial Use Agreement"), as will be provided by the Licensor.
- Commercial Entities interested in such a commercial license are
- required to [contact Licensor](https://ltx.io/model/licensing).
- Any commercial use of LTX-2 or Derivatives of LTX-2 by the
- Commercial Entities not in accordance with this Agreement and/or
- the Commercial Use Agreement is strictly prohibited and shall be
- deemed a material breach of this Agreement. Such material breach
- will be subject, in addition to any license fees owed to Licensor
- for the period such Commercial Entity used LTX-2 (as will be
- determined by Licensor), to liquidated damages, which will be paid
- to Licensor immediately upon demand, in an amount equal to double
- the amount that would otherwise have been paid by you for the
- relevant period of time. Such amount reflects a reasonable estimation
- of the losses and administrative costs incurred due to such breach.
- You agree and understand that this remedy does not limit the Licensor's
- right to pursue other remedies available at law or equity.
-
- 3. Distribution and Redistribution. You may host for third parties
- remote access purposes (e.g. software-as-a-service), reproduce
- and distribute copies of LTX-2 or Derivatives of LTX-2 thereof in
- any medium, with or without modifications, provided that you meet
- the following conditions:
-
- (a) Use-based restrictions as referenced in paragraph 4 and all
- provisions of Attachment A MUST be included as an enforceable
- provision by you in any type of legal agreement (e.g. a
- license) governing the use and/or distribution of LTX-2 or
- Derivatives of LTX-2, and you shall give notice to subsequent
- users you distribute to, that LTX-2 or Derivatives of LTX-2
- are subject to paragraph 4 and Attachment A in their entirety,
- including all use restrictions and acceptable use policies;
-
- (b) You must provide any third party recipients of LTX-2 or
- Derivatives of LTX-2 a copy of this Agreement, including all
- attachments and use policies. Any Derivative of LTX-2 (as
- defined in Section 1, including but not limited to fine-tuned
- weights, modified training code, models trained on Outputs, or
- any other derivative) must be distributed exclusively under
- the terms of this Agreement with a complete copy of this
- license included;
-
- (c) You must cause any modified files to carry prominent notices
- stating that you changed the files;
-
- (d) You must retain all copyright, patent, trademark, and
- attribution notices excluding those notices that do not
- pertain to any part of LTX-2, Derivatives of LTX-2.
-
- You may add your own copyright statement to your modifications and
- may provide additional or different license terms and conditions -
- respecting paragraph 3(a) - for use, reproduction, or distribution
- of your modifications, or for any such Derivatives of LTX-2 as a
- whole, provided your use, reproduction, and distribution of LTX-2
- otherwise complies with the conditions stated in this Agreement,
- and you provide a complete copy of this Agreement with any such
- use, reproduction and distribution of LTX-2 and any Derivatives
- thereof.
-
- 4. Use-based restrictions. The restrictions set forth in Attachment A
- are considered Use-based restrictions. Therefore, you cannot use
- LTX-2 and the Derivatives of LTX-2 in violation of the specified
- restricted uses. You may use LTX-2 subject to this Agreement,
- including only for lawful purposes and in accordance with the
- Agreement. "Use" may include creating any content with, fine-tuning,
- updating, running, training, evaluating and/or re-parametrizing
- LTX-2. You shall require all of your users who use LTX-2 or a
- Derivative of LTX-2 to comply with the terms of this paragraph 4.
-
- 5. The Output You Generate. Except as set forth herein, Licensor
- claims no rights in the Output you generate using LTX-2. You are
- accountable for input you insert into LTX-2, the Output you
- generate and its subsequent uses. No use of the Output can
- contravene any provision as stated in the Agreement.
-
- 6. Updates and Runtime Restrictions. To the maximum extent permitted
- by law, Licensor reserves the right to restrict (remotely or
- otherwise) usage of LTX-2 in violation of this Agreement, update
- LTX-2 through electronic means, or modify the Output of LTX-2
- based on updates. You shall undertake reasonable efforts to use
- the latest version of LTX-2. Any use of the non-current version
- of LTX-2 is done solely at your risk.
-
- 7. Export Controls and Sanctions Compliance. You acknowledge that
- LTX-2, Derivatives of LTX-2 may be subject to export control laws
- and regulations, including but not limited to the U.S. Export
- Administration Regulations and sanctions programs administered by
- the Office of Foreign Assets Control (OFAC). You represent and
- warrant that you and any users of LTX-2 are not (i) located in,
- organized under the laws of, or ordinarily resident in any country
- or territory subject to comprehensive sanctions; (ii) identified
- on any U.S. government restricted party list, including the
- Specially Designated Nationals and Blocked Persons List; or
- (iii) otherwise prohibited from receiving LTX-2 under applicable
- law. You shall not export, re-export, or transfer LTX-2, directly
- or indirectly, in violation of any applicable export control or
- sanctions laws or regulations. You agree to comply with all
- applicable trade control laws and shall indemnify and hold
- Licensor harmless from any claims arising from your failure to
- comply with such laws.
-
- 8. Trademarks and related. Nothing in this Agreement permits you to
- make use of Licensor's trademarks, trade names, logos or to
- otherwise suggest endorsement or misrepresent the relationship
- between the parties; and any rights not expressly granted herein
- are reserved by the Licensor.
-
- 9. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides LTX-2 on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or
- conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS
- FOR A PARTICULAR PURPOSE. You are solely responsible for
- determining the appropriateness of using or redistributing LTX-2
- and Derivatives of LTX-2 and assume any risks associated with
- your exercise of permissions under this Agreement.
-
- 10. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall Licensor be liable
- to you for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as
- a result of this Agreement or out of the use or inability to use
- LTX-2 (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if Licensor has been
- advised of the possibility of such damages.
-
- 11. Accepting Warranty or Additional Liability. While redistributing
- LTX-2 and Derivatives of LTX-2, you may, provided you do not
- violate the terms of this Agreement, choose to offer and charge
- a fee for, acceptance of support, warranty, indemnity, or other
- liability obligations. However, in accepting such obligations,
- you may act only on your own behalf and on your sole
- responsibility, not on behalf of Licensor, and only if you agree
- to indemnify, defend, and hold Licensor harmless for any liability
- incurred by, or claims asserted against Licensor, by reason of
- your accepting any such warranty or additional liability.
-
- 12. Governing Law. This Agreement and all relations, disputes, claims
- and other matters arising hereunder (including non-contractual
- disputes or claims) will be governed exclusively by, and construed
- exclusively in accordance with, the laws of the State of New York.
- To the extent permitted by law, choice of laws rules and the
- United Nations Convention on Contracts for the International Sale
- of Goods will not apply. For the purposes of adjudicating any
- action or proceeding to enforce the terms of this Agreement, you
- hereby irrevocably consent to the exclusive jurisdiction of, and
- venue in, the federal and state courts located in the County of
- New York within the State of New York. The prevailing party in
- any claim or dispute between the parties under this Agreement
- will be entitled to reimbursement of its reasonable attorneys'
- fees and costs. You hereby waive the right to a trial by jury,
- to participate in a class or representative action (including in
- arbitration), or to combine individual proceedings in court or
- in arbitration without the consent of all parties.
-
- 13. Term and Termination. This Agreement is effective upon your
- acceptance and continues until terminated. Licensor may terminate
- this Agreement immediately upon written notice to you if you
- breach any provision of this Agreement, including but not limited
- to violations of the use restrictions in Attachment A or
- unauthorized commercial use. Upon termination: (a) all rights
- granted to you under this Agreement will immediately cease;
- (b) you must immediately cease all use of LTX-2 and Derivatives
- of LTX-2; (c) you must delete or destroy all copies of LTX-2
- and Derivatives of LTX-2 in your possession or control; and
- (d) you must notify any third parties to whom you distributed
- LTX-2 or Derivatives of LTX-2 of the termination. Sections 8-13,
- and Section 15 shall survive termination of this Agreement.
- Termination does not relieve you of any obligations incurred
- prior to termination, including payment obligations under
- Section 2. In addition, if You commence a lawsuit or other
- proceedings (including a cross-claim or counterclaim in a lawsuit)
- against Licensor or any person or entity alleging that LTX-2 or
- any Output, or any portion of any of the foregoing, infringe any
- intellectual property or other right owned or licensable by you,
- then all licenses granted to you under this Agreement shall
- terminate as of the date such lawsuit or other proceeding is filed.
-
- 14. Disputes and Arbitration. All disputes arising in connection with
- this Agreement shall be finally settled by arbitration under the
- Rules of Arbitration of the International Chamber of Commerce
- ("ICC Rules"), by one (1) arbitrator appointed in accordance with
- the ICC Rules. The seat of arbitration shall be New York, NY, USA,
- and the proceedings shall be conducted in English. The arbitrator
- shall be empowered to grant any relief that a court could grant.
- Judgment on the arbitration award may be entered by any court
- having jurisdiction thereof. Each party waives its right to a
- trial by jury and to participate in any class or representative
- action.
-
- 15. If any provision of this Agreement is held to be
- invalid, illegal
- or unenforceable, the remaining provisions shall be unaffected
- thereby and remain valid as if such provision had not been set
- forth herein.
-
- END OF TERMS AND CONDITIONS
-
- ATTACHMENT A: Use Restrictions
-
- When using the Outputs, LTX-2 and any Derivatives thereof, you
- will comply with the Acceptable Use Policy. In addition, you
- agree not to use the Outputs, LTX-2 or its Derivatives in any
- of the following ways:
-
- 1. In any way that violates any applicable national, federal,
- state, local or international law or regulation;
-
- 2. For the purpose of exploiting, Harming or attempting to
- exploit or Harm minors in any way;
-
- 3. To generate or disseminate false information and/or content
- with the purpose of Harming others;
-
- 4. To generate or disseminate personal identifiable information
- that can be used to Harm an individual;
-
- 5. To generate or disseminate information and/or content (e.g.
- images, code, posts, articles), and place the information
- and/or content in any context (e.g. bot generating tweets)
- without expressly and intelligibly disclaiming that the
- information and/or content is machine generated;
-
- 6. To defame, disparage or otherwise harass others;
-
- 7. To impersonate or attempt to impersonate (e.g. deepfakes)
- others without their consent;
-
- 8. For fully automated decision making that adversely impacts an
- individual's legal rights or otherwise creates or modifies a
- binding, enforceable obligation;
-
- 9. For any use intended to or which has the effect of
- discriminating against or Harming individuals or groups based
- on online or offline social behavior or known or predicted
- personal or personality characteristics;
-
- 10. To exploit any of the vulnerabilities of a specific group of
- persons based on their age, social, physical or mental
- characteristics, in order to materially distort the behavior
- of a person pertaining to that group in a manner that causes
- or is likely to cause that person or another person physical
- or psychological Harm;
-
- 11. For any use intended to or which has the effect of
- discriminating against individuals or groups based on legally
- protected characteristics or categories;
-
- 12. To provide medical advice and medical results interpretation;
-
- 13. To generate or disseminate information for the purpose to be
- used for administration of justice, law enforcement,
- immigration or asylum processes, such as predicting an
- individual will commit fraud/crime commitment (e.g. by text
- profiling, drawing causal relationships between assertions
- made in documents, indiscriminate and arbitrarily-targeted use);
-
- 14. To generate and/or disseminate malware (including – but not
- limited to – ransomware) or any other content to be used for
- the purpose of harming electronic systems;
-
- 15. To engage in, promote, incite, or facilitate discrimination
- or other unlawful or harmful conduct in the provision of
- employment, employment benefits, credit, housing, or other
- essential goods and services;
-
- 16. To engage in, promote, incite, or facilitate the harassment,
- abuse, threatening, or bullying of individuals or groups of
- individuals;
-
- 17. For military, warfare, nuclear industries or applications,
- weapons development, or any use in connection with activities
- that may cause death, personal injury, or severe physical or
- environmental damage;
-
- 18. For commercial use only: To train, improve, or fine-tune any
- other machine learning model, artificial intelligence system,
- or competing model, except for Derivatives of LTX-2 as
- expressly permitted under this Agreement;
-
- 19. To circumvent, disable, or interfere with any technical
- limitations, safety features, content filters, or use
- restrictions implemented in LTX-2 by Licensor;
-
- 20. To use LTX-2 or Derivatives of LTX-2 in any product, service,
- or application that directly competes with Licensor's
- commercial products or services, or is designed to replace or
- substitute Licensor's offerings in the market, without
- obtaining a separate commercial license from Licensor.
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000..8858b29
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,125 @@
+# LTX-2.x Community License Agreement
+
+*License date: August 11, 2026*
+
+**By downloading, using, accessing or distributing any portion or element of LTX-2.x, you agree that you have read and accepted to be bound by this Agreement.**
+
+**1. Definitions.**
+
+> **1.1** **“Agreement”** means the terms and conditions for this LTX-2.x Community License Agreement and the exhibits, attachments, and Complementary Materials, as specified in this document.
+
+> **1.2** **“Complementary Materials”** means the accompanying documentation, tutorials, examples, configuration files and other materials made available by Licensor together with the LTX-2.x model weights and parameters, in each case as distributed by Licensor.
+
+> **1.3** **“Control”** means the direct or indirect ownership of more than fifty percent (50%) of the voting securities or other ownership interests, or the power to direct the management and policies of such Entity through voting rights, contract, or otherwise.
+
+> **1.4** **“Data”** means a collection of information and/or content extracted from the dataset used with LTX-2.x, including to train, pretrain, or otherwise evaluate LTX-2.x. The Data is not licensed under this Agreement.
+
+> **1.5** **“Derivatives of LTX-2.x”** means all modifications to LTX-2.x, works based on LTX-2.x, or any other model which is created or initialized by transfer of patterns of the weights, parameters, activations or output of LTX-2.x, to the other model, in order to cause the other model to perform similarly to LTX-2.x, including – but not limited to - distillation methods entailing the use of intermediate data representations or methods based on the generation of synthetic data by LTX-2.x for training the other model. For clarity, Derivatives of LTX-2.x include: (i) any fine-tuned or adapted weights, parameters, or checkpoints derived from LTX-2.x; (ii) derivative model architectures that incorporate or are based upon LTX-2.x’s architecture; and (iii) any modified or extended versions of the Complementary Materials.
+
+> **1.6** **“Entity”** means any individual, corporation, partnership, limited liability company, or other legal entity. For purposes of this Agreement, an Entity shall be deemed to include, on an aggregative basis, all subsidiaries, affiliates, and other companies under common Control with such Entity. When determining whether an Entity meets any threshold under this Agreement (including revenue thresholds in Section 2.1), all subsidiaries, affiliates, and companies under common Control shall be considered collectively.
+
+> **1.7** **“Harm”** includes but is not limited to physical, mental, psychological, financial and reputational damage, pain, or loss.
+
+> **1.8** **“Licensor”** or **“LTX”** means the owner that is granting the license under this Agreement. For the purposes of this Agreement, the Licensor is Lightricks Ltd.
+
+> **1.9** **“LTX-2.x”** means the large generative models, text/image/video/audio/3D generation models, and multimodal large language models and their software and algorithms, including trained model weights, parameters (including optimizer states), machine-learning model code, inference-enabling code, training-enabling code, fine-tuning enabling code, accompanying source code, scripts, and all other elements of the foregoing distributed and made publicly available by LTX (including, for example, at [https://github.com/Lightricks/LTX-2](https://github.com/Lightricks/LTX-2)). This license is applicable to all LTX-2.5 versions released since August 11, 2026, and all future releases of LTX-2.x under this license.
+
+> **1.10** **“Output”** means the results of operating LTX-2.x as embodied in informational content resulting therefrom.
+
+> **1.11** **“you”** (or **“your”**) means an individual or legal Entity licensing LTX-2.x in accordance with this Agreement and/or otherwise downloading, accessing, distributing or using LTX-2.x for whichever purpose and in any field of use, including usage of LTX-2.x in an end-use application - e.g. chatbot, translator, image generator.
+
+**2. Grant of License.**
+
+> **2.1** Subject to your compliance with the terms and conditions of this Agreement, you are granted a non-exclusive, worldwide, non-transferable and royalty-free limited license under Licensor’s intellectual property or other rights owned by Licensor embodied in LTX-2.x to use, reproduce, prepare, distribute, publicly display, publicly perform, sublicense, copy, create derivative works of, and make modifications to LTX-2.x, for any purpose, subject to the restrictions set forth in Attachment A; **provided however, that Entities with annual revenues of at least $10,000,000 (the “Commercial Entities”) are required to obtain a paid license for any use (excluding use solely for a Non-Commercial Purpose as set forth in Section 2.2) of LTX-2.x and Derivatives of LTX-2.x (such paid license referred to herein as a “Commercial Use Agreement”), as will be provided by the Licensor. Commercial Entities interested in such a commercial license are required to [contact Licensor](mailto:[email protected]). Any use of LTX-2.x or Derivatives of LTX-2.x by Commercial Entities not in accordance with this Agreement and/or the Commercial Use Agreement is strictly prohibited and shall be deemed a material breach of this Agreement. In the event of such material breach, and without limiting Licensor’s right to terminate the Agreement or to pursue any other remedies available at law or in equity, you shall pay Licensor the license fees owed for the period such Commercial Entity used LTX-2.x (calculated at Licensor’s standard commercial license fees, in effect during the relevant period or, absent published standard fees, a reasonable market rate for a comparable license), within thirty (30) days of Licensor’s written demand.**
+
+> **2.2** Notwithstanding the foregoing or anything to the contrary in this Agreement, a Commercial Entity may download and use LTX-2.x and Derivatives of LTX-2.x without obtaining the Commercial Use Agreement solely for a Non-Commercial Purpose. **“Non-Commercial Purpose”** means any of the following uses, but only so far as such Commercial Entity does not receive any direct or indirect payment arising from the use of LTX-2.x or Derivatives of LTX-2.x: (i) use by an individual acting in a personal capacity for research, experimentation, learning, private study, hobby or recreational projects, or personal entertainment, in each case where such use is not connected, directly or indirectly, to any commercial activity, business operation, or the performance of duties for an employer or any other Entity; and (ii) use by a Commercial Entity for testing, evaluation, or non-commercial research and development in a non-production or development environment. For clarity, use (a) for revenue-generating activity in any manner, whether direct or indirect, (b) in direct interactions with or that has impact on end users, or (c) to train, fine-tune, or distill any model (including any Derivative of LTX-2.x) for commercial use, in each case, is not a Non-Commercial Purpose and requires all Commercial Entities to obtain a paid license under the Commercial Use Agreement prior to such use. For the avoidance of doubt, the permission granted under this Section 2.2 is a limited right of use only and does not convey or transfer any ownership right, title, or interest in or to LTX-2.x or any Derivatives of LTX-2.x, and all Derivatives of LTX-2.x created or used pursuant to this Section 2.2 remain subject to the terms of this Agreement, including Section 1.5.
+
+**3. Distribution and Redistribution.** You may host for third parties remote access purposes (e.g. software-as-a-service), reproduce and distribute copies of LTX-2.x or Derivatives of LTX-2.x thereof in any medium, with or without modifications, provided that you meet the following conditions:
+
+> **3.1** Use-based restrictions as referenced in Section 4 and all provisions of Attachment A MUST be included as an enforceable provision by you in any type of legal agreement (e.g. a license) governing the use and/or distribution of LTX-2.x or Derivatives of LTX-2.x, and you shall give notice to subsequent users you distribute to, that LTX-2.x or Derivatives of LTX-2.x are subject to Section 4 and Attachment A in their entirety, including all use restrictions and acceptable use policies;
+
+> **3.2** You must provide any third-party recipients of LTX-2.x or Derivatives of LTX-2.x a copy of this Agreement, including all attachments and use policies. Any Derivative of LTX-2.x (as defined in Section 1.5, including but not limited to fine-tuned weights, modified training code, models trained on Outputs, or any other derivative) must be distributed exclusively under the terms of this Agreement, subject to Section 3.6, with a complete copy of this Agreement included;
+
+> **3.3** You must cause any modified files to carry prominent notices stating that you changed the files;
+
+> **3.4** You must retain all copyright, patent, trademark, and attribution notices excluding those notices that do not pertain to any part of LTX-2.x, Derivatives of LTX-2.x.
+
+> **3.5** Transfer of Derivatives. No transfer of any Derivative of LTX-2.x (including any fine-tuned weights, LoRA adapters, or similar adaptations) to a third party shall grant such third party any right, title, license, or authorization to access, use, reproduce, distribute, or exploit LTX-2.x, or any Derivative of LTX-2.x beyond the rights granted under this Agreement. If the transferee is a Commercial Entity (as defined in Section 2), it must obtain a paid license from Licensor prior to any use of any Derivative of LTX-2.x, regardless of who created such Derivative. Prior to or at the time of any such transfer, you shall notify the transferee in writing that (i) use of such Derivative of LTX-2.x is subject to the terms of this Agreement, and (ii) if the transferee is a Commercial Entity, it must obtain a separate paid license to LTX-2.x from Licensor. You shall not transfer any Derivative of LTX-2.x to a Commercial Entity unless such Commercial Entity has obtained the required paid license from Licensor prior to any use, and unless the proposed transferee has been so informed. You and the transferee shall each be responsible for ensuring the transferee obtains the required license from Licensor prior to any use of LTX-2.x or Derivative of LTX-2.x. Nothing in this Section 3.5 shall require a Commercial Entity to obtain a paid license for use solely for a Non-Commercial Purpose as permitted under Section 2.2.
+
+> **3.6** You may add your own copyright statement to your modifications and may provide additional license terms and conditions - **respecting Section 3.1** - for use, reproduction, or distribution of your modifications, or for any such Derivatives of LTX-2.x as a whole, provided your use, reproduction, and distribution of LTX-2.x otherwise complies with the conditions stated in this Agreement, and you provide a complete copy of this Agreement with any such use, reproduction and distribution of LTX-2.x and any Derivatives thereof; provided that any such additional terms shall be additive only and shall not derogate from, conflict with, waive, or purport to modify any term of this Agreement, and this Agreement shall govern in the event of any conflict.
+
+**4. Use-based restrictions.** The restrictions set forth in Attachment A are considered Use-based restrictions. Therefore, you cannot use LTX-2.x and the Derivatives of LTX-2.x in violation of the specified restricted uses. You may use LTX-2.x subject to this Agreement, only for lawful purposes and in accordance with the Agreement. **“Use”** may include creating any content with, fine-tuning, updating, running, training, evaluating and/or re-parametrizing LTX-2.x. You shall require all of your users who use LTX-2.x or a Derivative of LTX-2.x to comply with the terms of this Section 4.
+
+**5. The Output You Generate.** Except as set forth herein, Licensor claims no rights in the Output you generate using LTX-2.x. You are accountable for input you insert into LTX-2.x, the Output you generate and its subsequent uses. No use of the Output can contravene any provision as stated in the Agreement.
+
+**6. Updates and Runtime Restrictions; AI Regulations.** To the maximum extent permitted by law, Licensor reserves the right to restrict (remotely or otherwise) usage of LTX-2.x in violation of this Agreement, update LTX-2.x through electronic means, or modify the Output of LTX-2.x based on updates. You shall undertake reasonable efforts to use the latest version of LTX-2.x. Any use of the non-current version of LTX-2.x is done solely at your risk. To the extent applicable to you, you shall comply with all laws and regulations governing artificial intelligence that apply to your use, deployment, or distribution of LTX-2.x, Derivatives of LTX-2.x, or Outputs, including Regulation (EU) 2024/1689 (the “EU AI Act”) and the California AI Transparency Act (Cal. Bus. & Prof. Code § 22757 et seq.), each as amended from time to time and any other applicable laws, regulations, or binding guidance relating to artificial intelligence, transparency, content provenance, or synthetic media, together with any documentation made available by Licensor regarding compliance with the same (collectively, “AI Regulations”). You shall maintain (including within any application or service through which LTX-2.x, any Derivative of LTX-2.x, or any Output is made available), and shall not remove, disable, alter, or circumvent, any safety or security measures, disclosures, metadata, watermarking, content provenance, latent disclosure, or other transparency features or functionalities included or embedded within LTX-2.x or any Derivative of LTX-2.x, or applied to any Output, in furtherance of AI Regulations, including any capability of LTX-2.x to include latent disclosures in Outputs, and you shall include equivalent obligations in any agreement governing your distribution of LTX-2.x or any Derivative of LTX-2.x. You are solely responsible for any transparency, disclosure, marking, or labeling obligations applicable to you under AI Regulations as a provider or deployer of LTX-2.x, any Derivative of LTX-2.x, or any system incorporating any of the foregoing, including any obligation to disclose that content is artificially generated or manipulated. If Licensor knows or reasonably believes that you have modified LTX-2.x or any Derivative of LTX-2.x such that it is no longer capable of including any disclosure required by AI Regulations in Outputs, or that you have otherwise removed, disabled, or circumvented any feature or functionality described in this Section, Licensor may in its sole discretion revoke the license granted under this Agreement effective immediately upon notice to you, and upon such revocation you shall immediately cease all use of LTX-2.x and Derivatives of LTX-2.x. Licensor makes no representation or warranty that LTX-2.x, any Derivative of LTX-2.x, or any Output complies with any AI Regulations applicable to your specific use case or deployment, and you are solely responsible for determining the applicability of, and ensuring your compliance with, all AI Regulations. You shall indemnify, defend, and hold harmless Licensor and its affiliates from and against any and all claims, liabilities, losses, damages, costs, and expenses (including reasonable attorneys’ fees) arising out of or relating to your use, deployment, distribution, or modification of LTX-2.x, any Derivative of LTX-2.x, or any Output in violation of, or your other failure to comply with, any AI Regulations.
+
+> For purposes of the EU AI Act, Licensor makes LTX-2.x openly available under this community license and intends that LTX-2.x be treated as a free and open-source general purpose AI model within the meaning of Article 53(2) of the EU AI Act. You acknowledge and agree that (a) to the extent the free and open source derogations under Article 53(2) of the EU AI Act apply, Licensor’s obligations under the EU AI Act with respect to LTX-2.x are limited to those applicable to providers of free and open source general purpose AI models (it being acknowledged that such derogations do not extend to the obligations under Article 53(1)(c) and (d)), (b) you acknowledge that LTX-2.x is not intended to be integrated into a high risk AI system, and shall be fully and solely responsible for any obligation resulting from such integration, (c) if you integrate LTX-2.x or any Derivative of LTX-2.x into a high-risk AI system you shall be solely responsible for all provider obligations that would otherwise apply to Licensor under the EU AI Act, and (d) you shall not take any action, or omit to take any action, that would cause Licensor to lose the benefit of the free and open source derogations under the EU AI Act, and you shall indemnify and hold Licensor harmless from any liability, costs, or expenses arising from your breach of this Section.
+
+**7. Export Controls and Sanctions Compliance.** You acknowledge that LTX-2.x, Derivatives of LTX-2.x may be subject to export control laws and regulations, including but not limited to the U.S. Export Administration Regulations and sanctions programs administered by the Office of Foreign Assets Control (OFAC). You represent and warrant that you and any users of LTX-2.x are not (i) located in, organized under the laws of, or ordinarily resident in any country or territory subject to comprehensive sanctions; (ii) identified on any U.S. government restricted party list, including the Specially Designated Nationals and Blocked Persons List; or (iii) otherwise prohibited from receiving LTX-2.x under applicable law. You shall not export, re-export, or transfer LTX-2.x, directly or indirectly, in violation of any applicable export control or sanctions laws or regulations. You agree to comply with all applicable trade control laws and shall indemnify and hold Licensor harmless from any claims arising from your failure to comply with such laws.
+
+**8. Trademarks; Reservation of Rights.** Nothing in this Agreement permits you to make use of Licensor’s trademarks, trade names, logos or to otherwise suggest endorsement or misrepresent the relationship between the parties; and any rights not expressly granted herein are reserved by the Licensor. Except as expressly set forth in this Agreement, Licensor does not grant, directly or by implication, estoppel, statute or otherwise, any right or license in its, or its affiliates’, intellectual property rights or other proprietary rights. For avoidance of doubt, all intellectual property rights in Derivatives of LTX-2.x shall be subject to the terms of this Agreement, and you acquire no right, title, or interest in or to LTX-2.x itself, which is and remains the exclusive property of Licensor. You shall not assert any ownership or other right in LTX-2.x or any Derivative of LTX-2.x in any manner that restricts, encumbers, or is inconsistent with the rights retained by Licensor or granted to other licensees under this Agreement.
+
+**9. Disclaimer of Warranty.** Unless required by applicable law or agreed to in writing, Licensor provides LTX-2.x on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing LTX-2.x and Derivatives of LTX-2.x and assume any risks associated with your exercise of permissions under this Agreement.
+
+**10. Limitation of Liability.** To the fullest extent permitted by applicable law, in no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall Licensor be liable to you or any other individual or Entity for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this Agreement or out of the use of, or inability to use LTX-2.x or any Derivative of LTX-2.x (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if Licensor has been advised of the possibility of such damages.
+
+**11. Accepting Warranty or Additional Liability.** While redistributing LTX-2.x and Derivatives of LTX-2.x, you may, provided you do not violate the terms of this Agreement, choose to offer and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations. However, in accepting such obligations, you may act only on your own behalf and on your sole responsibility, not on behalf of Licensor, and only if you agree to indemnify, defend, and hold Licensor harmless for any liability incurred by, or claims asserted against Licensor, by reason of your accepting any such warranty or additional liability.
+
+**12. Governing Law.** This Agreement and all relations, disputes, claims and other matters arising hereunder (including non-contractual disputes or claims) will be governed exclusively by, and construed exclusively in accordance with, the laws of the State of New York and applicable U.S. federal law. To the extent permitted by law, choice of laws rules and the United Nations Convention on Contracts for the International Sale of Goods will not apply. The prevailing party in any claim or dispute between the parties under this Agreement will be entitled to reimbursement of its reasonable attorneys’ fees and costs.
+
+**13. Term and Termination.** This Agreement is effective upon your acceptance and continues until terminated. Licensor may terminate this Agreement immediately upon written notice to you if you breach any provision of this Agreement, including but not limited to violations of the use restrictions in Attachment A or unauthorized commercial use. This Agreement also terminates immediately and automatically, without notice, upon any material breach of this Agreement, including any use in violation of applicable AI Regulations or any unauthorized commercial use of LTX-2.x or Derivatives of LTX-2.x by a Commercial Entity. Upon termination: (a) all rights granted to you under this Agreement will immediately cease; (b) you must immediately cease all use of LTX-2.x and Derivatives of LTX-2.x; (c) you must delete or destroy all copies of LTX-2.x and Derivatives of LTX-2.x in your possession or control; and (d) you must notify any third parties to whom you distributed LTX-2.x or Derivatives of LTX-2.x of the termination. Sections 2, 3, 4, 6-16 and Attachment A shall survive termination of this Agreement. Termination does not relieve you of any obligations incurred prior to termination, including payment obligations under Section 2 and adhering to the restrictions under Section 3. In addition, if You commence a lawsuit or other proceedings (including a cross-claim or counterclaim in a lawsuit) against Licensor or any person or entity alleging that LTX-2.x or any Output, or any portion of any of the foregoing, infringe any intellectual property or other right owned or licensable by you, then all licenses granted to you under this Agreement shall terminate as of the date such lawsuit or other proceeding is filed.
+
+**14. Disputes and Arbitration; Waiver of Jury Trial; Class Action Waiver.** **IF YOU ARE NOT ACTING AS A CONSUMER UNDER APPLICABLE LAW, YOU HEREBY WAIVE THE RIGHT TO A TRIAL BY JURY, TO PARTICIPATE IN A CLASS OR REPRESENTATIVE ACTION (INCLUDING IN ARBITRATION), OR TO COMBINE INDIVIDUAL PROCEEDINGS IN COURT OR IN ARBITRATION WITHOUT THE CONSENT OF ALL PARTIES.** All disputes arising in connection with this Agreement shall be finally settled by arbitration under the Rules of Arbitration of the International Chamber of Commerce (“ICC Rules”), by one (1) arbitrator appointed in accordance with the ICC Rules. The seat of arbitration shall be New York, NY, USA, and the proceedings shall be conducted in English. The arbitrator shall be empowered to grant any relief that a court could grant. Judgment on the arbitration award may be entered by any court having jurisdiction thereof. Notwithstanding the foregoing, either party may seek injunctive or other equitable relief in respect of any actual or threatened breach of the license restrictions under this Agreement (including Attachment A and the Acceptable Use Policy) or any actual or threatened infringement, misappropriation, or violation of Licensor’s intellectual property rights, in the state or federal courts located in the County of New York, State of New York, and each party irrevocably consents to the jurisdiction of, and venue in, such courts for that limited purpose. The foregoing waivers do not apply to, and are not enforceable against, any licensee acting as a consumer under the mandatory consumer-protection laws of its jurisdiction of residence (including, without limitation, the European Union, the United Kingdom, and the State of California), and nothing in this Agreement limits any rights under such laws that cannot be waived or limited by contract. If any waiver in this Section is held invalid or unenforceable as to a particular licensee or dispute, such waiver shall be severed to that extent only and shall not affect the validity or enforceability of the remainder of this Section.
+
+**15.** In the event of any exception to the application of binding arbitration, all disputes, claims, and other matters arising hereunder shall be brought exclusively in the state or federal courts located in the County of New York, State of New York. You waive all defenses of lack of personal jurisdiction and forum non conveniens with respect to venue and jurisdiction in such courts, and consent to their exclusive jurisdiction and venue.
+
+**16. Severability.** If any provision of this Agreement is held to be invalid, illegal or unenforceable, the remaining provisions shall be unaffected thereby and remain valid as if such provision had not been set forth herein.
+
+**END OF TERMS AND CONDITIONS**
+
+# Attachment A
+
+*Use Restrictions*
+
+When using the Outputs, LTX-2.x and any Derivatives thereof, you agree to comply with the [Acceptable Use Policy](https://static.lightricks.com/legal/ltx-acceptable-use-policy.pdf) which is hereby incorporated into and made part of this Agreement by reference. Licensor may update it from time to time, and the version in effect at the time of your use governs; continued use after an update constitutes acceptance. Licensor shall post each version of the Acceptable Use Policy with its effective date, and no update shall apply retroactively to use occurring before that effective date. In addition, you agree not to use the Outputs, LTX-2.x or its Derivatives in any of the following ways:
+
+> **1)** In any way that violates any applicable national, federal, state, local or international law or regulation;
+
+> **2)** For the purpose of exploiting, Harming or attempting to exploit or Harm minors in any way;
+
+> **3)** Knowingly generate or disseminate verifiably false information and/or content with the intent to deceive, defraud, or otherwise unlawfully Harm others;
+
+> **4)** To generate or disseminate personal identifiable information that can be used to Harm an individual;
+
+> **5)** To generate or disseminate information and/or content (e.g. images, code, posts, articles), and place the information and/or content in any context (e.g. bot generating tweets) without expressly and intelligibly disclaiming that the information and/or content is machine generated;
+
+> **6)** To defame others, or to engage in the unlawful harassment of others;
+
+> **7)** To impersonate or attempt to impersonate (e.g. deepfakes) others without their consent;
+
+> **8)** For fully automated decision making that adversely impacts an individual’s legal rights or otherwise creates or modifies a binding, enforceable obligation;
+
+> **9)** For any use intended to or which has the effect of discriminating against or Harming individuals or groups based on online or offline social behavior or known or predicted personal or personality characteristics;
+
+> **10)** To exploit any of the vulnerabilities of a specific group of persons based on their age, social, physical or mental characteristics, in order to materially distort the behavior of a person pertaining to that group in a manner that causes or is likely to cause that person or another person physical or psychological Harm;
+
+> **11)** For any use intended to or which has the effect of discriminating against individuals or groups based on legally protected characteristics or categories;
+
+> **12)** To provide medical advice and medical results interpretation;
+
+> **13)** To generate or disseminate information for the purpose to be used for administration of justice, law enforcement, immigration or asylum processes, such as predicting an individual will commit fraud/crime commitment (e.g. by text profiling, drawing causal relationships between assertions made in documents, indiscriminate and arbitrarily-targeted use);
+
+> **14)** To generate and/or disseminate malware (including – but not limited to – ransomware) or any other content to be used for the purpose of harming electronic systems;
+
+> **15)** To engage in, promote, incite, or facilitate discrimination or other unlawful or harmful conduct in the provision of employment, employment benefits, credit, housing, or other essential goods and services;
+
+> **16)** To engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals;
+
+> **17)** For military, warfare, nuclear industries or applications, weapons development, or any use in connection with activities that may cause death, personal injury, or severe physical or environmental damage;
+
+> **18)** For commercial use only: To train, improve, or fine-tune any other machine learning model, artificial intelligence system, or competing model, except for Derivatives of LTX-2.x as expressly permitted under this Agreement;
+
+> **19)** To circumvent, disable, or interfere with any technical limitations, safety features, content filters, watermarking, content provenance or latent disclosure functionalities, or use restrictions implemented in LTX-2.x by Licensor;
+
+> **20)** To use LTX-2.x or Derivatives of LTX-2.x in any product, service, or application that directly competes with Licensor’s commercial products or services, or is designed to replace or substitute Licensor’s offerings in the market, without obtaining a separate commercial license from Licensor.
diff --git a/MODELS-LTX-2.3.md b/MODELS-LTX-2.3.md
new file mode 100644
index 0000000..2837048
--- /dev/null
+++ b/MODELS-LTX-2.3.md
@@ -0,0 +1,44 @@
+# LTX-2.3 Models
+
+Model downloads for LTX-2.3. Each checkpoint below is a single file bundling the
+transformer, the video and audio VAEs, and the text projection; the Gemma text encoder is
+downloaded separately (listed below).
+
+Every pipeline in this repository runs on these checkpoints. If you want LTX-2.5 instead, start
+from the [Quick Start](README.md#-quick-start) -- its weights are split per component and are not
+interchangeable with the files here. The LoRAs at the end of this page were trained on LTX-2.3, so
+pair them with an LTX-2.3 checkpoint.
+
+Download the models you need from the [LTX-2.3 HuggingFace repository](https://huggingface.co/Lightricks/LTX-2.3):
+
+**LTX-2.3 Model Checkpoint** (choose and download one of the following)
+ * [`ltx-2.3-22b-dev.safetensors`](https://huggingface.co/Lightricks/LTX-2.3/blob/main/ltx-2.3-22b-dev.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.3/resolve/main/ltx-2.3-22b-dev.safetensors)
+ * [`ltx-2.3-22b-distilled-1.1.safetensors`](https://huggingface.co/Lightricks/LTX-2.3/blob/main/ltx-2.3-22b-distilled-1.1.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.3/resolve/main/ltx-2.3-22b-distilled-1.1.safetensors)
+
+**Spatial Upscaler** - Required for the two-stage pipeline implementations in this repository
+ * [`ltx-2.3-spatial-upscaler-x2-1.1.safetensors`](https://huggingface.co/Lightricks/LTX-2.3/blob/main/ltx-2.3-spatial-upscaler-x2-1.1.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.3/resolve/main/ltx-2.3-spatial-upscaler-x2-1.1.safetensors)
+ * [`ltx-2.3-spatial-upscaler-x1.5-1.0.safetensors`](https://huggingface.co/Lightricks/LTX-2.3/blob/main/ltx-2.3-spatial-upscaler-x1.5-1.0.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.3/resolve/main/ltx-2.3-spatial-upscaler-x1.5-1.0.safetensors)
+
+**Temporal Upscaler** - Supported by the model and will be required for future pipeline implementations
+ * [`ltx-2.3-temporal-upscaler-x2-1.0.safetensors`](https://huggingface.co/Lightricks/LTX-2.3/blob/main/ltx-2.3-temporal-upscaler-x2-1.0.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.3/resolve/main/ltx-2.3-temporal-upscaler-x2-1.0.safetensors)
+
+**Distilled LoRA** - Required for the two-stage pipeline implementations in this repository (except DistilledPipeline, ICLoraPipeline, and DubItPipeline)
+ * [`ltx-2.3-22b-distilled-lora-384-1.1.safetensors`](https://huggingface.co/Lightricks/LTX-2.3/blob/main/ltx-2.3-22b-distilled-lora-384-1.1.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.3/resolve/main/ltx-2.3-22b-distilled-lora-384-1.1.safetensors)
+
+**Gemma Text Encoder** (download all assets from the repository)
+ * [`Gemma 3`](https://huggingface.co/google/gemma-3-12b-it-qat-q4_0-unquantized/tree/main)
+
+**LoRAs**
+ * [`LTX-2.3-22b-IC-LoRA-Union-Control`](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-Union-Control) - [Download](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-Union-Control/resolve/main/ltx-2.3-22b-ic-lora-union-control-ref0.5.safetensors)
+ * [`LTX-2.3-22b-IC-LoRA-Motion-Track-Control`](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-Motion-Track-Control) - [Download](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-Motion-Track-Control/resolve/main/ltx-2.3-22b-ic-lora-motion-track-control-ref0.5.safetensors)
+ * [`LTX-2-19b-IC-LoRA-Detailer`](https://huggingface.co/Lightricks/LTX-2-19b-IC-LoRA-Detailer) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-IC-LoRA-Detailer/resolve/main/ltx-2-19b-ic-lora-detailer.safetensors)
+ * [`LTX-2-19b-IC-LoRA-Pose-Control`](https://huggingface.co/Lightricks/LTX-2-19b-IC-LoRA-Pose-Control) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-IC-LoRA-Pose-Control/resolve/main/ltx-2-19b-ic-lora-pose-control.safetensors)
+ * [`LTX-2-19b-LoRA-Camera-Control-Dolly-In`](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-In) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-In/resolve/main/ltx-2-19b-lora-camera-control-dolly-in.safetensors)
+ * [`LTX-2-19b-LoRA-Camera-Control-Dolly-Left`](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Left) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Left/resolve/main/ltx-2-19b-lora-camera-control-dolly-left.safetensors)
+ * [`LTX-2-19b-LoRA-Camera-Control-Dolly-Out`](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Out) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Out/resolve/main/ltx-2-19b-lora-camera-control-dolly-out.safetensors)
+ * [`LTX-2-19b-LoRA-Camera-Control-Dolly-Right`](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Right) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Right/resolve/main/ltx-2-19b-lora-camera-control-dolly-right.safetensors)
+ * [`LTX-2-19b-LoRA-Camera-Control-Jib-Down`](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Jib-Down) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Jib-Down/resolve/main/ltx-2-19b-lora-camera-control-jib-down.safetensors)
+ * [`LTX-2-19b-LoRA-Camera-Control-Jib-Up`](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Jib-Up) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Jib-Up/resolve/main/ltx-2-19b-lora-camera-control-jib-up.safetensors)
+ * [`LTX-2-19b-LoRA-Camera-Control-Static`](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Static) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Static/resolve/main/ltx-2-19b-lora-camera-control-static.safetensors)
+ * [`LTX-2.3-22b-IC-LoRA-HDR`](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-HDR) - HDR IC-LoRA and pre-computed text embeddings for `HDRICLoraPipeline`
+ * [`LTX-2.3-22b-IC-LoRA-DubIt`](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-DubIt) - [Download](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-DubIt/resolve/main/ltx-2.3-22b-ic-lora-dubit-0.9.safetensors)
diff --git a/README.md b/README.md
index cb66d69..b0a82d3 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# LTX-2
[![Website](https://img.shields.io/badge/Website-LTX-181717?logo=google-chrome)](https://ltx.io)
-[![Model](https://img.shields.io/badge/HuggingFace-Model-orange?logo=huggingface)](https://huggingface.co/Lightricks/LTX-2.3)
+[![Model](https://img.shields.io/badge/HuggingFace-Model-orange?logo=huggingface)](https://huggingface.co/Lightricks/LTX-2.5)
[![Demo](https://img.shields.io/badge/Demo-Try%20Now-brightgreen?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAFKADAAQAAAABAAAAFAAAAACy3fD9AAACmElEQVQ4Ea1VP2haYRA/fRo0mESRIIqb2IwxuNUl0CGFQBC6OAWcikMottCpqYtDQIgdQsBFhAjZqiQhbhmySJBOgmNU0EGCg9r61Bivd0ffoykE0iQH37/77n7f3e/uqQFIPB7P/N3d3QeDwfAFEedZ91ghnyH5JM1m87dWq6UavF6vdTKZfDcajW/p4rE49+wIFMj33Gq1vlNo+kxg758KpiETqP/29vaXweVyqaS0aBfPXEfGFwTjWCwM+KBQoWA4HAJx/KDNvxcmTTGbzYAH8SljOp2C2+2GjY0NqNfrcHFxAXNzc2LDfCuKIq78KBdFOwsgGzidTnA4HHBzcwO9Xg8sFgtsbm7C3t4eVCoVaDQa0O12YXl5GUwmk5z5cZ/PB6PRCNrttgADFQUXFhbw8PAQVVXF3d1dJAeMx+P0zn0Jh8OYz+eRADCRSGAqlcLxeIz7+/u4tLSEjKUDZrNZ8U4mk0jR4fr6Op6enoru+voa0+k0rq2tYTAYxE6ng9QiSLRgrVZDv9+PFLkA6kUhT+GEC8C8XF5ewtHRkejICShiaDabwPvj42NJm3k7ODiQdDl9Fr0ocqJpdXUVIpEIdz7Y7XZRr6ysQDQahXK5LORvbW1p5rC9vQ2UifAooBqHuVxO0vt72tnZwWq1qqtisRgWCgU5ZzIZPDk50fdUUEmZvxTmAgKBgAxunT/fJpRKJWmhUCgEVDi4uroSG46kWCzC4uKitNVgMICzszOhSgA5fiJZhp4Lbbh1KARpbF65D/lx3vMdP05Vlkf5zKIDyukFJi7N6AVwNAhVsdlsM+LsjaZ56sq8kyQUqs4P6rsAKV49B4x4Padf7Y9Kv9+fEmiBQH8S4Gsa5v8EHpL9VwL7xH8BvwEcd4ccVf02KQAAAABJRU5ErkJggg==)](https://console.ltx.video/playground)
[![Paper](https://img.shields.io/badge/Paper-PDF-EC1C24?logo=adobeacrobatreader&logoColor=white)](https://arxiv.org/abs/2601.03233)
[![Discord](https://img.shields.io/badge/Join-Discord-5865F2?logo=discord)](https://discord.gg/ltxplatform)
@@ -21,24 +21,39 @@ git clone https://github.com/Lightricks/LTX-2.git
cd LTX-2
```
-Download the relevant [models](https://huggingface.co/Lightricks/LTX-2.3) or use the [Hugging Face CLI](https://huggingface.co/docs/huggingface_hub/guides/cli)
+Install the dependencies. The `natten` extra is the fastest backend for the diffusion video VAE below, and is Linux + CUDA only -- on Windows and macOS it is skipped automatically and decoding falls back to a Triton or eager implementation, so the same command works everywhere (see [neighborhood attention backends](packages/ltx-pipelines/docs/optimization.md#diffusion-vae-decoder))
+
+```bash
+uv sync --extra natten
+```
+
+Download the [models](https://huggingface.co/Lightricks/LTX-2.5) or use the [Hugging Face CLI](https://huggingface.co/docs/huggingface_hub/guides/cli)
```bash
hf auth login
-hf download Lightricks/LTX-2.3 \
- ltx-2.3-22b-distilled-1.1.safetensors ltx-2.3-spatial-upscaler-x2-1.1.safetensors --local-dir models/ltx-2.3
-hf download google/gemma-3-12b-it-qat-q4_0-unquantized --local-dir models/gemma-3-12b
+hf download Lightricks/LTX-2.5 \
+ diffusion_models/ltx-2.5-22b-distilled-transformer-bf16.safetensors \
+ text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors \
+ vae/ltx-2.5-video-vae-bf16.safetensors \
+ vae/ltx-2.5-audio-vae-bf16.safetensors \
+ latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors \
+ --local-dir models/ltx-2.5
```
+That is roughly 66 GiB. The CLI keeps the repository's folder layout under `--local-dir`, which is why the paths below include `diffusion_models/`, `vae/` and so on.
+
If you get a 401/403, accept the model terms on Hugging Face and log in with a **Read** token (fine-grained tokens need the "read gated repos" scope enabled).
Generate
```bash
uv run python -m ltx_pipelines.distilled \
- --distilled-checkpoint-path models/ltx-2.3/ltx-2.3-22b-distilled-1.1.safetensors \
- --spatial-upsampler-path models/ltx-2.3/ltx-2.3-spatial-upscaler-x2-1.1.safetensors \
- --gemma-root models/gemma-3-12b \
+ --transformer-path models/ltx-2.5/diffusion_models/ltx-2.5-22b-distilled-transformer-bf16.safetensors \
+ --text-encoder-path models/ltx-2.5/text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors \
+ --video-vae-path models/ltx-2.5/vae/ltx-2.5-video-vae-bf16.safetensors \
+ --audio-vae-path models/ltx-2.5/vae/ltx-2.5-audio-vae-bf16.safetensors \
+ --spatial-upsampler-path models/ltx-2.5/latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors \
+ --num-frames 121 \
--seed 42 \
--output-path output.mp4 \
--prompt "A medium close-up shot features a Caucasian man with a beard, wearing a green and white baseball cap without any letters on the front, and a light blue shirt over a white t-shirt. He is positioned in the center of the frame, looking intently directly at the camera, his eyes focused on camera. His facial expression is one of deep concentration, with his brow slightly raised. As he looks straight at the camera, a quick sniff sound is heard, and then he speaks with a deep male voice and a satisfied tone, saying, 'I think it's so good.' The camera remains static throughout, maintaining a shallow depth of field, which keeps the man in sharp focus while the background is softly blurred, showing a beige wall behind him. After a brief pause, another short, audible sniff is heard. The man then continues to speak, his voice maintaining the same quality, as he states, 'So good. So good.' He elaborates further, emphasizing his point with a final statement, 'This got to be, it's got to be the best tool I've ever seen.'"
@@ -50,52 +65,62 @@ This uses the distilled model and pipeline for fast results. For better quality
### Full Model List
-For pipelines beyond the quickstart, download the relevant models from the [LTX-2.3 HuggingFace repository](https://huggingface.co/Lightricks/LTX-2.3):
+LTX-2.5 is the recommended model, and what the [Quick Start](#-quick-start) uses. Its weights are published as one file per component, so you download only the parts your pipeline needs.
+
+Download from the [LTX-2.5 HuggingFace repository](https://huggingface.co/Lightricks/LTX-2.5):
+
+**Transformer** (choose and download one of the following)
+ * [`ltx-2.5-22b-dev-transformer-bf16.safetensors`](https://huggingface.co/Lightricks/LTX-2.5/blob/main/diffusion_models/ltx-2.5-22b-dev-transformer-bf16.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.5/resolve/main/diffusion_models/ltx-2.5-22b-dev-transformer-bf16.safetensors) - the full model; used by the guided two-stage pipelines
+ * [`ltx-2.5-22b-distilled-transformer-bf16.safetensors`](https://huggingface.co/Lightricks/LTX-2.5/blob/main/diffusion_models/ltx-2.5-22b-distilled-transformer-bf16.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.5/resolve/main/diffusion_models/ltx-2.5-22b-distilled-transformer-bf16.safetensors) - runs in far fewer steps; what `DistilledPipeline`, `ICLoraPipeline` and `DubItPipeline` expect
+
+**Text Encoder** - Gemma 4 12B, fine-tuned for LTX, with the text projection bundled in; required by every pipeline. It is bundled with the model, so no separate Gemma download is needed. Google's stock Gemma 4 release is not a substitute: loading checks the encoder's version against the one the checkpoint was trained with (`gemma4-12b-ltx-v1`)
+ * [`gemma4-12b-with-proj-ltx-2.5-bf16.safetensors`](https://huggingface.co/Lightricks/LTX-2.5/blob/main/text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.5/resolve/main/text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors)
+
+**Video VAE** (choose and download one of the following)
+ * [`ltx-2.5-video-vae-bf16.safetensors`](https://huggingface.co/Lightricks/LTX-2.5/blob/main/vae/ltx-2.5-video-vae-bf16.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.5/resolve/main/vae/ltx-2.5-video-vae-bf16.safetensors) - diffusion decoder (`NADiffusionDecoder`); improved quality at the cost of longer decode time and more VRAM. Fastest with the `natten` extra, and falls back to Triton or eager neighborhood attention without it
+ * [`ltx-2.5-video-vae-conv-bf16.safetensors`](https://huggingface.co/Lightricks/LTX-2.5/blob/main/vae/ltx-2.5-video-vae-conv-bf16.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.5/resolve/main/vae/ltx-2.5-video-vae-conv-bf16.safetensors) - convolutional decoder; lighter and needs no extra dependencies
+
+**Audio VAE** - required by the pipelines that generate or decode audio
+ * [`ltx-2.5-audio-vae-bf16.safetensors`](https://huggingface.co/Lightricks/LTX-2.5/blob/main/vae/ltx-2.5-audio-vae-bf16.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.5/resolve/main/vae/ltx-2.5-audio-vae-bf16.safetensors)
+
+**Spatial Upscaler** - required by the two-stage pipeline implementations in this repository
+ * [`ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors`](https://huggingface.co/Lightricks/LTX-2.5/blob/main/latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.5/resolve/main/latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors)
+
+**Temporal Upscaler** - required by [`DFRPipeline`](packages/ltx-pipelines/src/ltx_pipelines/dfr_pipeline.py) when running temporal refine rounds (`--temporal-upsample-rounds`)
+ * [`ltx-2.5-latent-temporal-upscaler-x2-bf16-1.0.safetensors`](https://huggingface.co/Lightricks/LTX-2.5/blob/main/latent_upscale_models/ltx-2.5-latent-temporal-upscaler-x2-bf16-1.0.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.5/resolve/main/latent_upscale_models/ltx-2.5-latent-temporal-upscaler-x2-bf16-1.0.safetensors)
-**LTX-2.3 Model Checkpoint** (choose and download one of the following)
- * [`ltx-2.3-22b-dev.safetensors`](https://huggingface.co/Lightricks/LTX-2.3/blob/main/ltx-2.3-22b-dev.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.3/resolve/main/ltx-2.3-22b-dev.safetensors)
- * [`ltx-2.3-22b-distilled-1.1.safetensors`](https://huggingface.co/Lightricks/LTX-2.3/blob/main/ltx-2.3-22b-distilled-1.1.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.3/resolve/main/ltx-2.3-22b-distilled-1.1.safetensors)
+**Distilled LoRA** - required by the two-stage pipeline implementations that run the full model in stage 1 (all except DistilledPipeline, ICLoraPipeline and DubItPipeline)
+ * [`ltx-2.5-22b-distilled-lora-450-bf16.safetensors`](https://huggingface.co/Lightricks/LTX-2.5/blob/main/loras/ltx-2.5-22b-distilled-lora-450-bf16.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.5/resolve/main/loras/ltx-2.5-22b-distilled-lora-450-bf16.safetensors)
-**Spatial Upscaler** - Required for current two-stage pipeline implementations in this repository
- * [`ltx-2.3-spatial-upscaler-x2-1.1.safetensors`](https://huggingface.co/Lightricks/LTX-2.3/blob/main/ltx-2.3-spatial-upscaler-x2-1.1.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.3/resolve/main/ltx-2.3-spatial-upscaler-x2-1.1.safetensors)
- * [`ltx-2.3-spatial-upscaler-x1.5-1.0.safetensors`](https://huggingface.co/Lightricks/LTX-2.3/blob/main/ltx-2.3-spatial-upscaler-x1.5-1.0.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.3/resolve/main/ltx-2.3-spatial-upscaler-x1.5-1.0.safetensors)
+**Detailing IC-LoRA** - optional; the 2x spatial detailing LoRA for [`DFRPipeline`](packages/ltx-pipelines/src/ltx_pipelines/dfr_pipeline.py)'s refinement stage (`--detailing-lora`). It lives in its own repository, [`LTX-2.5-22b-IC-LoRA-Pixel-Spatial-Upscaler`](https://huggingface.co/Lightricks/LTX-2.5-22b-IC-LoRA-Pixel-Spatial-Upscaler)
+ * [`ltx-2.5-22b-ic-lora-pixel-spatial-upscaler-x2-1.0.safetensors`](https://huggingface.co/Lightricks/LTX-2.5-22b-IC-LoRA-Pixel-Spatial-Upscaler/blob/main/ltx-2.5-22b-ic-lora-pixel-spatial-upscaler-x2-1.0.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.5-22b-IC-LoRA-Pixel-Spatial-Upscaler/resolve/main/ltx-2.5-22b-ic-lora-pixel-spatial-upscaler-x2-1.0.safetensors)
-**Temporal Upscaler** - Supported by the model and will be required for future pipeline implementations
- * [`ltx-2.3-temporal-upscaler-x2-1.0.safetensors`](https://huggingface.co/Lightricks/LTX-2.3/blob/main/ltx-2.3-temporal-upscaler-x2-1.0.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.3/resolve/main/ltx-2.3-temporal-upscaler-x2-1.0.safetensors)
+**Duration Head** - optional; lets you omit `--num-frames` and have the clip length predicted from the prompt
+ * [`ltx-2.5-duration-head-bf16.safetensors`](https://huggingface.co/Lightricks/LTX-2.5/blob/main/model_patches/ltx-2.5-duration-head-bf16.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.5/resolve/main/model_patches/ltx-2.5-duration-head-bf16.safetensors)
-**Distilled LoRA** - Required for current two-stage pipeline implementations in this repository (except DistilledPipeline, ICLoraPipeline, and DubItPipeline)
- * [`ltx-2.3-22b-distilled-lora-384-1.1.safetensors`](https://huggingface.co/Lightricks/LTX-2.3/blob/main/ltx-2.3-22b-distilled-lora-384-1.1.safetensors) - [Download](https://huggingface.co/Lightricks/LTX-2.3/resolve/main/ltx-2.3-22b-distilled-lora-384-1.1.safetensors)
+#### Legacy: LTX-2.3
-**Gemma Text Encoder** (download all assets from the repository)
- * [`Gemma 3`](https://huggingface.co/google/gemma-3-12b-it-qat-q4_0-unquantized/tree/main)
+Every pipeline in this repository also runs on LTX-2.3. Its checkpoints are single files bundling
+the transformer, VAEs and text projection, with the Gemma 3 text encoder downloaded separately.
+Files are not interchangeable between the two models, and a LoRA only works with the model it was
+trained on.
-**LoRAs**
- * [`LTX-2.3-22b-IC-LoRA-Union-Control`](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-Union-Control) - [Download](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-Union-Control/resolve/main/ltx-2.3-22b-ic-lora-union-control-ref0.5.safetensors)
- * [`LTX-2.3-22b-IC-LoRA-Motion-Track-Control`](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-Motion-Track-Control) - [Download](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-Motion-Track-Control/resolve/main/ltx-2.3-22b-ic-lora-motion-track-control-ref0.5.safetensors)
- * [`LTX-2-19b-IC-LoRA-Detailer`](https://huggingface.co/Lightricks/LTX-2-19b-IC-LoRA-Detailer) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-IC-LoRA-Detailer/resolve/main/ltx-2-19b-ic-lora-detailer.safetensors)
- * [`LTX-2-19b-IC-LoRA-Pose-Control`](https://huggingface.co/Lightricks/LTX-2-19b-IC-LoRA-Pose-Control) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-IC-LoRA-Pose-Control/resolve/main/ltx-2-19b-ic-lora-pose-control.safetensors)
- * [`LTX-2-19b-LoRA-Camera-Control-Dolly-In`](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-In) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-In/resolve/main/ltx-2-19b-lora-camera-control-dolly-in.safetensors)
- * [`LTX-2-19b-LoRA-Camera-Control-Dolly-Left`](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Left) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Left/resolve/main/ltx-2-19b-lora-camera-control-dolly-left.safetensors)
- * [`LTX-2-19b-LoRA-Camera-Control-Dolly-Out`](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Out) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Out/resolve/main/ltx-2-19b-lora-camera-control-dolly-out.safetensors)
- * [`LTX-2-19b-LoRA-Camera-Control-Dolly-Right`](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Right) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Right/resolve/main/ltx-2-19b-lora-camera-control-dolly-right.safetensors)
- * [`LTX-2-19b-LoRA-Camera-Control-Jib-Down`](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Jib-Down) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Jib-Down/resolve/main/ltx-2-19b-lora-camera-control-jib-down.safetensors)
- * [`LTX-2-19b-LoRA-Camera-Control-Jib-Up`](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Jib-Up) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Jib-Up/resolve/main/ltx-2-19b-lora-camera-control-jib-up.safetensors)
- * [`LTX-2-19b-LoRA-Camera-Control-Static`](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Static) - [Download](https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Static/resolve/main/ltx-2-19b-lora-camera-control-static.safetensors)
- * [`LTX-2.3-22b-IC-LoRA-HDR`](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-HDR) - HDR IC-LoRA and pre-computed text embeddings for `HDRICLoraPipeline`
- * [`LTX-2.3-22b-IC-LoRA-DubIt`](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-DubIt) - [Download](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-DubIt/resolve/main/ltx-2.3-22b-ic-lora-dubit-0.9.safetensors)
+See **[LTX-2.3 models](MODELS-LTX-2.3.md)** for the full list.
### Available Pipelines
-* **[TI2VidTwoStagesPipeline](packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages.py)** - Production-quality text/image-to-video with 2x upsampling (recommended)
+* **[DistilledPipeline](packages/ltx-pipelines/src/ltx_pipelines/distilled.py)** - Fastest inference with 8 predefined sigmas (recommended)
+* **[DFRPipeline](packages/ltx-pipelines/src/ltx_pipelines/dfr_pipeline.py)** - Detail-fidelity rendering: generated keyframes and a spatial detailing pass, with optional temporal 2x/4x refinement
+* **[TI2VidTwoStagesPipeline](packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages.py)** - Production-quality text/image-to-video with 2x upsampling
* **[TI2VidTwoStagesHQPipeline](packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages_hq.py)** - Same two-stage flow as above but uses the res_2s second-order sampler (fewer steps, better quality)
* **[TI2VidOneStagePipeline](packages/ltx-pipelines/src/ltx_pipelines/ti2vid_one_stage.py)** - Single-stage generation for quick prototyping
-* **[DistilledPipeline](packages/ltx-pipelines/src/ltx_pipelines/distilled.py)** - Fastest inference with 8 predefined sigmas
* **[ICLoraPipeline](packages/ltx-pipelines/src/ltx_pipelines/ic_lora.py)** - Video-to-video and image-to-video transformations (uses distilled model.)
* **[KeyframeInterpolationPipeline](packages/ltx-pipelines/src/ltx_pipelines/keyframe_interpolation.py)** - Interpolate between keyframe images
* **[A2VidPipelineTwoStage](packages/ltx-pipelines/src/ltx_pipelines/a2vid_two_stage.py)** - Audio-to-video generation conditioned on an input audio file
* **[RetakePipeline](packages/ltx-pipelines/src/ltx_pipelines/retake.py)** - Regenerate a specific time region of an existing video
-* **[HDRICLoraPipeline](packages/ltx-pipelines/src/ltx_pipelines/hdr_ic_lora.py)** - Video-to-video with HDR output (linear float frames via LogC3 inverse decode, suitable for EXR export and tonemapping)
+* **[HDRICLoraPipeline](packages/ltx-pipelines/src/ltx_pipelines/hdr_ic_lora.py)** - Video-to-video with HDR IC-LoRA output (linear float via LogC3 inverse decode, suitable for EXR export and tonemapping)
* **[DubItPipeline](packages/ltx-pipelines/src/ltx_pipelines/dubit.py)** - Dub-It: rephrasing while matching speaker identity and lip movements (distilled model, single IC-LoRA, two stages).
+* **Native HDR / EXR** — standard pipelines accept EXR stills and EXR-frame folders with `--hdr {SRGB_LINEAR,ACESCG,ACESCCT}` and write half EXR frames plus a BT.2020/HLG master. See [HDR Support](packages/ltx-pipelines/docs/hdr.md).
### ⚡ Optimization Tips
diff --git a/packages/ltx-core/README.md b/packages/ltx-core/README.md
index d347105..752c5b0 100644
--- a/packages/ltx-core/README.md
+++ b/packages/ltx-core/README.md
@@ -5,13 +5,13 @@ The foundational library for the LTX-2 Audio-Video generation model. This packag
## 📦 What's Inside?
- **`components/`**: Modular diffusion components (Schedulers, Guiders, Noisers, Patchifiers) following standard protocols
-- **`conditioning/`**: Tools for preparing latent states and applying conditioning (image, video, keyframes)
+- **`conditioning/`**: Tools for preparing latent states and applying conditioning (image, video, keyframes, generated keyframe slots)
- **`guidance/`**: Perturbation system for fine-grained control over attention mechanisms
- **`loader/`**: Utilities for loading weights from `.safetensors`, fusing LoRAs, and managing memory
- **`block_streaming/`**: Memory-efficient inference that streams transformer blocks through the GPU one at a time (from pinned CPU buffers or directly from disk)
- **`model/`**: PyTorch implementations of the LTX-2 Transformer, Video VAE, Audio VAE, Vocoder and Upscaler
- **`text_encoders/gemma`**: Gemma text encoder implementation with tokenizers, feature extractors, and separate encoders for audio-video and video-only generation
-- **`quantization/`**: FP8 quantization backends (FP8 scaled MM, FP8 cast) for reduced memory footprint.
+- **`quantization/`**: FP8 (scaled MM, cast), blockwise FP8/FP6, and NVFP4 Linear (via `ltx-kernels`) for reduced memory / faster GEMM.
## 🚀 Quick Start
@@ -49,14 +49,15 @@ pip install -e packages/ltx-core
### Conditioning & Control
-- **Conditioning** ([`conditioning/`](src/ltx_core/conditioning/)): Tools for preparing and applying various conditioning types (image, video, keyframes)
+- **Conditioning** ([`conditioning/`](src/ltx_core/conditioning/)): Tools for preparing and applying various conditioning types (image, video, keyframes, and generated keyframe slots via `VideoGeneratedKeyframeSlots` -- extra model-generated frames at interior positions, requiring a checkpoint whose transformer config sets `use_keyframes_abs_pos_embedding`)
- **Guidance** ([`guidance/`](src/ltx_core/guidance/)): Perturbation system for fine-grained control over attention mechanisms (e.g., skipping specific attention layers)
### Utilities
- **Loader** ([`loader/`](src/ltx_core/loader/)): Model loading from `.safetensors`, LoRA fusion, weight remapping, and memory management
-- **Quantization** ([`quantization/`](src/ltx_core/quantization/)): FP8 quantization backends for reduced memory footprint and faster inference
+- **Quantization** ([`quantization/`](src/ltx_core/quantization/)): FP8, blockwise FP8/FP6, and NVFP4 Linear policies for reduced memory footprint and faster inference
- **Block Streaming** ([`block_streaming/`](src/ltx_core/block_streaming/)): Streams transformer blocks through the GPU one block at a time, so the full model runs on machines without enough memory to hold all its weights at once
+- **Colour / HDR** ([`color/`](src/ltx_core/color/), [`hdr.py`](src/ltx_core/hdr.py)): Primaries matrices, YUV/HLG helpers, and working-space transfers used by pipeline EXR/`--hdr` I/O. Pipeline-level docs: [HDR Support](../ltx-pipelines/docs/hdr.md).
### Loader
@@ -334,6 +335,10 @@ The Video VAE ([`src/ltx_core/model/video_vae/`](src/ltx_core/model/video_vae/))
- Where `F' = 1 + (F-1)*8`
- Example: `[B, 128, 5, 16, 16]` → `[B, 3, 33, 512, 512]`
+`ConvVideoDecoder` (above) is the default, single-forward-pass decoder. `model/video_vae/` also has `DiffusionVideoDecoder` -- a neighborhood-attention decoder (for best performance requires the `natten` extra: `uv sync --package ltx-core --extra natten`; without it, Triton or eager fallbacks are used) that iteratively denoises pixels via Euler steps (`default_num_inference_steps=2` for distilled) instead of a single deterministic pass. `VideoDecoderConfigurator.from_config` picks between the two based on the checkpoint's own `vae._class_name`. `DIFFUSION_VAE_DECODER_COMFY_KEYS_FILTER` is its checkpoint key-remapping `SDOps`. Pipeline-side DiffVAE presets live in `DiffVAEMode` / `apply_diffvae_mode` (default `CHUNKED_EAGER`; CLI `--diffvae-optimization`). See `ltx-pipelines` docs for relative compile/runtime/VRAM tradeoffs between modes.
+
+> **DiffVAE + CUDA illegal memory access:** the `natten` extra pins `natten==0.21.7+torch2130cu132` with `torch==2.13.0` (cu132). Older PyTorch/NVIDIA stacks can IMA inside NATTEN TokPerm on large stage-5 volumes. If that happens, upgrade CUDA / PyTorch / natten to those pins (see also [pipelines optimization docs](../ltx-pipelines/docs/optimization.md#diffusion-vae-decoder)).
+
The Video VAE is used internally by pipelines for encoding video pixels to latents and decoding latents back to pixels. For usage examples, see the [`ltx-pipelines`](../ltx-pipelines/) package.
---
@@ -361,7 +366,18 @@ The Audio VAE is used internally by pipelines for encoding mel spectrograms to l
## Text Encoding (Gemma)
-LTX-2 uses **Gemma 3** (Gemma 3-12B) as the multilingual text encoder backbone, located in [`src/ltx_core/text_encoders/gemma/`](src/ltx_core/text_encoders/gemma/). Advanced text understanding is critical not only for global language support but for the phonetic and semantic accuracy of generated speech.
+LTX-2 uses Gemma as the multilingual text encoder backbone, located in [`src/ltx_core/text_encoders/gemma/`](src/ltx_core/text_encoders/gemma/). LTX-2.3 uses stock **Gemma 3** (12B), downloaded separately; LTX-2.5 uses a **Gemma 4** (unified) fine-tuned for LTX and shipped with the model. Advanced text understanding is critical not only for global language support but for the phonetic and semantic accuracy of generated speech.
+
+### Tokenization and BOS
+
+Encoding goes through [`LTXGemmaTokenizer`](src/ltx_core/text_encoders/gemma/tokenizer.py), which always ensures a leading `<bos>`:
+
+| Family | Tokenizer assets prepend `<bos>`? | Encode path |
+|--------|-----------------------------------|-------------|
+| Gemma 3 | Yes (`tokenizer.json` post_processor) | Leading `<bos>` already from assets |
+| Gemma 4 | No | We prepend `<bos>` so both families match |
+
+EOS is not appended on the encode path.
### Text Encoder Architecture
diff --git a/packages/ltx-core/pyproject.toml b/packages/ltx-core/pyproject.toml
index 23d0231..d19373c 100644
--- a/packages/ltx-core/pyproject.toml
+++ b/packages/ltx-core/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "ltx-core"
-version = "1.1.7"
+version = "1.2.0"
description = "Core implementation of Lightricks' LTX-2 model"
readme = "README.md"
requires-python = ">=3.10"
@@ -9,7 +9,8 @@ dependencies = [
"torchaudio",
"einops",
"numpy",
- "transformers>=4.52",
+ "av",
+ "transformers>=5.8.0",
"safetensors",
"accelerate",
"scipy>=1.14",
@@ -21,6 +22,36 @@ dependencies = [
"mps-sdpa>=0.2.0; sys_platform == 'darwin' and platform_machine == 'arm64'",
]
+[project.optional-dependencies]
+natten = [
+ # Pinned wheel + matching torch so DiffVAE does not hit TokPerm IMA on older
+ # PyTorch/NVIDIA stacks. Keep in sync with install hints in attention.py /
+ # diffusion_video_decoder.py and packages/ltx-pipelines/docs/optimization.md.
+ "natten==0.21.7+torch2130cu132; sys_platform == 'linux' and (platform_machine == 'x86_64' or platform_machine == 'aarch64')",
+ "torch==2.13.0; sys_platform == 'linux' and (platform_machine == 'x86_64' or platform_machine == 'aarch64')",
+]
+
+[tool.uv.sources]
+torch = { index = "torch" }
+torchaudio = { index = "torch-test" }
+natten = { index = "natten" }
+
+[[tool.uv.index]]
+name = "torch"
+url = "https://download.pytorch.org/whl/cu132"
+explicit = true
+
+[[tool.uv.index]]
+name = "torch-test"
+url = "https://download.pytorch.org/whl/test/cu132/"
+explicit = true
+
+[[tool.uv.index]]
+name = "natten"
+url = "https://whl.natten.org"
+format = "flat"
+explicit = true
+
[build-system]
requires = ["uv_build>=0.9.8,<0.10.0"]
build-backend = "uv_build"
diff --git a/packages/ltx-core/src/ltx_core/allocator_trim_strategy.py b/packages/ltx-core/src/ltx_core/allocator_trim_strategy.py
new file mode 100644
index 0000000..6287853
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/allocator_trim_strategy.py
@@ -0,0 +1,8 @@
+from enum import Enum
+
+
+class AllocatorTrimStrategy(Enum):
+ """How a block releases its model's memory when its scope exits."""
+
+ TRIM = "trim" # sync, meta params/persistent buffers, empty_cache() back to the OS
+ DEFER = "defer" # meta params/persistent buffers only; skip sync and empty_cache (allocator stays warm)
diff --git a/packages/ltx-core/src/ltx_core/block_streaming/builder.py b/packages/ltx-core/src/ltx_core/block_streaming/builder.py
index b37ba91..cb74a27 100644
--- a/packages/ltx-core/src/ltx_core/block_streaming/builder.py
+++ b/packages/ltx-core/src/ltx_core/block_streaming/builder.py
@@ -28,7 +28,7 @@ from ltx_core.block_streaming.utils import (
from ltx_core.block_streaming.wrapper import BlockStreamingWrapper
from ltx_core.devices import synchronize_device
from ltx_core.loader.fuse_loras import FuseRule, bf16_fuse_rule, fuse_lora_weights
-from ltx_core.loader.helpers import create_meta_model, load_state_dict, read_model_config
+from ltx_core.loader.helpers import create_meta_model, load_state_dict, read_model_config, read_model_metadata
from ltx_core.loader.module_ops import ModuleOps
from ltx_core.loader.primitives import (
LoraPathStrengthAndSDOps,
@@ -38,7 +38,7 @@ from ltx_core.loader.primitives import (
StateDictLoader,
TensorLayout,
)
-from ltx_core.loader.registry import DummyRegistry, Registry
+from ltx_core.loader.registry import ModelRegistry, Registry
from ltx_core.loader.sd_ops import SDOps
from ltx_core.loader.sft_loader import SafetensorsModelStateDictLoader
from ltx_core.model.model_protocol import ModelConfigurator, ModelType
@@ -102,7 +102,7 @@ class StreamingModelBuilder(Generic[ModelType], ModelBuilderProtocol[ModelType])
self._module_ops = module_ops
self._loras = loras
self._model_loader = model_loader if model_loader is not None else SafetensorsModelStateDictLoader()
- self._registry = registry if registry is not None else DummyRegistry()
+ self._registry = registry if registry is not None else ModelRegistry(cache_models=True, cache_weights=False)
self._fuse_rule = fuse_rule
self._blocks_attr = blocks_attr
self._blocks_prefix = blocks_prefix
@@ -156,6 +156,11 @@ class StreamingModelBuilder(Generic[ModelType], ModelBuilderProtocol[ModelType])
def cpu_slots_count(self) -> int | None:
return self._cpu_slots_count
+ @property
+ def keeps_gpu_resident_weights(self) -> bool:
+ # Block weights live in fixed GPU/CPU slots that are reused across builds.
+ return True
+
def with_sd_ops(self, sd_ops: SDOps | None) -> Self:
clone = copy.copy(self)
clone._model_sd_ops = sd_ops
@@ -189,9 +194,13 @@ class StreamingModelBuilder(Generic[ModelType], ModelBuilderProtocol[ModelType])
"""Read model configuration from the checkpoint metadata."""
return read_model_config(self.model_path, self.model_loader)
- def meta_model(self, config: dict, module_ops: tuple[ModuleOps, ...]) -> ModelType:
+ def model_metadata(self) -> dict:
+ """Read the full checkpoint metadata (including sibling keys beyond ``config``)."""
+ return read_model_metadata(self.model_path, self.model_loader)
+
+ def meta_model(self, metadata: dict, module_ops: tuple[ModuleOps, ...]) -> ModelType:
"""Create a model on the meta device and apply module operations."""
- return create_meta_model(self.model_class_configurator, config, module_ops)
+ return create_meta_model(self.model_class_configurator, metadata, module_ops)
def build(
self,
@@ -218,8 +227,8 @@ class StreamingModelBuilder(Generic[ModelType], ModelBuilderProtocol[ModelType])
raise ValueError("StreamingModelBuilder.build requires an explicit dtype")
device = device if device is not None else torch.device("cuda")
- config = read_model_config(self.model_path, self.model_loader)
- meta_model: nn.Module = create_meta_model(self.model_class_configurator, config, self.module_ops)
+ metadata = self.model_metadata()
+ meta_model: nn.Module = create_meta_model(self.model_class_configurator, metadata, self.module_ops)
meta_model.eval()
blocks = resolve_attr(meta_model, self.blocks_attr)
diff --git a/packages/ltx-core/src/ltx_core/block_streaming/wrapper.py b/packages/ltx-core/src/ltx_core/block_streaming/wrapper.py
index 26ff850..cb1cdf1 100644
--- a/packages/ltx-core/src/ltx_core/block_streaming/wrapper.py
+++ b/packages/ltx-core/src/ltx_core/block_streaming/wrapper.py
@@ -10,9 +10,10 @@ from torch import nn
from ltx_core.block_streaming.provider import WeightsProvider
from ltx_core.block_streaming.utils import assign_tensor_to_module
+from ltx_core.model.disposable import Disposable
-class BlockStreamingWrapper(nn.Module):
+class BlockStreamingWrapper(nn.Module, Disposable):
"""Streams sequential model blocks through GPU buffer caches.
The wrapper delegates all weight management to a :class:`WeightsProvider`
which handles CPU-to-GPU copies, caching, LoRA fusion, and stream
diff --git a/packages/ltx-core/src/ltx_core/color/__init__.py b/packages/ltx-core/src/ltx_core/color/__init__.py
new file mode 100644
index 0000000..e5950b9
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/color/__init__.py
@@ -0,0 +1,59 @@
+"""Colour transforms, primaries, YUV packing, and HLG encode.
+VAE working-space helpers (``HDRTransfer``, ``TransferEncoding``) live in
+:mod:`ltx_core.hdr` — import them from there. This package does not re-export
+hdr symbols (that would cycle: ``hdr`` imports ``color.primaries``).
+"""
+
+from ltx_core.color.hlg import (
+ HlgGpuConverter,
+ HlgPyAVEncoder,
+ encode_linear_hdr_frames_to_hlg_mp4,
+ hlg_inverse_oetf,
+)
+from ltx_core.color.primaries import (
+ ACESCG_TO_2020,
+ ACESCG_TO_SRGB,
+ EXR_CHROMATICITIES,
+ PRIMARY_MATRIX_TO_2020,
+ REC709_TO_2020,
+ SRGB_TO_ACESCG,
+ Primaries,
+ apply_acescg_to_srgb,
+ apply_srgb_to_acescg,
+)
+from ltx_core.color.yuv import (
+ ColorRange,
+ ColorSpace,
+ FrameConverter,
+ PixelFormat,
+ rgb_to_yuv,
+ rgb_to_yuv420,
+ rgb_to_yuv420p10,
+ rgb_uint8_converter_,
+ yuv420p_bt709_converter_,
+)
+
+__all__ = [
+ "ACESCG_TO_2020",
+ "ACESCG_TO_SRGB",
+ "EXR_CHROMATICITIES",
+ "PRIMARY_MATRIX_TO_2020",
+ "REC709_TO_2020",
+ "SRGB_TO_ACESCG",
+ "ColorRange",
+ "ColorSpace",
+ "FrameConverter",
+ "HlgGpuConverter",
+ "HlgPyAVEncoder",
+ "PixelFormat",
+ "Primaries",
+ "apply_acescg_to_srgb",
+ "apply_srgb_to_acescg",
+ "encode_linear_hdr_frames_to_hlg_mp4",
+ "hlg_inverse_oetf",
+ "rgb_to_yuv",
+ "rgb_to_yuv420",
+ "rgb_to_yuv420p10",
+ "rgb_uint8_converter_",
+ "yuv420p_bt709_converter_",
+]
diff --git a/packages/ltx-core/src/ltx_core/color/audio_mux.py b/packages/ltx-core/src/ltx_core/color/audio_mux.py
new file mode 100644
index 0000000..ab48b0f
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/color/audio_mux.py
@@ -0,0 +1,82 @@
+"""Shared AAC mux helpers for SDR and HLG PyAV encoders."""
+
+from __future__ import annotations
+
+from fractions import Fraction
+
+import av
+import torch
+
+from ltx_core.types import Audio
+
+
+def validate_audio_waveform(audio: Audio) -> None:
+ """Raise ValueError if the waveform is empty or not stereo ``(2, N)`` / ``(N, 2)``."""
+ samples = audio.waveform
+ if samples.numel() == 0:
+ raise ValueError("audio.waveform is empty; pass audio=None for no audio.")
+ if samples.ndim != 2 or 2 not in samples.shape:
+ raise ValueError(f"audio.waveform must be stereo (2, N) or (N, 2); got shape {tuple(samples.shape)}.")
+
+
+def normalize_audio_waveform(samples: torch.Tensor) -> torch.Tensor:
+ """Transpose a validated stereo waveform to channel-last ``(N, 2)``."""
+ return samples.T if samples.shape[1] != 2 else samples
+
+
+def prepare_audio_stream(container: av.container.Container, audio_sample_rate: int) -> av.audio.AudioStream:
+ """Add a stereo AAC stream to ``container``."""
+ audio_stream = container.add_stream("aac", rate=audio_sample_rate)
+ audio_stream.codec_context.sample_rate = audio_sample_rate
+ audio_stream.codec_context.layout = "stereo"
+ audio_stream.codec_context.time_base = Fraction(1, audio_sample_rate)
+ return audio_stream
+
+
+def resample_audio(
+ container: av.container.Container, audio_stream: av.audio.AudioStream, frame_in: av.AudioFrame
+) -> None:
+ """Resample ``frame_in`` to the encoder format and mux packets."""
+ cc = audio_stream.codec_context
+
+ # Use the encoder's format/layout/rate as the *target*
+ target_format = cc.format or "fltp" # AAC → usually fltp
+ target_layout = cc.layout or "stereo"
+ target_rate = cc.sample_rate or frame_in.sample_rate
+
+ audio_resampler = av.audio.resampler.AudioResampler(
+ format=target_format,
+ layout=target_layout,
+ rate=target_rate,
+ )
+
+ audio_next_pts = 0
+ for rframe in audio_resampler.resample(frame_in):
+ if rframe.pts is None:
+ rframe.pts = audio_next_pts
+ audio_next_pts += rframe.samples
+ rframe.sample_rate = frame_in.sample_rate
+ container.mux(audio_stream.encode(rframe))
+
+ # flush audio encoder
+ for packet in audio_stream.encode():
+ container.mux(packet)
+
+
+def write_audio(container: av.container.Container, audio_stream: av.audio.AudioStream, audio: Audio) -> None:
+ """Mux ``audio`` onto an already-open AAC stream."""
+ samples = normalize_audio_waveform(audio.waveform)
+
+ # Convert to int16 packed for ingestion; resampler converts to encoder fmt.
+ if samples.dtype != torch.int16:
+ samples = torch.clip(samples, -1.0, 1.0)
+ samples = (samples * 32767.0).to(torch.int16)
+
+ frame_in = av.AudioFrame.from_ndarray(
+ samples.contiguous().reshape(1, -1).cpu().numpy(),
+ format="s16",
+ layout="stereo",
+ )
+ frame_in.sample_rate = audio.sampling_rate
+
+ resample_audio(container, audio_stream, frame_in)
diff --git a/packages/ltx-core/src/ltx_core/color/hlg.py b/packages/ltx-core/src/ltx_core/color/hlg.py
new file mode 100644
index 0000000..3655e6f
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/color/hlg.py
@@ -0,0 +1,306 @@
+"""In-memory scene-linear HDR frames → BT.2020 / HLG / 10-bit HEVC MP4.
+HLG = Hybrid Log-Gamma (ITU-R BT.2100, OETF per ARIB STD-B67). Output is HEVC Main10,
+yuv420p10le, tagged BT.2020 primaries + arib-std-b67 transfer + bt2020nc matrix, limited
+range.
+Per frame: scene-linear RGB → primaries → BT.2020 → map linear light to HLG scene
+signal (diffuse white at ``white_signal``, highlights rolled toward 1.0) → HLG OETF →
+planar YUV420P10 → PyAV/libx265.
+"""
+
+from __future__ import annotations
+
+import contextlib
+import logging
+import math
+import os
+import threading
+from collections.abc import Iterable, Iterator
+from dataclasses import dataclass
+from fractions import Fraction
+from pathlib import Path
+from queue import Queue
+from typing import Any
+
+import av
+import numpy as np
+import torch
+
+from ltx_core.color.audio_mux import prepare_audio_stream, validate_audio_waveform, write_audio
+from ltx_core.color.primaries import Primaries
+from ltx_core.color.yuv import ColorRange, ColorSpace, rgb_to_yuv420p10
+from ltx_core.types import Audio
+
+logger = logging.getLogger(__name__)
+
+# FFmpeg AVColor* tags not covered by ColorSpace / ColorRange.
+_AV_COLOR_PRIMARIES_BT2020 = 9
+_AV_COLOR_TRC_ARIB_STD_B67 = 18 # HLG
+
+# ARIB STD-B67 (HLG) OETF constants.
+HLG_A, HLG_B, HLG_C = 0.17883277, 0.28466892, 0.55991073
+
+
+def hlg_inverse_oetf(v: float) -> float:
+ """Inverse HLG OETF for a scalar signal value → scene-linear."""
+ return (v * v) / 3.0 if v <= 0.5 else (math.exp((v - HLG_C) / HLG_A) + HLG_B) / 12.0
+
+
+@dataclass
+class HlgGpuConverter:
+ """GPU linear-HDR ``[F,H,W,3]`` → planar uint16 YUV420P10 (BT.2020 / HLG / limited)."""
+
+ prim_mat: torch.Tensor # [3, 3] on device
+ white_x: float
+ roll_k: float
+
+ @classmethod
+ def create(
+ cls,
+ primaries: Primaries = Primaries.REC709,
+ white_signal: float = 0.75,
+ rolloff_k: float | None = None,
+ *,
+ device: torch.device | None = None,
+ dtype: torch.dtype = torch.float32,
+ ) -> HlgGpuConverter:
+ if device is None:
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
+ white_x = hlg_inverse_oetf(white_signal)
+ roll_k = rolloff_k if rolloff_k is not None else white_x / (1.0 - white_x)
+ prim = primaries.matrix_to_rec2020.to(device=device, dtype=dtype)
+ return cls(prim_mat=prim, white_x=float(white_x), roll_k=float(roll_k))
+
+ def to_hlg_signal_(self, rgb_linear_chw: torch.Tensor) -> torch.Tensor:
+ """``(*, 3, H, W)`` scene-linear → HLG signal ``[0, 1]``."""
+ lin = torch.nan_to_num(
+ (rgb_linear_chw.movedim(-3, -1) @ self.prim_mat.T).clamp(min=0.0),
+ nan=0.0,
+ neginf=0.0,
+ )
+ x = torch.where(
+ lin <= 1.0,
+ lin * self.white_x,
+ 1.0 - (1.0 - self.white_x) * torch.exp(-self.roll_k * (lin - 1.0)),
+ )
+ sig = torch.where(
+ x <= 1.0 / 12.0,
+ torch.sqrt((3.0 * x).clamp(min=0.0)),
+ HLG_A * torch.log((12.0 * x - HLG_B).clamp(min=1e-12)) + HLG_C,
+ )
+ return sig.clamp(0.0, 1.0).movedim(-1, -3)
+
+ def __call__(self, frames_fhwc: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
+ """``[F,H,W,3]`` scene-linear → planar uint16 Y, U, V on the same device."""
+ if frames_fhwc.ndim != 4 or frames_fhwc.shape[-1] != 3:
+ raise ValueError(f"expected [F,H,W,3], got {tuple(frames_fhwc.shape)}")
+ x = frames_fhwc.to(device=self.prim_mat.device, dtype=self.prim_mat.dtype)
+ hlg = self.to_hlg_signal_(x.movedim(-1, -3).contiguous())
+ return rgb_to_yuv420p10(hlg, ColorSpace.BT_2020_NCL, ColorRange.MPEG)
+
+
+def _resolve_x265_thread_count(thread_count: int) -> int:
+ """Clamp libx265 threads; ``0`` (auto) can hang on 100+ CPU hosts."""
+ if thread_count > 0:
+ return thread_count
+ return max(1, min(os.cpu_count() or 8, 16))
+
+
+@dataclass
+class HlgPyAVEncoder:
+ """Open PyAV libx265 HLG encoder."""
+
+ container: av.container.OutputContainer
+ stream: av.video.stream.VideoStream
+
+ @classmethod
+ def open(
+ cls,
+ out_path: str | Path,
+ width: int,
+ height: int,
+ fps: float,
+ *,
+ crf: int = 12,
+ preset: str = "ultrafast",
+ thread_count: int = 0,
+ ) -> HlgPyAVEncoder:
+ Path(out_path).parent.mkdir(parents=True, exist_ok=True)
+ threads = _resolve_x265_thread_count(thread_count)
+ container = av.open(str(out_path), mode="w", options={"movflags": "+faststart"})
+ stream = container.add_stream("libx265", rate=Fraction(fps).limit_denominator(1000))
+ stream.width = width
+ stream.height = height
+ stream.pix_fmt = "yuv420p10le"
+ stream.codec_tag = "hvc1"
+ stream.options = {
+ "crf": str(crf),
+ "preset": preset,
+ "x265-params": (
+ "colorprim=bt2020:transfer=arib-std-b67:colormatrix=bt2020nc:range=limited:"
+ f"repeat-headers=1:info=0:pools={threads}:frame-threads=4"
+ ),
+ }
+ ctx = stream.codec_context
+ ctx.thread_count = threads
+ ctx.thread_type = "FRAME"
+ ctx.color_primaries = _AV_COLOR_PRIMARIES_BT2020
+ ctx.color_trc = _AV_COLOR_TRC_ARIB_STD_B67
+ ctx.colorspace = ColorSpace.BT_2020_NCL.av_colorspace
+ ctx.color_range = ColorRange.MPEG.av_color_range
+ return cls(container=container, stream=stream)
+
+ def encode_yuv420p10(self, y: np.ndarray, u: np.ndarray, v: np.ndarray) -> None:
+ """Encode one planar uint16 Y/U/V frame (already BT.2020 HLG limited)."""
+ frame = av.VideoFrame(self.stream.width, self.stream.height, "yuv420p10le")
+ for plane, src in zip(frame.planes, (y, u, v), strict=True):
+ dest = np.frombuffer(plane, dtype=np.uint16).reshape(plane.height, plane.line_size // 2)
+ dest[:, : src.shape[1]] = src
+ frame.colorspace = ColorSpace.BT_2020_NCL.av_colorspace
+ frame.color_range = ColorRange.MPEG.av_color_range
+ for packet in self.stream.encode(frame):
+ self.container.mux(packet)
+
+ def flush(self) -> None:
+ for packet in self.stream.encode():
+ self.container.mux(packet)
+
+ def close(self) -> None:
+ self.flush()
+ self.container.close()
+
+
+def _hlg_encode_planes_threaded(
+ encoder: HlgPyAVEncoder,
+ plane_chunks: Iterator[tuple[np.ndarray, np.ndarray, np.ndarray]],
+ progress_total: int | None = None,
+ *,
+ audio: Audio | None = None,
+ audio_stream: av.audio.AudioStream | None = None,
+) -> int:
+ """libx265-encode planar uint16 chunks on a background thread (1-slot queue)."""
+ chunk_queue: Queue[tuple[np.ndarray, np.ndarray, np.ndarray] | None] = Queue(maxsize=1)
+ encoder_error: list[BaseException] = []
+ n_frames = [0]
+
+ def encoder_worker() -> None:
+ error: BaseException | None = None
+ while True:
+ item = chunk_queue.get()
+ if item is None:
+ break
+ if error is not None:
+ continue
+ try:
+ y_b, u_b, v_b = item
+ for i in range(y_b.shape[0]):
+ encoder.encode_yuv420p10(y_b[i], u_b[i], v_b[i])
+ n_frames[0] += 1
+ except Exception as e:
+ error = e
+ if error is None:
+ try:
+ encoder.flush()
+ if audio is not None and audio_stream is not None:
+ write_audio(encoder.container, audio_stream, audio)
+ encoder.container.close()
+ except Exception as e:
+ error = e
+ else:
+ with contextlib.suppress(Exception):
+ encoder.container.close()
+ if error is not None:
+ encoder_error.append(error)
+
+ encoder_thread = threading.Thread(target=encoder_worker, name="hlg-encoder")
+ encoder_thread.start()
+ try:
+ if progress_total is not None:
+ from tqdm import tqdm # noqa: PLC0415
+
+ plane_chunks = tqdm(plane_chunks, total=progress_total, desc="HLG encode")
+ for item in plane_chunks:
+ chunk_queue.put(item)
+ finally:
+ chunk_queue.put(None)
+ encoder_thread.join()
+
+ if encoder_error:
+ raise encoder_error[0]
+ return n_frames[0]
+
+
+def _as_fhwc_torch(frame: torch.Tensor | np.ndarray) -> torch.Tensor:
+ t = frame.detach() if isinstance(frame, torch.Tensor) else torch.as_tensor(np.asarray(frame))
+ if t.ndim == 3:
+ t = t.unsqueeze(0)
+ if t.shape[-1] != 3 and t.shape[1] == 3:
+ t = t.movedim(1, -1)
+ return t
+
+
+def encode_linear_hdr_frames_to_hlg_mp4( # noqa: PLR0913
+ frames: Iterable[Any],
+ out_path: str | Path,
+ fps: float = 24.0,
+ primaries: Primaries = Primaries.REC709,
+ white_signal: float = 0.75,
+ rolloff_k: float | None = None,
+ crf: int = 12,
+ preset: str = "ultrafast",
+ progress: bool = False,
+ progress_total: int | None = None,
+ thread_count: int = 0,
+ audio: Audio | None = None,
+ device: torch.device | None = None,
+) -> int:
+ """Encode scene-linear HDR frames to BT.2020/HLG/10-bit HEVC mp4 via PyAV.
+ Consumes ``HxWx3`` / ``FxHxWx3`` chunks one at a time. Conversion runs on
+ ``device``; the encoder thread only muxes planar uint16 into libx265.
+ """
+ converter = HlgGpuConverter.create(primaries, white_signal, rolloff_k, device=device)
+
+ it = iter(frames)
+ try:
+ first = next(it)
+ except StopIteration as e:
+ raise ValueError("No HDR frames to encode.") from e
+
+ first_t = _as_fhwc_torch(first)
+ # ``first_t`` is [F,H,W,C]; open() takes (width, height).
+ height, width = int(first_t.shape[1]), int(first_t.shape[2])
+ encoder = HlgPyAVEncoder.open(
+ out_path,
+ width,
+ height,
+ fps,
+ crf=crf,
+ preset=preset,
+ thread_count=thread_count,
+ )
+
+ audio_stream: av.audio.AudioStream | None = None
+ if audio is not None:
+ validate_audio_waveform(audio)
+ audio_stream = prepare_audio_stream(encoder.container, audio.sampling_rate)
+
+ def plane_chunks() -> Iterator[tuple[np.ndarray, np.ndarray, np.ndarray]]:
+ y, u, v = converter(first_t)
+ yield y.cpu().numpy(), u.cpu().numpy(), v.cpu().numpy()
+ for chunk in it:
+ y, u, v = converter(_as_fhwc_torch(chunk))
+ yield y.cpu().numpy(), u.cpu().numpy(), v.cpu().numpy()
+
+ try:
+ n = _hlg_encode_planes_threaded(
+ encoder,
+ plane_chunks(),
+ progress_total=progress_total if progress or progress_total is not None else None,
+ audio=audio,
+ audio_stream=audio_stream,
+ )
+ except Exception:
+ Path(out_path).unlink(missing_ok=True)
+ raise
+ if progress:
+ logger.info(" %d frames", n)
+ return n
diff --git a/packages/ltx-core/src/ltx_core/color/primaries.py b/packages/ltx-core/src/ltx_core/color/primaries.py
new file mode 100644
index 0000000..aa22acf
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/color/primaries.py
@@ -0,0 +1,125 @@
+"""Linear primaries: gamut basis, conversion, and EXR chromaticity tags.
+Shared by the VAE HDR working-space path (AP1 ↔ Rec.709) and the HLG encode
+path (Rec.709 / ACEScg → Rec.2020).
+"""
+
+from __future__ import annotations
+
+import enum
+
+import torch
+from torch import Tensor
+
+# ACEScg (AP1, D60-adapted) linear → linear sRGB / Rec.709 (D65) primaries.
+_ACESCG_TO_SRGB = torch.tensor(
+ [
+ [1.70505000, -0.62179000, -0.08326000],
+ [-0.13026000, 1.14080000, -0.01055000],
+ [-0.02400000, -0.12897000, 1.15297000],
+ ],
+ dtype=torch.float32,
+)
+
+# Exact inverse of ``_ACESCG_TO_SRGB`` (float64) for a clean round-trip.
+_SRGB_TO_ACESCG = torch.linalg.inv(_ACESCG_TO_SRGB.double()).to(torch.float32)
+
+# Rec.709 (D65) → Rec.2020 (D65) (ITU-R BT.2087).
+_REC709_TO_2020 = torch.tensor(
+ [
+ [0.62740389, 0.32928304, 0.04331307],
+ [0.06909729, 0.91954040, 0.01136232],
+ [0.01639144, 0.08801331, 0.89559525],
+ ],
+ dtype=torch.float32,
+)
+
+# ACEScg (AP1, D60) → Rec.2020 (D65), Bradford CAT.
+_ACESCG_TO_2020 = torch.tensor(
+ [
+ [1.02582475, -0.02005319, -0.00577156],
+ [-0.00223437, 1.00458650, -0.00235213],
+ [-0.00501335, -0.02529007, 1.03030342],
+ ],
+ dtype=torch.float32,
+)
+
+# Public matrix aliases (tests / advanced callers). Prefer ``Primaries.to``.
+ACESCG_TO_SRGB = _ACESCG_TO_SRGB
+SRGB_TO_ACESCG = _SRGB_TO_ACESCG
+REC709_TO_2020 = _REC709_TO_2020
+ACESCG_TO_2020 = _ACESCG_TO_2020
+
+
+def _apply_primaries_matrix(video: Tensor, mat: Tensor) -> Tensor:
+ """Apply a 3x3 primaries matrix. Channel axis: dim 1 for 5D, else ``..., C, H, W``."""
+ mat = mat.to(device=video.device, dtype=video.dtype)
+ if video.ndim == 5:
+ return torch.einsum("bcfhw,dc->bdfhw", video, mat)
+ return torch.einsum("...chw,dc->...dhw", video, mat)
+
+
+class Primaries(enum.Enum):
+ """Authoring / working-space colour primaries (linear light).
+ Rec.2020 is a conversion *target* (HLG master), not an EXR authoring case —
+ use :meth:`to_rec2020`.
+ """
+
+ REC709 = "rec709"
+ ACESCG = "acescg"
+
+ @property
+ def exr_chromaticities(self) -> tuple[float, ...]:
+ """EXR ``chromaticities`` header (R/G/B/W x,y)."""
+ match self:
+ case Primaries.REC709:
+ return (0.64, 0.33, 0.30, 0.60, 0.15, 0.06, 0.3127, 0.3290)
+ case Primaries.ACESCG:
+ return (0.713, 0.293, 0.165, 0.830, 0.128, 0.044, 0.32168, 0.33767)
+
+ @property
+ def matrix_to_rec2020(self) -> Tensor:
+ """3x3 linear map from this basis to Rec.2020 (for HLG)."""
+ match self:
+ case Primaries.REC709:
+ return _REC709_TO_2020
+ case Primaries.ACESCG:
+ return _ACESCG_TO_2020
+
+ def to(self, target: Primaries, video: Tensor) -> Tensor:
+ """Convert linear light from this basis into ``target``. Identity when same."""
+ if self is target:
+ return video
+ match (self, target):
+ case (Primaries.REC709, Primaries.ACESCG):
+ return _apply_primaries_matrix(video, _SRGB_TO_ACESCG)
+ case (Primaries.ACESCG, Primaries.REC709):
+ return _apply_primaries_matrix(video, _ACESCG_TO_SRGB)
+ raise ValueError(f"No primaries conversion from {self!r} to {target!r}.")
+
+ def to_rec2020(self, video: Tensor) -> Tensor:
+ """Linear light in this basis → Rec.2020 (HLG master space)."""
+ return _apply_primaries_matrix(video, self.matrix_to_rec2020)
+
+
+# Back-compat helpers used by older call sites / re-exports.
+def apply_acescg_to_srgb(video: Tensor) -> Tensor:
+ """Linear ACEScg (AP1) → linear sRGB/Rec.709 primaries."""
+ return Primaries.ACESCG.to(Primaries.REC709, video)
+
+
+def apply_srgb_to_acescg(video: Tensor) -> Tensor:
+ """Linear sRGB/Rec.709 → linear ACEScg (AP1) primaries."""
+ return Primaries.REC709.to(Primaries.ACESCG, video)
+
+
+# String-keyed maps for EXR tag lookup / transitional call sites.
+# Prefer ``Primaries.matrix_to_rec2020`` / ``Primaries.exr_chromaticities``.
+PRIMARY_MATRIX_TO_2020 = {
+ Primaries.REC709.value: REC709_TO_2020,
+ Primaries.ACESCG.value: ACESCG_TO_2020,
+}
+
+EXR_CHROMATICITIES = {
+ Primaries.REC709.value: Primaries.REC709.exr_chromaticities,
+ Primaries.ACESCG.value: Primaries.ACESCG.exr_chromaticities,
+}
diff --git a/packages/ltx-core/src/ltx_core/color/yuv.py b/packages/ltx-core/src/ltx_core/color/yuv.py
new file mode 100644
index 0000000..d3185a5
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/color/yuv.py
@@ -0,0 +1,228 @@
+"""GPU RGB→YUV420 packing for PyAV video encode (SDR 8-bit and HDR 10-bit).
+Shared by ltx-pipelines and ltx-trainer. Runs between the VAE decoder (float RGB
+chunks) and encode / HLG paths, bypassing pyav's CPU-side libswscale.
+``FrameConverter`` also carries codec metadata (pixel format, colour space,
+colour range).
+"""
+
+from __future__ import annotations
+
+import enum
+
+import torch
+
+
+class ColorSpace(enum.Enum):
+ """YUV color space standard."""
+
+ BT_709 = "bt709"
+ BT_2020_NCL = "bt2020ncl"
+
+ @property
+ def av_colorspace(self) -> int:
+ """FFmpeg ``AVCOL_SPC_*`` constant for ``codec_context.colorspace``."""
+ return _AV_COLORSPACE[self]
+
+
+class ColorRange(enum.Enum):
+ """YUV color range."""
+
+ MPEG = "mpeg"
+ JPEG = "jpeg"
+
+ @property
+ def av_color_range(self) -> int:
+ """FFmpeg ``AVCOL_RANGE_*`` constant for ``codec_context.color_range``."""
+ return _AV_COLOR_RANGE[self]
+
+
+class PixelFormat(enum.Enum):
+ """Pixel format for video frames."""
+
+ RGB24 = "rgb24"
+ YUV420P = "yuv420p"
+
+ @property
+ def av_format(self) -> str:
+ """PyAV format string for ``VideoFrame.from_ndarray``."""
+ return self.value
+
+
+_AV_COLORSPACE = {
+ ColorSpace.BT_709: 1, # AVCOL_SPC_BT709
+ ColorSpace.BT_2020_NCL: 9, # AVCOL_SPC_BT2020_NCL
+}
+
+_AV_COLOR_RANGE = {
+ ColorRange.MPEG: 1, # AVCOL_RANGE_MPEG (limited)
+ ColorRange.JPEG: 2, # AVCOL_RANGE_JPEG (full)
+}
+
+_KR_2020, _KG_2020, _KB_2020 = 0.2627, 0.6780, 0.0593
+_COLOR_SPACE_MATRICES = {
+ ColorSpace.BT_709: torch.tensor(
+ [
+ [0.2126, 0.7152, 0.0722],
+ [-0.1146, -0.3854, 0.5],
+ [0.5, -0.4542, -0.0458],
+ ],
+ dtype=torch.float32,
+ ),
+ ColorSpace.BT_2020_NCL: torch.tensor(
+ [
+ [_KR_2020, _KG_2020, _KB_2020],
+ [-_KR_2020 / 1.8814, -_KG_2020 / 1.8814, 0.5],
+ [0.5, -_KG_2020 / 1.4746, -_KB_2020 / 1.4746],
+ ],
+ dtype=torch.float32,
+ ),
+}
+
+
+def _require_rgb_chw(image: torch.Tensor) -> None:
+ if image.ndim < 3 or image.shape[-3] != 3:
+ raise ValueError(f"Input size must have a shape of (*, 3, H, W). Got {image.shape}")
+
+
+def rgb_to_yuv(image: torch.Tensor, color_space: ColorSpace) -> torch.Tensor:
+ """RGB ``[0, 1]`` ``(*, 3, H, W)`` → YUV ``(*, 3, H, W)``."""
+ _require_rgb_chw(image)
+ mat = _COLOR_SPACE_MATRICES[color_space].to(device=image.device, dtype=image.dtype)
+ pixels = image.movedim(-3, -1)
+ return (pixels @ mat.T).movedim(-1, -3)
+
+
+def apply_color_range_(
+ y: torch.Tensor,
+ uv: torch.Tensor,
+ color_range: ColorRange,
+ *,
+ bits: int = 8,
+) -> tuple[torch.Tensor, torch.Tensor]:
+ """Scale Y/UV to 8- or 10-bit code levels in-place.
+ MPEG uses ``(219 * E' + 16) * 2^(bits-8)`` for Y and
+ ``(224 * E' + 128) * 2^(bits-8)`` for Cb/Cr.
+ """
+ if bits not in (8, 10):
+ raise ValueError(f"Unsupported bit depth: {bits}")
+ factor = 1 << (bits - 8)
+ if color_range == ColorRange.MPEG:
+ y.mul_(219 * factor).add_(16 * factor)
+ uv.mul_(224 * factor).add_(128 * factor)
+ elif color_range == ColorRange.JPEG:
+ max_code = (1 << bits) - 1
+ y.mul_(max_code)
+ uv.add_(0.5).mul_(max_code)
+ else:
+ raise ValueError(f"Unsupported color range: {color_range}")
+ return y, uv
+
+
+def apply_color_range_10bit_(
+ y: torch.Tensor, uv: torch.Tensor, color_range: ColorRange
+) -> tuple[torch.Tensor, torch.Tensor]:
+ """Scale Y/UV to 10-bit code levels in-place."""
+ return apply_color_range_(y, uv, color_range, bits=10)
+
+
+def _rgb_to_yuv420_unit(image: torch.Tensor, color_space: ColorSpace) -> tuple[torch.Tensor, torch.Tensor]:
+ """RGB ``[0,1]`` → Y ``[0,1]`` + UV centered at 0, 4:2:0 (no code levels)."""
+ _require_rgb_chw(image)
+ if image.shape[-2] % 2 != 0 or image.shape[-1] % 2 != 0:
+ raise ValueError(f"Input H and W must be divisible by 2. Got {image.shape}")
+
+ yuv = rgb_to_yuv(image, color_space)
+ y = yuv[..., :1, :, :]
+ uv_full = yuv[..., 1:3, :, :].contiguous()
+ lead = uv_full.shape[:-3]
+ uv_flat = uv_full.reshape(-1, 2, uv_full.shape[-2], uv_full.shape[-1])
+ uv = torch.nn.functional.avg_pool2d(uv_flat, kernel_size=2, stride=2)
+ return y, uv.reshape(*lead, 2, uv.shape[-2], uv.shape[-1])
+
+
+def rgb_to_yuv420(
+ image: torch.Tensor, color_space: ColorSpace, color_range: ColorRange
+) -> tuple[torch.Tensor, torch.Tensor]:
+ """RGB ``(*, 3, H, W)`` → 8-bit-level Y / UV 4:2:0."""
+ y, uv = _rgb_to_yuv420_unit(image, color_space)
+ return apply_color_range_(y, uv, color_range)
+
+
+def rgb_to_yuv420p10(
+ image: torch.Tensor, color_space: ColorSpace, color_range: ColorRange
+) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
+ """RGB float ``[0, 1]`` ``(*, 3, H, W)`` → planar uint16 Y, U, V (yuv420p10)."""
+ y, uv = _rgb_to_yuv420_unit(image, color_space)
+ apply_color_range_(y, uv, color_range, bits=10)
+ return yuv420_planes_u16(y, uv)
+
+
+def pack_i420(y: torch.Tensor, uv: torch.Tensor) -> torch.Tensor:
+ """Pack Y + UV into I420 ``(*, H*3//2, W)`` uint8 for PyAV."""
+ y_plane = y[..., 0, :, :]
+ uv_packed = uv.reshape(*uv.shape[:-3], uv.shape[-2], uv.shape[-1] * 2)
+ return torch.cat([y_plane, uv_packed], dim=-2).clamp_(0, 255).to(torch.uint8)
+
+
+def yuv420_planes_u16(y: torch.Tensor, uv: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
+ """Split 10-bit Y/UV code levels into planar ``uint16`` Y, U, V."""
+ y16 = y[..., 0, :, :].round_().clamp_(0, 1023).to(torch.uint16)
+ u16 = uv[..., 0, :, :].round_().clamp_(0, 1023).to(torch.uint16)
+ v16 = uv[..., 1, :, :].round_().clamp_(0, 1023).to(torch.uint16)
+ return y16, u16, v16
+
+
+def _rgb_uint8_fn_(frames: torch.Tensor) -> torch.Tensor:
+ return frames.clamp_(0.0, 1.0).mul_(255.0).to(torch.uint8).movedim(-3, -1)
+
+
+def _yuv420p_bt709_fn_(frames: torch.Tensor) -> torch.Tensor:
+ y, uv = rgb_to_yuv420(frames, ColorSpace.BT_709, ColorRange.MPEG)
+ return pack_i420(y, uv)
+
+
+class FrameConverter(enum.Enum):
+ """Converts ``[*, C, H, W]`` float ``[0, 1]`` frames for encode.
+ Carries encoding metadata so the caller can tag the output stream.
+ ``__call__`` **may mutate** its input (aliases keep the trailing-underscore
+ convention: ``rgb_uint8_converter_``, ``yuv420p_bt709_converter_``).
+ HLG / 10-bit packing stays in ``hlg`` — not a case here.
+ """
+
+ RGB24 = "rgb24"
+ YUV420P_BT709 = "yuv420p_bt709"
+
+ def __call__(self, frames: torch.Tensor) -> torch.Tensor:
+ match self:
+ case FrameConverter.RGB24:
+ return _rgb_uint8_fn_(frames)
+ case FrameConverter.YUV420P_BT709:
+ return _yuv420p_bt709_fn_(frames)
+
+ @property
+ def pixel_format(self) -> PixelFormat:
+ match self:
+ case FrameConverter.RGB24:
+ return PixelFormat.RGB24
+ case FrameConverter.YUV420P_BT709:
+ return PixelFormat.YUV420P
+
+ @property
+ def color_space(self) -> ColorSpace | None:
+ match self:
+ case FrameConverter.RGB24:
+ return None
+ case FrameConverter.YUV420P_BT709:
+ return ColorSpace.BT_709
+
+ @property
+ def color_range(self) -> ColorRange | None:
+ match self:
+ case FrameConverter.RGB24:
+ return None
+ case FrameConverter.YUV420P_BT709:
+ return ColorRange.MPEG
+
+
+rgb_uint8_converter_ = FrameConverter.RGB24
+yuv420p_bt709_converter_ = FrameConverter.YUV420P_BT709
diff --git a/packages/ltx-core/src/ltx_core/components/__init__.py b/packages/ltx-core/src/ltx_core/components/__init__.py
index c1cb638..29794e9 100644
--- a/packages/ltx-core/src/ltx_core/components/__init__.py
+++ b/packages/ltx-core/src/ltx_core/components/__init__.py
@@ -1,7 +1,7 @@
"""
Diffusion pipeline components.
Submodules:
- diffusion_steps - Diffusion stepping algorithms (EulerDiffusionStep)
+ diffusion_steps - Diffusion stepping algorithms (EulerDiffusionStep, EulerAncestralDiffusionStep)
guiders - Guidance strategies (CFGGuider, STGGuider, APG variants)
noisers - Noise samplers (GaussianNoiser)
patchifiers - Latent patchification (VideoLatentPatchifier, AudioPatchifier)
diff --git a/packages/ltx-core/src/ltx_core/components/diffusion_steps.py b/packages/ltx-core/src/ltx_core/components/diffusion_steps.py
index 9d83e82..fea46f5 100644
--- a/packages/ltx-core/src/ltx_core/components/diffusion_steps.py
+++ b/packages/ltx-core/src/ltx_core/components/diffusion_steps.py
@@ -40,6 +40,72 @@ class EulerDiffusionStep(DiffusionStepProtocol):
return (sample.to(torch.float32) + velocity.to(torch.float32) * dt).to(sample.dtype)
+class EulerAncestralDiffusionStep(DiffusionStepProtocol):
+ """Ancestral (SDE) Euler step for rectified-flow models.
+ Each step advances deterministically to an intermediate noise level
+ ``sigma_down <= sigma_next`` and then renoises back up to ``sigma_next``,
+ rescaling the signal component by ``alpha_next / alpha_down`` so the
+ transition stays variance-preserving. ``eta`` interpolates between a plain
+ Euler step (``eta=0``, ``sigma_down == sigma_next``, no noise added) and a
+ fully ancestral step (``eta=1``).
+ This is the rectified-flow parameterization (``alpha = 1 - sigma``), which
+ is the one that applies to LTX-2. It deliberately does **not** reuse
+ :func:`_get_ancestral_step`: that helper implements the DDIM/variance-
+ exploding ancestral coefficients, which give a different ``sigma_down`` and
+ a different amount of injected noise for the same ``eta``. The two agree
+ only at ``eta=0``.
+ """
+
+ def __init__(self, eta: float = 1.0, s_noise: float = 1.0) -> None:
+ self.eta = eta
+ self.s_noise = s_noise
+
+ def step(
+ self,
+ sample: torch.Tensor,
+ denoised_sample: torch.Tensor,
+ sigmas: torch.Tensor,
+ step_index: int,
+ noise: torch.Tensor | None = None,
+ **_kwargs,
+ ) -> torch.Tensor:
+ """Advance one ancestral Euler step.
+ Args:
+ sample: Current noisy latent x_t.
+ denoised_sample: Denoised prediction x_0.
+ sigmas: Full sigma schedule tensor.
+ step_index: Current step index.
+ noise: Noise tensor for the renoise term. Required when ``eta > 0``;
+ unused (and may be ``None``) when ``eta == 0``.
+ Returns:
+ Updated latent x_{t-1}, or ``denoised_sample`` when the next sigma is 0.
+ """
+ sigma = sigmas[step_index].to(torch.float32)
+ sigma_next = sigmas[step_index + 1].to(torch.float32)
+ if sigma_next == 0:
+ return denoised_sample.to(sample.dtype)
+ if self.eta > 0 and noise is None:
+ raise ValueError("EulerAncestralDiffusionStep requires a noise tensor when eta > 0")
+
+ x = sample.to(torch.float32)
+ denoised = denoised_sample.to(torch.float32)
+
+ downstep_ratio = 1.0 + (sigma_next / sigma - 1.0) * self.eta
+ sigma_down = sigma_next * downstep_ratio
+
+ # Euler step to sigma_down, expressed as an interpolation between x and x_0.
+ sigma_down_ratio = sigma_down / sigma
+ x_next = sigma_down_ratio * x + (1.0 - sigma_down_ratio) * denoised
+
+ if self.eta > 0:
+ # Renoise from sigma_down back up to sigma_next.
+ alpha_next = 1.0 - sigma_next
+ alpha_down = 1.0 - sigma_down
+ renoise_coeff = (sigma_next**2 - sigma_down**2 * alpha_next**2 / alpha_down**2).clamp(min=0) ** 0.5
+ x_next = (alpha_next / alpha_down) * x_next + noise.to(torch.float32) * self.s_noise * renoise_coeff
+ return x_next.to(sample.dtype)
+
+
class Res2sDiffusionStep(DiffusionStepProtocol):
"""
Second-order diffusion step for res_2s sampling with SDE noise injection.
diff --git a/packages/ltx-core/src/ltx_core/conditioning/__init__.py b/packages/ltx-core/src/ltx_core/conditioning/__init__.py
index 8d3eb9f..6ef2982 100644
--- a/packages/ltx-core/src/ltx_core/conditioning/__init__.py
+++ b/packages/ltx-core/src/ltx_core/conditioning/__init__.py
@@ -9,6 +9,7 @@ from ltx_core.conditioning.types import (
VideoConditionByLatentIndex,
VideoConditionByMask,
VideoConditionByReferenceLatent,
+ VideoGeneratedKeyframeSlots,
)
__all__ = [
@@ -20,4 +21,5 @@ __all__ = [
"VideoConditionByLatentIndex",
"VideoConditionByMask",
"VideoConditionByReferenceLatent",
+ "VideoGeneratedKeyframeSlots",
]
diff --git a/packages/ltx-core/src/ltx_core/conditioning/mask_utils.py b/packages/ltx-core/src/ltx_core/conditioning/mask_utils.py
index 57945f4..3a4fc54 100644
--- a/packages/ltx-core/src/ltx_core/conditioning/mask_utils.py
+++ b/packages/ltx-core/src/ltx_core/conditioning/mask_utils.py
@@ -73,6 +73,40 @@ def resolve_cross_mask(
return mask
+def extend_keyframes_mask(
+ latent_state: LatentState,
+ num_new_tokens: int,
+ *,
+ marked: bool,
+) -> torch.Tensor | None:
+ """Extend :attr:`LatentState.keyframes_mask` to cover newly appended tokens.
+ Every conditioning item that appends tokens must call this, otherwise the per-token marker
+ goes out of sync with the token sequence -- or is dropped entirely by items that build a fresh
+ :class:`LatentState` instead of using :func:`dataclasses.replace`.
+ Args:
+ latent_state: State being extended.
+ num_new_tokens: Number of tokens the item appends.
+ marked: Whether the new tokens encode a single standalone pixel frame in the *generated*
+ stream. True only for generated keyframe slots; given-content conditioning tokens
+ (image guidance, reference latents) are never marked, matching the reference
+ implementation, which marks only the keyframe conditioning methods.
+ Returns:
+ The extended mask, or ``None`` when there was no mask and the new tokens are unmarked.
+ """
+ existing = latent_state.keyframes_mask
+ if existing is None and not marked:
+ return None
+ if existing is None:
+ existing = torch.zeros_like(latent_state.denoise_mask)
+ new = torch.ones if marked else torch.zeros
+ pad = new(
+ (existing.shape[0], num_new_tokens, existing.shape[2]),
+ device=existing.device,
+ dtype=existing.dtype,
+ )
+ return torch.cat([existing, pad], dim=1)
+
+
def update_attention_mask(
latent_state: LatentState,
attention_mask: float | torch.Tensor | None,
diff --git a/packages/ltx-core/src/ltx_core/conditioning/types/__init__.py b/packages/ltx-core/src/ltx_core/conditioning/types/__init__.py
index bd8d962..a22c633 100644
--- a/packages/ltx-core/src/ltx_core/conditioning/types/__init__.py
+++ b/packages/ltx-core/src/ltx_core/conditioning/types/__init__.py
@@ -2,6 +2,7 @@
from ltx_core.conditioning.types.attention_strength_wrapper import ConditioningItemAttentionStrengthWrapper
from ltx_core.conditioning.types.keyframe_cond import VideoConditionByKeyframeIndex
+from ltx_core.conditioning.types.keyframe_slots import VideoGeneratedKeyframeSlots
from ltx_core.conditioning.types.latent_cond import VideoConditionByLatentIndex
from ltx_core.conditioning.types.mask_cond import VideoConditionByMask
from ltx_core.conditioning.types.reference_audio_cond import AudioConditionByReferenceLatent
@@ -14,4 +15,5 @@ __all__ = [
"VideoConditionByLatentIndex",
"VideoConditionByMask",
"VideoConditionByReferenceLatent",
+ "VideoGeneratedKeyframeSlots",
]
diff --git a/packages/ltx-core/src/ltx_core/conditioning/types/keyframe_cond.py b/packages/ltx-core/src/ltx_core/conditioning/types/keyframe_cond.py
index ba009cd..2c8c18a 100644
--- a/packages/ltx-core/src/ltx_core/conditioning/types/keyframe_cond.py
+++ b/packages/ltx-core/src/ltx_core/conditioning/types/keyframe_cond.py
@@ -2,7 +2,7 @@ import torch
from ltx_core.components.patchifiers import get_pixel_coords
from ltx_core.conditioning.item import ConditioningItem
-from ltx_core.conditioning.mask_utils import update_attention_mask
+from ltx_core.conditioning.mask_utils import extend_keyframes_mask, update_attention_mask
from ltx_core.tools import VideoLatentTools
from ltx_core.types import LatentState, VideoLatentShape
@@ -81,4 +81,10 @@ class VideoConditionByKeyframeIndex(ConditioningItem):
positions=torch.cat([latent_state.positions, positions], dim=2),
clean_latent=torch.cat([latent_state.clean_latent, tokens], dim=1),
attention_mask=new_attention_mask,
+ # Given keyframe content is ordinary image guidance, not a generated keyframe slot, so
+ # it carries no keyframe marker.
+ keyframes_mask=extend_keyframes_mask(latent_state, tokens.shape[1], marked=False),
+ generated_keyframe_layout=latent_state.generated_keyframe_layout,
+ generated_keyframes=latent_state.generated_keyframes,
+ frozen=latent_state.frozen,
)
diff --git a/packages/ltx-core/src/ltx_core/conditioning/types/keyframe_slots.py b/packages/ltx-core/src/ltx_core/conditioning/types/keyframe_slots.py
new file mode 100644
index 0000000..99f4904
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/conditioning/types/keyframe_slots.py
@@ -0,0 +1,174 @@
+"""Generated keyframe slots: extra single-pixel-frame tokens denoised with the target.
+Unlike every other conditioning item, this one supplies no content by default. It appends empty,
+fully-denoised token slots whose RoPE position marks a single interior pixel frame, letting the
+model generate additional frames at those positions and condition the surrounding video on them.
+That relaxes the effective temporal compression ratio at those positions, at the cost of one
+latent frame's worth of tokens per keyframe (which buys 1 pixel frame instead of the usual 8).
+Optional ``initial_keyframes`` seeds the appended ``latent`` tokens (not ``clean_latent``) so the
+noiser can lerp from that content when ``denoise_mask=1`` (``clean`` is ignored at mask 1).
+Requires a checkpoint trained for it -- one whose transformer config sets
+``use_keyframes_abs_pos_embedding``. On any other checkpoint the learned marker does not exist,
+so the slots would be denoised as unmarked tokens and the extra compute would be wasted;
+pipelines validate this up front rather than silently degrading.
+"""
+
+import itertools
+from collections.abc import Sequence
+
+import torch
+
+from ltx_core.components.patchifiers import get_pixel_coords
+from ltx_core.conditioning.item import ConditioningItem
+from ltx_core.conditioning.mask_utils import extend_keyframes_mask, update_attention_mask
+from ltx_core.tools import VideoLatentTools
+from ltx_core.types import GeneratedKeyframeLayout, LatentState
+
+
+class VideoGeneratedKeyframeSlots(ConditioningItem):
+ """Appends fully-denoised keyframe slots at the given target pixel-frame indices.
+ Each slot occupies one latent frame's worth of tokens at the target's spatial resolution, with
+ ``denoise_mask = 1`` so the noiser fills it from the slot ``latent`` (zeros, or
+ ``initial_keyframes`` when provided) and the denoising loop generates its content. The slot is
+ marked in ``keyframes_mask`` so it receives the model's learned keyframe absolute-position
+ embedding.
+ Deliberately separate from :class:`VideoConditionByKeyframeIndex`, which appends *given*
+ keyframe content for ordinary image guidance and must not be marked: the reference
+ implementation only sets the keyframe marker for the keyframe conditioning methods, not for
+ plain image / first-and-last-frame conditioning.
+ All slots are appended by a single item so the resulting token range is contiguous and can be
+ recorded as one :class:`GeneratedKeyframeLayout`.
+ Args:
+ pixel_frame_indices: Target pixel-frame index for each slot. Must be non-empty, strictly
+ increasing, and within the target's frame range.
+ initial_keyframes: Optional ``(B, C, K, H, W)`` latent content written into the appended
+ ``latent`` tokens before noising. ``K`` must equal ``len(pixel_frame_indices)``.
+ """
+
+ def __init__(
+ self,
+ pixel_frame_indices: Sequence[int],
+ initial_keyframes: torch.Tensor | None = None,
+ ):
+ indices = tuple(int(index) for index in pixel_frame_indices)
+ if not indices:
+ raise ValueError("pixel_frame_indices must be non-empty")
+ if any(index < 0 for index in indices):
+ raise ValueError(f"pixel_frame_indices must be non-negative, got {indices}")
+ if any(b <= a for a, b in itertools.pairwise(indices)):
+ raise ValueError(f"pixel_frame_indices must be strictly increasing, got {indices}")
+ if initial_keyframes is not None:
+ if initial_keyframes.ndim != 5:
+ raise ValueError(
+ f"initial_keyframes must have shape (B, C, K, H, W), got {tuple(initial_keyframes.shape)}"
+ )
+ if initial_keyframes.shape[2] != len(indices):
+ raise ValueError(
+ f"initial_keyframes K={initial_keyframes.shape[2]} must match {len(indices)} pixel_frame_indices"
+ )
+ self.pixel_frame_indices = indices
+ self.initial_keyframes = initial_keyframes
+
+ def apply_to(
+ self,
+ latent_state: LatentState,
+ latent_tools: VideoLatentTools,
+ ) -> LatentState:
+ num_pixel_frames = latent_tools.target_shape.upscale(latent_tools.scale_factors).frames
+ if self.pixel_frame_indices[-1] >= num_pixel_frames:
+ raise ValueError(
+ f"Generated keyframe at pixel frame {self.pixel_frame_indices[-1]} is outside the target's "
+ f"{num_pixel_frames} frames"
+ )
+
+ frame_shape = latent_tools.target_shape._replace(frames=1)
+ tokens_per_keyframe = latent_tools.patchifier.get_token_count(frame_shape)
+ device = latent_state.latent.device
+ dtype = latent_state.latent.dtype
+
+ positions = torch.cat(
+ [self._slot_positions(index, latent_tools, device) for index in self.pixel_frame_indices],
+ dim=2,
+ )
+
+ num_new_tokens = tokens_per_keyframe * len(self.pixel_frame_indices)
+ batch_size = latent_state.latent.shape[0]
+ if self.initial_keyframes is None:
+ slot_tokens = torch.zeros(
+ batch_size, num_new_tokens, latent_state.latent.shape[2], device=device, dtype=dtype
+ )
+ else:
+ initials = self.initial_keyframes.to(device=device, dtype=dtype)
+ if initials.shape[0] != batch_size:
+ raise ValueError(
+ f"initial_keyframes batch {initials.shape[0]} does not match latent batch {batch_size}"
+ )
+ expected_hw = (latent_tools.target_shape.height, latent_tools.target_shape.width)
+ if (initials.shape[3], initials.shape[4]) != expected_hw:
+ raise ValueError(
+ f"initial_keyframes spatial size {(initials.shape[3], initials.shape[4])} does not match "
+ f"target latent spatial size {expected_hw}"
+ )
+ slot_tokens = torch.cat(
+ [
+ latent_tools.patchifier.patchify(initials[:, :, index : index + 1])
+ for index in range(initials.shape[2])
+ ],
+ dim=1,
+ )
+ # denoise_mask 1 => the noiser lerps slot latent toward noise (clean_latent is ignored).
+ denoise_mask = torch.ones(batch_size, num_new_tokens, 1, device=device, dtype=latent_state.denoise_mask.dtype)
+
+ keyframes_mask = extend_keyframes_mask(latent_state, num_new_tokens, marked=True)
+
+ new_attention_mask = update_attention_mask(
+ latent_state=latent_state,
+ attention_mask=None,
+ num_noisy_tokens=latent_tools.target_shape.token_count(),
+ num_new_tokens=num_new_tokens,
+ batch_size=batch_size,
+ device=device,
+ dtype=dtype,
+ )
+
+ if latent_state.generated_keyframe_layout is not None:
+ raise ValueError("Generated keyframe slots were already applied to this state; use a single item")
+
+ return LatentState(
+ latent=torch.cat([latent_state.latent, slot_tokens], dim=1),
+ denoise_mask=torch.cat([latent_state.denoise_mask, denoise_mask], dim=1),
+ positions=torch.cat([latent_state.positions, positions], dim=2),
+ clean_latent=torch.cat([latent_state.clean_latent, torch.zeros_like(slot_tokens)], dim=1),
+ attention_mask=new_attention_mask,
+ keyframes_mask=keyframes_mask,
+ generated_keyframe_layout=GeneratedKeyframeLayout(
+ pixel_frame_indices=self.pixel_frame_indices,
+ tokens_per_keyframe=tokens_per_keyframe,
+ first_token=latent_state.latent.shape[1],
+ ),
+ generated_keyframes=latent_state.generated_keyframes,
+ frozen=latent_state.frozen,
+ )
+
+ @staticmethod
+ def _slot_positions(
+ pixel_frame_index: int,
+ latent_tools: VideoLatentTools,
+ device: torch.device,
+ ) -> torch.Tensor:
+ """Positions for one slot: full spatial grid, temporal span exactly ``[t, t + 1)``.
+ The single-pixel-frame temporal extent is what distinguishes a slot from a regular latent
+ frame (which spans ``temporal_scale_factor`` pixel frames) in RoPE space.
+ """
+ frame_shape = latent_tools.target_shape._replace(frames=1)
+ latent_coords = latent_tools.patchifier.get_patch_grid_bounds(output_shape=frame_shape, device=device)
+ positions = get_pixel_coords(
+ latent_coords=latent_coords,
+ scale_factors=latent_tools.scale_factors,
+ # causal_fix collapses frame 0's span to a single frame; here the span is set
+ # explicitly below, so it must not also be applied.
+ causal_fix=False,
+ ).to(dtype=torch.float32)
+ positions[:, 0, ...] = float(pixel_frame_index)
+ positions[:, 0, ..., 1:] = positions[:, 0, ..., :1] + 1
+ positions[:, 0, ...] /= latent_tools.fps
+ return positions
diff --git a/packages/ltx-core/src/ltx_core/conditioning/types/reference_audio_cond.py b/packages/ltx-core/src/ltx_core/conditioning/types/reference_audio_cond.py
index 6c63db5..3427025 100644
--- a/packages/ltx-core/src/ltx_core/conditioning/types/reference_audio_cond.py
+++ b/packages/ltx-core/src/ltx_core/conditioning/types/reference_audio_cond.py
@@ -4,7 +4,7 @@ from __future__ import annotations
import torch
-from ltx_core.conditioning.mask_utils import update_attention_mask
+from ltx_core.conditioning.mask_utils import extend_keyframes_mask, update_attention_mask
from ltx_core.tools import LatentTools
from ltx_core.types import LatentState
@@ -56,4 +56,10 @@ class AudioConditionByReferenceLatent:
positions=torch.cat([latent_state.positions, self.positions], dim=2),
clean_latent=torch.cat([latent_state.clean_latent, tokens], dim=1),
attention_mask=new_attention_mask,
+ # Audio states carry no keyframe marker, so this resolves to None; called anyway to keep
+ # the invariant that every appending conditioning item extends the per-token fields.
+ keyframes_mask=extend_keyframes_mask(latent_state, tokens.shape[1], marked=False),
+ generated_keyframe_layout=latent_state.generated_keyframe_layout,
+ generated_keyframes=latent_state.generated_keyframes,
+ frozen=latent_state.frozen,
)
diff --git a/packages/ltx-core/src/ltx_core/conditioning/types/reference_video_cond.py b/packages/ltx-core/src/ltx_core/conditioning/types/reference_video_cond.py
index 51e3463..9e9f234 100644
--- a/packages/ltx-core/src/ltx_core/conditioning/types/reference_video_cond.py
+++ b/packages/ltx-core/src/ltx_core/conditioning/types/reference_video_cond.py
@@ -4,7 +4,7 @@ import torch
from ltx_core.components.patchifiers import get_pixel_coords
from ltx_core.conditioning.item import ConditioningItem
-from ltx_core.conditioning.mask_utils import update_attention_mask
+from ltx_core.conditioning.mask_utils import extend_keyframes_mask, update_attention_mask
from ltx_core.tools import VideoLatentTools
from ltx_core.types import LatentState, VideoLatentShape
@@ -99,4 +99,10 @@ class VideoConditionByReferenceLatent(ConditioningItem):
positions=torch.cat([latent_state.positions, positions], dim=2),
clean_latent=torch.cat([latent_state.clean_latent, tokens], dim=1),
attention_mask=new_attention_mask,
+ # Reference tokens are never keyframes. Their own first latent frame also spans a single
+ # pixel frame, so a position-derived marker would wrongly claim them.
+ keyframes_mask=extend_keyframes_mask(latent_state, tokens.shape[1], marked=False),
+ generated_keyframe_layout=latent_state.generated_keyframe_layout,
+ generated_keyframes=latent_state.generated_keyframes,
+ frozen=latent_state.frozen,
)
diff --git a/packages/ltx-core/src/ltx_core/devices.py b/packages/ltx-core/src/ltx_core/devices.py
index 1857fd4..3e4af2f 100644
--- a/packages/ltx-core/src/ltx_core/devices.py
+++ b/packages/ltx-core/src/ltx_core/devices.py
@@ -80,6 +80,26 @@ def empty_device_cache(device: DeviceSpec = None) -> None:
torch.mps.empty_cache()
+def cuda_activation_budget_bytes(device: DeviceSpec = None) -> int:
+ """Bytes still available for new CUDA allocations in this process.
+ Honors ``torch.cuda.set_per_process_memory_fraction``: ``mem_get_info`` reports
+ raw device free memory and does *not* shrink under a fraction cap, so we use
+ ``fraction * device_total - memory_reserved`` (also capped by raw free).
+ """
+ if not torch.cuda.is_available():
+ return 0
+ resolved = resolve_device(device)
+ if resolved.type != "cuda":
+ return 0
+ idx = resolved.index if resolved.index is not None else torch.cuda.current_device()
+ free_raw, _total_raw = torch.cuda.mem_get_info(idx)
+ props_total = torch.cuda.get_device_properties(idx).total_memory
+ fraction = torch.cuda.get_per_process_memory_fraction(idx)
+ reserved = torch.cuda.memory_reserved(idx)
+ under_fraction = max(0, int(fraction * props_total) - int(reserved))
+ return min(int(free_raw), under_fraction)
+
+
def cleanup_accelerator_memory(device: DeviceSpec = None) -> None:
"""Run Python GC and release CUDA/MPS allocator caches."""
gc.collect()
diff --git a/packages/ltx-core/src/ltx_core/duration_head/__init__.py b/packages/ltx-core/src/ltx_core/duration_head/__init__.py
new file mode 100644
index 0000000..b86baf6
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/duration_head/__init__.py
@@ -0,0 +1,11 @@
+"""DurationHead: predicts shot duration from Connector token outputs."""
+
+from ltx_core.duration_head.duration_head import AttentionPooler, DurationHead
+from ltx_core.duration_head.model_configurator import DURATION_HEAD_KEY_OPS, DurationHeadConfigurator
+
+__all__ = [
+ "DURATION_HEAD_KEY_OPS",
+ "AttentionPooler",
+ "DurationHead",
+ "DurationHeadConfigurator",
+]
diff --git a/packages/ltx-core/src/ltx_core/duration_head/duration_head.py b/packages/ltx-core/src/ltx_core/duration_head/duration_head.py
new file mode 100644
index 0000000..17bc3b1
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/duration_head/duration_head.py
@@ -0,0 +1,118 @@
+"""Small regression head that predicts shot duration from frozen Connector outputs.
+The audio and video Connectors in ``embeddings_connector.py`` consume a Gemma caption
+embedding and emit per-token hidden states. Their output dimension and sequence length
+are fixed by the production model, so a thin regression head on top has all the signal
+it needs to predict the natural duration of the implied shot -- without running the full
+diffusion pipeline.
+The head is modality-agnostic: pass either or both of {audio, video} connector outputs.
+Modality-specific input projections map each stream to a shared pooler hidden dim,
+learnable modality embeddings tag the streams so an attention pooler can tell them
+apart, and a small MLP turns the pooled vector into a log-duration prediction. Targets
+(when training) are in log-seconds so the loss spreads its budget evenly across orders
+of magnitude; at inference time callers exponentiate the prediction to get seconds.
+Unlike the training-time head, this module never sees packed/multi-sample sequences, so
+it has no segment-id bookkeeping. It also needs no attention mask: the connector always
+substitutes learnable registers for padded positions and marks the result as fully
+attendable, so every token handed to this module is already valid.
+"""
+
+from __future__ import annotations
+
+import torch
+from torch import nn
+
+from ltx_core.model.disposable import Disposable
+
+
+class AttentionPooler(nn.Module):
+ """Cross-attend ``num_queries`` learnable tokens against ``tokens``.
+ Produces a fixed-shape ``(B, num_queries, hidden_dim)`` output regardless of the
+ input sequence length. Every position in ``tokens`` is attendable -- see the module
+ docstring for why no mask is needed.
+ """
+
+ def __init__(self, hidden_dim: int = 256, num_queries: int = 1, num_heads: int = 4) -> None:
+ super().__init__()
+ self.hidden_dim = hidden_dim
+ self.num_queries = num_queries
+ self.query_tokens = nn.Parameter(torch.randn(num_queries, hidden_dim) * 0.02)
+ self.cross_attn = nn.MultiheadAttention(
+ embed_dim=hidden_dim,
+ num_heads=num_heads,
+ batch_first=True,
+ )
+
+ def forward(self, tokens: torch.Tensor) -> torch.Tensor:
+ batch_size = tokens.shape[0]
+ queries = self.query_tokens.unsqueeze(0).expand(batch_size, -1, -1)
+ pooled, _ = self.cross_attn(queries, tokens, tokens, need_weights=False)
+ return pooled
+
+
+class DurationHead(nn.Module, Disposable):
+ """Predict log-duration in seconds from one or both Connector outputs.
+ Args:
+ video_cross_attention_dim: Video connector output dim.
+ audio_cross_attention_dim: Audio connector output dim.
+ pooler_hidden_dim: Shared hidden dim both modalities are projected into.
+ num_queries: Number of learnable pooling queries.
+ num_pooler_heads: Attention heads used by the pooler.
+ mlp_hidden: Hidden width of the output MLP.
+ """
+
+ def __init__(
+ self,
+ video_cross_attention_dim: int = 4096,
+ audio_cross_attention_dim: int = 2048,
+ pooler_hidden_dim: int = 256,
+ num_queries: int = 1,
+ num_pooler_heads: int = 4,
+ mlp_hidden: int = 256,
+ ) -> None:
+ super().__init__()
+ self.pooler_hidden_dim = pooler_hidden_dim
+
+ self.video_input_proj = nn.Linear(video_cross_attention_dim, pooler_hidden_dim)
+ self.video_modality_emb = nn.Parameter(torch.randn(pooler_hidden_dim) * 0.02)
+
+ self.audio_input_proj = nn.Linear(audio_cross_attention_dim, pooler_hidden_dim)
+ self.audio_modality_emb = nn.Parameter(torch.randn(pooler_hidden_dim) * 0.02)
+
+ self.attention_pooler = AttentionPooler(
+ hidden_dim=pooler_hidden_dim,
+ num_queries=num_queries,
+ num_heads=num_pooler_heads,
+ )
+ self.mlp_hidden = nn.Linear(pooler_hidden_dim * num_queries, mlp_hidden)
+ self.mlp_out = nn.Linear(mlp_hidden, 1)
+
+ def forward(
+ self,
+ video_tokens: torch.Tensor | None = None,
+ audio_tokens: torch.Tensor | None = None,
+ ) -> torch.Tensor:
+ """Predict duration in seconds.
+ The regression target is trained in log-seconds (spreads the loss budget evenly
+ across orders of magnitude -- see the module docstring), so the MLP output is a
+ log-duration internally; ``exp`` is applied here so callers always get seconds.
+ Args:
+ video_tokens: ``(B, T_v, video_cross_attention_dim)``, or ``None``.
+ audio_tokens: ``(B, T_a, audio_cross_attention_dim)``, or ``None``.
+ Returns:
+ Duration prediction in seconds, shape ``(B,)``.
+ """
+ if video_tokens is None and audio_tokens is None:
+ raise ValueError("DurationHead.forward requires at least one of video_tokens / audio_tokens")
+
+ token_groups: list[torch.Tensor] = []
+ if video_tokens is not None:
+ token_groups.append(self.video_input_proj(video_tokens) + self.video_modality_emb)
+ if audio_tokens is not None:
+ token_groups.append(self.audio_input_proj(audio_tokens) + self.audio_modality_emb)
+
+ tokens = torch.cat(token_groups, dim=1)
+ pooled = self.attention_pooler(tokens)
+ pooled_flat = pooled.reshape(pooled.shape[0], -1)
+ hidden = torch.nn.functional.gelu(self.mlp_hidden(pooled_flat), approximate="tanh")
+ log_duration = self.mlp_out(hidden).squeeze(-1)
+ return log_duration.exp()
diff --git a/packages/ltx-core/src/ltx_core/duration_head/model_configurator.py b/packages/ltx-core/src/ltx_core/duration_head/model_configurator.py
new file mode 100644
index 0000000..53cd4c6
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/duration_head/model_configurator.py
@@ -0,0 +1,35 @@
+from ltx_core.duration_head.duration_head import DurationHead
+from ltx_core.loader.sd_ops import SDOps
+from ltx_core.model.model_protocol import ModelConfigurator
+
+# DurationHead's tensors live under a "duration_head." key prefix, already exported in
+# PyTorch's nn.MultiheadAttention layout. Layout-agnostic on purpose: this strips the
+# prefix regardless of whether it's read from its own checkpoint file or from a shared
+# one alongside other model weights.
+DURATION_HEAD_KEY_OPS = (
+ SDOps("DURATION_HEAD_KEY_OPS").with_matching(prefix="duration_head.").with_replacement("duration_head.", "")
+)
+
+
+class DurationHeadConfigurator(ModelConfigurator[DurationHead]):
+ """Configurator for DurationHead.
+ Video/audio projection dims mirror the main transformer's connector dims
+ (``cross_attention_dim`` / ``audio_cross_attention_dim``). The head's own
+ hyperparameters have no finalized config schema yet, so they are read from a
+ placeholder ``duration_head`` sub-dict with JAX-matching defaults.
+ """
+
+ @classmethod
+ def from_metadata(cls, metadata: dict) -> DurationHead:
+ config = metadata.get("config", {})
+ transformer_config = config.get("transformer", {})
+ duration_head_config = config.get("duration_head", {})
+
+ return DurationHead(
+ video_cross_attention_dim=transformer_config.get("cross_attention_dim", 4096),
+ audio_cross_attention_dim=transformer_config.get("audio_cross_attention_dim", 2048),
+ pooler_hidden_dim=duration_head_config.get("pooler_hidden_dim", 256),
+ num_queries=duration_head_config.get("num_queries", 1),
+ num_pooler_heads=duration_head_config.get("num_pooler_heads", 4),
+ mlp_hidden=duration_head_config.get("mlp_hidden", 256),
+ )
diff --git a/packages/ltx-core/src/ltx_core/guidance/perturbations.py b/packages/ltx-core/src/ltx_core/guidance/perturbations.py
index a4c7789..394f96e 100644
--- a/packages/ltx-core/src/ltx_core/guidance/perturbations.py
+++ b/packages/ltx-core/src/ltx_core/guidance/perturbations.py
@@ -98,6 +98,16 @@ class BatchedPerturbationConfig:
obj._block_masks_cpu = block_masks_cpu
return obj
+ @property
+ def block_masks(self) -> torch.Tensor:
+ """Keep-mask on the compute device (1 = keep, 0 = perturbed), indexed [type, block, sample]."""
+ return self._block_masks
+
+ @property
+ def block_masks_cpu(self) -> torch.Tensor | None:
+ """Host mirror of the keep-mask, or None for compiled-only configs (see ``from_masks``)."""
+ return self._block_masks_cpu
+
def batch_slice(self, start: int, end: int) -> "BatchedPerturbationConfig":
"""A view over samples ``[start:end]`` of the batch, by slicing the mask tensors.
Slicing (never rebuilding) keeps the host mask build outside any compiled / capture region.
diff --git a/packages/ltx-core/src/ltx_core/hdr.py b/packages/ltx-core/src/ltx_core/hdr.py
index 8413004..7274b22 100644
--- a/packages/ltx-core/src/ltx_core/hdr.py
+++ b/packages/ltx-core/src/ltx_core/hdr.py
@@ -1,71 +1,172 @@
-"""HDR utilities: LogC3 compression for HDR IC-LoRA training and inference.
-Provides compress/decompress and postprocess helpers for HDR video generation.
-Used by ltx-pipelines for HDR IC-LoRA and by ltx-trainer for HDR validation.
+"""HDR working-space transfers: LogC3 and ACEScct.
+Two transforms are supported:
+* **LogC3** — ARRI LogC3 (EI 800) camera log curve (HDR IC-LoRA default).
+* **ACEScct** — AMPAS S-2016-001 ACEScct log working space (EXR condition round-trip).
+Both map linear HDR [0, ∞) <-> a compressed [0, 1] signal. Callers are responsible
+for mapping the [0, 1] signal to/from the VAE's [-1, 1] range (``to_vae_range`` on
+encode, the VAE decoder's ``to_rgb`` on decode). Used by ltx-pipelines for EXR
+conditioning / HDR IC-LoRA and by ltx-trainer for HDR validation.
"""
from __future__ import annotations
-from typing import Literal
+import enum
import torch
from torch import Tensor
+from ltx_core.color.primaries import Primaries
-class LogC3:
- """ARRI LogC3 (EI 800) HDR compression.
- Maps linear [0, ∞) <-> LogC3 [0, 1] via the camera log curve. The log
- curve allocates more precision to shadows/midtones and compresses
- highlights smoothly. Callers are responsible for mapping the [0, 1]
- output to the VAE's [-1, 1] input range.
- """
+__all__ = [
+ "HDRTransfer",
+ "TransferEncoding",
+ "to_acescct_working_space",
+ "to_hdr_linear",
+]
- name = "LogC3"
- A = 5.555556
- B = 0.052272
- C = 0.247190
- D = 0.385537
- E = 5.367655
- F = 0.092809
- CUT = 0.010591
+
+class TransferEncoding(enum.Enum):
+ """Transfer encoding of an HDR tensor (scene-linear vs already-compressed log)."""
+
+ LINEAR = "linear"
+ LOG = "log"
+
+
+# --- curve helpers ----------------------------------------------------------------
+
+_LOGC3_A = 5.555556
+_LOGC3_B = 0.052272
+_LOGC3_C = 0.247190
+_LOGC3_D = 0.385537
+_LOGC3_E = 5.367655
+_LOGC3_F = 0.092809
+_LOGC3_CUT = 0.010591
+
+_ACESCCT_A_LIN = 10.5402377416545
+_ACESCCT_B_LIN = 0.0729055341958355
+_ACESCCT_X_BRK = 0.0078125
+_ACESCCT_Y_BRK = 0.155251141552511
+_ACESCCT_LOG_M = 17.52
+_ACESCCT_LOG_B = 9.72
+
+
+def _compress_logc3(hdr: Tensor) -> Tensor:
+ x = torch.clamp(hdr, min=0.0)
+ log_part = _LOGC3_C * torch.log10(_LOGC3_A * x + _LOGC3_B) + _LOGC3_D
+ lin_part = _LOGC3_E * x + _LOGC3_F
+ return torch.clamp(torch.where(x >= _LOGC3_CUT, log_part, lin_part), 0.0, 1.0)
+
+
+def _decompress_logc3(logc: Tensor) -> Tensor:
+ logc = torch.clamp(logc, 0.0, 1.0)
+ cut_log = _LOGC3_E * _LOGC3_CUT + _LOGC3_F
+ lin_from_log = (torch.pow(10.0, (logc - _LOGC3_D) / _LOGC3_C) - _LOGC3_B) / _LOGC3_A
+ lin_from_lin = (logc - _LOGC3_F) / _LOGC3_E
+ return torch.where(logc >= cut_log, lin_from_log, lin_from_lin)
+
+
+def _compress_acescct(hdr: Tensor) -> Tensor:
+ x = torch.clamp(hdr, min=0.0)
+ log_part = (torch.log2(torch.clamp(x, min=1e-12)) + _ACESCCT_LOG_B) / _ACESCCT_LOG_M
+ lin_part = _ACESCCT_A_LIN * x + _ACESCCT_B_LIN
+ return torch.clamp(torch.where(x > _ACESCCT_X_BRK, log_part, lin_part), 0.0, 1.0)
+
+
+def _decompress_acescct(ct: Tensor) -> Tensor:
+ ct = torch.clamp(ct, 0.0, 1.0)
+ lin_from_log = torch.pow(2.0, ct * _ACESCCT_LOG_M - _ACESCCT_LOG_B)
+ lin_from_lin = (ct - _ACESCCT_B_LIN) / _ACESCCT_A_LIN
+ return torch.where(ct > _ACESCCT_Y_BRK, lin_from_log, lin_from_lin)
+
+
+class HDRTransfer(enum.Enum):
+ """VAE HDR working-space transfer curve."""
+
+ LOGC3 = "logc3"
+ ACESCCT = "acescct"
+
+ @property
+ def display_name(self) -> str:
+ """Human / EXR ``colorSpace`` tag name (e.g. ``ACEScct``, ``LogC3``)."""
+ match self:
+ case HDRTransfer.LOGC3:
+ return "LogC3"
+ case HDRTransfer.ACESCCT:
+ return "ACEScct"
+
+ @property
+ def native_primaries(self) -> Primaries:
+ """Linear primaries the curve is defined on (decompress lands here)."""
+ match self:
+ case HDRTransfer.LOGC3:
+ return Primaries.REC709
+ case HDRTransfer.ACESCCT:
+ return Primaries.ACESCG
def compress(self, hdr: Tensor) -> Tensor:
- """Compress linear HDR [0, ∞) → LogC3 [0, 1]."""
- x = torch.clamp(hdr, min=0.0)
- log_part = self.C * torch.log10(self.A * x + self.B) + self.D
- lin_part = self.E * x + self.F
- logc = torch.where(x >= self.CUT, log_part, lin_part)
- return torch.clamp(logc, 0.0, 1.0)
+ """Compress linear HDR [0, ∞) → working-space [0, 1]."""
+ match self:
+ case HDRTransfer.LOGC3:
+ return _compress_logc3(hdr)
+ case HDRTransfer.ACESCCT:
+ return _compress_acescct(hdr)
+
+ def decompress(self, compressed: Tensor) -> Tensor:
+ """Decompress working-space [0, 1] → linear HDR [0, ∞)."""
+ match self:
+ case HDRTransfer.LOGC3:
+ return _decompress_logc3(compressed)
+ case HDRTransfer.ACESCCT:
+ return _decompress_acescct(compressed)
def compress_ldr(self, ldr: Tensor) -> Tensor:
- """Compress LDR [0, 1] → [0, 1] (no log curve, just clamp)."""
+ """LDR [0, 1] → [0, 1] (identity clamp; transfer-agnostic)."""
return torch.clamp(ldr, 0.0, 1.0)
- def decompress(self, logc: Tensor) -> Tensor:
- """Decompress LogC3 [0, 1] → linear HDR [0, ∞)."""
- logc = torch.clamp(logc, 0.0, 1.0)
- cut_log = self.E * self.CUT + self.F
- lin_from_log = (torch.pow(10.0, (logc - self.D) / self.C) - self.B) / self.A
- lin_from_lin = (logc - self.F) / self.E
- return torch.where(logc >= cut_log, lin_from_log, lin_from_lin)
+ def to_working_space(
+ self,
+ video: Tensor,
+ *,
+ source_primaries: Primaries = Primaries.REC709,
+ ) -> Tensor:
+ """Map scene-linear HDR into this transfer's compressed [0, 1] working space.
+ Rotates ``source_primaries`` into :attr:`native_primaries`, then compresses.
+ Callers that already have working-space codes should skip this and pass them
+ straight to ``to_vae_range``.
+ """
+ linear_native = source_primaries.to(self.native_primaries, video.float())
+ return self.compress(linear_native.clamp(min=0.0))
+
+ def to_linear(
+ self,
+ working: Tensor,
+ *,
+ out_primaries: Primaries = Primaries.REC709,
+ ) -> Tensor:
+ """Decompress this transfer's [0, 1] working space to scene-linear HDR.
+ Decompresses into :attr:`native_primaries`, then converts into ``out_primaries``.
+ Callers that need to keep log codes (e.g. log-tagged EXR round-trip) should
+ skip this and write the working signal directly.
+ """
+ linear_native = self.decompress(working.float())
+ return self.native_primaries.to(out_primaries, linear_native).clamp(min=0.0)
+
- def decompress_ldr(self, logc: Tensor) -> Tensor:
- """Decompress [0, 1] → LDR [0, 1] (identity clamp)."""
- return torch.clamp(logc, 0.0, 1.0)
+# --- thin wrappers for transitional call sites ------------------------------------
+
+
+def to_acescct_working_space(
+ video: Tensor,
+ source_primaries: Primaries = Primaries.REC709,
+) -> Tensor:
+ """Compress scene-linear HDR into the ACEScct [0, 1] working space."""
+ return HDRTransfer.ACESCCT.to_working_space(video, source_primaries=source_primaries)
-def apply_hdr_decode_postprocess(
- decoded_video: Tensor,
- transform: Literal["logc3"] = "logc3",
+def to_hdr_linear(
+ working: Tensor,
+ transfer: HDRTransfer = HDRTransfer.LOGC3,
+ out_primaries: Primaries = Primaries.REC709,
) -> Tensor:
- """Apply HDR decompress to VAE decode output for HDR recovery.
- Args:
- decoded_video: Tensor from VAE decode in [0, 1], shape [B, C, F, H, W].
- Must be float32 for sufficient color resolution.
- transform: "logc3".
- Returns:
- HDR video tensor float32.
- """
- decoded_video = decoded_video.float()
- if transform == "logc3":
- return LogC3().decompress(decoded_video)
- raise ValueError(f"Unsupported HDR transform: {transform}")
+ """Decompress a [0, 1] working-space signal to scene-linear HDR."""
+ return transfer.to_linear(working, out_primaries=out_primaries)
diff --git a/packages/ltx-core/src/ltx_core/loader/__init__.py b/packages/ltx-core/src/ltx_core/loader/__init__.py
index 9bb099c..1f770be 100644
--- a/packages/ltx-core/src/ltx_core/loader/__init__.py
+++ b/packages/ltx-core/src/ltx_core/loader/__init__.py
@@ -4,7 +4,9 @@ from ltx_core.loader.fuse_loras import apply_loras
from ltx_core.loader.helpers import (
create_meta_model,
load_state_dict,
+ parse_model_version,
read_model_config,
+ read_model_metadata,
)
from ltx_core.loader.module_ops import ModuleOps
from ltx_core.loader.primitives import (
@@ -15,7 +17,12 @@ from ltx_core.loader.primitives import (
StateDict,
StateDictLoader,
)
-from ltx_core.loader.registry import DummyRegistry, Registry, StateDictRegistry
+from ltx_core.loader.registry import (
+ DummyRegistry,
+ ModelRegistry,
+ Registry,
+ module_registry_key,
+)
from ltx_core.loader.sd_ops import (
LTXV_LORA_COMFY_RENAMING_MAP,
ContentMatching,
@@ -39,6 +46,7 @@ __all__ = [
"LoraPathStrengthAndSDOps",
"LoraStateDictWithStrength",
"ModelBuilderProtocol",
+ "ModelRegistry",
"ModuleOps",
"Registry",
"SDKeyValueOperation",
@@ -48,9 +56,11 @@ __all__ = [
"SingleGPUModelBuilder",
"StateDict",
"StateDictLoader",
- "StateDictRegistry",
"apply_loras",
"create_meta_model",
"load_state_dict",
+ "module_registry_key",
+ "parse_model_version",
"read_model_config",
+ "read_model_metadata",
]
diff --git a/packages/ltx-core/src/ltx_core/loader/fuse_loras.py b/packages/ltx-core/src/ltx_core/loader/fuse_loras.py
index 63fd282..de8e9fc 100644
--- a/packages/ltx-core/src/ltx_core/loader/fuse_loras.py
+++ b/packages/ltx-core/src/ltx_core/loader/fuse_loras.py
@@ -155,14 +155,19 @@ def apply_loras(
lora_sd_and_strengths: list[LoraStateDictWithStrength],
fuse_rule: FuseRule = bf16_fuse_rule,
destination_sd: StateDict | None = None,
+ preserve_input_device: bool = True,
) -> StateDict:
"""Fuse LoRAs into ``model_sd`` and place the results in ``destination_sd``.
When ``destination_sd`` is provided, the fused tensors are placed directly into it.
+ When omitted, a fresh SD is allocated; untouched keys may alias ``model_sd``.
+ Pass ``preserve_input_device=False`` to leave fused tensors on the fusion device (e.g. when
+ ``model_sd`` is a CPU-retained clean cache and the caller will H2D untouched keys later).
"""
fused_iter = fuse_lora_weights(
model_sd,
lora_sd_and_strengths,
fuse_rule=fuse_rule,
+ preserve_input_device=preserve_input_device,
)
if destination_sd is not None:
for key, fused in fused_iter:
@@ -170,7 +175,8 @@ def apply_loras(
return destination_sd
fused = dict(fused_iter)
- sd = {k: (fused[k] if k in fused else v.clone()) for k, v in model_sd.sd.items()}
+ # Untouched keys may alias ``model_sd`` (e.g. pinned retained cache); do not clone them.
+ sd = {k: fused.get(k, v) for k, v in model_sd.sd.items()}
return StateDict(sd, model_sd.device, model_sd.size, model_sd.dtype)
diff --git a/packages/ltx-core/src/ltx_core/loader/helpers.py b/packages/ltx-core/src/ltx_core/loader/helpers.py
index b95e0bd..af2ea04 100644
--- a/packages/ltx-core/src/ltx_core/loader/helpers.py
+++ b/packages/ltx-core/src/ltx_core/loader/helpers.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+from os import PathLike, fspath
from typing import TypeVar
import torch
@@ -14,47 +15,80 @@ from ltx_core.loader.sd_ops import SDOps
from ltx_core.model.model_protocol import ModelConfigurator
_M = TypeVar("_M", bound=nn.Module)
+_PathArg = str | PathLike[str]
+
+
+def as_path_list(paths: _PathArg | tuple[_PathArg, ...] | list[_PathArg]) -> list[str]:
+ """Normalize checkpoint path args to the ``list[str]`` shape registries key on."""
+ if isinstance(paths, (str, PathLike)):
+ return [fspath(paths)]
+ return [fspath(p) for p in paths]
def load_state_dict(
- paths: str | tuple[str, ...] | list[str],
+ paths: _PathArg | tuple[_PathArg, ...] | list[_PathArg],
loader: StateDictLoader,
registry: Registry,
device: torch.device | None,
sd_ops: SDOps | None = None,
) -> StateDict:
"""Load a state dict from disk, using registry caching."""
- if isinstance(paths, str):
- path_list = [paths]
- elif isinstance(paths, tuple):
- path_list = list(paths)
- else:
- path_list = paths
+ path_list = as_path_list(paths)
cached = registry.get(path_list, sd_ops)
if cached is not None:
return cached
result = loader.load(path_list, sd_ops=sd_ops, device=device)
- registry.add(path_list, sd_ops=sd_ops, state_dict=result)
- return result
+ # ``add`` returns the retained copy when the registry rewrites storage (e.g. pin to CPU).
+ return registry.add(path_list, sd_ops=sd_ops, state_dict=result)
-def read_model_config(
+def read_model_metadata(
model_path: str | tuple[str, ...],
loader: StateDictLoader,
) -> dict:
- """Read metadata from the first shard of a checkpoint."""
+ """Read the full metadata dict from the first shard of a checkpoint."""
first = model_path[0] if isinstance(model_path, tuple) else model_path
return loader.metadata(first)
+def read_model_config(
+ model_path: str | tuple[str, ...],
+ loader: StateDictLoader,
+) -> dict:
+ """Read the ``config`` sub-dict (transformer/vae/scheduler/...) from a checkpoint's metadata."""
+ return read_model_metadata(model_path, loader).get("config", {})
+
+
+def parse_model_version(version: str | None) -> tuple[int, ...]:
+ """Parse a checkpoint's ``model_version`` into comparable numeric components.
+ Parsing stops at the first dot-separated component that isn't a plain integer, so
+ pre-release tags are dropped (the pre-2.4 era used strings like ``"2.3.rc1"``). A
+ shorter numeric prefix already compares as "less than" a longer one sharing its
+ leading components (``(2, 3) < (2, 4, 0)``), so dropping the tail is safe. An unset
+ or non-numeric version parses to ``()``, which compares below every real version --
+ callers get their oldest fallback.
+ Tags are not always dot-separated (``"2.4-rc2"`` parses to ``(2,)``). Callers that
+ want such a build to compare equal to its own generation should normalize the
+ separator first -- see ``detect_params`` in ltx-pipelines.
+ """
+ if not version:
+ return ()
+ numeric_parts = []
+ for part in version.split("."):
+ if not part.isdigit():
+ break
+ numeric_parts.append(int(part))
+ return tuple(numeric_parts)
+
+
def create_meta_model(
configurator: type[ModelConfigurator[_M]],
- config: dict,
+ metadata: dict,
module_ops: tuple[ModuleOps, ...] = (),
) -> _M:
"""Create a model on the meta device and apply module operations."""
with torch.device("meta"):
- model = configurator.from_config(config)
+ model = configurator.from_metadata(metadata)
for op in module_ops:
if op.matcher(model):
model = op.mutator(model)
diff --git a/packages/ltx-core/src/ltx_core/loader/primitives.py b/packages/ltx-core/src/ltx_core/loader/primitives.py
index 28f8f44..8550bf3 100644
--- a/packages/ltx-core/src/ltx_core/loader/primitives.py
+++ b/packages/ltx-core/src/ltx_core/loader/primitives.py
@@ -92,6 +92,11 @@ class ModelBuilderProtocol(BuilderProtocol[BuiltType], Protocol[BuiltType]):
"""Path(s) to the checkpoint this builder loads from (for logging/diagnostics)."""
...
+ @property
+ def keeps_gpu_resident_weights(self) -> bool:
+ """Whether rebuilds rebind the same GPU weight storages (safe for CUDA-graph capture)."""
+ ...
+
@property
def model_sd_ops(self) -> SDOps | None: ...
diff --git a/packages/ltx-core/src/ltx_core/loader/registry.py b/packages/ltx-core/src/ltx_core/loader/registry.py
index 9fd5f9d..c62f176 100644
--- a/packages/ltx-core/src/ltx_core/loader/registry.py
+++ b/packages/ltx-core/src/ltx_core/loader/registry.py
@@ -1,25 +1,38 @@
+from __future__ import annotations
+
import hashlib
+import json
import threading
-from dataclasses import dataclass, field
from pathlib import Path
from typing import Protocol
+from torch import nn
+
from ltx_core.loader.primitives import StateDict
from ltx_core.loader.sd_ops import SDOps
+def module_registry_key(
+ *,
+ configurator: type,
+ config: dict,
+ module_ops_names: tuple[str, ...],
+) -> str:
+ """Hex digest identity of a model shell: configurator + init config + module ops."""
+ payload = "\0".join(
+ (
+ f"{configurator.__module__}.{configurator.__qualname__}",
+ json.dumps(config, sort_keys=True, separators=(",", ":")),
+ ",".join(module_ops_names),
+ )
+ )
+ return hashlib.sha256(payload.encode("utf-8")).hexdigest()
+
+
class Registry(Protocol):
- """
- Protocol for managing state dictionaries in a registry.
- It is used to store state dictionaries and reuse them later without loading them again.
- Implementations must provide:
- - add: Add a state dictionary to the registry
- - pop: Remove a state dictionary from the registry
- - get: Retrieve a state dictionary from the registry
- - clear: Clear all state dictionaries from the registry
- """
+ """Cache for state dictionaries and/or structurally keyed model shells."""
- def add(self, paths: list[str], sd_ops: SDOps | None, state_dict: StateDict) -> None: ...
+ def add(self, paths: list[str], sd_ops: SDOps | None, state_dict: StateDict) -> StateDict: ...
def pop(self, paths: list[str], sd_ops: SDOps | None) -> StateDict | None: ...
@@ -27,35 +40,65 @@ class Registry(Protocol):
def clear(self) -> None: ...
+ def get_model(self, key: str) -> nn.Module | None: ...
+
+ def add_model(self, key: str, model: nn.Module) -> nn.Module: ...
+
+ def pop_model(self, key: str) -> nn.Module | None: ...
+
class DummyRegistry(Registry):
- """
- Dummy registry that does not store state dictionaries.
- """
+ """Registry that stores neither state dictionaries nor model instances."""
- def add(self, paths: list[str], sd_ops: SDOps | None, state_dict: StateDict) -> None:
- pass
+ def add(self, paths: list[str], sd_ops: SDOps | None, state_dict: StateDict) -> StateDict:
+ _ = paths, sd_ops
+ return state_dict
def pop(self, paths: list[str], sd_ops: SDOps | None) -> StateDict | None:
- pass
+ _ = paths, sd_ops
+ return None
def get(self, paths: list[str], sd_ops: SDOps | None) -> StateDict | None:
- pass
+ _ = paths, sd_ops
+ return None
def clear(self) -> None:
pass
-
-@dataclass
-class StateDictRegistry(Registry):
- """
- Registry that stores state dictionaries in a dictionary.
+ def get_model(self, key: str) -> nn.Module | None:
+ _ = key
+ return None
+
+ def add_model(self, key: str, model: nn.Module) -> nn.Module:
+ _ = key
+ return model
+
+ def pop_model(self, key: str) -> nn.Module | None:
+ _ = key
+ return None
+
+
+class ModelRegistry(Registry):
+ """In-process cache of state dictionaries and/or model shells.
+ Toggle independently via ``cache_weights`` / ``cache_models``:
+ - both ``True`` (default): cache checkpoint tensors and structural shells;
+ - ``cache_models=True, cache_weights=False``: reuse shells, reload weights each build;
+ - ``cache_models=False, cache_weights=True``: cache tensors only (rebuild structure each time);
+ - both ``False``: same effective behavior as :class:`DummyRegistry`.
+ Model shells are keyed by :func:`module_registry_key` hex digests. A structural hit
+ reuses the shell; callers always reassign weights onto it. Non-persistent buffers
+ installed by module ops are kept on the shell across ``dispose`` and are not stored
+ in the weight map.
"""
- _state_dicts: dict[str, StateDict] = field(default_factory=dict)
- _lock: threading.Lock = field(default_factory=threading.Lock)
+ def __init__(self, *, cache_weights: bool = True, cache_models: bool = True) -> None:
+ self._cache_weights = cache_weights
+ self._cache_models = cache_models
+ self._state_dicts: dict[str, StateDict] = {}
+ self._models: dict[str, nn.Module] = {}
+ self._lock = threading.Lock()
- def _generate_id(self, paths: list[str], sd_ops: SDOps) -> str:
+ def _generate_id(self, paths: list[str], sd_ops: SDOps | None) -> str:
m = hashlib.sha256()
parts = [str(Path(p).resolve()) for p in paths]
if sd_ops is not None:
@@ -63,13 +106,15 @@ class StateDictRegistry(Registry):
m.update("\0".join(parts).encode("utf-8"))
return m.hexdigest()
- def add(self, paths: list[str], sd_ops: SDOps | None, state_dict: StateDict) -> str:
+ def add(self, paths: list[str], sd_ops: SDOps | None, state_dict: StateDict) -> StateDict:
+ if not self._cache_weights:
+ return state_dict
sd_id = self._generate_id(paths, sd_ops)
with self._lock:
if sd_id in self._state_dicts:
raise ValueError(f"State dict retrieved from {paths} with {sd_ops} already added, check with get first")
self._state_dicts[sd_id] = state_dict
- return sd_id
+ return state_dict
def pop(self, paths: list[str], sd_ops: SDOps | None) -> StateDict | None:
with self._lock:
@@ -82,3 +127,21 @@ class StateDictRegistry(Registry):
def clear(self) -> None:
with self._lock:
self._state_dicts.clear()
+ self._models.clear()
+
+ def get_model(self, key: str) -> nn.Module | None:
+ with self._lock:
+ return self._models.get(key)
+
+ def add_model(self, key: str, model: nn.Module) -> nn.Module:
+ if not self._cache_models:
+ return model
+ with self._lock:
+ if key in self._models:
+ raise ValueError(f"Model for {key} already added, check with get_model first")
+ self._models[key] = model
+ return model
+
+ def pop_model(self, key: str) -> nn.Module | None:
+ with self._lock:
+ return self._models.pop(key, None)
diff --git a/packages/ltx-core/src/ltx_core/loader/sft_loader.py b/packages/ltx-core/src/ltx_core/loader/sft_loader.py
index 859da80..a864ac8 100644
--- a/packages/ltx-core/src/ltx_core/loader/sft_loader.py
+++ b/packages/ltx-core/src/ltx_core/loader/sft_loader.py
@@ -56,11 +56,22 @@ class SafetensorsModelStateDictLoader(StateDictLoader):
self.weight_loader = weight_loader if weight_loader is not None else SafetensorsStateDictLoader()
def metadata(self, path: str) -> dict:
+ """Read the full safetensors ``__metadata__`` dict.
+ Values are JSON string-encoded by convention (e.g. ``config``, ``gemma_source_checkpoint``);
+ each is parsed if it's valid JSON and left as a raw string otherwise (e.g. ``license``,
+ ``model_version``).
+ """
with safetensors.safe_open(path, framework="pt") as f:
meta = f.metadata()
- if meta is None or "config" not in meta:
+ if meta is None:
return {}
- return json.loads(meta["config"])
+ parsed = {}
+ for key, value in meta.items():
+ try:
+ parsed[key] = json.loads(value)
+ except json.JSONDecodeError:
+ parsed[key] = value
+ return parsed
def load(self, path: str | list[str], sd_ops: SDOps | None = None, device: torch.device | None = None) -> StateDict:
return self.weight_loader.load(path, sd_ops, device)
diff --git a/packages/ltx-core/src/ltx_core/loader/single_gpu_model_builder.py b/packages/ltx-core/src/ltx_core/loader/single_gpu_model_builder.py
index b0a284b..58b577b 100644
--- a/packages/ltx-core/src/ltx_core/loader/single_gpu_model_builder.py
+++ b/packages/ltx-core/src/ltx_core/loader/single_gpu_model_builder.py
@@ -8,7 +8,13 @@ import torch
from torch import nn
from ltx_core.loader.fuse_loras import FuseRule, apply_loras, bf16_fuse_rule
-from ltx_core.loader.helpers import create_meta_model, load_state_dict, read_model_config
+from ltx_core.loader.helpers import (
+ as_path_list,
+ create_meta_model,
+ load_state_dict,
+ read_model_config,
+ read_model_metadata,
+)
from ltx_core.loader.module_ops import ModuleOps
from ltx_core.loader.primitives import (
LoRAAdaptableProtocol,
@@ -18,7 +24,7 @@ from ltx_core.loader.primitives import (
StateDict,
StateDictLoader,
)
-from ltx_core.loader.registry import DummyRegistry, Registry
+from ltx_core.loader.registry import ModelRegistry, Registry, module_registry_key
from ltx_core.loader.sd_ops import SDOps
from ltx_core.loader.sft_loader import SafetensorsModelStateDictLoader
from ltx_core.model.model_protocol import ModelConfigurator, ModelType
@@ -41,6 +47,31 @@ def _check_uninitialized(model: nn.Module) -> list[str]:
return names
+# dtypes that ``build(..., dtype=)`` may cast. Quantized payloads (uint8 NVFP4,
+# float8, etc.) must not be rewritten — SDOps policies emit them at load time.
+_DTYPE_CASTABLE = frozenset(
+ {
+ torch.float32,
+ torch.float64,
+ torch.float16,
+ torch.bfloat16,
+ }
+)
+
+
+def _cast_floating_sd(sd: dict[str, torch.Tensor], dtype: torch.dtype) -> dict[str, torch.Tensor]:
+ def _cast(value: torch.Tensor) -> torch.Tensor:
+ if value.dtype not in _DTYPE_CASTABLE:
+ return value
+ # Keep FP32 scalars (e.g. NVFP4 ``weight_scale_2`` / alpha) — bf16 would
+ # corrupt the per-tensor decode-scale convention.
+ if value.ndim == 0 and value.dtype == torch.float32:
+ return value
+ return value.to(dtype=dtype)
+
+ return {key: _cast(value) for key, value in sd.items()}
+
+
def _load_model_weights(
meta_model: nn.Module,
model_path: str | tuple[str, ...],
@@ -63,7 +94,7 @@ def _load_model_weights(
if not lora_strengths or (min(lora_strengths) == 0 and max(lora_strengths) == 0):
sd = model_sd.sd
if dtype is not None:
- sd = {key: value.to(dtype=dtype) for key, value in sd.items()}
+ sd = _cast_floating_sd(sd, dtype)
meta_model.load_state_dict(sd, strict=False, assign=True)
return
@@ -71,15 +102,20 @@ def _load_model_weights(
lora_sd_and_strengths = [
LoraStateDictWithStrength(sd, strength) for sd, strength in zip(lora_state_dicts, lora_strengths, strict=True)
]
+ # Retained registry entries are clean cache — fuse into a fresh SD. Ephemeral loads (get miss)
+ # may be fused in place. Always leave fused tensors on the fusion device (no D2H bounce when
+ # ``model_sd`` is CPU-retained).
+ destination_sd = None if registry.get(as_path_list(model_path), model_sd_ops) is not None else model_sd
final_sd = apply_loras(
model_sd=model_sd,
lora_sd_and_strengths=lora_sd_and_strengths,
fuse_rule=fuse_rule,
- destination_sd=model_sd if isinstance(registry, DummyRegistry) else None,
+ destination_sd=destination_sd,
+ preserve_input_device=False,
)
fused_sd = final_sd.sd
if dtype is not None:
- fused_sd = {key: value.to(dtype=dtype) for key, value in fused_sd.items()}
+ fused_sd = _cast_floating_sd(fused_sd, dtype)
meta_model.load_state_dict(fused_sd, strict=False, assign=True)
@@ -97,7 +133,8 @@ class SingleGPUModelBuilder(Generic[ModelType], ModelBuilderProtocol[ModelType],
loras: Sequence of LoRA adapters (path, strength, optional sd_ops) to fuse into the model.
model_loader: Strategy for loading state dicts from disk. Defaults to
:class:`SafetensorsModelStateDictLoader`.
- registry: Cache for already-loaded state dicts. Defaults to :class:`DummyRegistry` (no caching).
+ registry: Cache for model shells / state dicts. Defaults to a shell-only
+ :class:`ModelRegistry` (``cache_models=True``, ``cache_weights=False``).
lora_load_device: Device used when loading LoRA weight tensors from disk. Defaults to
``torch.device("cpu")``, which keeps LoRA weights in CPU memory and transfers them to
the target GPU sequentially during fusion, reducing peak GPU memory usage compared to
@@ -124,7 +161,7 @@ class SingleGPUModelBuilder(Generic[ModelType], ModelBuilderProtocol[ModelType],
self._module_ops = module_ops
self._loras = loras
self._model_loader = model_loader if model_loader is not None else SafetensorsModelStateDictLoader()
- self._registry = registry if registry is not None else DummyRegistry()
+ self._registry = registry if registry is not None else ModelRegistry(cache_models=True, cache_weights=False)
self._lora_load_device = lora_load_device if lora_load_device is not None else torch.device("cpu")
self._fuse_rule = fuse_rule
@@ -144,6 +181,11 @@ class SingleGPUModelBuilder(Generic[ModelType], ModelBuilderProtocol[ModelType],
def registry(self) -> Registry:
return self._registry
+ @property
+ def keeps_gpu_resident_weights(self) -> bool:
+ # Registry may retain a CPU SD; each build H2Ds into fresh GPU storages.
+ return False
+
@property
def model_path(self) -> str | tuple[str, ...]:
return self._model_path
@@ -202,8 +244,20 @@ class SingleGPUModelBuilder(Generic[ModelType], ModelBuilderProtocol[ModelType],
def model_config(self) -> dict:
return read_model_config(self._model_path, self._model_loader)
- def meta_model(self, config: dict, module_ops: tuple[ModuleOps, ...]) -> ModelType:
- return create_meta_model(self._model_class_configurator, config, module_ops)
+ def model_metadata(self) -> dict:
+ return read_model_metadata(self._model_path, self._model_loader)
+
+ def meta_model(self, metadata: dict, module_ops: tuple[ModuleOps, ...]) -> ModelType:
+ struct_key = module_registry_key(
+ configurator=self._model_class_configurator,
+ config=metadata,
+ module_ops_names=tuple(op.name for op in module_ops),
+ )
+ cached = self._registry.get_model(struct_key)
+ if cached is not None:
+ return cached # type: ignore[return-value]
+ model = create_meta_model(self._model_class_configurator, metadata, module_ops)
+ return self._registry.add_model(struct_key, model) # type: ignore[return-value]
def load_sd(
self, paths: list[str], registry: Registry, device: torch.device | None, sd_ops: SDOps | None = None
@@ -217,8 +271,8 @@ class SingleGPUModelBuilder(Generic[ModelType], ModelBuilderProtocol[ModelType],
**kwargs: object, # noqa: ARG002
) -> ModelType:
device = torch.device("cuda") if device is None else device
- config = self.model_config()
- meta_model = self.meta_model(config, self._module_ops)
+ metadata = self.model_metadata()
+ meta_model = self.meta_model(metadata, self._module_ops)
_load_model_weights(
meta_model=meta_model,
diff --git a/packages/ltx-core/src/ltx_core/modality_tiling.py b/packages/ltx-core/src/ltx_core/modality_tiling.py
index 60a4042..c269b97 100644
--- a/packages/ltx-core/src/ltx_core/modality_tiling.py
+++ b/packages/ltx-core/src/ltx_core/modality_tiling.py
@@ -13,7 +13,7 @@ from dataclasses import dataclass, replace
import torch
from ltx_core.model.transformer.modality import Modality
-from ltx_core.tiling import Tile, TileCountConfig, create_tiles, identity_mapping_operation, split_by_count
+from ltx_core.tiling import Tile, TileCountConfig, create_tiles, identity_mapping_operation
from ltx_core.tools import VideoLatentTools
from ltx_core.types import VideoLatentShape
@@ -55,11 +55,7 @@ class VideoModalityTilingHelper:
self._num_generated_tokens = self._patchifier.get_token_count(self._latent_shape)
self._tiles = create_tiles(
torch.Size([self._latent_shape.frames, self._latent_shape.height, self._latent_shape.width]),
- splitters=[
- split_by_count(tiling.frames.num_tiles, tiling.frames.overlap),
- split_by_count(tiling.height.num_tiles, tiling.height.overlap),
- split_by_count(tiling.width.num_tiles, tiling.width.overlap),
- ],
+ splitters=list(tiling.to_splitters(video_tools.scale_factors, causal_temporal=False)),
mappers=[identity_mapping_operation] * 3,
)
@@ -109,6 +105,13 @@ class VideoModalityTilingHelper:
if modality.attention_mask is not None:
tile_attention_mask = modality.attention_mask[:, keep_indices, :][:, :, keep_indices]
+ # Sliced, not recomputed: the marker must survive `normalize_positions`, which shifts every
+ # tile's generated tokens to start at zero and so destroys the "temporal start == 0" and
+ # "temporal extent == 1" signals the mask could otherwise be derived from.
+ tile_keyframes_mask = None
+ if modality.keyframes_mask is not None:
+ tile_keyframes_mask = modality.keyframes_mask[:, keep_indices]
+
positions = modality.positions[:, :, keep_indices, :]
if normalize_positions:
num_tile_gen = self._tile_generated_token_count(tile)
@@ -122,6 +125,7 @@ class VideoModalityTilingHelper:
timesteps=modality.timesteps[:, keep_indices],
positions=positions,
attention_mask=tile_attention_mask,
+ keyframes_mask=tile_keyframes_mask,
)
return tiled, TilingContext(
diff --git a/packages/ltx-core/src/ltx_core/model/__init__.py b/packages/ltx-core/src/ltx_core/model/__init__.py
index e8a5b27..cd2a259 100644
--- a/packages/ltx-core/src/ltx_core/model/__init__.py
+++ b/packages/ltx-core/src/ltx_core/model/__init__.py
@@ -1,8 +1,11 @@
"""Model definitions for LTX-2."""
+from ltx_core.model.disposable import Disposable, DisposableProtocol
from ltx_core.model.model_protocol import ModelConfigurator, ModelType
__all__ = [
+ "Disposable",
+ "DisposableProtocol",
"ModelConfigurator",
"ModelType",
]
diff --git a/packages/ltx-core/src/ltx_core/model/audio_vae/audio_vae.py b/packages/ltx-core/src/ltx_core/model/audio_vae/audio_vae.py
index 7b2cfe2..c84dee3 100644
--- a/packages/ltx-core/src/ltx_core/model/audio_vae/audio_vae.py
+++ b/packages/ltx-core/src/ltx_core/model/audio_vae/audio_vae.py
@@ -13,6 +13,7 @@ from ltx_core.model.audio_vae.resnet import ResnetBlock
from ltx_core.model.audio_vae.upsample import build_upsampling_path
from ltx_core.model.audio_vae.vocoder import Vocoder
from ltx_core.model.common.normalization import NormType, build_normalization_layer
+from ltx_core.model.disposable import Disposable
from ltx_core.types import Audio, AudioLatentShape
LATENT_DOWNSAMPLE_FACTOR = 4
@@ -56,7 +57,7 @@ def run_mid_block(mid: torch.nn.Module, features: torch.Tensor) -> torch.Tensor:
return mid.block_2(features, temb=None)
-class AudioEncoder(torch.nn.Module):
+class AudioEncoder(torch.nn.Module, Disposable):
"""
Encoder that compresses audio spectrograms into latent representations.
The encoder uses a series of downsampling blocks with residual connections,
@@ -273,7 +274,7 @@ def encode_audio(
return latent
-class AudioDecoder(torch.nn.Module):
+class AudioDecoder(torch.nn.Module, Disposable):
"""
Symmetric decoder that reconstructs audio spectrograms from latent features.
The decoder mirrors the encoder structure with configurable channel multipliers,
diff --git a/packages/ltx-core/src/ltx_core/model/audio_vae/model_configurator.py b/packages/ltx-core/src/ltx_core/model/audio_vae/model_configurator.py
index 90f9b06..6c897b7 100644
--- a/packages/ltx-core/src/ltx_core/model/audio_vae/model_configurator.py
+++ b/packages/ltx-core/src/ltx_core/model/audio_vae/model_configurator.py
@@ -46,8 +46,8 @@ class VocoderConfigurator(ModelConfigurator[Vocoder]):
"""
@classmethod
- def from_config(cls: type[Vocoder], config: dict) -> Vocoder | VocoderWithBWE:
- cfg = config.get("vocoder", {})
+ def from_metadata(cls, metadata: dict) -> Vocoder | VocoderWithBWE:
+ cfg = metadata.get("config", {}).get("vocoder", {})
if "bwe" not in cfg:
check_config_value(cfg, "resblock", "1")
@@ -107,8 +107,8 @@ VOCODER_COMFY_KEYS_FILTER = (
class AudioDecoderConfigurator(ModelConfigurator[AudioDecoder]):
@classmethod
- def from_config(cls: type[AudioDecoder], config: dict) -> AudioDecoder:
- audio_vae_cfg = config.get("audio_vae", {})
+ def from_metadata(cls, metadata: dict) -> AudioDecoder:
+ audio_vae_cfg = metadata.get("config", {}).get("audio_vae", {})
model_cfg = audio_vae_cfg.get("model", {})
model_params = model_cfg.get("params", {})
ddconfig = model_params.get("ddconfig", {})
@@ -143,8 +143,8 @@ class AudioDecoderConfigurator(ModelConfigurator[AudioDecoder]):
class AudioEncoderConfigurator(ModelConfigurator[AudioEncoder]):
@classmethod
- def from_config(cls: type[AudioEncoder], config: dict) -> AudioEncoder:
- audio_vae_cfg = config.get("audio_vae", {})
+ def from_metadata(cls, metadata: dict) -> AudioEncoder:
+ audio_vae_cfg = metadata.get("config", {}).get("audio_vae", {})
model_cfg = audio_vae_cfg.get("model", {})
model_params = model_cfg.get("params", {})
ddconfig = model_params.get("ddconfig", {})
diff --git a/packages/ltx-core/src/ltx_core/model/audio_vae/ops.py b/packages/ltx-core/src/ltx_core/model/audio_vae/ops.py
index 58fcbec..d45fc17 100644
--- a/packages/ltx-core/src/ltx_core/model/audio_vae/ops.py
+++ b/packages/ltx-core/src/ltx_core/model/audio_vae/ops.py
@@ -59,12 +59,14 @@ class PerChannelStatistics(nn.Module):
"""
Per-channel statistics for normalizing and denormalizing the latent representation.
This statics is computed over the entire dataset and stored in model's checkpoint under AudioVAE state_dict.
+ Defaults are identity (std=1, mean=0) so models constructed without a checkpoint
+ do not inherit allocator garbage / NaNs from ``torch.empty``.
"""
def __init__(self, latent_channels: int = 128) -> None:
super().__init__()
- self.register_buffer("std-of-means", torch.empty(latent_channels))
- self.register_buffer("mean-of-means", torch.empty(latent_channels))
+ self.register_buffer("std-of-means", torch.ones(latent_channels))
+ self.register_buffer("mean-of-means", torch.zeros(latent_channels))
def un_normalize(self, x: torch.Tensor) -> torch.Tensor:
return (x * self.get_buffer("std-of-means").to(x)) + self.get_buffer("mean-of-means").to(x)
diff --git a/packages/ltx-core/src/ltx_core/model/audio_vae/vocoder.py b/packages/ltx-core/src/ltx_core/model/audio_vae/vocoder.py
index 4af6941..7fa1572 100644
--- a/packages/ltx-core/src/ltx_core/model/audio_vae/vocoder.py
+++ b/packages/ltx-core/src/ltx_core/model/audio_vae/vocoder.py
@@ -9,6 +9,7 @@ import torch.nn.functional as F
from torch import nn
from ltx_core.model.audio_vae.resnet import LRELU_SLOPE, ResBlock1
+from ltx_core.model.disposable import Disposable
def get_padding(kernel_size: int, dilation: int = 1) -> int:
@@ -289,7 +290,7 @@ class AMPBlock1(nn.Module):
return x
-class Vocoder(torch.nn.Module):
+class Vocoder(torch.nn.Module, Disposable):
"""
Vocoder model for synthesizing audio from Mel spectrograms.
Args:
@@ -515,7 +516,7 @@ class MelSTFT(nn.Module):
return log_mel, magnitude, phase, energy
-class VocoderWithBWE(nn.Module):
+class VocoderWithBWE(nn.Module, Disposable):
"""Vocoder with bandwidth extension (BWE) upsampling.
Chains a mel-to-wav vocoder with a BWE module that upsamples the output
to a higher sample rate. The BWE computes a mel spectrogram from the
diff --git a/packages/ltx-core/src/ltx_core/model/disposable.py b/packages/ltx-core/src/ltx_core/model/disposable.py
new file mode 100644
index 0000000..496a734
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/disposable.py
@@ -0,0 +1,42 @@
+"""Disposable mixin: release parameter / persistent-buffer storage without wiping module-ops state."""
+
+from __future__ import annotations
+
+from typing import Protocol, runtime_checkable
+
+import torch
+from torch import nn
+
+
+@runtime_checkable
+class DisposableProtocol(Protocol):
+ def dispose(self) -> None: ...
+
+
+class Disposable(DisposableProtocol):
+ """Mixin providing :meth:`dispose`; use as ``class Foo(nn.Module, Disposable)``."""
+
+ def dispose(self) -> None:
+ """Release parameter / persistent-buffer storage to meta.
+ Non-persistent buffers (module-ops state) are left intact. Sync /
+ ``empty_cache`` are owned by the surrounding context (e.g. ``gpu_model``).
+ """
+ if not isinstance(self, nn.Module):
+ raise TypeError(f"{type(self).__name__} must be an nn.Module to dispose")
+
+ persistent = set(self.state_dict().keys())
+ for name, param in list(self.named_parameters()):
+ parent_name, _, attr = name.rpartition(".")
+ parent = self.get_submodule(parent_name) if parent_name else self
+ setattr(
+ parent,
+ attr,
+ nn.Parameter(torch.empty_like(param, device="meta"), requires_grad=param.requires_grad),
+ )
+
+ for name, buf in list(self.named_buffers()):
+ if name not in persistent:
+ continue
+ parent_name, _, attr = name.rpartition(".")
+ parent = self.get_submodule(parent_name) if parent_name else self
+ parent.register_buffer(attr, torch.empty_like(buf, device="meta"), persistent=True)
diff --git a/packages/ltx-core/src/ltx_core/model/model_protocol.py b/packages/ltx-core/src/ltx_core/model/model_protocol.py
index 5bd408a..4d029d5 100644
--- a/packages/ltx-core/src/ltx_core/model/model_protocol.py
+++ b/packages/ltx-core/src/ltx_core/model/model_protocol.py
@@ -12,10 +12,10 @@ ModelType = TypeVar("ModelType", covariant=True, bound=torch.nn.Module) # noqa:
class ModelConfigurator(Protocol[ModelType]):
- """Protocol for model loader classes that instantiates models from a configuration dictionary."""
+ """Protocol for model loader classes that instantiates models from checkpoint metadata."""
@classmethod
- def from_config(cls, config: dict) -> ModelType: ...
+ def from_metadata(cls, metadata: dict) -> ModelType: ...
class LTXModelProtocol(Protocol):
diff --git a/packages/ltx-core/src/ltx_core/model/transformer/attention.py b/packages/ltx-core/src/ltx_core/model/transformer/attention.py
index 8efb76f..8a38552 100644
--- a/packages/ltx-core/src/ltx_core/model/transformer/attention.py
+++ b/packages/ltx-core/src/ltx_core/model/transformer/attention.py
@@ -35,8 +35,11 @@ try:
except ImportError:
flash_attn_interface = None
try:
+ # FA4's cute path depends on a matching nvidia-cutlass-dsl; a newer cutlass
+ # can raise AttributeError (e.g. missing cute.core.ThrMma) rather than
+ # ImportError — treat any probe failure as "FA4 unavailable".
from flash_attn.cute import flash_attn_func as flash_attn_4_func
-except ImportError:
+except Exception:
flash_attn_4_func = None
try:
# macOS only: routes SDPA to Apple's prebuilt MPSGraph attention kernel.
diff --git a/packages/ltx-core/src/ltx_core/model/transformer/compiling.py b/packages/ltx-core/src/ltx_core/model/transformer/compiling.py
index f06716f..f312436 100644
--- a/packages/ltx-core/src/ltx_core/model/transformer/compiling.py
+++ b/packages/ltx-core/src/ltx_core/model/transformer/compiling.py
@@ -1,11 +1,15 @@
+import contextlib
+from collections.abc import Hashable, Iterator
from dataclasses import dataclass, field, replace
from typing import Any
import torch
+import torch.utils._pytree as pytree
from ltx_core.guidance.perturbations import BatchedPerturbationConfig, PerturbationType
from ltx_core.loader.module_ops import ModuleOps
from ltx_core.loader.sd_ops import SDOps
+from ltx_core.model.transformer.cudagraph_capture import CudaGraphRunner
from ltx_core.model.transformer.model import LTXModel
from ltx_core.model.transformer.transformer_args import BlockPerturbationsProcessor, TransformerArgs
@@ -19,35 +23,48 @@ _DEFAULT_DYNAMO_CONFIG: dict[str, Any] = {"inline_inbuilt_nn_modules": True, "ca
class CompilationConfig:
"""``torch.compile`` configuration for transformer blocks. ``None`` keeps eager."""
+ # torch.compile mode (e.g. "reduce-overhead"); None = default.
+ # reduce-overhead / max-autotune require GPU-resident weights (keeps_gpu_resident_weights).
mode: str | None = None
+ # torch.compile backend
backend: str = "inductor"
+ # error on graph breaks instead of falling back to eager
fullgraph: bool = False
+ # force dynamic shapes; None lets Dynamo decide
dynamic: bool | None = None
+ # torch._inductor.config overrides
inductor_config: dict[str, Any] = field(default_factory=lambda: dict(_DEFAULT_INDUCTOR_CONFIG))
+ # torch._dynamo.config overrides
dynamo_config: dict[str, Any] = field(default_factory=lambda: dict(_DEFAULT_DYNAMO_CONFIG))
+ # mark the sequence dimension as dynamic so one artifact serves all sequence lengths
+ seq_dim_dynamic: bool = True
+ # True: separate graph for guidance pass; False: single runtime-masked graph
+ recompile_perturbed_block: bool = True
+ # True: per-block compile + one CUDA graph over the block loop. Faster cold start
+ # than reduce-overhead's 48-block cudagraph tree. Requires GPU-resident weights
+ # (keeps_gpu_resident_weights).
+ capture: bool = False
class CompiledBlockPerturbationsProcessor(BlockPerturbationsProcessor):
- """Per-block input prep for compiled blocks: mark the seq dim dynamic, then attach perturbation
- as config-independent runtime masks so the block traces ONCE.
- The ``mark_dynamic`` calls keep the per-block compile artifact shape-polymorphic; they run in
- eager mode (this processor lives outside the compiled region) on the tensors about to cross into
- the trace. Both keep-masks are then attached UNCONDITIONALLY and the skip flags pinned False, so
- the trace is identical for every pass (cond / uncond / STG): the block never sees a flipped
- Python bool (``self_attn_all_perturbed``) or a None-vs-tensor mask that Dynamo would specialise
- on, so the STG pass no longer triggers a recompile. An all-keep mask blends to a no-op
- (``out*1 + v*0``); an all-zero mask reproduces the skip. Reads only ``mask`` (runtime tensor
- indexing), never the host-side ``all_in_batch`` / ``any_in_batch``.
+ """Eager prep of each block's inputs before they enter a compiled region.
+ When ``seq_dim_dynamic`` is set, marks sequence-length dims on the tensors about
+ to cross into the block so one compile artifact covers all lengths.
+ Perturbation state is attached based on ``recompile_perturbed_block``:
+ * ``True`` (default) — same as :class:`BlockPerturbationsProcessor`: optional
+ masks and Python bool shortcuts. Dynamo specialises on those, so an STG
+ pass gets its own graph (extra compile; clean passes skip the mask multiply).
+ * ``False`` — always attach both masks and pin the skip flags to ``False``.
+ Every pass (cond / uncond / STG) traces the same graph; an all-ones mask is
+ a no-op and an all-zeros mask is a skip.
"""
- def __call__(
- self,
- args: TransformerArgs,
- perturbations: BatchedPerturbationConfig,
- block_idx: int,
- self_attn_type: PerturbationType,
- cross_attn_type: PerturbationType,
- ) -> TransformerArgs:
+ def __init__(self, seq_dim_dynamic: bool, recompile_perturbed_block: bool) -> None:
+ super().__init__()
+ self._seq_dim_dynamic = seq_dim_dynamic
+ self._recompile_perturbed_block = recompile_perturbed_block
+
+ def _mark_seq_dim_dynamic(self, args: TransformerArgs) -> TransformerArgs:
# Positional embeddings are second-from-last regardless of rope type:
# split rope is (B, H, T, D//2) -- dim -2 == 2; interleaved rope is (B, T, D)
# -- dim -2 == 1. Both work via the negative index.
@@ -84,37 +101,120 @@ class CompiledBlockPerturbationsProcessor(BlockPerturbationsProcessor):
# and broadcasts, leave it static. Same guard pattern as `timesteps`.
if args.cross_scale_shift_timestep is not None and args.cross_scale_shift_timestep.shape[1] > 1:
torch._dynamo.mark_dynamic(args.cross_scale_shift_timestep, 1)
- # Perturbation as config-independent runtime masks (skip flags pinned False -> no recompile).
- return replace(
- args,
- self_attn_perturbation_mask=perturbations.mask(self_attn_type, block_idx),
- self_attn_all_perturbed=False,
- cross_attn_perturbation_mask=perturbations.mask(cross_attn_type, block_idx),
- cross_attn_skip_all=False,
- )
+ return args
-def compile_transformer(model: LTXModel, config: CompilationConfig) -> LTXModel:
- """Compile each transformer block via ``torch.compile`` with the given settings.
- The patched forward emits ``torch.compiler.cudagraph_mark_step_begin()`` once
- per step. Under CUDA-graph-enabling modes (``"reduce-overhead"`` /
- ``"max-autotune"``) this overrides Dynamo's per-invocation auto-mark
- heuristic, which would otherwise fire once per compiled block call (48 per
- forward) and treat each block call as a fresh iteration. Under other modes
- the mark is a no-op (decrements an unread counter).
+ def __call__(
+ self,
+ args: TransformerArgs,
+ perturbations: BatchedPerturbationConfig,
+ block_idx: int,
+ self_attn_type: PerturbationType,
+ cross_attn_type: PerturbationType,
+ ) -> TransformerArgs:
+ if self._seq_dim_dynamic:
+ args = self._mark_seq_dim_dynamic(args)
+
+ if self._recompile_perturbed_block:
+ # Conditional None-or-tensor masks + Python bool shortcuts: Dynamo specialises on the
+ # STG-perturbed pass and recompiles a separate block graph for it.
+ args = super().__call__(args, perturbations, block_idx, self_attn_type, cross_attn_type)
+ else:
+ # Unconditional runtime masks (skip flags pinned False): the block traces once, no recompile.
+ args = replace(
+ args,
+ self_attn_perturbation_mask=perturbations.mask(self_attn_type, block_idx),
+ self_attn_all_perturbed=False,
+ cross_attn_perturbation_mask=perturbations.mask(cross_attn_type, block_idx),
+ cross_attn_skip_all=False,
+ )
+
+ return args
+
+ def graph_signature(self, perturbations: BatchedPerturbationConfig) -> Hashable:
+ # recompile_perturbed_block=False attaches unconditional masks with fixed flags -> no
+ # perturbation guards, so the block never recompiles per pattern: one constant signature
+ # (graph per shape).
+ if not self._recompile_perturbed_block:
+ return ()
+ return super().graph_signature(perturbations)
+
+
+def _register_transformer_args_pytree() -> None:
+ """Register ``TransformerArgs`` as a pytree so :class:`CudaGraphRunner` can flatten it to
+ tensor leaves for copy-in/out. Idempotent.
+ """
+ if TransformerArgs not in pytree.SUPPORTED_NODES:
+ pytree.register_dataclass(TransformerArgs)
+
+
+def _compile_config_patches(config: CompilationConfig) -> Iterator[None]:
+ """Apply the config's inductor/dynamo patches for the duration of a compiled call."""
+ with (
+ torch._inductor.config.patch(**config.inductor_config),
+ torch._dynamo.config.patch(**config.dynamo_config), # type: ignore[attr-defined]
+ ):
+ yield
+
+
+def _compile_blocks(model: LTXModel, config: CompilationConfig, *, mode: str | None) -> None:
+ """Compile each transformer block and install the perturbation processor.
+ ``mode`` is the sole knob that differs between the two compile paths: the captured path passes
+ ``None`` (cudagraphs OFF -- it manages its own CUDA graph), the reduce-overhead path passes
+ ``config.mode``. Forcing ``dynamic=True`` over-dynamizes and trips a data-dependent ``.item()``
+ (DataDependentOutputException); ``config.dynamic`` plus the processor's per-block seq
+ ``mark_dynamic`` is what keeps the artifact shape-polymorphic.
"""
model.transformer_blocks = torch.nn.ModuleList(
- torch.compile(m, mode=config.mode, backend=config.backend, fullgraph=config.fullgraph, dynamic=config.dynamic)
+ torch.compile(m, mode=mode, backend=config.backend, fullgraph=config.fullgraph, dynamic=config.dynamic)
for m in model.transformer_blocks
)
- model.block_input_processor = CompiledBlockPerturbationsProcessor()
+ model.block_input_processor = CompiledBlockPerturbationsProcessor(
+ seq_dim_dynamic=config.seq_dim_dynamic, recompile_perturbed_block=config.recompile_perturbed_block
+ )
+
+
+def compile_transformer_captured(model: LTXModel, config: CompilationConfig) -> LTXModel:
+ """Per-block compile (dynamic, cudagraphs OFF) + self-managed per-shape CUDA-graph capture of
+ the block-loop.
+ Each block compiles once into a shape-polymorphic Inductor kernel -- AOTAutograd sees ONE
+ block (cheap ~38s), not a whole-forward compile whose functionalize metadata pass is O(48
+ blocks). ``_process_transformer_blocks`` (the 48-block loop) is then captured as ONE CUDA graph
+ per input shape by :class:`CudaGraphRunner` and replayed: single-graph runtime without that
+ O(48) AOT cost, staying shape-polymorphic (sweeping down from the max shape re-captures,
+ never recompiles). The RoPE/args ``prepare`` and output projection run eager (outside the
+ graph) -- they do host->device work that cannot be captured, and widening the boundary to
+ include them is only ~3% faster steady-state (not worth the shared RoPE changes it needs).
+ """
+ _register_transformer_args_pytree() # so the runner can flatten TransformerArgs to tensor leaves
+ _compile_blocks(model, config, mode=None) # cudagraphs OFF -- the runner captures the graph
+
+ original_block_loop = model._process_transformer_blocks
+
+ def patched_block_loop(
+ video: TransformerArgs | None, audio: TransformerArgs | None, perturbations: BatchedPerturbationConfig | None
+ ) -> tuple[TransformerArgs | None, TransformerArgs | None]:
+ # Config patches matter only during warmup/capture (the first-shape block compile); the
+ # steady-state replay path (CudaGraphRunner) never re-enters this.
+ with _compile_config_patches(config):
+ return original_block_loop(video, audio, perturbations)
+
+ model._process_transformer_blocks = CudaGraphRunner(patched_block_loop, model.block_input_processor)
+ return model
+
+
+def compile_transformer(model: LTXModel, config: CompilationConfig) -> LTXModel:
+ """Compile each transformer block via ``torch.compile`` with the given settings."""
+ if config.capture:
+ return compile_transformer_captured(model, config)
+ _compile_blocks(model, config, mode=config.mode)
def patched_dynamo_forward(*args, **kwargs) -> tuple[torch.Tensor, torch.Tensor]:
+ # One mark per step so reduce-overhead/max-autotune do not treat each of the
+ # 48 compiled block calls as a new iteration. No-op under other modes.
torch.compiler.cudagraph_mark_step_begin()
- with (
- torch._inductor.config.patch(**config.inductor_config),
- torch._dynamo.config.patch(**config.dynamo_config), # type: ignore[attr-defined]
- ):
+ with _compile_config_patches(config):
return model.forward_without_compilation(*args, **kwargs)
model.forward_without_compilation = model.forward
diff --git a/packages/ltx-core/src/ltx_core/model/transformer/cudagraph_capture.py b/packages/ltx-core/src/ltx_core/model/transformer/cudagraph_capture.py
new file mode 100644
index 0000000..6f3adbd
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/transformer/cudagraph_capture.py
@@ -0,0 +1,167 @@
+"""Self-managed CUDA-graph capture of the transformer block loop.
+Captures ``_process_transformer_blocks`` as one CUDA graph per (shape, perturbation signature)
+and replays it from persistent static buffers. RoPE prepare / output projection stay eager.
+Not thread-safe: :class:`CudaGraphRunner` (including the shared graph mempool) assumes a single
+caller; concurrent capture/replay is unsupported.
+"""
+
+from __future__ import annotations
+
+import dataclasses
+from collections.abc import Callable, Hashable
+from typing import TYPE_CHECKING
+
+import torch
+import torch.utils._pytree as pytree
+
+from ltx_core.guidance.perturbations import BatchedPerturbationConfig
+
+if TYPE_CHECKING:
+ # torch imports this under TYPE_CHECKING too (a runtime top-level import cycles).
+ from torch.cuda import _POOL_HANDLE
+
+ from ltx_core.model.transformer.transformer_args import BlockPerturbationsProcessor, TransformerArgs
+
+_BlockLoopFn = Callable[
+ ["TransformerArgs | None", "TransformerArgs | None", "BatchedPerturbationConfig"],
+ "tuple[TransformerArgs | None, TransformerArgs | None]",
+]
+_ShapeKey = tuple[tuple[int, ...], ...]
+# One capture identity: input shapes plus the block's perturbation graph signature (what the block
+# specialises on), so a perturbed pass keys to -- and recaptures -- its own graph.
+_CaptureKey = tuple[_ShapeKey, Hashable]
+
+
+class _Capture:
+ graph: torch.cuda.CUDAGraph
+ # Persistent static buffers the graph reads/writes. Inputs are copied in, outputs cloned out.
+ static_video: TransformerArgs | None
+ static_audio: TransformerArgs | None
+ static_perturbations: BatchedPerturbationConfig # wraps the static block_masks buffer read in-graph
+ static_video_out: TransformerArgs | None
+ static_audio_out: TransformerArgs | None
+
+
+def _shape_key(video: TransformerArgs | None, audio: TransformerArgs | None, block_masks: torch.Tensor) -> _ShapeKey:
+ tensors = [*pytree.tree_leaves(video), *pytree.tree_leaves(audio), block_masks]
+ return tuple(tuple(t.shape) for t in tensors if isinstance(t, torch.Tensor))
+
+
+def _clone_value(value: object) -> object:
+ """Clone a ``TransformerArgs`` field. Tensors and the rope ``(cos, sin)`` tuples are copied;
+ bools and ``None`` are immutable and shared as-is."""
+ if isinstance(value, torch.Tensor):
+ return value.clone()
+ if isinstance(value, tuple):
+ return tuple(t.clone() for t in value)
+ return value
+
+
+def _copy_value(dst: object, src: object) -> None:
+ """Copy ``src`` into ``dst`` in place. Non-tensor fields (bools/None) are baked into the captured
+ graph and need no copy; tensors and the rope ``(cos, sin)`` tuples are copied element-wise."""
+ if isinstance(dst, torch.Tensor):
+ dst.copy_(src, non_blocking=True)
+ elif isinstance(dst, tuple):
+ for d, s in zip(dst, src, strict=True):
+ d.copy_(s, non_blocking=True)
+
+
+def _clone_args(args: TransformerArgs | None) -> TransformerArgs | None:
+ """Clone args into fresh persistent buffers -- the one-time static-INPUT allocation in ``_capture``."""
+ if args is None:
+ return None
+ return dataclasses.replace(args, **{f.name: _clone_value(getattr(args, f.name)) for f in dataclasses.fields(args)})
+
+
+def _copy_args(dst: TransformerArgs | None, src: TransformerArgs | None) -> None:
+ """Copy ``src``'s tensors into ``dst``'s persistent static buffers, field by field, in place."""
+ if dst is None:
+ return
+ for f in dataclasses.fields(dst):
+ _copy_value(getattr(dst, f.name), getattr(src, f.name))
+
+
+class CudaGraphRunner:
+ """Wrap ``_process_transformer_blocks(video, audio, perturbations) -> (video_out, audio_out)``
+ with a per-(shape, perturbation) captured CUDA graph. Holds the video/audio ``TransformerArgs``
+ (and the perturbation ``block_masks``) as persistent static buffers: each call's tensors are
+ copied into the static inputs, the graph replayed, and the static OUTPUT buffers returned
+ directly (standard CUDA-graph idiom -- the caller reads them, via the eager output projection,
+ before the next replay overwrites them).
+ Not thread-safe. Capture dict mutation, static-buffer copy-in/out, and the class-level shared
+ mempool all assume a single-threaded caller; do not share a runner (or concurrent first-time
+ captures across runners) across threads.
+ """
+
+ # Shared mempool across runners so captures reuse intermediate memory (lazy init; not locked).
+ _shared_pool: _POOL_HANDLE | None = None
+
+ def __init__(
+ self, block_loop_fn: _BlockLoopFn, block_input_processor: BlockPerturbationsProcessor, warmup_iters: int = 3
+ ) -> None:
+ self._block_loop = block_loop_fn
+ # Keys the capture on the block's perturbation graph signature -- the SAME processor the
+ # wrapped block-loop uses, so a pass recaptures exactly when the block recompiles and the
+ # signature can never diverge from the actual guards.
+ self._block_input_processor = block_input_processor
+ self._warmup_iters = warmup_iters
+ self._captures: dict[_CaptureKey, _Capture] = {}
+
+ def __call__(
+ self, video: TransformerArgs | None, audio: TransformerArgs | None, perturbations: BatchedPerturbationConfig
+ ) -> tuple[TransformerArgs | None, TransformerArgs | None]:
+ key = self._cache_key(video, audio, perturbations)
+ cap = self._captures.get(key)
+ if cap is None:
+ cap = self._capture(video, audio, perturbations) # static inputs already hold this call's values
+ self._captures[key] = cap
+ else:
+ # Copy this call's inputs into the static buffers the graph reads.
+ _copy_args(cap.static_video, video)
+ _copy_args(cap.static_audio, audio)
+ cap.static_perturbations.block_masks.copy_(perturbations.block_masks, non_blocking=True)
+ # Always replay (even right after capture); never return the capture-run outputs.
+ cap.graph.replay()
+ return cap.static_video_out, cap.static_audio_out
+
+ def _cache_key(
+ self, video: TransformerArgs | None, audio: TransformerArgs | None, perturbations: BatchedPerturbationConfig
+ ) -> _CaptureKey:
+ """Capture identity: input shapes + the block's perturbation graph signature. Keying on the
+ signature makes a pass recapture exactly when it would recompile (and no more) -- the perturbed
+ pass no longer silently replays the clean same-shape graph."""
+ shape = _shape_key(video, audio, perturbations.block_masks)
+ return shape, self._block_input_processor.graph_signature(perturbations)
+
+ def _capture(
+ self, video: TransformerArgs | None, audio: TransformerArgs | None, perturbations: BatchedPerturbationConfig
+ ) -> _Capture:
+ static_video = _clone_args(video)
+ static_audio = _clone_args(audio)
+ # Device masks are in-graph inputs; host mirror feeds eager any/all during warmup (may be None).
+ static_perturbations = BatchedPerturbationConfig.from_masks(
+ perturbations.block_masks.clone(), perturbations.block_masks_cpu
+ )
+ # Warmup on a side stream so any (first-shape) Dynamo/Inductor compile, autotune, cuBLAS
+ # workspace, and IPC-kernel residency land OUTSIDE the capture. All ranks run this lockstep.
+ side = torch.cuda.Stream()
+ side.wait_stream(torch.cuda.current_stream())
+ with torch.cuda.stream(side):
+ for _ in range(self._warmup_iters):
+ self._block_loop(static_video, static_audio, static_perturbations)
+ torch.cuda.current_stream().wait_stream(side)
+ torch.cuda.synchronize()
+ torch._C._cuda_clearCublasWorkspaces() # avoid double-counting cuBLAS workspace into the pool
+ # Restore this call's inputs (warmup may have written into the static buffers) so the capture
+ # records with correct values and the post-capture replay yields this call's output.
+ _copy_args(static_video, video)
+ _copy_args(static_audio, audio)
+ static_perturbations.block_masks.copy_(perturbations.block_masks, non_blocking=True)
+ if CudaGraphRunner._shared_pool is None:
+ CudaGraphRunner._shared_pool = torch.cuda.graph_pool_handle()
+ graph = torch.cuda.CUDAGraph()
+ with torch.cuda.graph(graph, pool=CudaGraphRunner._shared_pool, capture_error_mode="global"):
+ video_out, audio_out = self._block_loop(static_video, static_audio, static_perturbations)
+ return _Capture(graph, static_video, static_audio, static_perturbations, video_out, audio_out)
diff --git a/packages/ltx-core/src/ltx_core/model/transformer/feed_forward.py b/packages/ltx-core/src/ltx_core/model/transformer/feed_forward.py
index a55b5a7..95ebb2b 100644
--- a/packages/ltx-core/src/ltx_core/model/transformer/feed_forward.py
+++ b/packages/ltx-core/src/ltx_core/model/transformer/feed_forward.py
@@ -4,12 +4,12 @@ from ltx_core.model.transformer.gelu_approx import GELUApprox
class FeedForward(torch.nn.Module):
- def __init__(self, dim: int, dim_out: int, mult: int = 4) -> None:
+ def __init__(self, dim: int, dim_out: int, mult: int = 4, bias: bool = True) -> None:
super().__init__()
inner_dim = int(dim * mult)
- project_in = GELUApprox(dim, inner_dim)
+ project_in = GELUApprox(dim, inner_dim, bias=bias)
- self.net = torch.nn.Sequential(project_in, torch.nn.Identity(), torch.nn.Linear(inner_dim, dim_out))
+ self.net = torch.nn.Sequential(project_in, torch.nn.Identity(), torch.nn.Linear(inner_dim, dim_out, bias=bias))
def forward(self, x: torch.Tensor) -> torch.Tensor:
return self.net(x)
diff --git a/packages/ltx-core/src/ltx_core/model/transformer/gelu_approx.py b/packages/ltx-core/src/ltx_core/model/transformer/gelu_approx.py
index 1923e6e..8363271 100644
--- a/packages/ltx-core/src/ltx_core/model/transformer/gelu_approx.py
+++ b/packages/ltx-core/src/ltx_core/model/transformer/gelu_approx.py
@@ -2,9 +2,9 @@ import torch
class GELUApprox(torch.nn.Module):
- def __init__(self, dim_in: int, dim_out: int) -> None:
+ def __init__(self, dim_in: int, dim_out: int, bias: bool = True) -> None:
super().__init__()
- self.proj = torch.nn.Linear(dim_in, dim_out)
+ self.proj = torch.nn.Linear(dim_in, dim_out, bias=bias)
def forward(self, x: torch.Tensor) -> torch.Tensor:
return torch.nn.functional.gelu(self.proj(x), approximate="tanh")
diff --git a/packages/ltx-core/src/ltx_core/model/transformer/modality.py b/packages/ltx-core/src/ltx_core/model/transformer/modality.py
index d4d9018..872307d 100644
--- a/packages/ltx-core/src/ltx_core/model/transformer/modality.py
+++ b/packages/ltx-core/src/ltx_core/model/transformer/modality.py
@@ -38,6 +38,13 @@ class Modality:
attention. ``None`` means unrestricted (full) attention between
all tokens. Built incrementally by conditioning items; see
:class:`~ltx_core.conditioning.types.attention_strength_wrapper.ConditioningItemAttentionStrengthWrapper`.
+ keyframes_mask: Optional per-token marker, shape ``(B, T, 1)`` -- the same layout as
+ ``timesteps`` -- non-zero for tokens whose latent encodes a *single standalone pixel
+ frame* rather than the usual multi-frame span. That is the target's first latent frame
+ (the video encoder is causal) plus any generated keyframe slots. Selects the tokens
+ that receive the model's learned keyframe absolute-position embedding. ``None`` means
+ no token is marked, which is also the effective behaviour of every model built without
+ ``use_keyframes_abs_pos_embedding``.
"""
latent: (
@@ -53,6 +60,7 @@ class Modality:
enabled: bool = True
context_mask: torch.Tensor | None = None
attention_mask: torch.Tensor | None = None
+ keyframes_mask: torch.Tensor | None = None # Shape: (B, T, 1), non-zero on single-pixel-frame latents
def split(self, sizes: list[int]) -> list[Modality]:
"""Split along the batch dimension into chunks of the given sizes."""
diff --git a/packages/ltx-core/src/ltx_core/model/transformer/model.py b/packages/ltx-core/src/ltx_core/model/transformer/model.py
index 3c2bcba..dc00164 100644
--- a/packages/ltx-core/src/ltx_core/model/transformer/model.py
+++ b/packages/ltx-core/src/ltx_core/model/transformer/model.py
@@ -4,6 +4,7 @@ from enum import Enum
import torch
from ltx_core.guidance.perturbations import BatchedPerturbationConfig, PerturbationType
+from ltx_core.model.disposable import Disposable
from ltx_core.model.model_protocol import LTXModelProtocol
from ltx_core.model.transformer.adaln import AdaLayerNormSingle, adaln_embedding_coefficient
from ltx_core.model.transformer.attention import attention_label
@@ -38,7 +39,7 @@ class LTXModelType(Enum):
return self in (LTXModelType.AudioVideo, LTXModelType.AudioOnly)
-class LTXModel(torch.nn.Module):
+class LTXModel(torch.nn.Module, Disposable):
"""
LTX model transformer implementation.
This class implements the transformer blocks for the LTX model.
@@ -73,6 +74,10 @@ class LTXModel(torch.nn.Module):
caption_projection: torch.nn.Module | None = None,
audio_caption_projection: torch.nn.Module | None = None,
cross_attention_adaln: bool = False,
+ use_prompt_adaln_single: bool = True,
+ ff_bias: bool = True,
+ audio_ff_bias: bool = True,
+ use_keyframes_abs_pos_embedding: bool = False,
):
super().__init__()
# Log the attention backends this transformer is built with. Reading the resolved
@@ -86,12 +91,14 @@ class LTXModel(torch.nn.Module):
)
self._enable_gradient_checkpointing = False
self.cross_attention_adaln = cross_attention_adaln
+ self.use_prompt_adaln_single = use_prompt_adaln_single
self.use_middle_indices_grid = use_middle_indices_grid
self.rope_type = rope_type
self.double_precision_rope = double_precision_rope
self.timestep_scale_multiplier = timestep_scale_multiplier
self.positional_embedding_theta = positional_embedding_theta
self.model_type = model_type
+ self.use_keyframes_abs_pos_embedding = use_keyframes_abs_pos_embedding
cross_pe_max_pos = None
if model_type.is_video_enabled():
if positional_embedding_max_pos is None:
@@ -136,6 +143,8 @@ class LTXModel(torch.nn.Module):
norm_eps=norm_eps,
ops=ops,
apply_gated_attention=apply_gated_attention,
+ ff_bias=ff_bias,
+ audio_ff_bias=audio_ff_bias,
)
# Hook for per-block input prep. Compile transforms in `compiling.py`
# wrap (not replace) this with a processor that also marks the seq dim
@@ -146,6 +155,50 @@ class LTXModel(torch.nn.Module):
def _adaln_embedding_coefficient(self) -> int:
return adaln_embedding_coefficient(self.cross_attention_adaln)
+ def _keyframes_embedding(self) -> torch.Tensor | None:
+ """Look the parameter up on each call.
+ Deliberately not a captured reference: this parameter is absent from checkpoints that
+ predate it, so it is created on the meta device and only later materialized -- which
+ replaces the parameter object. A stale reference would keep pointing at the meta tensor.
+ """
+ return getattr(self, "keyframes_abs_pos_embedding", None)
+
+ @property
+ def supports_keyframes_abs_pos_embedding(self) -> bool:
+ """Whether this model has a usable keyframe absolute-position embedding.
+ False for models built without the flag, and also for a model whose config set the flag
+ but whose checkpoint carried no weight for it (the parameter would still be on ``meta``).
+ """
+ embedding = self._keyframes_embedding()
+ return embedding is not None and not embedding.is_meta
+
+ def enable_keyframes_abs_pos_embedding(self) -> None:
+ """Ensure the keyframe embedding exists and holds real zeros, creating it if needed.
+ Covers both ways a loaded model can arrive without a usable parameter:
+ - The checkpoint predates the feature entirely, so its config never set
+ ``use_keyframes_abs_pos_embedding`` and no parameter was built. It is created here.
+ - The config did set the flag but the checkpoint carried no weight for it. Models are
+ built on the meta device and loaded with ``strict=False, assign=True``, so such a
+ parameter stays on ``meta`` and would fail at the first forward.
+ Idempotent, and never overwrites a parameter that already holds real storage -- a
+ checkpoint carrying a trained embedding keeps it. The preprocessors resolve the parameter
+ through a provider on every call, so enabling it after the model is built is safe.
+ A zero embedding is an exact no-op, so this only makes the marker *harmless*, not
+ meaningful: it does not give an untrained checkpoint the keyframe capability.
+ """
+ if not self.model_type.is_video_enabled():
+ raise ValueError("The keyframe absolute-position embedding is a video-stream parameter")
+
+ existing = self._keyframes_embedding()
+ if existing is not None and not existing.is_meta:
+ return
+
+ reference = self.patchify_proj.weight
+ shape = existing.shape if existing is not None else (1, self.inner_dim)
+ dtype = existing.dtype if existing is not None else reference.dtype
+ self.use_keyframes_abs_pos_embedding = True
+ self.keyframes_abs_pos_embedding = torch.nn.Parameter(torch.zeros(shape, dtype=dtype, device=reference.device))
+
def _init_video(
self,
in_channels: int,
@@ -159,10 +212,18 @@ class LTXModel(torch.nn.Module):
if caption_projection is not None:
self.caption_projection = caption_projection
+ # Marks tokens whose latent encodes a single standalone pixel frame. Zero-initialized, so a
+ # checkpoint that predates it behaves identically until the parameter is trained.
+ self.keyframes_abs_pos_embedding = (
+ torch.nn.Parameter(torch.zeros(1, self.inner_dim)) if self.use_keyframes_abs_pos_embedding else None
+ )
+
self.adaln_single = AdaLayerNormSingle(self.inner_dim, embedding_coefficient=self._adaln_embedding_coefficient)
self.prompt_adaln_single = (
- AdaLayerNormSingle(self.inner_dim, embedding_coefficient=2) if self.cross_attention_adaln else None
+ AdaLayerNormSingle(self.inner_dim, embedding_coefficient=2)
+ if self.cross_attention_adaln and self.use_prompt_adaln_single
+ else None
)
# Video output components
@@ -190,7 +251,9 @@ class LTXModel(torch.nn.Module):
)
self.audio_prompt_adaln_single = (
- AdaLayerNormSingle(self.audio_inner_dim, embedding_coefficient=2) if self.cross_attention_adaln else None
+ AdaLayerNormSingle(self.audio_inner_dim, embedding_coefficient=2)
+ if self.cross_attention_adaln and self.use_prompt_adaln_single
+ else None
)
# Audio output components
@@ -248,6 +311,7 @@ class LTXModel(torch.nn.Module):
av_ca_timestep_scale_multiplier=self.av_ca_timestep_scale_multiplier,
caption_projection=getattr(self, "caption_projection", None),
prompt_adaln=getattr(self, "prompt_adaln_single", None),
+ keyframes_embedding_provider=self._keyframes_embedding,
)
self.audio_args_preprocessor = MultiModalTransformerArgsPreprocessor(
patchify_proj=self.audio_patchify_proj,
@@ -282,6 +346,7 @@ class LTXModel(torch.nn.Module):
rope_type=self.rope_type,
caption_projection=getattr(self, "caption_projection", None),
prompt_adaln=getattr(self, "prompt_adaln_single", None),
+ keyframes_embedding_provider=self._keyframes_embedding,
)
elif self.model_type.is_audio_enabled():
self.audio_args_preprocessor = TransformerArgsPreprocessor(
@@ -309,6 +374,8 @@ class LTXModel(torch.nn.Module):
norm_eps: float,
ops: TransformerOpsConfig,
apply_gated_attention: bool,
+ ff_bias: bool = True,
+ audio_ff_bias: bool = True,
) -> None:
"""Initialize transformer blocks for LTX."""
video_config = (
@@ -319,6 +386,7 @@ class LTXModel(torch.nn.Module):
context_dim=cross_attention_dim,
apply_gated_attention=apply_gated_attention,
cross_attention_adaln=self.cross_attention_adaln,
+ ff_bias=ff_bias,
)
if self.model_type.is_video_enabled()
else None
@@ -331,6 +399,7 @@ class LTXModel(torch.nn.Module):
context_dim=audio_cross_attention_dim,
apply_gated_attention=apply_gated_attention,
cross_attention_adaln=self.cross_attention_adaln,
+ ff_bias=audio_ff_bias,
)
if self.model_type.is_audio_enabled()
else None
@@ -469,7 +538,7 @@ class LTXModel(torch.nn.Module):
return vx, ax
-class LegacyX0Model(torch.nn.Module):
+class LegacyX0Model(torch.nn.Module, Disposable):
"""
Legacy X0 model implementation.
Returns fully denoised output based on the velocities produced by the base model.
@@ -502,7 +571,7 @@ class LegacyX0Model(torch.nn.Module):
return denoised_video, denoised_audio
-class X0Model(torch.nn.Module):
+class X0Model(torch.nn.Module, Disposable):
"""
X0 model implementation.
Returns fully denoised outputs based on the velocities produced by the base model.
diff --git a/packages/ltx-core/src/ltx_core/model/transformer/model_configurator.py b/packages/ltx-core/src/ltx_core/model/transformer/model_configurator.py
index fb47cef..8661527 100644
--- a/packages/ltx-core/src/ltx_core/model/transformer/model_configurator.py
+++ b/packages/ltx-core/src/ltx_core/model/transformer/model_configurator.py
@@ -16,7 +16,8 @@ class LTXModelConfigurator(ModelConfigurator[LTXModel]):
"""
@classmethod
- def from_config(cls, config: dict, ops: TransformerOpsConfig = DEFAULT_TRANSFORMER_OPS) -> LTXModel:
+ def from_metadata(cls, metadata: dict, ops: TransformerOpsConfig = DEFAULT_TRANSFORMER_OPS) -> LTXModel:
+ config = metadata.get("config", {})
# Build caption projections for 19B models (projection handled in transformer).
caption_projection, audio_caption_projection = _build_caption_projections(config, is_av=True)
@@ -69,6 +70,16 @@ class LTXModelConfigurator(ModelConfigurator[LTXModel]):
caption_projection=caption_projection,
audio_caption_projection=audio_caption_projection,
cross_attention_adaln=config.get("cross_attention_adaln", False),
+ # Default True preserves the prompt-side AdaLN MLP for existing checkpoints. KV-cacheable
+ # checkpoints set use_prompt_adaln_single=false, dropping the timestep-dependence of the
+ # cross-attention K/V so they can be computed once per prompt and reused across steps.
+ use_prompt_adaln_single=config.get("use_prompt_adaln_single", True),
+ # Default True keeps backwards compatibility: pre-2.5 checkpoints lack these
+ # keys and retain FFN biases. LTX 2.5 (gemma4) sets ff_bias=false.
+ ff_bias=config.get("ff_bias", True),
+ audio_ff_bias=config.get("audio_ff_bias", True),
+ # Only generated-keyframe checkpoints set this; defaults off so older ones are untouched.
+ use_keyframes_abs_pos_embedding=config.get("use_keyframes_abs_pos_embedding", False),
)
@@ -79,7 +90,8 @@ class LTXVideoOnlyModelConfigurator(ModelConfigurator[LTXModel]):
"""
@classmethod
- def from_config(cls, config: dict, ops: TransformerOpsConfig = DEFAULT_TRANSFORMER_OPS) -> LTXModel:
+ def from_metadata(cls, metadata: dict, ops: TransformerOpsConfig = DEFAULT_TRANSFORMER_OPS) -> LTXModel:
+ config = metadata.get("config", {})
# Build caption projection for 19B model (projection handled in transformer).
caption_projection, _ = _build_caption_projections(config, is_av=False)
@@ -120,6 +132,14 @@ class LTXVideoOnlyModelConfigurator(ModelConfigurator[LTXModel]):
apply_gated_attention=config.get("apply_gated_attention", False),
caption_projection=caption_projection,
cross_attention_adaln=config.get("cross_attention_adaln", False),
+ # Default True preserves the prompt-side AdaLN MLP for existing checkpoints. KV-cacheable
+ # checkpoints set use_prompt_adaln_single=false, making the cross-attention K/V
+ # timestep-independent (computed once per prompt, reused across steps).
+ use_prompt_adaln_single=config.get("use_prompt_adaln_single", True),
+ # Default True keeps backwards compatibility with pre-2.5 checkpoints.
+ ff_bias=config.get("ff_bias", True),
+ # Only generated-keyframe checkpoints set this; defaults off so older ones are untouched.
+ use_keyframes_abs_pos_embedding=config.get("use_keyframes_abs_pos_embedding", False),
)
@@ -132,7 +152,8 @@ class LTXAudioOnlyModelConfigurator(ModelConfigurator[LTXModel]):
"""
@classmethod
- def from_config(cls, config: dict, ops: TransformerOpsConfig = DEFAULT_TRANSFORMER_OPS) -> LTXModel:
+ def from_metadata(cls, metadata: dict, ops: TransformerOpsConfig = DEFAULT_TRANSFORMER_OPS) -> LTXModel:
+ config = metadata.get("config", {})
# Build audio caption projection for 19B models (projection handled in transformer).
_, audio_caption_projection = _build_caption_projections(config, is_av=True)
diff --git a/packages/ltx-core/src/ltx_core/model/transformer/rope.py b/packages/ltx-core/src/ltx_core/model/transformer/rope.py
index ece46a4..e66c5f0 100644
--- a/packages/ltx-core/src/ltx_core/model/transformer/rope.py
+++ b/packages/ltx-core/src/ltx_core/model/transformer/rope.py
@@ -102,7 +102,9 @@ def generate_freq_grid_np(
dtype=np.float64,
),
)
- return torch.tensor(pow_indices * math.pi / 2, dtype=torch.float32)
+ # as_tensor (not tensor): under torch.compile the numpy ops above are traced as tensors,
+ # so torch.tensor() would copy-construct from a tensor (warns); as_tensor casts in place.
+ return torch.as_tensor(pow_indices * math.pi / 2, dtype=torch.float32)
@functools.lru_cache(maxsize=5)
diff --git a/packages/ltx-core/src/ltx_core/model/transformer/transformer.py b/packages/ltx-core/src/ltx_core/model/transformer/transformer.py
index d1c3002..1d874f1 100644
--- a/packages/ltx-core/src/ltx_core/model/transformer/transformer.py
+++ b/packages/ltx-core/src/ltx_core/model/transformer/transformer.py
@@ -34,6 +34,7 @@ class TransformerConfig:
context_dim: int
apply_gated_attention: bool = False
cross_attention_adaln: bool = False
+ ff_bias: bool = True
@dataclass(frozen=True)
@@ -119,7 +120,7 @@ class BasicAVTransformerBlock(torch.nn.Module):
ops=ops.attention_ops,
apply_gated_attention=video.apply_gated_attention,
)
- self.ff = FeedForward(video.dim, dim_out=video.dim)
+ self.ff = FeedForward(video.dim, dim_out=video.dim, bias=video.ff_bias)
video_sst_size = adaln_embedding_coefficient(video.cross_attention_adaln)
self.scale_shift_table = torch.nn.Parameter(torch.empty(video_sst_size, video.dim))
@@ -144,7 +145,7 @@ class BasicAVTransformerBlock(torch.nn.Module):
ops=ops.attention_ops,
apply_gated_attention=audio.apply_gated_attention,
)
- self.audio_ff = FeedForward(audio.dim, dim_out=audio.dim)
+ self.audio_ff = FeedForward(audio.dim, dim_out=audio.dim, bias=audio.ff_bias)
audio_sst_size = adaln_embedding_coefficient(audio.cross_attention_adaln)
self.audio_scale_shift_table = torch.nn.Parameter(torch.empty(audio_sst_size, audio.dim))
@@ -424,7 +425,7 @@ def apply_cross_attention_adaln(
q_scale: torch.Tensor,
q_gate: torch.Tensor,
prompt_scale_shift_table: torch.Tensor,
- prompt_timestep: torch.Tensor,
+ prompt_timestep: torch.Tensor | None,
context_mask: torch.Tensor | None = None,
) -> torch.Tensor:
"""Apply query/key AdaLN modulation then cross-attention.
@@ -433,10 +434,14 @@ def apply_cross_attention_adaln(
repeated here.
"""
batch_size = x_normed.shape[0]
- shift_kv, scale_kv = (
- prompt_scale_shift_table[None, None].to(device=x_normed.device, dtype=x_normed.dtype)
- + prompt_timestep.reshape(batch_size, prompt_timestep.shape[1], 2, -1)
- ).unbind(dim=2)
+ # K/V modulation. With the prompt-side AdaLN MLP disabled (use_prompt_adaln_single=False),
+ # prompt_timestep is None and only the static per-block table applies, so K/V are
+ # timestep-independent and cacheable across denoising/AR steps. Otherwise the timestep-
+ # conditioned MLP output is added on top.
+ kv_modulation = prompt_scale_shift_table[None, None].to(device=x_normed.device, dtype=x_normed.dtype)
+ if prompt_timestep is not None:
+ kv_modulation = kv_modulation + prompt_timestep.reshape(batch_size, prompt_timestep.shape[1], 2, -1)
+ shift_kv, scale_kv = kv_modulation.unbind(dim=2)
attn_input = x_normed * (1 + q_scale) + q_shift
encoder_hidden_states = context * (1 + scale_kv) + shift_kv
return attn(attn_input, context=encoder_hidden_states, mask=context_mask) * q_gate
diff --git a/packages/ltx-core/src/ltx_core/model/transformer/transformer_args.py b/packages/ltx-core/src/ltx_core/model/transformer/transformer_args.py
index 86203b3..566bbd3 100644
--- a/packages/ltx-core/src/ltx_core/model/transformer/transformer_args.py
+++ b/packages/ltx-core/src/ltx_core/model/transformer/transformer_args.py
@@ -1,3 +1,4 @@
+from collections.abc import Callable, Hashable
from dataclasses import dataclass, replace
import torch
@@ -12,6 +13,35 @@ from ltx_core.model.transformer.rope import (
precompute_freqs_cis,
)
+#: Returns the model's keyframe absolute-position embedding, or ``None`` when the model has none.
+#: A provider rather than the tensor itself because a parameter the checkpoint did not supply is
+#: materialized later, which *replaces* the parameter object -- a directly-held reference would
+#: keep pointing at the stale meta tensor.
+KeyframesEmbeddingProvider = Callable[[], torch.Tensor | None]
+
+
+def apply_keyframes_absolute_embedding(
+ hidden_states: torch.Tensor,
+ keyframes_mask: torch.Tensor | None,
+ embedding_provider: KeyframesEmbeddingProvider | None,
+) -> torch.Tensor:
+ """Add the learned keyframe marker to single-pixel-frame tokens.
+ Applied to projected hidden states, immediately after ``patchify_proj``. The embedding is
+ zero-initialized, so this is an exact no-op until it is trained -- and a no-op forever for
+ models built without ``use_keyframes_abs_pos_embedding``, whose provider yields ``None``.
+ Args:
+ hidden_states: ``(B, T, D)`` projected tokens.
+ keyframes_mask: ``(B, T, 1)`` marker, or ``None`` for "no token is marked".
+ embedding_provider: Resolves the ``(1, D)`` embedding, or ``None`` if the model has none.
+ """
+ if embedding_provider is None or keyframes_mask is None:
+ return hidden_states
+ embedding = embedding_provider()
+ if embedding is None:
+ return hidden_states
+ mask = (keyframes_mask > 0).to(dtype=hidden_states.dtype)
+ return hidden_states + mask * embedding.to(dtype=hidden_states.dtype)
+
@dataclass(frozen=True)
class TransformerArgs:
@@ -54,6 +84,23 @@ class BlockPerturbationsProcessor:
is None when every sample skips the cross-attention entirely.
"""
+ def _block_guards(
+ self,
+ perturbations: BatchedPerturbationConfig,
+ block_idx: int,
+ self_type: PerturbationType,
+ cross_type: PerturbationType,
+ ) -> tuple[bool, bool, bool]:
+ """The values the block's attention branches specialise on: ``(self_mask_present, all_self,
+ all_cross)``. Self-attn has three paths -- none/partial/all -- so it needs both whether a
+ blend mask is present (partial) and ``all_self`` (skip); cross-attn multiplies its mask
+ unconditionally when it runs, so only ``all_cross`` (skip the whole block) matters. Mask
+ VALUES below this ride in as runtime data and do not change which path runs."""
+ all_self = perturbations.all_in_batch(self_type, block_idx)
+ any_self = perturbations.any_in_batch(self_type, block_idx)
+ all_cross = perturbations.all_in_batch(cross_type, block_idx)
+ return (any_self and not all_self), all_self, all_cross
+
def __call__(
self,
args: "TransformerArgs",
@@ -62,25 +109,35 @@ class BlockPerturbationsProcessor:
self_attn_type: PerturbationType,
cross_attn_type: PerturbationType,
) -> "TransformerArgs":
- all_self = perturbations.all_in_batch(self_attn_type, block_idx)
- any_self = perturbations.any_in_batch(self_attn_type, block_idx)
- self_mask: torch.Tensor | None = None
- if any_self and not all_self:
- self_mask = perturbations.mask(self_attn_type, block_idx)
-
- all_cross = perturbations.all_in_batch(cross_attn_type, block_idx)
- cross_mask: torch.Tensor | None = None
- if not all_cross:
- cross_mask = perturbations.mask(cross_attn_type, block_idx)
-
+ self_mask_present, all_self, all_cross = self._block_guards(
+ perturbations, block_idx, self_attn_type, cross_attn_type
+ )
return replace(
args,
- self_attn_perturbation_mask=self_mask,
+ self_attn_perturbation_mask=perturbations.mask(self_attn_type, block_idx) if self_mask_present else None,
self_attn_all_perturbed=all_self,
- cross_attn_perturbation_mask=cross_mask,
+ cross_attn_perturbation_mask=None if all_cross else perturbations.mask(cross_attn_type, block_idx),
cross_attn_skip_all=all_cross,
)
+ def graph_signature(self, perturbations: BatchedPerturbationConfig) -> Hashable:
+ """Identity of the block graph for this perturbation config: the per-block guard values the
+ attention branches specialise on (see ``_block_guards``). A CUDA-graph capture keyed on it
+ recaptures when -- and only when -- the block would recompile; mask values below this
+ granularity ride in as copy-in runtime data and never change the graph."""
+ assert perturbations.block_masks_cpu is not None, "graph signature needs the host mask mirror"
+ num_blocks = perturbations.block_masks_cpu.shape[1]
+ # (self-attn, cross-attn) types per modality, as _process_transformer_blocks applies them.
+ modality_types = (
+ (PerturbationType.SKIP_VIDEO_SELF_ATTN, PerturbationType.SKIP_A2V_CROSS_ATTN),
+ (PerturbationType.SKIP_AUDIO_SELF_ATTN, PerturbationType.SKIP_V2A_CROSS_ATTN),
+ )
+ return tuple(
+ self._block_guards(perturbations, block_idx, self_type, cross_type)
+ for block_idx in range(num_blocks)
+ for self_type, cross_type in modality_types
+ )
+
class TransformerArgsPreprocessor:
def __init__( # noqa: PLR0913
@@ -97,6 +154,7 @@ class TransformerArgsPreprocessor:
rope_type: LTXRopeType,
caption_projection: torch.nn.Module | None = None,
prompt_adaln: AdaLayerNormSingle | None = None,
+ keyframes_embedding_provider: KeyframesEmbeddingProvider | None = None,
) -> None:
self.patchify_proj = patchify_proj
self.adaln = adaln
@@ -110,6 +168,7 @@ class TransformerArgsPreprocessor:
self.rope_type = rope_type
self.caption_projection = caption_projection
self.prompt_adaln = prompt_adaln
+ self.keyframes_embedding_provider = keyframes_embedding_provider
def _prepare_timestep(
self, timestep: torch.Tensor, adaln: AdaLayerNormSingle, batch_size: int, hidden_dtype: torch.dtype
@@ -207,6 +266,7 @@ class TransformerArgsPreprocessor:
cross_modality: Modality | None = None, # noqa: ARG002
) -> TransformerArgs:
x = self.patchify_proj(modality.latent)
+ x = apply_keyframes_absolute_embedding(x, modality.keyframes_mask, self.keyframes_embedding_provider)
batch_size = x.shape[0]
timestep, embedded_timestep = self._prepare_timestep(
modality.timesteps, self.adaln, batch_size, modality.latent.dtype
@@ -263,6 +323,7 @@ class MultiModalTransformerArgsPreprocessor:
av_ca_timestep_scale_multiplier: int,
caption_projection: torch.nn.Module | None = None,
prompt_adaln: AdaLayerNormSingle | None = None,
+ keyframes_embedding_provider: KeyframesEmbeddingProvider | None = None,
) -> None:
self.simple_preprocessor = TransformerArgsPreprocessor(
patchify_proj=patchify_proj,
@@ -277,6 +338,7 @@ class MultiModalTransformerArgsPreprocessor:
rope_type=rope_type,
caption_projection=caption_projection,
prompt_adaln=prompt_adaln,
+ keyframes_embedding_provider=keyframes_embedding_provider,
)
self.cross_scale_shift_adaln = cross_scale_shift_adaln
self.cross_gate_adaln = cross_gate_adaln
diff --git a/packages/ltx-core/src/ltx_core/model/upsampler/model.py b/packages/ltx-core/src/ltx_core/model/upsampler/model.py
index 10d65ed..48851d1 100644
--- a/packages/ltx-core/src/ltx_core/model/upsampler/model.py
+++ b/packages/ltx-core/src/ltx_core/model/upsampler/model.py
@@ -1,13 +1,14 @@
import torch
from einops import rearrange
+from ltx_core.model.disposable import Disposable
from ltx_core.model.upsampler.pixel_shuffle import PixelShuffleND
from ltx_core.model.upsampler.res_block import ResBlock
from ltx_core.model.upsampler.spatial_rational_resampler import SpatialRationalResampler
from ltx_core.model.video_vae import VideoEncoder
-class LatentUpsampler(torch.nn.Module):
+class LatentUpsampler(torch.nn.Module, Disposable):
"""
Model to upsample VAE latents spatially and/or temporally.
Args:
diff --git a/packages/ltx-core/src/ltx_core/model/upsampler/model_configurator.py b/packages/ltx-core/src/ltx_core/model/upsampler/model_configurator.py
index 2a714a4..9cbb925 100644
--- a/packages/ltx-core/src/ltx_core/model/upsampler/model_configurator.py
+++ b/packages/ltx-core/src/ltx_core/model/upsampler/model_configurator.py
@@ -9,7 +9,8 @@ class LatentUpsamplerConfigurator(ModelConfigurator[LatentUpsampler]):
"""
@classmethod
- def from_config(cls: type[LatentUpsampler], config: dict) -> LatentUpsampler:
+ def from_metadata(cls, metadata: dict) -> LatentUpsampler:
+ config = metadata.get("config", {})
in_channels = config.get("in_channels", 128)
mid_channels = config.get("mid_channels", 512)
num_blocks_per_stage = config.get("num_blocks_per_stage", 4)
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/__init__.py b/packages/ltx-core/src/ltx_core/model/video_vae/__init__.py
index 45af025..a41fa6c 100644
--- a/packages/ltx-core/src/ltx_core/model/video_vae/__init__.py
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/__init__.py
@@ -1,25 +1,54 @@
"""Video VAE package."""
-from ltx_core.model.video_vae.memory_efficient_decode import MEMORY_EFFICIENT_DECODE
+from ltx_core.model.video_vae.memory_efficient_decode import CHANNELS_LAST_3D_WEIGHTS, MEMORY_EFFICIENT_DECODE
from ltx_core.model.video_vae.model_configurator import (
+ DIFFUSION_VAE_DECODER_COMFY_KEYS_FILTER,
VAE_DECODER_COMFY_KEYS_FILTER,
VAE_ENCODER_COMFY_KEYS_FILTER,
VideoDecoderConfigurator,
VideoEncoderConfigurator,
+ diffvae_tiling_geometry_from_vae_config,
+ estimate_diffusion_decoder_weight_bytes,
+ is_diffusion_video_vae,
+ video_decoder_sd_ops_for_checkpoint,
+)
+from ltx_core.model.video_vae.video_vae import (
+ ConvVideoDecoder,
+ DiffusionVideoDecoder,
+ VideoDecoder,
+ VideoEncoder,
+ get_video_chunks_number,
+)
+from ltx_core.tiling import (
+ AUTO_TILING,
+ AutoTiling,
+ DimensionSizeConfig,
+ PipelineTiling,
+ TileSizeConfig,
+ TilingConfig,
)
-from ltx_core.model.video_vae.tiling import SpatialTilingConfig, TemporalTilingConfig, TilingConfig
-from ltx_core.model.video_vae.video_vae import VideoDecoder, VideoEncoder, get_video_chunks_number
__all__ = [
+ "AUTO_TILING",
+ "CHANNELS_LAST_3D_WEIGHTS",
+ "DIFFUSION_VAE_DECODER_COMFY_KEYS_FILTER",
"MEMORY_EFFICIENT_DECODE",
"VAE_DECODER_COMFY_KEYS_FILTER",
"VAE_ENCODER_COMFY_KEYS_FILTER",
- "SpatialTilingConfig",
- "TemporalTilingConfig",
+ "AutoTiling",
+ "ConvVideoDecoder",
+ "DiffusionVideoDecoder",
+ "DimensionSizeConfig",
+ "PipelineTiling",
+ "TileSizeConfig",
"TilingConfig",
"VideoDecoder",
"VideoDecoderConfigurator",
"VideoEncoder",
"VideoEncoderConfigurator",
+ "diffvae_tiling_geometry_from_vae_config",
+ "estimate_diffusion_decoder_weight_bytes",
"get_video_chunks_number",
+ "is_diffusion_video_vae",
+ "video_decoder_sd_ops_for_checkpoint",
]
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/attention.py b/packages/ltx-core/src/ltx_core/model/video_vae/attention.py
new file mode 100644
index 0000000..af7d0bb
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/attention.py
@@ -0,0 +1,69 @@
+"""Attention building blocks for the video VAE."""
+
+import torch
+import torch.nn.functional as F
+from einops import rearrange
+from torch import nn
+
+from ltx_core.model.transformer.attention import AttentionCallable, AttentionFunction
+
+
+class _RMSNorm2D(nn.Module):
+ r"""Channel-first RMSNorm for 4D tensors with a learnable per-channel gain.
+ Args:
+ channels: The number of channels in the input.
+ """
+
+ def __init__(self, channels: int) -> None:
+ super().__init__()
+ self.scale = channels**0.5
+ self.gamma = nn.Parameter(torch.ones(channels, 1, 1))
+
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
+ return F.normalize(x, dim=1) * (self.scale * self.gamma)
+
+
+class AttnBlock3D(nn.Module):
+ r"""Single-head per-frame spatial self-attention block.
+ Frames are folded into the batch dimension and attention is computed over
+ H*W per frame -- no cross-frame interaction.
+ The block is single-head, matching the reference implementation. An
+ ``attention_head_dim`` carried in the VAE block config is intentionally not
+ honored: the reference (which trained the checkpoints) is single-head, and a
+ real-image encode/decode round-trip on the 16x16x4 checkpoint reconstructs at
+ ~29 dB PSNR, confirming the single-head layout is the faithful one.
+ Args:
+ in_channels: The number of input channels.
+ attention: The attention backend, given either as an :class:`AttentionFunction`
+ enum (resolved once here via :meth:`~AttentionFunction.to_callable`) or as an
+ already-resolved :class:`AttentionCallable`. Defaults to the PyTorch (SDPA)
+ backend rather than ``AUTOMATIC``: this block is single-head, so
+ ``head_dim == in_channels``, which exceeds the FlashAttention head-dim limit at
+ the VAE bottleneck. SDPA's dispatcher falls back to an efficient/math kernel for
+ such large head dims, whereas ``AUTOMATIC`` would hand back a raw flash kernel on
+ Hopper/Blackwell that the kernel cannot serve.
+ """
+
+ def __init__(
+ self,
+ in_channels: int,
+ attention: AttentionFunction | AttentionCallable = AttentionFunction.PYTORCH,
+ ) -> None:
+ super().__init__()
+ self._attention = attention.to_callable() if isinstance(attention, AttentionFunction) else attention
+ self.norm = _RMSNorm2D(in_channels)
+ self.to_qkv = nn.Conv2d(in_channels, in_channels * 3, kernel_size=1)
+ self.proj = nn.Conv2d(in_channels, in_channels, kernel_size=1)
+
+ def forward(self, hidden_states: torch.Tensor, causal: bool = True) -> torch.Tensor: # noqa: ARG002
+ identity = hidden_states
+ b = hidden_states.shape[0]
+ x = rearrange(hidden_states, "b c t h w -> (b t) c h w")
+ x = self.norm(x)
+ qkv = rearrange(self.to_qkv(x), "bt c h w -> bt (h w) c")
+ q, k, v = qkv.chunk(3, dim=-1)
+ x = self._attention(q, k, v, 1)
+ x = rearrange(x, "bt (h w) c -> bt c h w", h=hidden_states.shape[3])
+ x = self.proj(x)
+ x = rearrange(x, "(b t) c h w -> b c t h w", b=b)
+ return identity + x
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/conv_video_decoder.py b/packages/ltx-core/src/ltx_core/model/video_vae/conv_video_decoder.py
new file mode 100644
index 0000000..ebc98e8
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/conv_video_decoder.py
@@ -0,0 +1,557 @@
+"""Convolutional video VAE decoder."""
+
+from __future__ import annotations
+
+import logging
+from typing import Any, Iterator, List, Tuple
+
+import torch
+from einops import rearrange
+from torch import nn
+
+from ltx_core.model.common.normalization import PixelNorm
+from ltx_core.model.disposable import Disposable
+from ltx_core.model.transformer.attention import AttentionCallable, AttentionFunction
+from ltx_core.model.transformer.timestep_embedding import PixArtAlphaCombinedTimestepSizeEmbeddings
+from ltx_core.model.video_vae.attention import AttnBlock3D
+from ltx_core.model.video_vae.convolution import make_conv_nd
+from ltx_core.model.video_vae.enums import NormLayerType, PaddingModeType
+from ltx_core.model.video_vae.ops import PerChannelStatistics, unpatchify
+from ltx_core.model.video_vae.resnet import ResnetBlock3D, UNetMidBlock3D
+from ltx_core.model.video_vae.sampling import DepthToSpaceUpsample
+from ltx_core.model.video_vae.video_vae import (
+ VideoDecoder,
+ map_spatial_slice,
+ map_temporal_slice,
+ to_mapping_operation,
+)
+from ltx_core.tiling import (
+ DEFAULT_MAPPING_OPERATION,
+ DEFAULT_SPLIT_OPERATION,
+ Tile,
+ TilingConfig,
+ create_tiles,
+ group_tiles_by_temporal_slice,
+ masks_are_complementary,
+ scale_by_masks_1d,
+)
+from ltx_core.types import SpatioTemporalScaleFactors, VideoLatentShape
+
+logger: logging.Logger = logging.getLogger(__name__)
+
+
+def _decoder_bottleneck_channels(base_channels: int, decoder_blocks: List[Tuple[str, int | dict[str, Any]]]) -> int:
+ """Channel count at the decoder bottleneck (the latent end, before any upsampling).
+ The decoder mirrors the encoder: ``conv_in`` widens the latents to the bottleneck,
+ then each upsampling block divides the channels by its multiplier as it grows the
+ spatial/temporal size, ending at ``base_channels``. So the bottleneck is
+ ``base_channels`` times the product of those multipliers -- 8x for the 32x32x8 VAE,
+ 4x for the 16x16x4 VAE.
+ """
+ channel_multiplier = 1
+ for block_name, block_params in decoder_blocks:
+ config = {"num_layers": block_params} if isinstance(block_params, int) else block_params
+ if block_name in ("compress_time", "compress_space", "compress_all"):
+ channel_multiplier *= config.get("multiplier", 1)
+ elif block_name == "res_x_y":
+ channel_multiplier *= config.get("multiplier", 2)
+ return base_channels * channel_multiplier
+
+
+def _make_decoder_block(
+ block_name: str,
+ block_config: dict[str, Any],
+ in_channels: int,
+ convolution_dimensions: int,
+ norm_layer: NormLayerType,
+ timestep_conditioning: bool,
+ norm_num_groups: int,
+ spatial_padding_mode: PaddingModeType,
+ attention: AttentionFunction | AttentionCallable,
+) -> Tuple[nn.Module, int]:
+ out_channels = in_channels
+ if block_name == "res_x":
+ block = UNetMidBlock3D(
+ dims=convolution_dimensions,
+ in_channels=in_channels,
+ num_layers=block_config["num_layers"],
+ resnet_eps=1e-6,
+ resnet_groups=norm_num_groups,
+ norm_layer=norm_layer,
+ inject_noise=block_config.get("inject_noise", False),
+ timestep_conditioning=timestep_conditioning,
+ spatial_padding_mode=spatial_padding_mode,
+ )
+ elif block_name == "attn_res_x":
+ block = UNetMidBlock3D(
+ dims=convolution_dimensions,
+ in_channels=in_channels,
+ num_layers=block_config["num_layers"],
+ resnet_groups=norm_num_groups,
+ norm_layer=norm_layer,
+ inject_noise=block_config.get("inject_noise", False),
+ timestep_conditioning=timestep_conditioning,
+ attention_head_dim=block_config["attention_head_dim"],
+ spatial_padding_mode=spatial_padding_mode,
+ )
+ elif block_name == "res_x_y":
+ out_channels = in_channels // block_config.get("multiplier", 2)
+ block = ResnetBlock3D(
+ dims=convolution_dimensions,
+ in_channels=in_channels,
+ out_channels=out_channels,
+ eps=1e-6,
+ groups=norm_num_groups,
+ norm_layer=norm_layer,
+ inject_noise=block_config.get("inject_noise", False),
+ timestep_conditioning=False,
+ spatial_padding_mode=spatial_padding_mode,
+ )
+ elif block_name == "compress_time":
+ out_channels = in_channels // block_config.get("multiplier", 1)
+ block = DepthToSpaceUpsample(
+ dims=convolution_dimensions,
+ in_channels=in_channels,
+ stride=(2, 1, 1),
+ out_channels_reduction_factor=block_config.get("multiplier", 1),
+ spatial_padding_mode=spatial_padding_mode,
+ )
+ elif block_name == "compress_space":
+ out_channels = in_channels // block_config.get("multiplier", 1)
+ block = DepthToSpaceUpsample(
+ dims=convolution_dimensions,
+ in_channels=in_channels,
+ stride=(1, 2, 2),
+ out_channels_reduction_factor=block_config.get("multiplier", 1),
+ spatial_padding_mode=spatial_padding_mode,
+ )
+ elif block_name == "compress_all":
+ out_channels = in_channels // block_config.get("multiplier", 1)
+ block = DepthToSpaceUpsample(
+ dims=convolution_dimensions,
+ in_channels=in_channels,
+ stride=(2, 2, 2),
+ residual=block_config.get("residual", False),
+ out_channels_reduction_factor=block_config.get("multiplier", 1),
+ spatial_padding_mode=spatial_padding_mode,
+ )
+ elif block_name == "attn":
+ block = AttnBlock3D(in_channels=in_channels, attention=attention)
+ else:
+ raise ValueError(f"unknown layer: {block_name}")
+
+ return block, out_channels
+
+
+class ConvVideoDecoder(nn.Module, Disposable, VideoDecoder):
+ _DEFAULT_NORM_NUM_GROUPS = 32
+ """
+ Variational Autoencoder Decoder. Decodes latent representation into video frames.
+ The decoder upsamples latents through a series of upsampling operations (inverse of encoder).
+ Output dimensions: F = 8x(F'-1) + 1, H = 32xH', W = 32xW' for standard LTX Video configuration.
+ Upsampling blocks expand dimensions by 2x in specified dimensions:
+ - "compress_time": temporal only
+ - "compress_space": spatial only (H and W)
+ - "compress_all": all dimensions (F, H, W)
+ - "res_x" / "res_x_y" / "attn_res_x": no upsampling
+ Causal Mode:
+ causal=False (standard): Symmetric padding, allows future frame dependencies.
+ causal=True: Causal padding, each frame depends only on past/current frames.
+ First frame removed after temporal upsampling in both modes. Output shape unchanged.
+ Example: (B, 128, 5, 16, 16) -> (B, 3, 33, 512, 512) for both modes.
+ Args:
+ convolution_dimensions: The number of dimensions to use in convolutions (2D or 3D).
+ in_channels: The number of input channels (latent channels). Default is 128.
+ out_channels: The number of output channels. For RGB images, this is 3.
+ decoder_blocks: The list of blocks to construct the decoder. Each block is a tuple of (block_name, params)
+ where params is either an int (num_layers) or a dict with configuration.
+ patch_size: Final spatial expansion factor. For standard LTX Video, use 4 for 4x spatial expansion:
+ H -> Hx4, W -> Wx4. Should be a power of 2.
+ norm_layer: The normalization layer to use. Can be either `group_norm` or `pixel_norm`.
+ causal: Whether to use causal convolutions. For standard LTX Video, use False for symmetric padding.
+ When True, uses causal padding (past/current frames only).
+ timestep_conditioning: Whether to condition the decoder on timestep for denoising.
+ """
+
+ def __init__( # noqa: PLR0913
+ self,
+ convolution_dimensions: int = 3,
+ in_channels: int = 128,
+ out_channels: int = 3,
+ decoder_blocks: List[Tuple[str, int | dict]] = [], # noqa: B006
+ patch_size: int = 4,
+ norm_layer: NormLayerType = NormLayerType.PIXEL_NORM,
+ causal: bool = False,
+ timestep_conditioning: bool = False,
+ decoder_spatial_padding_mode: PaddingModeType = PaddingModeType.REFLECT,
+ base_channels: int = 128,
+ attention: AttentionFunction | AttentionCallable = AttentionFunction.PYTORCH,
+ ):
+ super().__init__()
+
+ self.video_downscale_factors = SpatioTemporalScaleFactors.from_blocks(decoder_blocks, patch_size)
+
+ self.patch_size = patch_size
+ out_channels = out_channels * patch_size**2
+ self.causal = causal
+ self.timestep_conditioning = timestep_conditioning
+ self._norm_num_groups = self._DEFAULT_NORM_NUM_GROUPS
+
+ # Per-channel statistics for denormalizing latents
+ self.per_channel_statistics = PerChannelStatistics(latent_channels=in_channels)
+
+ # Noise and timestep parameters for decoder conditioning
+ self.decode_noise_scale = 0.025
+ self.decode_timestep = 0.05
+
+ feature_channels = _decoder_bottleneck_channels(base_channels, decoder_blocks)
+
+ self.conv_in = make_conv_nd(
+ dims=convolution_dimensions,
+ in_channels=in_channels,
+ out_channels=feature_channels,
+ kernel_size=3,
+ stride=1,
+ padding=1,
+ causal=True,
+ spatial_padding_mode=decoder_spatial_padding_mode,
+ )
+
+ self.up_blocks = nn.ModuleList([])
+
+ for block_name, block_params in list(reversed(decoder_blocks)):
+ # Convert int to dict format for uniform handling
+ block_config = {"num_layers": block_params} if isinstance(block_params, int) else block_params
+
+ block, feature_channels = _make_decoder_block(
+ block_name=block_name,
+ block_config=block_config,
+ in_channels=feature_channels,
+ convolution_dimensions=convolution_dimensions,
+ norm_layer=norm_layer,
+ timestep_conditioning=timestep_conditioning,
+ norm_num_groups=self._norm_num_groups,
+ spatial_padding_mode=decoder_spatial_padding_mode,
+ attention=attention,
+ )
+
+ self.up_blocks.append(block)
+
+ if norm_layer == NormLayerType.GROUP_NORM:
+ self.conv_norm_out = nn.GroupNorm(num_channels=feature_channels, num_groups=self._norm_num_groups, eps=1e-6)
+ elif norm_layer == NormLayerType.PIXEL_NORM:
+ self.conv_norm_out = PixelNorm()
+
+ self.conv_act = nn.SiLU()
+ self.conv_out = make_conv_nd(
+ dims=convolution_dimensions,
+ in_channels=feature_channels,
+ out_channels=out_channels,
+ kernel_size=3,
+ padding=1,
+ causal=True,
+ spatial_padding_mode=decoder_spatial_padding_mode,
+ )
+
+ if timestep_conditioning:
+ self.timestep_scale_multiplier = nn.Parameter(torch.tensor(1000.0))
+ self.last_time_embedder = PixArtAlphaCombinedTimestepSizeEmbeddings(
+ embedding_dim=feature_channels * 2, size_emb_dim=0
+ )
+ self.last_scale_shift_table = nn.Parameter(torch.empty(2, feature_channels))
+
+ def forward(
+ self,
+ sample: torch.Tensor,
+ timestep: torch.Tensor | None = None,
+ generator: torch.Generator | None = None,
+ ) -> torch.Tensor:
+ r"""
+ Decode latent representation into video frames.
+ Args:
+ sample: Latent tensor (B, 128, F', H', W').
+ timestep: Timestep for conditioning (if timestep_conditioning=True). Uses default 0.05 if None.
+ generator: Random generator for deterministic noise injection (if inject_noise=True in blocks).
+ Returns:
+ Decoded video (B, 3, F, H, W) where F = 8x(F'-1) + 1, H = 32xH', W = 32xW'.
+ Example: (B, 128, 5, 16, 16) -> (B, 3, 33, 512, 512).
+ Note: First frame is removed after temporal upsampling regardless of causal mode.
+ When causal=False, allows future frame dependencies in convolutions but maintains same output shape.
+ """
+ batch_size = sample.shape[0]
+ output_dtype = sample.dtype
+ weights_dtype = next(self.parameters()).dtype
+ sample = sample.to(weights_dtype)
+
+ # Add noise if timestep conditioning is enabled
+ if self.timestep_conditioning:
+ noise = (
+ torch.randn(
+ sample.size(),
+ generator=generator,
+ dtype=sample.dtype,
+ device=sample.device,
+ )
+ * self.decode_noise_scale
+ )
+
+ sample = noise + (1.0 - self.decode_noise_scale) * sample
+
+ # Denormalize latents
+ sample = self.per_channel_statistics.un_normalize(sample)
+
+ # Use default decode_timestep if timestep not provided
+ if timestep is None and self.timestep_conditioning:
+ timestep = torch.full((batch_size,), self.decode_timestep, device=sample.device, dtype=sample.dtype)
+
+ sample = self.conv_in(sample, causal=self.causal)
+
+ scaled_timestep = None
+ if self.timestep_conditioning:
+ if timestep is None:
+ raise ValueError("'timestep' parameter must be provided when 'timestep_conditioning' is True")
+ scaled_timestep = timestep * self.timestep_scale_multiplier.to(sample)
+
+ for up_block in self.up_blocks:
+ if isinstance(up_block, UNetMidBlock3D):
+ block_kwargs = {
+ "causal": self.causal,
+ "timestep": scaled_timestep if self.timestep_conditioning else None,
+ "generator": generator,
+ }
+ sample = up_block(sample, **block_kwargs)
+ elif isinstance(up_block, ResnetBlock3D):
+ sample = up_block(sample, causal=self.causal, generator=generator)
+ else:
+ sample = up_block(sample, causal=self.causal)
+
+ sample = self.conv_norm_out(sample)
+
+ if self.timestep_conditioning:
+ embedded_timestep = self.last_time_embedder(
+ timestep=scaled_timestep.flatten(),
+ hidden_dtype=sample.dtype,
+ )
+ embedded_timestep = embedded_timestep.view(batch_size, embedded_timestep.shape[-1], 1, 1, 1)
+ ada_values = self.last_scale_shift_table[None, ..., None, None, None].to(
+ device=sample.device, dtype=sample.dtype
+ ) + embedded_timestep.reshape(
+ batch_size,
+ 2,
+ -1,
+ embedded_timestep.shape[-3],
+ embedded_timestep.shape[-2],
+ embedded_timestep.shape[-1],
+ )
+ shift, scale = ada_values.unbind(dim=1)
+ sample = sample * (1 + scale) + shift
+
+ sample = self.conv_act(sample)
+ sample = self.conv_out(sample, causal=self.causal)
+
+ # Final spatial expansion: reverse the initial patchify from encoder
+ # Moves pixels from channels back to spatial dimensions
+ # Example: (B, 48, F, 128, 128) -> (B, 3, F, 512, 512) with patch_size=4
+ sample = unpatchify(sample, patch_size_hw=self.patch_size, patch_size_t=1)
+
+ return sample.to(output_dtype)
+
+ def _prepare_tiles(
+ self,
+ latent: torch.Tensor,
+ tiling_config: TilingConfig | None = None,
+ ) -> List[Tile]:
+ splitters = [DEFAULT_SPLIT_OPERATION] * len(latent.shape)
+ mappers = [DEFAULT_MAPPING_OPERATION] * len(latent.shape)
+ if tiling_config is None:
+ return create_tiles(latent.shape, splitters, mappers)
+
+ t_split, h_split, w_split = tiling_config.to_splitters(self.video_downscale_factors)
+ splitters[2] = t_split
+ splitters[3] = h_split
+ splitters[4] = w_split
+
+ if tiling_config.height.is_tiled():
+ mappers[3] = to_mapping_operation(map_spatial_slice, scale=self.video_downscale_factors.height)
+ if tiling_config.width.is_tiled():
+ mappers[4] = to_mapping_operation(map_spatial_slice, scale=self.video_downscale_factors.width)
+ if tiling_config.frames.is_tiled():
+ mappers[2] = to_mapping_operation(map_temporal_slice, scale=self.video_downscale_factors.time)
+
+ return create_tiles(latent.shape, splitters, mappers)
+
+ def tiled_decode(
+ self,
+ latent: torch.Tensor,
+ tiling_config: TilingConfig | None = None,
+ timestep: torch.Tensor | None = None,
+ generator: torch.Generator | None = None,
+ ) -> Iterator[torch.Tensor]:
+ """
+ Decode a latent tensor into video frames using tiled processing.
+ Splits the latent tensor into tiles, decodes each tile individually,
+ and yields video chunks as they become available.
+ Args:
+ latent: Input latent tensor (B, C, F', H', W').
+ tiling_config: Tiling configuration for the latent tensor.
+ timestep: Optional timestep for decoder conditioning.
+ generator: Optional random generator for deterministic decoding.
+ Yields:
+ Video chunks (B, C, T, H, W) by temporal slices;
+ """
+
+ # Calculate full video shape from latent shape to get spatial dimensions
+ full_video_shape = VideoLatentShape.from_torch_shape(latent.shape).upscale(self.video_downscale_factors)
+ tiles = self._prepare_tiles(latent, tiling_config)
+ complementary = masks_are_complementary(tiles, full_video_shape.to_torch_shape())
+
+ temporal_groups = group_tiles_by_temporal_slice(tiles)
+
+ # State for temporal overlap handling
+ previous_chunk = None
+ previous_weights = None
+ previous_temporal_slice = None
+
+ for temporal_group_tiles in temporal_groups:
+ curr_temporal_slice = temporal_group_tiles[0].out_coords[2]
+
+ # Calculate the shape of the temporal buffer for this group of tiles.
+ # The temporal length depends on whether this is the first tile (starts at 0) or not.
+ # - First tile: (frames - 1) * scale + 1
+ # - Subsequent tiles: frames * scale
+ # This logic is handled by TemporalAxisMapping and reflected in out_coords.
+ temporal_tile_buffer_shape = full_video_shape._replace(
+ frames=curr_temporal_slice.stop - curr_temporal_slice.start,
+ )
+
+ buffer = torch.zeros(
+ temporal_tile_buffer_shape.to_torch_shape(),
+ device=latent.device,
+ dtype=latent.dtype,
+ )
+
+ curr_weights = self._accumulate_temporal_group_into_buffer(
+ group_tiles=temporal_group_tiles,
+ buffer=buffer,
+ latent=latent,
+ timestep=timestep,
+ generator=generator,
+ complementary=complementary,
+ )
+
+ # Blend with previous temporal chunk if it exists
+ if previous_chunk is not None:
+ # Check if current temporal slice overlaps with previous temporal slice
+ if previous_temporal_slice.stop > curr_temporal_slice.start:
+ overlap_len = previous_temporal_slice.stop - curr_temporal_slice.start
+ temporal_overlap_slice = slice(curr_temporal_slice.start - previous_temporal_slice.start, None)
+
+ # The overlap is already masked before it reaches this step. Each tile is accumulated into buffer
+ # with its trapezoidal mask, and curr_weights accumulates the same mask. In the overlap blend we add
+ # the masked values (buffer[...]) and the corresponding weights (curr_weights[...]) into the
+ # previous buffers, then later normalize by weights.
+ previous_chunk[:, :, temporal_overlap_slice, :, :] += buffer[:, :, slice(0, overlap_len), :, :]
+ if not complementary:
+ previous_weights[:, :, temporal_overlap_slice, :, :] += curr_weights[
+ :, :, slice(0, overlap_len), :, :
+ ]
+ buffer[:, :, slice(0, overlap_len), :, :] = previous_chunk[:, :, temporal_overlap_slice, :, :]
+ curr_weights[:, :, slice(0, overlap_len), :, :] = previous_weights[
+ :, :, temporal_overlap_slice, :, :
+ ]
+ else:
+ buffer[:, :, slice(0, overlap_len), :, :] = previous_chunk[:, :, temporal_overlap_slice, :, :]
+
+ # Yield the non-overlapping part of the previous chunk
+ yield_len = curr_temporal_slice.start - previous_temporal_slice.start
+ if complementary:
+ yield previous_chunk[:, :, :yield_len, :, :]
+ else:
+ previous_weights = previous_weights.clamp(min=1e-8)
+ yield (previous_chunk / previous_weights)[:, :, :yield_len, :, :]
+
+ # Update state for next iteration
+ previous_chunk = buffer
+ previous_weights = curr_weights
+ previous_temporal_slice = curr_temporal_slice
+
+ # Yield any remaining chunk
+ if previous_chunk is not None:
+ if complementary:
+ yield previous_chunk
+ else:
+ previous_weights = previous_weights.clamp(min=1e-8)
+ yield previous_chunk / previous_weights
+
+ def decode_video(
+ self,
+ latent: torch.Tensor,
+ tiling_config: TilingConfig | None = None,
+ generator: torch.Generator | None = None,
+ ) -> Iterator[torch.Tensor]:
+ """Decode a video latent tensor, yielding float chunks ``[f, h, w, c]`` in ``[0, 1]``.
+ Subclasses (e.g. ``DistributedVideoDecoder``) may override this to
+ control eagerness or distribution across ranks.
+ """
+
+ def to_rgb(frames: torch.Tensor) -> torch.Tensor:
+ video = rearrange(frames[0], "c f h w -> f h w c")
+ return video.add_(1.0).mul_(0.5).clamp_(0.0, 1.0)
+
+ if tiling_config is not None:
+ for frames in self.tiled_decode(latent, tiling_config, generator=generator):
+ yield to_rgb(frames)
+ else:
+ decoded = self(latent, generator=generator)
+ yield to_rgb(decoded)
+
+ def _accumulate_temporal_group_into_buffer(
+ self,
+ group_tiles: List[Tile],
+ buffer: torch.Tensor,
+ latent: torch.Tensor,
+ timestep: torch.Tensor | None,
+ generator: torch.Generator | None,
+ *,
+ complementary: bool,
+ ) -> torch.Tensor | None:
+ """
+ Decode and accumulate all tiles of a temporal group into a local buffer.
+ The buffer is local to the group and always starts at time 0; temporal coordinates
+ are rebased by subtracting temporal_slice.start.
+ Returns the weights buffer, or ``None`` when ``complementary`` (no divisor needed).
+ """
+ temporal_slice = group_tiles[0].out_coords[2]
+
+ weights: torch.Tensor | None = None if complementary else torch.zeros_like(buffer)
+
+ for tile in group_tiles:
+ decoded_tile = self.forward(latent[tile.in_coords], timestep, generator)
+ temporal_offset = tile.out_coords[2].start - temporal_slice.start
+ # Use the tile's output coordinate length, not the decoded tile's length,
+ # as the decoder may produce a different number of frames than expected
+ expected_temporal_len = tile.out_coords[2].stop - tile.out_coords[2].start
+ decoded_temporal_len = decoded_tile.shape[2]
+
+ # Ensure we don't exceed the buffer or decoded tile bounds
+ actual_temporal_len = min(expected_temporal_len, decoded_temporal_len, buffer.shape[2] - temporal_offset)
+
+ chunk_coords = (
+ slice(None), # batch
+ slice(None), # channels
+ slice(temporal_offset, temporal_offset + actual_temporal_len),
+ tile.out_coords[3], # height
+ tile.out_coords[4], # width
+ )
+
+ decoded_slice = decoded_tile[:, :, :actual_temporal_len, :, :]
+ masks = tuple(m.to(device=buffer.device, dtype=torch.float32) for m in tile.masks_1d)
+ # Slice the temporal mask to the frames we actually write (length-1 untiled stays length-1).
+ masks = (*masks[:2], masks[2][:actual_temporal_len], *masks[3:])
+
+ buffer[chunk_coords] += scale_by_masks_1d(decoded_slice, masks)
+ if weights is not None:
+ strength = torch.ones(decoded_slice.shape, device=buffer.device, dtype=torch.float32)
+ weights[chunk_coords] += scale_by_masks_1d(strength, masks)
+
+ return weights
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/diffusion_tiling.py b/packages/ltx-core/src/ltx_core/model/video_vae/diffusion_tiling.py
new file mode 100644
index 0000000..db9242c
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/diffusion_tiling.py
@@ -0,0 +1,759 @@
+"""DiffVAE tiling helpers: schedule, pad/crop/size-floor, blend utilities.
+Decode orchestration lives on ``DiffusionVideoDecoder``. This module owns the
+geometry/schedule/mask pieces that tiling uses.
+"""
+
+from __future__ import annotations
+
+import itertools
+import math
+from dataclasses import dataclass
+from typing import List, Literal, Sequence, Tuple
+
+import torch
+
+from ltx_core.model.video_vae.transformer.apply import resolve_attention_for_host
+from ltx_core.model.video_vae.transformer.config import DiffVAEMode, NAttentionKind
+from ltx_core.tiling import (
+ DEFAULT_SPLIT_OPERATION,
+ DimensionInterval,
+ DimensionSizeConfig,
+ SplitOperation,
+ Tile,
+ TileSizeConfig,
+ TilingConfig,
+ _validate_overlap,
+ compute_trapezoidal_mask_1d,
+ split_by_size,
+ untiled_mask_1d,
+)
+from ltx_core.types import VIDEO_SCALE_FACTORS, SpatioTemporalScaleFactors
+
+ResizeAxisMode = Literal["repeat_last", "symmetric"]
+
+# Peak-activation heuristic (bytes):
+# hard (resident for whole tiled decode):
+# stage-4 input feature (stages 1-3 output): s4_txs4_hxs4_wxstage4_channelsxbf16
+# per temporal group + stage-5 tile:
+# accumulator: H x W x (2 x tile_t) x out_channels x accum_elem
+# (full-frame spatial; ~current group buffer + retained overlap stub / still-
+# live emitted exclusive chunk heading to encode; RGB by default; accum_elem
+# matches decode: fp16 when features are bf16, else feature dtype)
+# stage-5: stage5_tokens x stage5_channels x bf16 x coef
+# where stage5_tokens = F x (H/patch) x (W/patch) and coef folds NA working-set multiplicity.
+_MEM_COEF_BY_MODE: dict[DiffVAEMode, float] = {
+ DiffVAEMode.COMBINED_COMPILE: 11,
+ DiffVAEMode.CHUNKED_COMPILE: 7, # natten backend; Triton/eager use CHUNKED_EAGER
+ DiffVAEMode.CHUNKED_EAGER: 5,
+ DiffVAEMode.BLACKWELL_DSL: 2.5,
+}
+_DEFAULT_ELEMENT_SIZE: int = 2 # bf16 features → fp16 accumulator / bf16 stage-5
+_ACCUMULATOR_CHANNELS: int = 3 # RGB pixel blend buffer (decoder out_channels)
+_MIN_MODEL_BYTES_FLOOR: int = 1 << 30 # never assume a free DiffVAE weight footprint
+_BUDGET_SAFETY_BYTES_EAGER: int = 1 << 30
+_BUDGET_SAFETY_BYTES_COMPILED: int = 2 << 30
+
+
+def stage5_mem_coef(mode: DiffVAEMode) -> float:
+ """Stage-5 working-set multiplicity for auto tiling, after host NA resolve.
+ ``CHUNKED_COMPILE``'s coef 7 assumes natten. When the host remaps chunked
+ modes to Triton/eager fallback, use the ``CHUNKED_EAGER`` coef (5) instead.
+ ``COMBINED_COMPILE`` requires natten and keeps coef 11.
+ """
+ try:
+ base = _MEM_COEF_BY_MODE[mode]
+ except KeyError as exc:
+ raise ValueError(f"Unsupported DiffVAEMode for tiling budget: {mode!r}") from exc
+ resolved = resolve_attention_for_host(mode.resolve())
+ if resolved.attention in (NAttentionKind.TRITON, NAttentionKind.EAGER_SDPA):
+ return _MEM_COEF_BY_MODE[DiffVAEMode.CHUNKED_EAGER]
+ return base
+
+
+def budget_safety_bytes(mode: DiffVAEMode) -> int:
+ """Extra bytes withheld from the recommend budget (eager 1 GiB, compiled 2 GiB)."""
+ if mode is DiffVAEMode.CHUNKED_EAGER:
+ return _BUDGET_SAFETY_BYTES_EAGER
+ # Chunked compile that remaps to fallback NA is effectively eager for peak VRAM.
+ resolved = resolve_attention_for_host(mode.resolve())
+ if resolved.attention in (NAttentionKind.TRITON, NAttentionKind.EAGER_SDPA):
+ return _BUDGET_SAFETY_BYTES_EAGER
+ return _BUDGET_SAFETY_BYTES_COMPILED
+
+
+def accumulator_element_size(feature_dtype: torch.dtype) -> int:
+ """Bytes per accumulator element; mirrors ``_decode_temporal_group_isolated``.
+ ``accum_dtype = float16 if feat_s4.dtype == bfloat16 else feat_s4.dtype``.
+ """
+ if feature_dtype is torch.bfloat16:
+ return 2 # stored as fp16
+ return int(torch.tensor([], dtype=feature_dtype).element_size())
+
+
+def stage4_feature_bytes(
+ *,
+ height: int,
+ width: int,
+ num_frames: int,
+ upsample_strides: Sequence[Tuple[int, int, int]],
+ stage4_channels: int,
+ element_size: int = _DEFAULT_ELEMENT_SIZE,
+ natten_trailing_pad_latent_frames: int = 0,
+) -> int:
+ """Resident stages-1-3 output size (full volume tiled into stage 4).
+ Matches ``DiffusionVideoDecoder.forward_stages_1_to_3`` after optional NATTEN
+ trailing latent pad: channels-last ``(B, T, H, W, C)`` at stage-4 input resolution.
+ """
+ if stage4_channels < 1:
+ raise ValueError(f"stage4_channels must be >= 1, got {stage4_channels}")
+ if element_size < 1:
+ raise ValueError(f"element_size must be >= 1, got {element_size}")
+ if len(upsample_strides) < 3:
+ raise ValueError(f"need at least 3 upsample strides, got {len(upsample_strides)}")
+ if natten_trailing_pad_latent_frames < 0:
+ raise ValueError(f"natten_trailing_pad_latent_frames must be >= 0, got {natten_trailing_pad_latent_frames}")
+
+ # Local import: types ↔ tiling cycle avoidance at module import time.
+ from ltx_core.types import VIDEO_SCALE_FACTORS, VideoLatentShape, VideoPixelShape # noqa: PLC0415
+
+ latent = VideoLatentShape.from_pixel_shape(
+ VideoPixelShape(batch=1, frames=int(num_frames), height=int(height), width=int(width), fps=24.0),
+ scale_factors=VIDEO_SCALE_FACTORS,
+ )
+ s4_t, s4_h, s4_w = stage4_thw_from_latent(
+ upsample_strides[:3],
+ latent.frames + int(natten_trailing_pad_latent_frames),
+ latent.height,
+ latent.width,
+ drop_leading_frame=True,
+ )
+ return int(s4_t) * int(s4_h) * int(s4_w) * int(stage4_channels) * int(element_size)
+
+
+# ---------------------------------------------------------------------------
+# Public entry points (pipeline recommend / decode schedule)
+# ---------------------------------------------------------------------------
+
+
+def recommended_decode_tiling_config( # noqa: PLR0913
+ *,
+ tile_halos: Tuple[Tuple[int, int, int], Tuple[int, int, int]],
+ pixel_scale: SpatioTemporalScaleFactors,
+ min_tile_size_s4: Tuple[int, int, int],
+ patch_size: int,
+ height: int,
+ width: int,
+ num_frames: int,
+ mode: DiffVAEMode,
+ free_bytes: int,
+ stage5_channels: int,
+ stage4_channels: int,
+ upsample_strides: Sequence[Tuple[int, int, int]],
+ model_bytes: int = 0,
+ element_size: int = _DEFAULT_ELEMENT_SIZE,
+ natten_trailing_pad_latent_frames: int = 0,
+ out_channels: int = _ACCUMULATOR_CHANNELS,
+) -> TileSizeConfig:
+ """Pick DiffVAE decode tiling from stage-4/5 halos and free VRAM.
+ Always enables both spatial and temporal tiling (temporal-only full-frame slabs
+ are unsafe on Hopper / some natten builds).
+ Selection (size-grid, accumulator-aware):
+ 1. Enumerate legal tile **sizes** on the LCM of DiffVAE ``pixel_scale`` and
+ :data:`~ltx_core.types.VIDEO_SCALE_FACTORS` (so configs also pass
+ :class:`~ltx_core.tiling.TileSizeConfig` construction); derive tile
+ counts from :func:`~ltx_core.tiling.split_by_size` (same as decode).
+ 2. Drop triples whose peak-bytes estimate exceeds ``usable`` bytes
+ (``free - max(model, 1 GiB) - safety - stage4_feature``; safety is
+ 1 GiB eager / 2 GiB compiled). Stage-4 input features stay resident
+ for the whole tiled decode.
+ 3. Among feasible triples, pick minimal :func:`volumetric_overlap_waste`.
+ Peak-bytes estimate::
+ stage4_feature_bytes(...) # hard, full volume
+ + H * W * (2 * tile_t) * out_channels * element_size
+ + stage5_tokens * stage5_channels * element_size * coef
+ Accumulator is full output HxW (not spatially tiled) with temporal extent
+ ``2 * tile_t``: current group buffer plus the still-live previous exclusive
+ emit / overlap stub during handoff (not merely ``tile_t + overlap_t``).
+ RGBx``element_size`` by default. ``element_size`` is the activation width:
+ production bf16 features use fp16 accumulators (2), matching
+ :func:`accumulator_element_size`. Stage-5 uses the same element size x
+ ``stage5_channels`` x ``coef`` (11 / 7 / 5 / 2.5 by mode).
+ """
+ if height < 1 or width < 1 or num_frames < 1:
+ raise ValueError(f"height/width/num_frames must be >= 1, got {height}x{width}x{num_frames}")
+ if patch_size < 1:
+ raise ValueError(f"patch_size must be >= 1, got {patch_size}")
+ if stage5_channels < 1:
+ raise ValueError(f"stage5_channels must be >= 1, got {stage5_channels}")
+ if out_channels < 1:
+ raise ValueError(f"out_channels must be >= 1, got {out_channels}")
+ if element_size < 1:
+ raise ValueError(f"element_size must be >= 1, got {element_size}")
+
+ overlap_t, overlap_hw = recommended_pixel_overlaps(tile_halos, pixel_scale)
+
+ ft, fh, fw = pixel_scale.time, pixel_scale.height, pixel_scale.width
+ # Construction validates fixed 8/32/32; to_splitters uses pixel_scale - step both.
+ step_t = math.lcm(ft, VIDEO_SCALE_FACTORS.time)
+ step_h = math.lcm(fh, VIDEO_SCALE_FACTORS.height)
+ step_w = math.lcm(fw, VIDEO_SCALE_FACTORS.width)
+ min_t_px = _round_up(
+ # ``2 * overlap`` so left+right ramps fit (else masks are not complementary and
+ # decode allocates a full weights buffer ≈ another accumulator).
+ max(2 * ft, 2 * overlap_t, _round_up(min_tile_size_s4[0] * ft, ft), 16),
+ step_t,
+ )
+ min_h_px = _round_up(
+ max(2 * fh, 2 * overlap_hw, _round_up(min_tile_size_s4[1] * fh, fh), 64),
+ step_h,
+ )
+ min_w_px = _round_up(
+ max(2 * fw, 2 * overlap_hw, _round_up(min_tile_size_s4[2] * fw, fw), 64),
+ step_w,
+ )
+
+ model_cost = max(int(model_bytes), _MIN_MODEL_BYTES_FLOOR)
+ coef = stage5_mem_coef(mode)
+ s4_feat_bytes = stage4_feature_bytes(
+ height=height,
+ width=width,
+ num_frames=num_frames,
+ upsample_strides=upsample_strides,
+ stage4_channels=stage4_channels,
+ element_size=element_size,
+ natten_trailing_pad_latent_frames=natten_trailing_pad_latent_frames,
+ )
+ usable = max(0, int(free_bytes) - model_cost - budget_safety_bytes(mode) - s4_feat_bytes)
+ s5_bytes_per_token = max(1.0, float(stage5_channels) * float(element_size) * coef)
+ acc_bytes_per_pixel = int(out_channels) * int(element_size)
+
+ t_cands = _axis_candidates(num_frames, overlap_t, min_t_px, step_t)
+ h_cands = _axis_candidates(height, overlap_hw, min_h_px, step_h)
+ w_cands = _axis_candidates(width, overlap_hw, min_w_px, step_w)
+
+ scored: list[tuple[float, int, int, int, int, int]] = []
+ # (waste, -volume, n_t*n_h*n_w, tile_t, tile_h, tile_w) - minimize waste, then launches.
+ for tile_t, n_t in t_cands:
+ # Current group buffer + still-live emit/stub during temporal handoff.
+ acc_frames = 2 * int(tile_t)
+ acc_bytes = acc_frames * int(height) * int(width) * acc_bytes_per_pixel
+ if acc_bytes >= usable:
+ continue
+ s5_budget_bytes = usable - acc_bytes
+ max_s5_tokens = int(s5_budget_bytes // s5_bytes_per_token)
+ for tile_h, n_h in h_cands:
+ for tile_w, n_w in w_cands:
+ if stage5_tokens_for_pixel_tile(tile_t, tile_h, tile_w, patch_size=patch_size) > max_s5_tokens:
+ continue
+ waste = volumetric_overlap_waste(
+ num_frames=num_frames,
+ height=height,
+ width=width,
+ tile_frames=tile_t,
+ tile_height=tile_h,
+ tile_width=tile_w,
+ n_t=n_t,
+ n_h=n_h,
+ n_w=n_w,
+ )
+ scored.append((waste, -tile_t * tile_h * tile_w, n_t * n_h * n_w, tile_t, tile_h, tile_w))
+
+ if not scored:
+ raise ValueError(
+ "Cannot fit a DiffVAE decode tile under the memory budget: "
+ f"min tile ~{min_t_px}f x {min_h_px}x{min_w_px}px "
+ f"(overlaps T={overlap_t}, HW={overlap_hw}), "
+ f"mode={mode.value}, coef={coef}, stage5_channels={stage5_channels}, "
+ f"stage4_feature_bytes={s4_feat_bytes}, usable_bytes={usable}. "
+ "Reduce resolution or free GPU memory."
+ )
+
+ scored.sort()
+ _waste, _vol, _ntiles, tile_t, tile_h, tile_w = scored[0]
+ return TileSizeConfig(
+ frames=DimensionSizeConfig(tile_size=tile_t, overlap=overlap_t),
+ height=DimensionSizeConfig(tile_size=tile_h, overlap=overlap_hw),
+ width=DimensionSizeConfig(tile_size=tile_w, overlap=overlap_hw),
+ )
+
+
+def prepare_tile_schedule(
+ stage4_shape_bcthw: torch.Size,
+ tiling_config: TilingConfig | None,
+ *,
+ upsample3_stride: Tuple[int, int, int],
+ patch_size: int,
+ min_tile_size: Tuple[int, int, int],
+ tile_halos: Tuple[Tuple[int, int, int], Tuple[int, int, int]],
+) -> List[Tile]:
+ """Build pixel-blend tiles whose ``in_coords`` land on the stage-4 input grid.
+ DiffVAE temporal tiling deliberately skips ConvVAE causal split/mask tricks
+ (``split_temporal_causal``, ``left_starts_from_0``): pixel overlap already
+ covers blend+halo, and interval propagation follows
+ :class:`~ltx_core.model.video_vae.transformer.layers.LinearPixelShuffleUpsample`
+ (``drop_leading_frame`` only on the origin tile) with *symmetric* trapezoid
+ ramps so masks stay complementary without a weight buffer.
+ """
+ pixel_scale = stage4_to_pixel_scale_factors(upsample3_stride, patch_size)
+ if tiling_config is None:
+ return [
+ Tile(
+ in_coords=(slice(None), slice(None), slice(None), slice(None), slice(None)),
+ out_coords=(slice(None), slice(None), slice(None), slice(None), slice(None)),
+ masks_1d=(
+ untiled_mask_1d(),
+ untiled_mask_1d(),
+ untiled_mask_1d(),
+ untiled_mask_1d(),
+ untiled_mask_1d(),
+ ),
+ )
+ ]
+
+ overlap_t, overlap_hw = recommended_pixel_overlaps(tile_halos, pixel_scale)
+ _validate_overlap(tiling_config, min_overlap_frames=overlap_t, min_overlap_pixels=overlap_hw)
+ # Plain split (not split_temporal_causal): no start-1 / left_ramp+1 copycat of ConvVAE.
+ t_split, h_split, w_split = tiling_config.to_splitters(
+ pixel_scale, min_tile_size=min_tile_size, causal_temporal=False
+ )
+ st, sh, sw = upsample3_stride
+
+ def axis_specs(
+ split_op: SplitOperation,
+ dim_len: int,
+ stride_component: int,
+ *,
+ propagate_causal: bool,
+ apply_patch: bool,
+ ) -> list[tuple[slice, slice, torch.Tensor]]:
+ if split_op is DEFAULT_SPLIT_OPERATION:
+ return [(slice(None), slice(None), untiled_mask_1d())]
+ intervals = split_op(dim_len).intervals
+ specs = []
+ for iv in intervals:
+ stage5 = _propagate_interval_through_upsample_hops(iv, [stride_component], propagate_causal)
+ if apply_patch:
+ pixel = _propagate_interval_through_upsample_hops(stage5, [patch_size], causal=False)
+ else:
+ pixel = stage5
+ # Symmetric ramps (left_starts_from_0=False) for partition-of-unity with
+ # pixel-shuffle out_coords; ConvVAE sacrificial first-sample is not used.
+ mask_pixel = compute_trapezoidal_mask_1d(
+ pixel.end - pixel.start, pixel.left_ramp, pixel.right_ramp, left_starts_from_0=False
+ )
+ specs.append((slice(iv.start, iv.end), slice(pixel.start, pixel.end), mask_pixel))
+ return specs
+
+ # Temporal: pixel-shuffle propagate (drop-leading geometry); spatial: exact x stride.
+ t_specs = axis_specs(t_split, stage4_shape_bcthw[2], st, propagate_causal=True, apply_patch=False)
+ h_specs = axis_specs(h_split, stage4_shape_bcthw[3], sh, propagate_causal=False, apply_patch=True)
+ w_specs = axis_specs(w_split, stage4_shape_bcthw[4], sw, propagate_causal=False, apply_patch=True)
+
+ tiles: List[Tile] = []
+ for t_spec, h_spec, w_spec in itertools.product(t_specs, h_specs, w_specs):
+ t_s4, t_px, t_mask = t_spec
+ h_s4, h_px, h_mask = h_spec
+ w_s4, w_px, w_mask = w_spec
+ tiles.append(
+ Tile(
+ in_coords=(slice(None), t_s4, h_s4, w_s4, slice(None)),
+ out_coords=(slice(None), slice(None), t_px, h_px, w_px),
+ masks_1d=(untiled_mask_1d(), untiled_mask_1d(), t_mask, h_mask, w_mask),
+ )
+ )
+ return tiles
+
+
+def slice_stage4_tile(
+ feat_s4: torch.Tensor,
+ tile: Tile,
+ *,
+ content_frames: int,
+) -> tuple[torch.Tensor, bool, bool, tuple[int, int, int]]:
+ """Slice a stage-4 feature tile, extending trailing tiles to include ghost frames."""
+ is_origin = tile.in_coords[1].start in (0, None)
+ _, stop, _ = tile.in_coords[1].indices(content_frames)
+ pad_trailing = stop == content_frames
+ _b, t_coord, h_coord, w_coord, _c = tile.in_coords
+ t0, t1, _ = t_coord.indices(content_frames)
+ h0, h1, _ = h_coord.indices(feat_s4.shape[2])
+ w0, w1, _ = w_coord.indices(feat_s4.shape[3])
+ content_thw = (t1 - t0, h1 - h0, w1 - w0)
+ if pad_trailing:
+ t1 = feat_s4.shape[1]
+ feat_tile = feat_s4[:, t0:t1, h_coord, w_coord, :]
+ return feat_tile, is_origin, pad_trailing, content_thw
+
+
+# ---------------------------------------------------------------------------
+# Common helpers (geometry, pad/crop, stage floors)
+# ---------------------------------------------------------------------------
+
+
+@dataclass(frozen=True)
+class AxisPad:
+ """How many elements were added (pad) or removed (crop) on each side of one axis."""
+
+ before: int
+ after: int
+
+
+def resize_axis(
+ x: torch.Tensor,
+ dim: int,
+ size: int,
+ *,
+ mode: ResizeAxisMode,
+) -> tuple[torch.Tensor, AxisPad]:
+ """Pad or crop axis ``dim`` so its length becomes ``size``.
+ Pad (``len < size``):
+ ``repeat_last`` - append copies of the last slice.
+ ``symmetric`` - edge-replicate first/last; leftover goes to the end
+ (``before = need // 2``, ``after = need - before``).
+ Crop (``len > size``):
+ ``repeat_last`` - drop from the end.
+ ``symmetric`` - drop from both ends with the same split rule as pad.
+ """
+ if size < 1:
+ raise ValueError(f"resize_axis target size must be >= 1, got {size}")
+ if dim < 0:
+ dim += x.ndim
+ if not 0 <= dim < x.ndim:
+ raise ValueError(f"dim {dim} out of range for rank-{x.ndim} tensor")
+
+ length = x.shape[dim]
+ if length == size:
+ return x, AxisPad(0, 0)
+
+ if length < size:
+ need = size - length
+ if mode == "repeat_last":
+ last = x.narrow(dim, length - 1, 1)
+ expand_shape = list(x.shape)
+ expand_shape[dim] = need
+ pad = last.expand(expand_shape)
+ return torch.cat([x, pad], dim=dim), AxisPad(0, need)
+
+ before = need // 2
+ after = need - before
+ first = x.narrow(dim, 0, 1)
+ last = x.narrow(dim, length - 1, 1)
+ parts: list[torch.Tensor] = []
+ if before:
+ expand_shape = list(x.shape)
+ expand_shape[dim] = before
+ parts.append(first.expand(expand_shape))
+ parts.append(x)
+ if after:
+ expand_shape = list(x.shape)
+ expand_shape[dim] = after
+ parts.append(last.expand(expand_shape))
+ return torch.cat(parts, dim=dim), AxisPad(before, after)
+
+ need = length - size
+ if mode == "repeat_last":
+ return x.narrow(dim, 0, size).contiguous(), AxisPad(0, need)
+
+ before = need // 2
+ after = need - before
+ return x.narrow(dim, before, size).contiguous(), AxisPad(before, after)
+
+
+def ensure_min_latent_shape(
+ latent: torch.Tensor,
+ min_tile_sizes: Tuple[int, int, int],
+) -> tuple[torch.Tensor, tuple[AxisPad, AxisPad, AxisPad]]:
+ """Pad latent ``(B, C, T, H, W)`` up to ``min_tile_sizes`` if needed."""
+ min_t, min_h, min_w = min_tile_sizes
+ t_pad = AxisPad(0, 0)
+ h_pad = AxisPad(0, 0)
+ w_pad = AxisPad(0, 0)
+ x = latent
+ if x.shape[2] < min_t:
+ x, t_pad = resize_axis(x, 2, min_t, mode="repeat_last")
+ if x.shape[3] < min_h:
+ x, h_pad = resize_axis(x, 3, min_h, mode="symmetric")
+ if x.shape[4] < min_w:
+ x, w_pad = resize_axis(x, 4, min_w, mode="symmetric")
+ return x, (t_pad, h_pad, w_pad)
+
+
+def scale_axis_pad(pad: AxisPad, scale: int) -> AxisPad:
+ """Scale a latent-grid ``AxisPad`` into pixel (or other) units."""
+ return AxisPad(pad.before * scale, pad.after * scale)
+
+
+def crop_pixels_to_content(
+ pixels: torch.Tensor,
+ frames: int,
+ height: int,
+ width: int,
+ *,
+ h_pad: AxisPad | None = None,
+ w_pad: AxisPad | None = None,
+ spatial_scale: Tuple[int, int] = (1, 1),
+) -> torch.Tensor:
+ """Crop padded decode output ``(B, C, F, H, W)`` back to the content shape.
+ Temporal pad is always trailing (``repeat_last``), so T is cropped from the
+ end. Spatial size-floor pads must pass the recorded ``h_pad`` / ``w_pad``
+ (latent units) plus ``spatial_scale`` ``(H, W)`` so odd leftovers are not
+ re-split by a center-crop after upscaling.
+ """
+ x, _ = resize_axis(pixels, 2, frames, mode="repeat_last")
+ scale_h, scale_w = spatial_scale
+ if h_pad is not None:
+ before = scale_axis_pad(h_pad, scale_h).before
+ if before + height > x.shape[3]:
+ raise ValueError(f"H crop out of range: before={before}, height={height}, got {x.shape[3]}")
+ x = x.narrow(3, before, height).contiguous()
+ else:
+ x, _ = resize_axis(x, 3, height, mode="symmetric")
+ if w_pad is not None:
+ before = scale_axis_pad(w_pad, scale_w).before
+ if before + width > x.shape[4]:
+ raise ValueError(f"W crop out of range: before={before}, width={width}, got {x.shape[4]}")
+ x = x.narrow(4, before, width).contiguous()
+ else:
+ x, _ = resize_axis(x, 4, width, mode="symmetric")
+ return x
+
+
+def stage5_pixel_shape_from_stage4(
+ stage4_t: int,
+ stage4_h: int,
+ stage4_w: int,
+ *,
+ upsample_stride: Tuple[int, int, int],
+ patch_size: int,
+ stage5_kernel_t: int,
+ drop_leading_frame: bool,
+ pad_trailing: bool,
+) -> tuple[int, int, int]:
+ """Pixel ``(F, H, W)`` for a stage-4-input extent (one remaining NA hop + patch)."""
+ st, sh, sw = upsample_stride
+ frames = stage4_t * st - 1 if drop_leading_frame and st == 2 else stage4_t * st
+ if pad_trailing:
+ frames = max(frames, stage5_kernel_t)
+ return frames, stage4_h * sh * patch_size, stage4_w * sw * patch_size
+
+
+def pad_trailing_latent_for_natten_border(latent: torch.Tensor, n_frames: int) -> torch.Tensor:
+ """Replicate the last latent frame ``n_frames`` times for NATTEN last-frame border."""
+ if n_frames <= 0:
+ return latent
+ padded, _ = resize_axis(latent, 2, latent.shape[2] + n_frames, mode="repeat_last")
+ return padded
+
+
+def crop_trailing_context_natten_pad(
+ context: torch.Tensor,
+ *,
+ n_latent_frames: int,
+ time_scale: int,
+ stage5_kernel_t: int,
+) -> torch.Tensor:
+ """Crop ghosting appendix before stage 5, leaving at least ``stage5_kernel_t``."""
+ if n_latent_frames <= 0:
+ return context
+ ghost = n_latent_frames * time_scale
+ content_t = max(context.shape[1] - ghost, 1)
+ keep = min(context.shape[1], max(content_t, stage5_kernel_t))
+ cropped, _ = resize_axis(context, 1, keep, mode="repeat_last")
+ return cropped
+
+
+def _weight_floor(dtype: torch.dtype) -> float:
+ """Smallest divisor that safely guards ``buffer / weights`` in ``dtype``."""
+ return max(1e-8, torch.finfo(dtype).tiny)
+
+
+def stage4_thw_from_latent(
+ upsample_strides: Sequence[Tuple[int, int, int]],
+ latent_t: int,
+ latent_h: int,
+ latent_w: int,
+ *,
+ drop_leading_frame: bool = True,
+) -> Tuple[int, int, int]:
+ """Stage-4 input ``(T, H, W)`` after the first three upsample hops."""
+ t, h, w = latent_t, latent_h, latent_w
+ for st, sh, sw in upsample_strides[:3]:
+ t, h, w = t * st, h * sh, w * sw
+ if st == 2 and drop_leading_frame:
+ t -= 1
+ return t, h, w
+
+
+def stage4_to_pixel_scale_factors(
+ upsample_stride: Tuple[int, int, int],
+ patch_size: int,
+) -> SpatioTemporalScaleFactors:
+ """Pixel/frame units per stage-4-input cell (last NA hop + unpatchify)."""
+ st, sh, sw = upsample_stride
+ return SpatioTemporalScaleFactors(time=st, height=sh * patch_size, width=sw * patch_size)
+
+
+def compute_tile_min_size(
+ stage4_kernel: Tuple[int, int, int],
+ stage5_kernel: Tuple[int, int, int],
+ upsample3_stride: Tuple[int, int, int],
+) -> Tuple[int, int, int]:
+ """Min stage-4-input ``(T, H, W)`` so stages 4 and 5 each see ``>= kernel``."""
+ return tuple(max(stage4_kernel[a], -(-stage5_kernel[a] // upsample3_stride[a])) for a in range(3))
+
+
+def compute_tile_halos(
+ stage4_kernel: Tuple[int, int, int],
+ stage4_depth: int,
+ stage5_kernel: Tuple[int, int, int],
+ stage5_depth: int,
+ upsample3_stride: Tuple[int, int, int],
+) -> Tuple[Tuple[int, int, int], Tuple[int, int, int]]:
+ """One-sided halos in stage-4-input units for stages 4 and 5."""
+ halo4 = tuple(stage4_depth * (stage4_kernel[a] // 2) for a in range(3))
+ halo5 = tuple(-(-(stage5_depth * (stage5_kernel[a] // 2)) // upsample3_stride[a]) for a in range(3))
+ return halo4, halo5 # type: ignore[return-value]
+
+
+def _cumulative_upsample_strides(
+ upsamples: Sequence[Tuple[Tuple[int, int, int], int]],
+) -> List[Tuple[int, int, int]]:
+ """Per-axis product of hop strides for ``upsamples[:i]`` (``cumulative[0] = (1,1,1)``)."""
+ cumulative = [(1, 1, 1)]
+ t, h, w = 1, 1, 1
+ for stride, _ in upsamples:
+ t, h, w = t * stride[0], h * stride[1], w * stride[2]
+ cumulative.append((t, h, w))
+ return cumulative
+
+
+def all_stages_min_tile_size(
+ stage_kernels: Sequence[Tuple[int, int, int]],
+ upsamples: Sequence[Tuple[Tuple[int, int, int], int]],
+ stage5_kernel: Tuple[int, int, int],
+) -> Tuple[int, int, int]:
+ """Per-axis latent-grid floor so every stage's NA sees dims ``>= kernel_size``."""
+ cumulative = _cumulative_upsample_strides(upsamples)
+ mins = [1, 1, 1]
+ for stage_i in range(len(upsamples)):
+ strides = cumulative[stage_i]
+ for axis in range(3):
+ mins[axis] = max(mins[axis], -(-stage_kernels[stage_i][axis] // strides[axis]))
+ strides5 = cumulative[len(upsamples)]
+ for axis in range(3):
+ mins[axis] = max(mins[axis], -(-stage5_kernel[axis] // strides5[axis]))
+ return (mins[0], mins[1], mins[2])
+
+
+def pixel_tile_shape(full_shape: tuple[int, ...], out_coords: tuple[slice, ...]) -> tuple[int, ...]:
+ dims: list[int] = []
+ for size, coord in zip(full_shape, out_coords, strict=True):
+ start, stop, step = coord.indices(size)
+ dims.append(len(range(start, stop, step)))
+ return tuple(dims)
+
+
+# ---------------------------------------------------------------------------
+# Recommendation helpers
+# ---------------------------------------------------------------------------
+
+
+def _round_up(value: int, multiple: int) -> int:
+ return -(-value // multiple) * multiple
+
+
+def recommended_pixel_overlaps(
+ tile_halos: Tuple[Tuple[int, int, int], Tuple[int, int, int]],
+ pixel_scale: SpatioTemporalScaleFactors,
+) -> Tuple[int, int]:
+ """Stage-4/5-safe ``(temporal_overlap_frames, spatial_overlap_pixels)``.
+ Shared by :func:`recommended_decode_tiling_config` (to *set* overlaps) and
+ :func:`~ltx_core.tiling._validate_overlap` (to reject undersized configs).
+ """
+
+ def dominant(axis: int) -> int:
+ return max(tile_halos[i][axis] for i in range(len(tile_halos)))
+
+ overlap_t = _round_up(dominant(0) * pixel_scale.time, 8)
+ halo_hw = max(dominant(1), dominant(2))
+ overlap_hw = _round_up(halo_hw * pixel_scale.height, 32)
+ return overlap_t, overlap_hw
+
+
+def stage5_tokens_for_pixel_tile(
+ tile_frames: int,
+ tile_height: int,
+ tile_width: int,
+ *,
+ patch_size: int,
+) -> int:
+ """Pre-unpatchify stage-5 token count for a pixel-space tile (NATTEN volume)."""
+ h5 = max(1, tile_height // patch_size)
+ w5 = max(1, tile_width // patch_size)
+ return tile_frames * h5 * w5
+
+
+def _axis_candidates(length: int, overlap: int, min_size: int, multiple: int) -> list[tuple[int, int]]:
+ """``(tile_size, num_tiles)`` for every legal size on ``multiple``'s grid."""
+ out: list[tuple[int, int]] = []
+ max_size = max(_round_up(length, multiple), min_size)
+ for size in range(min_size, max_size + multiple, multiple):
+ if size <= overlap:
+ continue
+ n = len(split_by_size(size, overlap)(length).intervals)
+ out.append((size, n))
+ return out
+
+
+def volumetric_overlap_waste(
+ *,
+ num_frames: int,
+ height: int,
+ width: int,
+ tile_frames: int,
+ tile_height: int,
+ tile_width: int,
+ n_t: int,
+ n_h: int,
+ n_w: int,
+) -> float:
+ """``processed_volume / unique_volume`` (>= 1). Lower means less overlap recompute."""
+ processed = n_t * n_h * n_w * tile_frames * tile_height * tile_width
+ unique = max(1, num_frames * height * width)
+ return processed / unique
+
+
+# ---------------------------------------------------------------------------
+# Schedule helpers
+# ---------------------------------------------------------------------------
+
+
+def _propagate_interval_through_upsample_hops(
+ interval: DimensionInterval,
+ strides: Sequence[int],
+ causal: bool,
+) -> DimensionInterval:
+ """Forward-propagate one interval through a sequence of upsample hops on one axis.
+ Mirrors :class:`~ltx_core.model.video_vae.transformer.layers.LinearPixelShuffleUpsample`:
+ multiply by ``stride``, and for the causal temporal axis when ``stride == 2`` apply
+ the duplicate-frame drop (``end -= 1``; non-origin also ``start -= 1``).
+ This is *not* :func:`~ltx_core.model.video_vae.video_vae.map_temporal_slice` (ConvVAE).
+ DiffVAE non-origin tiles run with ``drop_leading_frame=False`` and must keep length
+ ``tile_t * stride``; the ConvVAE ``1+(L-1)*stride`` mapping is one frame short and
+ shifts non-origin ``out_coords``, which breaks tiled↔untiled temporal blend even
+ when masks are complementary.
+ """
+ x = interval
+ for stride in strides:
+ if stride < 1:
+ raise ValueError(f"upsample stride must be >= 1, got {stride}")
+ start = x.start * stride
+ end = x.end * stride
+ left_ramp = x.left_ramp * stride
+ right_ramp = x.right_ramp * stride
+ if causal and stride == 2:
+ end -= 1
+ if x.start != 0:
+ start -= 1
+ x = DimensionInterval(start=start, end=end, left_ramp=left_ramp, right_ramp=right_ramp)
+ return x
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/diffusion_video_decoder.py b/packages/ltx-core/src/ltx_core/model/video_vae/diffusion_video_decoder.py
new file mode 100644
index 0000000..b9cc41e
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/diffusion_video_decoder.py
@@ -0,0 +1,748 @@
+"""Diffusion (NATTEN) video VAE decoder."""
+
+from __future__ import annotations
+
+from typing import Iterator, List, Literal, Tuple
+
+import torch
+from torch import nn
+
+from ltx_core.devices import cuda_activation_budget_bytes
+from ltx_core.model.disposable import Disposable
+from ltx_core.model.transformer.timestep_embedding import PixArtAlphaCombinedTimestepSizeEmbeddings
+from ltx_core.model.video_vae import diffusion_tiling
+from ltx_core.model.video_vae.ops import PerChannelStatistics, patchify, unpatchify
+from ltx_core.model.video_vae.transformer import (
+ AdaLNZero,
+ ChannelLinear,
+ CombinedDiffusionNABlock,
+ LinearPixelShuffleUpsample,
+ NABlock,
+)
+from ltx_core.model.video_vae.transformer.config import DiffVAEMode
+from ltx_core.model.video_vae.video_vae import VideoDecoder
+from ltx_core.tiling import (
+ Tile,
+ TileSizeConfig,
+ TilingConfig,
+ group_tiles_by_temporal_slice,
+ masks_are_complementary,
+ scale_by_masks_1d,
+)
+from ltx_core.types import SpatioTemporalScaleFactors, VideoLatentShape
+from ltx_core.utils import to_velocity
+
+# Production CausalVideoAutoencoderL decoder layout: channel width per stage.
+# Mirrors the (non-diffusion) NA decoder's stage spec.
+_L_STAGE_CHANNELS: Tuple[int, ...] = (1024, 512, 256, 256, 128)
+_L_STAGE_DEPTHS: Tuple[int, ...] = (4, 6, 4, 2, 2)
+# (stride, out_channels_reduction_factor) per upsample, in stage order.
+_L_UPSAMPLES: Tuple[Tuple[Tuple[int, int, int], int], ...] = (
+ ((1, 2, 2), 2), # compress_space x2
+ ((2, 1, 1), 2), # compress_time x2
+ ((2, 2, 2), 1), # compress_all x1 (channel-preserving)
+ ((2, 2, 2), 2), # compress_all x2
+)
+# Per-stage 3D neighborhood (K_t, K_h, K_w).
+_L_STAGE_KERNELS: Tuple[Tuple[int, int, int], ...] = (
+ (3, 7, 7),
+ (3, 7, 7),
+ (3, 5, 5),
+ (3, 5, 5),
+ (3, 3, 3),
+)
+
+# Stage-5 (diffusion stage) defaults: wider kernel + more blocks than the
+# deterministic stages, since it carries the entire per-step diffusion compute.
+_DIFF_STAGE5_KERNEL_DEFAULT: Tuple[int, int, int] = (3, 7, 7)
+_DIFF_STAGE5_DEPTH_DEFAULT: int = 8
+_DIFF_STAGE_DEPTHS_DEFAULT: Tuple[int, ...] = (*_L_STAGE_DEPTHS[:-1], _DIFF_STAGE5_DEPTH_DEFAULT)
+
+
+class DiffusionVideoDecoder(nn.Module, Disposable, VideoDecoder):
+ """Diffusion-based video VAE decoder (Neighborhood-Attention backbone).
+ Minimal port of the reference ``NADiffusionDecoder``.
+ Stages 1-4 deterministically upsample the latent into a context volume
+ (same NA-upsample path as the non-diffusion NA decoder). Stage 5 runs
+ ``DiffusionNABlock``s that denoise the patchified noised pixels ``x_t``,
+ guided by that context via AdaLN-Zero scale/shift (ungated residuals;
+ legacy static gates are folded into Linear weights at load time).
+ Last-frame NATTEN window-shift is mitigated by temporarily replicating the
+ last latent frame ``(stage1_K_t // 2) * 2`` times through stages 1-4, then
+ cropping that appendix from context before stage 5 - but only down to
+ ``max(original_context_T, stage5_kernel[0])`` so undersized clips (e.g. a
+ single latent frame) still satisfy NATTEN's kernel floor. Latents / tiles
+ below ``stage_min_tile_sizes`` are edge-padded first via ``diffusion_tiling``;
+ leftover pad is cropped from the final pixels.
+ """
+
+ def __init__( # noqa: PLR0913
+ self,
+ in_channels: int = 128,
+ out_channels: int = 3,
+ patch_size: int = 4,
+ head_dim: int = 64,
+ rope_dim_split: Tuple[int, int, int] | None = None,
+ stage_channels: Tuple[int, ...] = _L_STAGE_CHANNELS,
+ stage_depths: Tuple[int, ...] = _DIFF_STAGE_DEPTHS_DEFAULT,
+ stage_kernels: Tuple[Tuple[int, int, int], ...] = _L_STAGE_KERNELS,
+ upsamples: Tuple[Tuple[Tuple[int, int, int], int], ...] = _L_UPSAMPLES,
+ stage5_kernel: Tuple[int, int, int] = _DIFF_STAGE5_KERNEL_DEFAULT,
+ stage5_channels: int | None = None,
+ t_emb_dim: int = 384,
+ default_num_inference_steps: int = 2,
+ timestep_scale_multiplier: float = 1.0,
+ model_output_type: Literal["v", "x0"] = "v",
+ ) -> None:
+ super().__init__()
+ assert len(stage_channels) == len(stage_depths) == len(stage_kernels)
+ assert len(upsamples) == len(stage_channels) - 1
+ for c in stage_channels:
+ assert c % head_dim == 0, f"stage_channels {stage_channels} must each be a multiple of head_dim={head_dim}"
+
+ self.patch_size = patch_size
+ self.register_buffer(
+ "default_inference_timesteps",
+ torch.linspace(1.0, 1.0 / default_num_inference_steps, default_num_inference_steps, device="cpu"),
+ persistent=False,
+ )
+ self.out_channels = out_channels
+ self.stage_channels = stage_channels
+ self.stage_depths = stage_depths
+ self.base_channels = stage_channels[-1]
+ self.causal = False
+ self.timestep_conditioning = True
+ self.video_downscale_factors = SpatioTemporalScaleFactors.default()
+ self.stage5_kernel: Tuple[int, int, int] = tuple(stage5_kernel) # type: ignore[assignment]
+ # NATTEN last-frame border workaround: replicate last latent frame
+ # ``(K_t // 2) * 2`` times through stages 1-4, then crop the appendix
+ # off context before stage 5 down to at least ``stage5_kernel[0]``.
+ self._natten_trailing_pad_latent_frames = (stage_kernels[0][0] // 2) * 2
+
+ # Encoder output is per-channel normalized; undo before conv_in (same as ConvVideoDecoder).
+ self.per_channel_statistics = PerChannelStatistics(latent_channels=in_channels)
+
+ self.conv_in = ChannelLinear(in_channels, stage_channels[0], bias=True)
+
+ self.det_stages = nn.ModuleList()
+ self.upsamples = nn.ModuleList()
+ n_det_stages = len(stage_channels) - 1
+ for stage_i in range(n_det_stages):
+ c = stage_channels[stage_i]
+ depth = stage_depths[stage_i]
+ kernel = stage_kernels[stage_i]
+ self.det_stages.append(
+ nn.ModuleList(
+ [
+ NABlock(dim=c, kernel_size=kernel, head_dim=head_dim, rope_dim_split=rope_dim_split)
+ for _ in range(depth)
+ ]
+ )
+ )
+ stride, reduction = upsamples[stage_i]
+ self.upsamples.append(
+ LinearPixelShuffleUpsample(in_channels=c, stride=stride, out_channels_reduction_factor=reduction)
+ )
+
+ self.t_embedder = PixArtAlphaCombinedTimestepSizeEmbeddings(embedding_dim=t_emb_dim, size_emb_dim=0)
+
+ c_ctx = stage_channels[-1]
+ self.context_channels = c_ctx
+ c5 = stage5_channels if stage5_channels is not None else c_ctx
+ d5 = stage_depths[-1]
+ assert c5 % head_dim == 0, f"stage5_channels {c5} must be a multiple of head_dim={head_dim}"
+ noised_pixel_channels = out_channels * (patch_size**2)
+
+ # Latent-grid floor so stages 1-3 (full volume) never undershoot NA.
+ self.stage_min_tile_sizes: Tuple[int, int, int] = diffusion_tiling.all_stages_min_tile_size(
+ stage_kernels, upsamples, stage5_kernel
+ )
+ # Stage-4-input tile floor / overlap halos (only stages 4-5 are tiled).
+ up3_stride = upsamples[3][0]
+ self.tile_min_sizes: Tuple[int, int, int] = diffusion_tiling.compute_tile_min_size(
+ stage_kernels[3], stage5_kernel, up3_stride
+ )
+ self.tile_halos: Tuple[Tuple[int, int, int], Tuple[int, int, int]] = diffusion_tiling.compute_tile_halos(
+ stage_kernels[3],
+ stage_depths[3],
+ stage5_kernel,
+ stage_depths[-1],
+ up3_stride,
+ )
+ self.conv_in_x_t = ChannelLinear(noised_pixel_channels, c5, bias=True)
+
+ # Shared AdaLN-Zero (7-chunk for shape compat; gate slots unused in block).
+ self.shared_adaln = AdaLNZero(dim=c5, t_emb_dim=t_emb_dim)
+
+ self.diff_blocks = nn.ModuleList(
+ [
+ CombinedDiffusionNABlock(
+ dim=c5,
+ kernel_size=stage5_kernel,
+ context_channels=c_ctx,
+ head_dim=head_dim,
+ rope_dim_split=rope_dim_split,
+ )
+ for _ in range(d5)
+ ]
+ )
+
+ self.norm_out = nn.RMSNorm(c5, eps=1e-6)
+ self.conv_out = ChannelLinear(c5, noised_pixel_channels, bias=True)
+
+ self.timestep_scale_multiplier = timestep_scale_multiplier
+ self.model_output_type = model_output_type
+ # Set True by ``compile_diffusion_decoder`` so decode marks T/H/W dynamic.
+ self.mark_dynamic_shapes = False
+ # When True, skip stage-4 upsample and inject via deferred sequential upsample+proj.
+ # Default False = combined pathway (``CombinedDiffusionNABlock``). Chunked DiffVAE
+ # modes flip this via ``apply_diffvae_config``.
+ self.deferred_stage4_upsample = False
+
+ def _run_det_stage(self, x: torch.Tensor, stage_i: int, drop_leading_frame: bool) -> torch.Tensor:
+ """One deterministic stage: NA blocks + upsample."""
+ if self.mark_dynamic_shapes:
+ for dim in (1, 2, 3):
+ torch._dynamo.mark_dynamic(x, dim)
+ for block in self.det_stages[stage_i]:
+ x = block(x)
+ return self.upsamples[stage_i](x, drop_leading_frame=drop_leading_frame)
+
+ def forward_stages_1_to_3(
+ self,
+ z_noisy: torch.Tensor,
+ drop_leading_frame: bool = True,
+ ) -> torch.Tensor:
+ """Stages 1-3 on a full (or already ghost-padded) latent → stage-4 input feature.
+ Output is channels-last ``(B, T, H, W, C)`` at stage-4 input resolution.
+ Callers that want NATTEN trailing ghosting should pad the latent first via
+ ``diffusion_tiling.pad_trailing_latent_for_natten_border``.
+ """
+ z_noisy = self.per_channel_statistics.un_normalize(z_noisy)
+ x = z_noisy.permute(0, 2, 3, 4, 1)
+ x = self.conv_in(x)
+ for stage_i in range(3):
+ x = self._run_det_stage(x, stage_i, drop_leading_frame)
+ return x
+
+ def forward_stage_4(
+ self,
+ x: torch.Tensor,
+ drop_leading_frame: bool = True,
+ pad_trailing: bool = True,
+ ) -> torch.Tensor:
+ """Stage 4 on a stage-4-input feature tile → stage-5 context (or pre-upsample feat).
+ ``x`` is channels-last. When ``pad_trailing``, soft-crop the ghosting
+ appendix before returning (ghost pad must already be present upstream).
+ When ``deferred_stage4_upsample`` is set, runs NA blocks only (no
+ ``upsamples[3]``) and crops ghost at pre-upsample temporal resolution.
+ """
+ if self.deferred_stage4_upsample:
+ if self.mark_dynamic_shapes:
+ for dim in (1, 2, 3):
+ torch._dynamo.mark_dynamic(x, dim)
+ for block in self.det_stages[3]:
+ x = block(x)
+ if pad_trailing:
+ up_t = int(self.upsamples[3].stride[0])
+ x = diffusion_tiling.crop_trailing_context_natten_pad(
+ x,
+ n_latent_frames=self._natten_trailing_pad_latent_frames,
+ time_scale=self.video_downscale_factors.time // up_t,
+ stage5_kernel_t=max(1, -(-self.stage5_kernel[0] // up_t)),
+ )
+ return x
+
+ x = self._run_det_stage(x, 3, drop_leading_frame)
+ if pad_trailing:
+ x = diffusion_tiling.crop_trailing_context_natten_pad(
+ x,
+ n_latent_frames=self._natten_trailing_pad_latent_frames,
+ time_scale=self.video_downscale_factors.time,
+ stage5_kernel_t=self.stage5_kernel[0],
+ )
+ return x
+
+ def _context_and_x_for_diff_step(self, context: torch.Tensor, x_t: torch.Tensor) -> torch.Tensor:
+ """Build block-ready ``[context | conv_in_x_t(patched x)]`` for ``forward_diff_step``."""
+ noised_pixels_patched = patchify(x_t, patch_size_hw=self.patch_size, patch_size_t=1)
+ x = self.conv_in_x_t(noised_pixels_patched.permute(0, 2, 3, 4, 1))
+ return torch.cat([context, x], dim=-1)
+
+ def _x_for_diff_step(self, x_t: torch.Tensor) -> torch.Tensor:
+ """Conv-processed noised pixels only (deferred-context path)."""
+ noised_pixels_patched = patchify(x_t, patch_size_hw=self.patch_size, patch_size_t=1)
+ return self.conv_in_x_t(noised_pixels_patched.permute(0, 2, 3, 4, 1))
+
+ def forward_diff_step(
+ self,
+ context_and_x: torch.Tensor,
+ t: torch.Tensor,
+ ) -> torch.Tensor:
+ """One stage-5 diffusion step. Returns the model prediction in pixel space.
+ ``context_and_x`` is ``[latent_context | conv_in_x_t(x)]`` (channels-last), built
+ at the call site via ``_context_and_x_for_diff_step``. That single buffer is
+ reused across ``diff_blocks``: each block writes its output x-half back
+ with ``copy_`` (no per-block ``cat``). One-tensor layout keeps Dynamo
+ T/H/W symbols identical under ``mark_dynamic``.
+ """
+ x_half = context_and_x[..., self.context_channels :]
+ t_emb = self.t_embedder(self.timestep_scale_multiplier * t, hidden_dtype=x_half.dtype)
+ modulation = self.shared_adaln(t_emb)
+
+ if self.mark_dynamic_shapes:
+ for dim in (1, 2, 3):
+ torch._dynamo.mark_dynamic(context_and_x, dim)
+
+ for block in self.diff_blocks:
+ x_half.copy_(block.forward_combined(context_and_x, modulation))
+ x = x_half
+
+ x = self.norm_out(x)
+ x = self.conv_out(x)
+ x = x.permute(0, 4, 1, 2, 3).contiguous()
+ return unpatchify(x, patch_size_hw=self.patch_size, patch_size_t=1)
+
+ def forward_diff_step_deferred(
+ self,
+ x: torch.Tensor,
+ stage4_feat: torch.Tensor,
+ t: torch.Tensor,
+ *,
+ drop_leading_frame: bool = True,
+ ) -> torch.Tensor:
+ """Stage-5 step with deferred context: only ``x`` + low-res ``stage4_feat``.
+ Marks T/H/W dynamic on both tensors. CHUNKED blocks upsample then
+ ``context_proj`` on the host before attn+mlp; BLACKWELL_DSL
+ (``DSLDiffusionBlockChain``) folds that hop into the fused kernel and never
+ materialises full-resolution context. ``drop_leading_frame`` must match the
+ flag used for this tile's stage-4 path (origin tile vs non-origin).
+ """
+ t_emb = self.t_embedder(self.timestep_scale_multiplier * t, hidden_dtype=x.dtype)
+ modulation = self.shared_adaln(t_emb)
+
+ if self.mark_dynamic_shapes:
+ for dim in (1, 2, 3):
+ torch._dynamo.mark_dynamic(x, dim)
+ torch._dynamo.mark_dynamic(stage4_feat, dim)
+
+ from ltx_core.model.video_vae.transformer.dsl_kernels import DSLDiffusionBlockChain # noqa: PLC0415
+
+ if isinstance(self.diff_blocks, DSLDiffusionBlockChain):
+ # Ping-pong fused launches; same deferred (x, stage4_feat) contract.
+ x = self.diff_blocks(x, stage4_feat, modulation, drop_leading_frame=drop_leading_frame)
+ else:
+ for block in self.diff_blocks:
+ x = block.forward_x_ctx(x, stage4_feat, modulation, drop_leading_frame=drop_leading_frame)
+
+ x = self.norm_out(x)
+ x = self.conv_out(x)
+ x = x.permute(0, 4, 1, 2, 3).contiguous()
+ return unpatchify(x, patch_size_hw=self.patch_size, patch_size_t=1)
+
+ def _euler_step(
+ self, x_t: torch.Tensor, model_out: torch.Tensor, t_now: torch.Tensor, t_next: torch.Tensor
+ ) -> torch.Tensor:
+ """One reverse-diffusion Euler update: advance ``x_t`` from ``t_now`` to
+ ``t_next`` given the model's prediction at ``t_now``.
+ """
+ compute_dtype = x_t.dtype
+ dt = (t_now - t_next).view(-1, *([1] * (x_t.ndim - 1))).to(torch.float32)
+ x_t_fp32 = x_t.to(torch.float32)
+ v_pred = model_out if self.model_output_type == "v" else to_velocity(x_t_fp32, t_now, model_out)
+ return (x_t_fp32 - dt * v_pred).to(compute_dtype)
+
+ def _decode_one_tile(
+ self,
+ feat_tile: torch.Tensor,
+ x_t_tile_init: torch.Tensor,
+ *,
+ is_origin: bool,
+ timestep: torch.Tensor,
+ pad_trailing: bool,
+ ) -> torch.Tensor:
+ """Run stage 4 + diffusion on one stage-4 feature tile (isolation)."""
+ context_tile = self.forward_stage_4(
+ feat_tile,
+ drop_leading_frame=is_origin,
+ pad_trailing=pad_trailing,
+ )
+
+ x_t = x_t_tile_init
+ _, num_steps = timestep.shape
+ for i in range(num_steps - 1):
+ t_now = timestep[:, i]
+ t_next = timestep[:, i + 1]
+ if self.deferred_stage4_upsample:
+ x = self._x_for_diff_step(x_t)
+ model_out = self.forward_diff_step_deferred(x, context_tile, t_now, drop_leading_frame=is_origin).to(
+ torch.float32
+ )
+ else:
+ context_and_x = self._context_and_x_for_diff_step(context_tile, x_t)
+ model_out = self.forward_diff_step(context_and_x, t_now).to(torch.float32)
+ x_t = self._euler_step(x_t, model_out, t_now, t_next)
+
+ t_now = timestep[:, -1]
+ if self.deferred_stage4_upsample:
+ x = self._x_for_diff_step(x_t)
+ model_out = self.forward_diff_step_deferred(x, context_tile, t_now, drop_leading_frame=is_origin)
+ else:
+ context_and_x = self._context_and_x_for_diff_step(context_tile, x_t)
+ model_out = self.forward_diff_step(context_and_x, t_now)
+ if self.model_output_type == "x0":
+ return model_out
+ return self._euler_step(x_t, model_out.to(torch.float32), t_now, torch.zeros_like(t_now))
+
+ def _decode_temporal_group_isolated(
+ self,
+ tiles: List[Tile],
+ feat_s4: torch.Tensor,
+ content_s4_frames: int,
+ x_t_init: torch.Tensor | None,
+ timestep: torch.Tensor,
+ full_video_shape: VideoLatentShape,
+ curr_temporal_slice: slice,
+ generator: torch.Generator | None,
+ *,
+ complementary: bool,
+ ) -> Tuple[torch.Tensor, torch.Tensor | None]:
+ """Decode every tile of one temporal group in isolation and blend."""
+ group_temporal_len = curr_temporal_slice.stop - curr_temporal_slice.start
+ group_shape = full_video_shape._replace(frames=group_temporal_len)
+ full_torch_shape = full_video_shape.to_torch_shape()
+ accum_dtype = torch.float16 if feat_s4.dtype == torch.bfloat16 else feat_s4.dtype
+ buffer = torch.zeros(group_shape.to_torch_shape(), device=feat_s4.device, dtype=accum_dtype)
+ weights: torch.Tensor | None = None if complementary else torch.zeros_like(buffer)
+ local_temporal_slice = slice(0, group_temporal_len)
+
+ compute_dtype = feat_s4.dtype
+ randn_device = generator.device if generator is not None else feat_s4.device
+ up3_stride = tuple(self.upsamples[3].stride)
+
+ for tile in tiles:
+ feat_tile, is_origin, pad_trailing, content_thw = diffusion_tiling.slice_stage4_tile(
+ feat_s4, tile, content_frames=content_s4_frames
+ )
+ content_pixel_shape = diffusion_tiling.pixel_tile_shape(full_torch_shape, tile.out_coords)
+ stage5_f, stage5_h, stage5_w = diffusion_tiling.stage5_pixel_shape_from_stage4(
+ content_thw[0],
+ content_thw[1],
+ content_thw[2],
+ upsample_stride=up3_stride, # type: ignore[arg-type]
+ patch_size=self.patch_size,
+ stage5_kernel_t=self.stage5_kernel[0],
+ drop_leading_frame=is_origin,
+ pad_trailing=pad_trailing,
+ )
+
+ if x_t_init is None:
+ x_t_tile_init = torch.randn(
+ (content_pixel_shape[0], content_pixel_shape[1], stage5_f, stage5_h, stage5_w),
+ dtype=compute_dtype,
+ generator=generator,
+ device=randn_device,
+ ).to(feat_s4.device)
+ else:
+ # Expand/crop to stage-5 canvas with the same edge policy as latent
+ # size-floor / ghost pad (not fresh noise - NA mixes padded values
+ # into kept pixels near the boundary).
+ x_t_tile_init = x_t_init[tile.out_coords]
+ x_t_tile_init, _ = diffusion_tiling.resize_axis(x_t_tile_init, 2, stage5_f, mode="repeat_last")
+ x_t_tile_init, _ = diffusion_tiling.resize_axis(x_t_tile_init, 3, stage5_h, mode="symmetric")
+ x_t_tile_init, _ = diffusion_tiling.resize_axis(x_t_tile_init, 4, stage5_w, mode="symmetric")
+
+ pixel_tile = self._decode_one_tile(
+ feat_tile,
+ x_t_tile_init,
+ is_origin=is_origin,
+ timestep=timestep,
+ pad_trailing=pad_trailing,
+ )
+ pixel_tile = diffusion_tiling.crop_pixels_to_content(
+ pixel_tile,
+ content_pixel_shape[2],
+ content_pixel_shape[3],
+ content_pixel_shape[4],
+ ).to(buffer.dtype)
+
+ masks = tuple(m.to(device=buffer.device, dtype=torch.float32) for m in tile.masks_1d)
+ local_coords = (
+ tile.out_coords[0],
+ tile.out_coords[1],
+ local_temporal_slice,
+ tile.out_coords[3],
+ tile.out_coords[4],
+ )
+ buffer[local_coords] += scale_by_masks_1d(pixel_tile, masks)
+ if weights is not None:
+ strength = torch.ones(pixel_tile.shape, device=buffer.device, dtype=buffer.dtype)
+ weights[local_coords] += scale_by_masks_1d(strength, masks)
+
+ return buffer, weights
+
+ def _decode_pixels( # noqa: PLR0912, PLR0915
+ self,
+ latent: torch.Tensor,
+ tiling_config: TilingConfig | None = None,
+ generator: torch.Generator | None = None,
+ *,
+ as_fhwc: bool = False,
+ ) -> Iterator[torch.Tensor]:
+ """Decode latent to pixels, yielding temporal chunks.
+ Default yields raw ``(B, C, F, H, W)`` in ``[-1, 1]``. With ``as_fhwc=True``
+ (used by :meth:`decode_video`), each chunk is materialized once as
+ contiguous ``[F, H, W, C]`` still in ``[-1, 1]`` - layout copy only;
+ range mapping stays in ``to_rgb``.
+ Stages 1-3 run once on the full volume; stages 4-5 run per tile with
+ pixel blend (one tile / one group when untiled or no real split).
+ Across temporal groups only the trailing overlap is retained between
+ iterations; exclusive frames are yielded before the next group decodes.
+ Peak residency is ~two tile extents (current buffer + still-live emit /
+ overlap stub), not a single ``tile + overlap`` slab.
+ """
+ content_shape = VideoLatentShape.from_torch_shape(latent.shape)
+ content_pixel = content_shape.upscale(self.video_downscale_factors)._replace(channels=self.out_channels)
+
+ latent, (_t_pad, h_pad, w_pad) = diffusion_tiling.ensure_min_latent_shape(latent, self.stage_min_tile_sizes)
+ spatial_scale = (self.video_downscale_factors.height, self.video_downscale_factors.width)
+ work_shape = VideoLatentShape.from_torch_shape(latent.shape)
+ full_video_shape = work_shape.upscale(self.video_downscale_factors)._replace(channels=self.out_channels)
+ target_shape = full_video_shape.to_torch_shape()
+
+ strides = [tuple(u.stride) for u in self.upsamples]
+ s4_t, s4_h, s4_w = diffusion_tiling.stage4_thw_from_latent(
+ strides, latent.shape[2], latent.shape[3], latent.shape[4], drop_leading_frame=True
+ )
+ tiles = diffusion_tiling.prepare_tile_schedule(
+ torch.Size([latent.shape[0], latent.shape[1], s4_t, s4_h, s4_w]),
+ tiling_config,
+ upsample3_stride=tuple(self.upsamples[3].stride), # type: ignore[arg-type]
+ patch_size=self.patch_size,
+ min_tile_size=self.tile_min_sizes,
+ tile_halos=self.tile_halos,
+ )
+
+ latent_padded = diffusion_tiling.pad_trailing_latent_for_natten_border(
+ latent, self._natten_trailing_pad_latent_frames
+ )
+ if self.mark_dynamic_shapes:
+ for dim in (2, 3, 4):
+ torch._dynamo.mark_dynamic(latent_padded, dim)
+
+ feat_s4 = self.forward_stages_1_to_3(latent_padded, drop_leading_frame=True)
+
+ batch = latent.shape[0]
+ timestep = self.default_inference_timesteps.to(latent.device).unsqueeze(0).expand(batch, -1)
+ single_step_x0 = timestep.shape[1] == 1 and self.model_output_type == "x0"
+
+ x_t_init: torch.Tensor | None = None
+ if not single_step_x0:
+ compute_dtype = latent.dtype
+ randn_device = generator.device if generator is not None else latent.device
+ x_t_init = torch.randn(
+ tuple(target_shape), dtype=compute_dtype, generator=generator, device=randn_device
+ ).to(latent.device)
+
+ complementary = masks_are_complementary(tiles, target_shape)
+ groups = group_tiles_by_temporal_slice(tiles)
+ group_slices = [slice(*group[0].out_coords[2].indices(target_shape[2])[:2]) for group in groups]
+
+ # Keep only the trailing temporal overlap of the previous group (not the full
+ # chunk). Exclusive frames are yielded before the next group is decoded; the
+ # consumer may still hold that emit while the next buffer is live (~2x tile).
+ overlap_stub: torch.Tensor | None = None
+ overlap_stub_weights: torch.Tensor | None = None
+
+ def _finalize(buf: torch.Tensor, wts: torch.Tensor | None) -> torch.Tensor:
+ if complementary:
+ return buf.to(latent.dtype)
+ assert wts is not None
+ wts = wts.clamp(min=diffusion_tiling._weight_floor(wts.dtype))
+ return (buf / wts).to(latent.dtype)
+
+ def _narrow_content_cfhw(t: torch.Tensor, frames_keep: int) -> torch.Tensor:
+ """Spatial/temporal content crop as views (no ``.contiguous()``)."""
+ x = t[:, :, :frames_keep]
+ th, tw = content_pixel.height, content_pixel.width
+ scale_h, scale_w = spatial_scale
+ if h_pad is not None:
+ before = diffusion_tiling.scale_axis_pad(h_pad, scale_h).before
+ x = x.narrow(3, before, th)
+ else:
+ need = x.shape[3] - th
+ if need > 0:
+ x = x.narrow(3, need // 2, th)
+ elif need < 0:
+ x, _ = diffusion_tiling.resize_axis(x, 3, th, mode="symmetric")
+ if w_pad is not None:
+ before = diffusion_tiling.scale_axis_pad(w_pad, scale_w).before
+ x = x.narrow(4, before, tw)
+ else:
+ need = x.shape[4] - tw
+ if need > 0:
+ x = x.narrow(4, need // 2, tw)
+ elif need < 0:
+ x, _ = diffusion_tiling.resize_axis(x, 4, tw, mode="symmetric")
+ return x
+
+ def _crop_emit(buf: torch.Tensor, wts: torch.Tensor | None, global_start: int) -> torch.Tensor | None:
+ if global_start >= content_pixel.frames or buf.shape[2] < 1:
+ return None
+ frames_keep = min(buf.shape[2], content_pixel.frames - global_start)
+ if frames_keep < 1:
+ return None
+ if not as_fhwc:
+ chunk = _finalize(buf[:, :, :frames_keep], None if wts is None else wts[:, :, :frames_keep])
+ return diffusion_tiling.crop_pixels_to_content(
+ chunk,
+ frames_keep,
+ content_pixel.height,
+ content_pixel.width,
+ h_pad=h_pad,
+ w_pad=w_pad,
+ spatial_scale=spatial_scale,
+ )
+
+ # One materialize: contiguous FHWC in latent.dtype, still [-1, 1].
+ # CFHW→FHWC cannot be inplace; range mapping is left to to_rgb.
+ cfhw = _narrow_content_cfhw(buf, frames_keep)
+ src = cfhw[0] # C, F, H, W (view into accumulator)
+ video = torch.empty(
+ src.shape[1],
+ src.shape[2],
+ src.shape[3],
+ src.shape[0],
+ dtype=latent.dtype,
+ device=src.device,
+ )
+ video.copy_(src.permute(1, 2, 3, 0))
+ if not complementary:
+ assert wts is not None
+ w_cfhw = _narrow_content_cfhw(wts, frames_keep)
+ wview = w_cfhw[0].permute(1, 2, 3, 0)
+ # Inplace floor on exclusive weight region only (discarded after emit).
+ wview.clamp_min_(diffusion_tiling._weight_floor(w_cfhw.dtype))
+ video.div_(wview)
+ return video
+
+ for gi, group in enumerate(groups):
+ curr_temporal_slice = group_slices[gi]
+ buffer, weights = self._decode_temporal_group_isolated(
+ group,
+ feat_s4,
+ s4_t,
+ x_t_init,
+ timestep,
+ full_video_shape,
+ curr_temporal_slice,
+ generator=generator,
+ complementary=complementary,
+ )
+
+ if overlap_stub is not None:
+ overlap_len = int(overlap_stub.shape[2])
+ if overlap_len > 0:
+ # Stub is exactly the region overlapping this group (cloned when
+ # the previous group finished); blend then write back into buffer.
+ overlap_stub += buffer[:, :, :overlap_len]
+ if complementary:
+ buffer[:, :, :overlap_len] = overlap_stub
+ else:
+ assert overlap_stub_weights is not None
+ assert weights is not None
+ overlap_stub_weights += weights[:, :, :overlap_len]
+ buffer[:, :, :overlap_len] = overlap_stub
+ weights[:, :, :overlap_len] = overlap_stub_weights
+ overlap_stub = None
+ overlap_stub_weights = None
+
+ if gi + 1 < len(groups):
+ next_start = group_slices[gi + 1].start
+ exclusive_len = min(max(0, next_start - curr_temporal_slice.start), buffer.shape[2])
+ emitted = _crop_emit(
+ buffer[:, :, :exclusive_len],
+ None if weights is None else weights[:, :, :exclusive_len],
+ curr_temporal_slice.start,
+ )
+ if emitted is not None:
+ yield emitted
+ # Retain only the trailing overlap for the next handoff.
+ overlap_stub = buffer[:, :, exclusive_len:].clone()
+ if not complementary:
+ assert weights is not None
+ overlap_stub_weights = weights[:, :, exclusive_len:].clone()
+ del buffer, weights
+ else:
+ emitted = _crop_emit(buffer, weights, curr_temporal_slice.start)
+ if emitted is not None:
+ yield emitted
+
+ def forward(
+ self,
+ sample: torch.Tensor,
+ generator: torch.Generator | None = None,
+ ) -> torch.Tensor:
+ """Decode via ``_decode_pixels`` with ``tiling_config=None`` (single full tile)."""
+ return next(self._decode_pixels(sample, tiling_config=None, generator=generator))
+
+ def recommended_tiling_config(
+ self,
+ *,
+ height: int,
+ width: int,
+ num_frames: int,
+ mode: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
+ free_bytes: int | None = None,
+ model_bytes: int | None = None,
+ ) -> TileSizeConfig:
+ """DiffVAE-aware tiling: stage-4/5 overlaps + memory-capped tile sizes."""
+ if free_bytes is None:
+ device = next(self.parameters()).device
+ free_bytes = cuda_activation_budget_bytes(device) if device.type == "cuda" else 0
+ if model_bytes is None:
+ model_bytes = sum(p.numel() * p.element_size() for p in self.parameters())
+ pixel_scale = diffusion_tiling.stage4_to_pixel_scale_factors(
+ tuple(self.upsamples[3].stride), # type: ignore[arg-type]
+ self.patch_size,
+ )
+ return diffusion_tiling.recommended_decode_tiling_config(
+ tile_halos=self.tile_halos,
+ pixel_scale=pixel_scale,
+ min_tile_size_s4=self.tile_min_sizes,
+ patch_size=self.patch_size,
+ height=height,
+ width=width,
+ num_frames=num_frames,
+ mode=mode,
+ free_bytes=free_bytes,
+ model_bytes=model_bytes,
+ )
+
+ def tiled_decode(
+ self,
+ latent: torch.Tensor,
+ tiling_config: TilingConfig,
+ generator: torch.Generator | None = None,
+ ) -> Iterator[torch.Tensor]:
+ """Tiled decode: stages 1-3 once, stages 4-5 per tile, pixel blend."""
+ yield from self._decode_pixels(latent, tiling_config, generator=generator)
+
+ def decode_video(
+ self,
+ latent: torch.Tensor,
+ tiling_config: TilingConfig | None = None,
+ generator: torch.Generator | None = None,
+ ) -> Iterator[torch.Tensor]:
+ """Decode latent video, yielding float chunk(s) ``[f, h, w, c]`` in ``[0, 1]``.
+ Untiled and tiled both go through ``_decode_pixels``. Tiled decode may yield
+ multiple times when ``tiling_config.frames`` splits the video.
+ Layout is packed once to contiguous FHWC on emit; ``to_rgb`` only does
+ inplace ``[-1, 1]→[0, 1]`` (no second realloc).
+ """
+
+ def to_rgb(frames: torch.Tensor) -> torch.Tensor:
+ return frames.add_(1).mul_(0.5).clamp_(0, 1)
+
+ for chunk in self._decode_pixels(latent, tiling_config, generator=generator, as_fhwc=True):
+ yield to_rgb(chunk)
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/memory_efficient_decode.py b/packages/ltx-core/src/ltx_core/model/video_vae/memory_efficient_decode.py
index 47c2add..eaff636 100644
--- a/packages/ltx-core/src/ltx_core/model/video_vae/memory_efficient_decode.py
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/memory_efficient_decode.py
@@ -19,15 +19,27 @@ from all four optimizations. Causal mode benefits from optimizations 1, 3,
and 4; in-place conv (2) is skipped because the asymmetric causal padding
layout prevents clean in-place overwrites.
Usage via the ``ModuleOps`` pattern (preferred)::
- from ltx_core.model.video_vae import MEMORY_EFFICIENT_DECODE
+ from ltx_core.loader.sd_ops import SDOps
+ from ltx_core.model.video_vae import (
+ CHANNELS_LAST_3D_WEIGHTS,
+ MEMORY_EFFICIENT_DECODE,
+ VAE_DECODER_COMFY_KEYS_FILTER,
+ )
+ sd_ops = SDOps(
+ name=f"sd_ops_chain_{VAE_DECODER_COMFY_KEYS_FILTER.name}+{CHANNELS_LAST_3D_WEIGHTS.name}",
+ mapping=(*VAE_DECODER_COMFY_KEYS_FILTER.mapping, *CHANNELS_LAST_3D_WEIGHTS.mapping),
+ )
builder = decoder_builder.with_module_ops(
(*decoder_builder.module_ops, MEMORY_EFFICIENT_DECODE)
- )
+ ).with_sd_ops(sd_ops)
Or applied directly to an existing decoder::
from ltx_core.model.video_vae.memory_efficient_decode import (
enable_memory_efficient_decode,
)
enable_memory_efficient_decode(decoder)
+Weights must be loaded with :data:`CHANNELS_LAST_3D_WEIGHTS` chained into sd_ops
+(or equivalent ``channels_last_3d`` layout) so the registry caches NHWC; the
+module op only formats activations and installs the workspace forward.
"""
from __future__ import annotations
@@ -41,6 +53,7 @@ from torch import nn
from torch.nn import functional as F
from ltx_core.loader.module_ops import ModuleOps
+from ltx_core.loader.sd_ops import KeyValueOperationResult, SDOps
from ltx_core.model.common.normalization import PixelNorm
from ltx_core.model.video_vae.convolution import CausalConv3d
from ltx_core.model.video_vae.ops import unpatchify
@@ -48,7 +61,7 @@ from ltx_core.model.video_vae.resnet import ResnetBlock3D, UNetMidBlock3D
from ltx_core.model.video_vae.sampling import DepthToSpaceUpsample
if TYPE_CHECKING:
- from ltx_core.model.video_vae.video_vae import VideoDecoder
+ from ltx_core.model.video_vae.video_vae import ConvVideoDecoder
# ---------------------------------------------------------------------------
@@ -455,7 +468,7 @@ def _upsample_forward_efficient(
def _final_norm_and_conv_out(
- decoder: VideoDecoder,
+ decoder: ConvVideoDecoder,
sample: torch.Tensor,
causal: bool,
scaled_timestep: torch.Tensor | None,
@@ -526,19 +539,20 @@ def _final_norm_and_conv_out(
def _memory_efficient_forward(
- decoder: VideoDecoder,
+ decoder: ConvVideoDecoder,
sample: torch.Tensor,
timestep: torch.Tensor | None = None,
generator: torch.Generator | None = None,
) -> torch.Tensor:
- """Full memory-efficient ``VideoDecoder.forward`` replacement.
+ """Full memory-efficient ``ConvVideoDecoder.forward`` replacement.
Orchestrates the entire decode through workspace-based operations:
``UNetMidBlock3D`` and ``DepthToSpaceUpsample`` blocks use efficient
paths; standalone ``ResnetBlock3D`` blocks fall back to the standard
forward. The final norm + ada + SiLU + conv_out is also workspace-based.
All workspaces are allocated ``channels_last_3d`` so cuDNN's NHWC 3D
- conv kernels run end-to-end. The caller (:func:`enable_memory_efficient_decode`)
- is responsible for converting the input sample and decoder weights to NHWC.
+ conv kernels run end-to-end. Weights must already be NHWC (via
+ :data:`CHANNELS_LAST_3D_WEIGHTS` chained at load); this path only formats the
+ input sample.
"""
causal = decoder.causal
batch_size = sample.shape[0]
@@ -600,38 +614,45 @@ def _memory_efficient_forward(
# ---------------------------------------------------------------------------
+def _to_channels_last_3d(key: str, value: torch.Tensor) -> list[KeyValueOperationResult]:
+ """Store 5D conv weights in NHWC so the mem-efficient path never reformats them."""
+ if value.dim() == 5:
+ value = value.to(memory_format=torch.channels_last_3d)
+ return [KeyValueOperationResult(key, value)]
+
+
+# Load-time NHWC for 5D weights. Chain onto the VAE decoder filter at the builder
+# (same pattern as QuantizationPolicy.sd_ops) so the registry caches this layout
+# under a distinct sd_ops name.
+CHANNELS_LAST_3D_WEIGHTS = SDOps("channels_last_3d_weights").with_kv_operation(operation=_to_channels_last_3d)
+
+
def enable_memory_efficient_decode(decoder: nn.Module) -> nn.Module:
- """Patch a ``VideoDecoder`` to use the memory-efficient forward path.
+ """Patch a ``ConvVideoDecoder`` to use the memory-efficient forward path.
The mem-efficient path runs the decoder in ``channels_last_3d`` memory
- format: weights and inputs are converted on first call so cuDNN's NHWC
- 3D conv kernels are used (~2x faster, avoids the large vol2col scratch
- buffer of the NCHW path).
+ format. **Weights** must already be NHWC — chain :data:`CHANNELS_LAST_3D_WEIGHTS`
+ into the builder's sd_ops at load so the registry stores that layout. This
+ patch only formats the **activation** and swaps in the workspace-based forward.
The original ``forward`` is saved as ``decoder._original_forward`` so
that it can be restored later with :func:`disable_memory_efficient_decode`.
"""
# Import here to avoid circular dependency at module level.
- from ltx_core.model.video_vae.video_vae import VideoDecoder # noqa: PLC0415
+ from ltx_core.model.video_vae.video_vae import ConvVideoDecoder # noqa: PLC0415
- if not isinstance(decoder, VideoDecoder):
- raise TypeError(f"Expected VideoDecoder, got {type(decoder).__name__}")
+ if not isinstance(decoder, ConvVideoDecoder):
+ raise TypeError(f"Expected ConvVideoDecoder, got {type(decoder).__name__}")
if hasattr(decoder, "_original_forward"):
return decoder
original_forward = decoder.forward
- weights_converted = False
def efficient_forward(
sample: torch.Tensor,
timestep: torch.Tensor | None = None,
generator: torch.Generator | None = None,
) -> torch.Tensor:
- nonlocal weights_converted
if sample.dim() == 5:
- if not weights_converted:
- # Lazy: weights are real by first-call time (meta -> loader -> here).
- decoder.to(memory_format=torch.channels_last_3d)
- weights_converted = True
sample = sample.to(memory_format=torch.channels_last_3d)
return _memory_efficient_forward(decoder, sample, timestep, generator)
@@ -641,7 +662,7 @@ def enable_memory_efficient_decode(decoder: nn.Module) -> nn.Module:
def disable_memory_efficient_decode(decoder: nn.Module) -> nn.Module:
- """Restore the original ``forward`` method on a patched ``VideoDecoder``."""
+ """Restore the original ``forward`` method on a patched ``ConvVideoDecoder``."""
if hasattr(decoder, "_original_forward"):
decoder.forward = decoder._original_forward # type: ignore[attr-defined]
del decoder._original_forward # type: ignore[attr-defined]
@@ -650,9 +671,9 @@ def disable_memory_efficient_decode(decoder: nn.Module) -> nn.Module:
def _is_video_decoder(model: nn.Module) -> bool:
"""Matcher for the ``MEMORY_EFFICIENT_DECODE`` module op."""
- from ltx_core.model.video_vae.video_vae import VideoDecoder # noqa: PLC0415
+ from ltx_core.model.video_vae.video_vae import ConvVideoDecoder # noqa: PLC0415
- return isinstance(model, VideoDecoder)
+ return isinstance(model, ConvVideoDecoder)
MEMORY_EFFICIENT_DECODE = ModuleOps(
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/model_configurator.py b/packages/ltx-core/src/ltx_core/model/video_vae/model_configurator.py
index 8e64ce5..89b7fb8 100644
--- a/packages/ltx-core/src/ltx_core/model/video_vae/model_configurator.py
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/model_configurator.py
@@ -1,79 +1,565 @@
-from ltx_core.loader.sd_ops import SDOps
+import dataclasses
+from pathlib import Path
+
+import safetensors
+import torch
+
+from ltx_core.loader.sd_ops import KeyValueOperationResult, SDOps
+from ltx_core.loader.sft_loader import SafetensorsModelStateDictLoader
from ltx_core.model.model_protocol import ModelConfigurator
from ltx_core.model.video_vae.enums import LogVarianceType, NormLayerType, PaddingModeType
-from ltx_core.model.video_vae.video_vae import VideoDecoder, VideoEncoder
+from ltx_core.model.video_vae.transformer.dsl_kernels import (
+ FUSED_CTX_BIAS_BUFFER,
+ FUSED_CTX_WEIGHT_BUFFER,
+ NA_SOFTMAX_BOUND_BUFFER,
+)
+from ltx_core.model.video_vae.video_vae import ConvVideoDecoder, DiffusionVideoDecoder, VideoDecoder, VideoEncoder
+
+_CONV_VAE_CLASS_NAME = "CausalVideoAutoencoder"
+
+
+def _vae_class_name_from_metadata(metadata: dict) -> str:
+ """Return the top-level ``vae._class_name`` from checkpoint metadata."""
+ return metadata.get("config", {}).get("vae", {}).get("_class_name", _CONV_VAE_CLASS_NAME)
+
+
+def is_diffusion_video_vae(checkpoint_path: str) -> bool:
+ """Whether ``checkpoint_path`` metadata describes a diffusion video VAE.
+ Decision is based on ``config.vae._class_name`` (same field
+ ``VideoDecoderConfigurator`` uses), not on how the path was supplied.
+ A standalone conv-VAE extract must still get conv SDOps / memory-efficient
+ decode.
+ """
+ metadata = SafetensorsModelStateDictLoader().metadata(checkpoint_path)
+ return _vae_class_name_from_metadata(metadata) != _CONV_VAE_CLASS_NAME
+
+
+def _prepare_video_encoder_kwargs(config: dict) -> dict:
+ """Extract ``VideoEncoder`` init kwargs from a ``vae`` configuration dictionary.
+ Two checkpoint layouts:
+ - Flat ``CausalVideoAutoencoder`` (LTX-2): fields live on ``vae`` itself.
+ Latent width is ``latent_channels``; top-level ``out_channels`` is decoder
+ RGB and must not be used as the encoder's latent size.
+ - Nested ``CausalDiffusionVAE``: fields live under ``vae.encoder`` with
+ ``blocks`` / ``out_channels`` naming (``out_channels`` is the latent width).
+ """
+ if "encoder" in config:
+ encoder_config = config["encoder"]
+ out_channels = encoder_config.get("out_channels", config.get("latent_channels", 128))
+ encoder_blocks = encoder_config.get("blocks", encoder_config.get("encoder_blocks", []))
+ else:
+ encoder_config = config
+ out_channels = config.get("latent_channels", 128)
+ encoder_blocks = config.get("encoder_blocks", [])
+
+ return {
+ "convolution_dimensions": encoder_config.get("dims", config.get("dims", 3)),
+ "in_channels": encoder_config.get("in_channels", 3),
+ "out_channels": out_channels,
+ "encoder_blocks": encoder_blocks,
+ "patch_size": encoder_config.get("patch_size", 4),
+ "norm_layer": NormLayerType(encoder_config.get("norm_layer", "pixel_norm")),
+ "latent_log_var": LogVarianceType(encoder_config.get("latent_log_var", "uniform")),
+ "encoder_spatial_padding_mode": PaddingModeType(
+ encoder_config.get(
+ "spatial_padding_mode",
+ config.get("encoder_spatial_padding_mode", "zeros"),
+ )
+ ),
+ }
class VideoEncoderConfigurator(ModelConfigurator[VideoEncoder]):
"""Configurator for creating a video VAE Encoder from a configuration dictionary."""
@classmethod
- def from_config(cls: type[VideoEncoder], config: dict) -> VideoEncoder:
- config = config.get("vae", {})
- convolution_dimensions = config.get("dims", 3)
- in_channels = config.get("in_channels", 3)
- latent_channels = config.get("latent_channels", 128)
- spatial_padding_mode = PaddingModeType(config.get("spatial_padding_mode", "zeros"))
- encoder_blocks = config.get("encoder_blocks", [])
- patch_size = config.get("patch_size", 4)
- norm_layer_str = config.get("norm_layer", "pixel_norm")
- latent_log_var_str = config.get("latent_log_var", "uniform")
-
- return VideoEncoder(
- convolution_dimensions=convolution_dimensions,
- in_channels=in_channels,
- out_channels=latent_channels,
- encoder_blocks=encoder_blocks,
- patch_size=patch_size,
- norm_layer=NormLayerType(norm_layer_str),
- latent_log_var=LogVarianceType(latent_log_var_str),
- encoder_spatial_padding_mode=spatial_padding_mode,
+ def from_metadata(cls, metadata: dict) -> VideoEncoder:
+ config = metadata.get("config", {}).get("vae", {})
+ return VideoEncoder(**_prepare_video_encoder_kwargs(config))
+
+
+def _build_conv_video_decoder(config: dict) -> ConvVideoDecoder:
+ """Build a ``ConvVideoDecoder`` from a ``vae`` configuration dictionary."""
+ return ConvVideoDecoder(
+ convolution_dimensions=config.get("dims", 3),
+ in_channels=config.get("latent_channels", 128),
+ out_channels=config.get("out_channels", 3),
+ decoder_blocks=config.get("decoder_blocks", []),
+ patch_size=config.get("patch_size", 4),
+ norm_layer=NormLayerType(config.get("norm_layer", "pixel_norm")),
+ causal=config.get("causal_decoder", False),
+ timestep_conditioning=config.get("timestep_conditioning", True),
+ decoder_spatial_padding_mode=PaddingModeType(config.get("spatial_padding_mode", "reflect")),
+ base_channels=config.get("decoder_base_channels", 128),
+ )
+
+
+def _build_diffusion_video_decoder(config: dict) -> DiffusionVideoDecoder:
+ """Build a ``DiffusionVideoDecoder`` from a ``vae`` configuration dictionary.
+ Real checkpoints (``_class_name: "CausalDiffusionVAE"``) nest decoder
+ hyperparameters under ``vae.decoder``; fall back to the flat ``vae`` dict
+ itself for configs that put them there directly. Architecture fields
+ absent from config (e.g. ``t_emb_dim``, stage ladders) are left at the
+ class defaults by omitting them from the constructor call.
+ """
+ decoder_config = config.get("decoder", config)
+ # Optional architecture overrides - only pass when present so class defaults apply.
+ architecture: dict = {}
+ if "stage_channels" in decoder_config:
+ architecture["stage_channels"] = tuple(decoder_config["stage_channels"])
+ if "stage_depths" in decoder_config:
+ architecture["stage_depths"] = tuple(decoder_config["stage_depths"])
+ if "stage_kernels" in decoder_config:
+ architecture["stage_kernels"] = tuple(tuple(kernel) for kernel in decoder_config["stage_kernels"])
+ if "upsamples" in decoder_config:
+ architecture["upsamples"] = tuple(
+ (tuple(stride), reduction) for stride, reduction in decoder_config["upsamples"]
)
+ if "stage5_kernel" in decoder_config:
+ architecture["stage5_kernel"] = tuple(decoder_config["stage5_kernel"])
+ if "stage5_channels" in decoder_config:
+ architecture["stage5_channels"] = decoder_config["stage5_channels"]
+
+ return DiffusionVideoDecoder(
+ in_channels=decoder_config.get("in_channels", config.get("latent_channels", 128)),
+ out_channels=decoder_config.get("out_channels", 3),
+ patch_size=decoder_config.get("patch_size", 4),
+ head_dim=decoder_config.get("head_dim", decoder_config.get("na_head_dim", 64)),
+ t_emb_dim=decoder_config.get("t_emb_dim", 384),
+ default_num_inference_steps=decoder_config.get("default_num_inference_steps", 2),
+ timestep_scale_multiplier=decoder_config.get("timestep_scale_multiplier", 1.0),
+ # Sibling of "decoder" at the top vae level (CausalDiffusionVAE.from_config
+ # reads it there too), not nested under decoder_config.
+ model_output_type=config.get("model_output_type", "v"),
+ **architecture,
+ )
+
+
+def stage4_channels_from_decoder_config(decoder_config: dict) -> int:
+ """Channels at stage-4 input (= output of deterministic stages 1-3).
+ ``stage_channels[3]`` after the first three upsample hops.
+ """
+ if "stage_channels" not in decoder_config:
+ raise ValueError("VAE decoder config missing stage_channels")
+ channels = decoder_config["stage_channels"]
+ if len(channels) < 4:
+ raise ValueError(f"stage_channels must have length >= 4, got {len(channels)}")
+ dim = int(channels[3])
+ if dim < 1:
+ raise ValueError(f"stage4_channels must be >= 1, got {dim}")
+ return dim
+
+
+def stage5_channels_from_decoder_config(decoder_config: dict) -> int:
+ """Stage-5 feature width from VAE config: ``num_heads * head_dim``.
+ Prefers explicit ``stage5_channels``, else ``stage_channels[-1]``. Both must be
+ divisible by ``head_dim`` (required in config as ``head_dim`` / ``na_head_dim``).
+ """
+ if "head_dim" in decoder_config:
+ head_dim = int(decoder_config["head_dim"])
+ elif "na_head_dim" in decoder_config:
+ head_dim = int(decoder_config["na_head_dim"])
+ else:
+ raise ValueError("VAE decoder config missing head_dim / na_head_dim")
+ if head_dim < 1:
+ raise ValueError(f"head_dim must be >= 1, got {head_dim}")
+ if "stage5_channels" in decoder_config:
+ dim = int(decoder_config["stage5_channels"])
+ elif "stage_channels" in decoder_config:
+ dim = int(decoder_config["stage_channels"][-1])
+ else:
+ raise ValueError("VAE decoder config missing stage5_channels / stage_channels")
+ if dim % head_dim != 0:
+ raise ValueError(f"stage5 dim {dim} is not divisible by head_dim={head_dim}")
+ return (dim // head_dim) * head_dim
+
+
+def diffvae_tiling_geometry_from_vae_config(config: dict) -> dict:
+ """Resolve DiffVAE tiling geometry from a ``vae`` config dict (no module build).
+ Returns kwargs for :func:`ltx_core.model.video_vae.diffusion_tiling.recommended_decode_tiling_config`
+ except resolution / memory fields: ``tile_halos``, ``pixel_scale``, ``min_tile_size_s4``,
+ ``patch_size``, ``stage5_channels``, ``stage4_channels``, ``upsample_strides``,
+ ``natten_trailing_pad_latent_frames``, ``out_channels``.
+ """
+ # Local import: avoid a hard cycle at module import time.
+ from ltx_core.model.video_vae import diffusion_tiling as dt # noqa: PLC0415
+ from ltx_core.model.video_vae import diffusion_video_decoder as dvd # noqa: PLC0415
+
+ decoder_config = config.get("decoder", config)
+ stage_kernels = (
+ tuple(tuple(k) for k in decoder_config["stage_kernels"])
+ if "stage_kernels" in decoder_config
+ else dvd._L_STAGE_KERNELS
+ )
+ stage_depths = (
+ tuple(decoder_config["stage_depths"]) if "stage_depths" in decoder_config else dvd._DIFF_STAGE_DEPTHS_DEFAULT
+ )
+ upsamples = (
+ tuple((tuple(stride), reduction) for stride, reduction in decoder_config["upsamples"])
+ if "upsamples" in decoder_config
+ else dvd._L_UPSAMPLES
+ )
+ stage5_kernel = (
+ tuple(decoder_config["stage5_kernel"]) if "stage5_kernel" in decoder_config else dvd._DIFF_STAGE5_KERNEL_DEFAULT
+ )
+ patch_size = int(decoder_config.get("patch_size", 4))
+ up3_stride = upsamples[3][0]
+ return {
+ "tile_halos": dt.compute_tile_halos(
+ stage_kernels[3],
+ stage_depths[3],
+ stage5_kernel,
+ stage_depths[-1],
+ up3_stride,
+ ),
+ "pixel_scale": dt.stage4_to_pixel_scale_factors(up3_stride, patch_size),
+ "min_tile_size_s4": dt.compute_tile_min_size(stage_kernels[3], stage5_kernel, up3_stride),
+ "patch_size": patch_size,
+ "stage5_channels": stage5_channels_from_decoder_config(decoder_config),
+ "stage4_channels": stage4_channels_from_decoder_config(decoder_config),
+ "upsample_strides": tuple(stride for stride, _reduction in upsamples),
+ "natten_trailing_pad_latent_frames": (stage_kernels[0][0] // 2) * 2,
+ "out_channels": int(decoder_config.get("out_channels", 3)),
+ }
+
+
+def estimate_diffusion_decoder_weight_bytes(checkpoint_path: str | Path) -> int:
+ """Sum on-disk bf16-sized nbytes for ``vae.decoder`` / ``decoder`` tensors (header only)."""
+ path = Path(checkpoint_path)
+ total = 0
+ with safetensors.safe_open(path, framework="pt", device="cpu") as handle:
+ for key in handle.keys(): # noqa: SIM118 # safetensors SafeOpen is not a Mapping
+ if not (key.startswith(("vae.decoder.", "decoder.")) or "per_channel_statistics" in key):
+ continue
+ shape = handle.get_slice(key).get_shape()
+ n = 1
+ for dim in shape:
+ n *= int(dim)
+ total += n * 2 # bf16
+ return total
class VideoDecoderConfigurator(ModelConfigurator[VideoDecoder]):
"""Configurator for creating a video VAE Decoder from a configuration dictionary."""
@classmethod
- def from_config(cls: type[VideoDecoder], config: dict) -> VideoDecoder:
- config = config.get("vae", {})
- convolution_dimensions = config.get("dims", 3)
- latent_channels = config.get("latent_channels", 128)
- spatial_padding_mode = PaddingModeType(config.get("spatial_padding_mode", "reflect"))
- out_channels = config.get("out_channels", 3)
- decoder_blocks = config.get("decoder_blocks", [])
- patch_size = config.get("patch_size", 4)
- norm_layer_str = config.get("norm_layer", "pixel_norm")
- causal = config.get("causal_decoder", False)
- timestep_conditioning = config.get("timestep_conditioning", True)
- base_channels = config.get("decoder_base_channels", 128)
-
- return VideoDecoder(
- convolution_dimensions=convolution_dimensions,
- in_channels=latent_channels,
- out_channels=out_channels,
- decoder_blocks=decoder_blocks,
- patch_size=patch_size,
- norm_layer=NormLayerType(norm_layer_str),
- causal=causal,
- timestep_conditioning=timestep_conditioning,
- decoder_spatial_padding_mode=spatial_padding_mode,
- base_channels=base_channels,
- )
+ def from_metadata(cls, metadata: dict) -> VideoDecoder:
+ config = metadata.get("config", {}).get("vae", {})
+ if _vae_class_name_from_metadata(metadata) == _CONV_VAE_CLASS_NAME:
+ return _build_conv_video_decoder(config)
+ return _build_diffusion_video_decoder(config)
+# Accept both monolithic ``vae.*`` prefixes and Comfy-split bare ``encoder.*`` /
+# ``decoder.*`` keys (standalone video VAE files under ``vae/``).
VAE_DECODER_COMFY_KEYS_FILTER = (
SDOps("VAE_DECODER_COMFY_KEYS_FILTER")
.with_matching(prefix="vae.decoder.")
.with_matching(prefix="vae.per_channel_statistics.")
+ .with_matching(prefix="decoder.")
+ .with_matching(prefix="per_channel_statistics.")
.with_replacement("vae.decoder.", "")
.with_replacement("vae.per_channel_statistics.", "per_channel_statistics.")
+ # Comfy-split bare keys: strip the leading ``decoder.`` after the vae. rule above.
+ .with_replacement("decoder.", "")
)
VAE_ENCODER_COMFY_KEYS_FILTER = (
SDOps("VAE_ENCODER_COMFY_KEYS_FILTER")
.with_matching(prefix="vae.encoder.")
.with_matching(prefix="vae.per_channel_statistics.")
+ .with_matching(prefix="encoder.")
+ .with_matching(prefix="per_channel_statistics.")
.with_replacement("vae.encoder.", "")
.with_replacement("vae.per_channel_statistics.", "per_channel_statistics.")
+ .with_replacement("encoder.", "")
+)
+
+
+def _split_fused_qkv_param(key: str, value: torch.Tensor) -> list[KeyValueOperationResult]:
+ """Split fused ``...qkv.weight`` / ``...qkv.bias`` into ``to_q`` / ``to_k`` / ``to_v``.
+ Checkpoints store a single Linear(dim, 3*dim) under ``qkv.{weight,bias}``;
+ ``QKVProjections`` owns three separate linears, so the loader rewrites keys here.
+ """
+ if value.shape[0] % 3 != 0:
+ msg = f"fused QKV param {key!r} leading dim {value.shape[0]} is not divisible by 3"
+ raise ValueError(msg)
+ d = value.shape[0] // 3
+ # key is "...qkv.weight" or "...qkv.bias"
+ leaf = "weight" if key.endswith(".weight") else "bias"
+ prefix = key[: -len(leaf)] # "...qkv."
+ return [
+ KeyValueOperationResult(f"{prefix}to_q.{leaf}", value[:d].detach().clone()),
+ KeyValueOperationResult(f"{prefix}to_k.{leaf}", value[d : 2 * d].detach().clone()),
+ KeyValueOperationResult(f"{prefix}to_v.{leaf}", value[2 * d :].detach().clone()),
+ ]
+
+
+_RAW_DIFFUSION_DECODER_PREFIX = "vae.decoder."
+_BARE_DIFFUSION_DECODER_PREFIX = "decoder."
+_K_NORM_SUFFIX = ".attn.k_norm.weight"
+_CONTEXT_PROJ_WEIGHT_SUFFIX = ".context_proj.weight"
+_CONTEXT_PROJ_BIAS_SUFFIX = ".context_proj.bias"
+_UPSAMPLE3_WEIGHT_KEY = "upsamples.3.proj.weight"
+_UPSAMPLE3_BIAS_KEY = "upsamples.3.proj.bias"
+_GATE_PARAM_SUFFIXES = (".gate_msa", ".gate_mlp", ".gate_ctx")
+# Post-rename Linear leaf → sibling gate key suffix (folded W←g·W, b←g·b).
+_GATE_FOLD_TARGETS: tuple[tuple[str, str], ...] = (
+ (".attn.proj.weight", ".gate_msa"),
+ (".attn.proj.bias", ".gate_msa"),
+ (".mlp.w_down.weight", ".gate_mlp"),
+ (".mlp.w_down.bias", ".gate_mlp"),
+ (".context_proj.weight", ".gate_ctx"),
+ (".context_proj.bias", ".gate_ctx"),
)
+
+
+def _strip_diffusion_decoder_prefix(key: str) -> str | None:
+ """Strip ``vae.decoder.`` or bare ``decoder.``; return None if neither matches."""
+ if key.startswith(_RAW_DIFFUSION_DECODER_PREFIX):
+ return key.removeprefix(_RAW_DIFFUSION_DECODER_PREFIX)
+ if key.startswith(_BARE_DIFFUSION_DECODER_PREFIX):
+ return key.removeprefix(_BARE_DIFFUSION_DECODER_PREFIX)
+ return None
+
+
+def _read_diff_vae_gates(checkpoint_path: str | Path) -> dict[str, torch.Tensor]:
+ """Return ``{post_rename_gate_key: tensor}`` for every DiffVAE ``gate_*``.
+ Keys are stripped of ``vae.decoder.`` / bare ``decoder.`` so they match the
+ names the loader passes to kv-ops after SDOps rename. Streaming load is
+ one-key-at-a-time, so siblings must be pre-read before fold ops run (same
+ pattern as ``_read_scales`` / ``_build_prequant_fold_sd_ops`` in fp8_cast).
+ """
+ out: dict[str, torch.Tensor] = {}
+ with safetensors.safe_open(str(checkpoint_path), framework="pt", device="cpu") as handle:
+ for key in handle.keys(): # noqa: SIM118
+ stripped = _strip_diffusion_decoder_prefix(key)
+ if stripped is None or not key.endswith(_GATE_PARAM_SUFFIXES):
+ continue
+ out[stripped] = handle.get_tensor(key)
+ return out
+
+
+def _drop_coarse_param(_key: str, _value: torch.Tensor) -> list[KeyValueOperationResult]:
+ """Drop bundled DiffVAE preview/coarse head weights (``coarse_*``)."""
+ return []
+
+
+def _gate_key_for_fold_target(param_key: str) -> str | None:
+ for leaf, gate_suffix in _GATE_FOLD_TARGETS:
+ if param_key.endswith(leaf):
+ return param_key[: -len(leaf)] + gate_suffix
+ return None
+
+
+def _fold_gate_into_linear(
+ param_key: str, value: torch.Tensor, gates: dict[str, torch.Tensor]
+) -> list[KeyValueOperationResult]:
+ """Fold a static gate into a Linear weight/bias when present; else pass through."""
+ gate_key = _gate_key_for_fold_target(param_key)
+ if gate_key is None:
+ return [KeyValueOperationResult(param_key, value)]
+ gate = gates.get(gate_key)
+ if gate is None:
+ return [KeyValueOperationResult(param_key, value)]
+ gate_f = gate.to(device=value.device, dtype=torch.float32)
+ value_f = value.to(dtype=torch.float32)
+ if value.ndim == 2:
+ folded = gate_f.unsqueeze(1) * value_f
+ elif value.ndim == 1:
+ folded = gate_f * value_f
+ else:
+ raise ValueError(f"Unsupported param rank {value.ndim} for gate fold on {param_key}")
+ return [KeyValueOperationResult(param_key, folded.to(dtype=value.dtype))]
+
+
+def _build_diffusion_vae_decoder_sd_ops(
+ gates: dict[str, torch.Tensor],
+ *,
+ stage4_hop: "_Stage4Hop | None" = None,
+) -> SDOps:
+ """DiffVAE decoder SDOps: rename, QKV split, coarse drop, gate fold/drop.
+ *gates* is keyed by post-rename gate param names (see ``_read_diff_vae_gates``).
+ Empty map (bundled n1 / QKV unit tests): fold is a no-op; drop never fires.
+ *stage4_hop* additionally packs the stage-4 upsample into every block's
+ ``context_proj``, which is what lets the fused CuTe DSL block read stage-4 directly.
+ """
+
+ def _drop_gate(gate_key: str, _value: torch.Tensor) -> list[KeyValueOperationResult]:
+ if gate_key not in gates:
+ raise ValueError(
+ f"Gate key {gate_key!r} has no matching entry in the pre-read gates dict; "
+ f"_read_diff_vae_gates and the loader's rename map have drifted"
+ )
+ return []
+
+ def _on_attn_proj(param_key: str, value: torch.Tensor) -> list[KeyValueOperationResult]:
+ return _fold_gate_into_linear(param_key, value, gates)
+
+ def _on_mlp_w_down(param_key: str, value: torch.Tensor) -> list[KeyValueOperationResult]:
+ return _fold_gate_into_linear(param_key, value, gates)
+
+ def _on_context_proj(param_key: str, value: torch.Tensor) -> list[KeyValueOperationResult]:
+ return _fold_gate_into_linear(param_key, value, gates)
+
+ def _on_context_proj_weight(param_key: str, value: torch.Tensor) -> list[KeyValueOperationResult]:
+ folded = _fold_gate_into_linear(param_key, value, gates)
+ if stage4_hop is None:
+ return folded
+ return folded + stage4_hop.fused_results(param_key, folded[0].new_value, gates)
+
+ # Drop/fold ops before QKV split so first-match kv-ops never mis-route.
+ # Match both monolith ``vae.decoder.*`` and Comfy-split bare ``decoder.*``.
+ return (
+ SDOps("DIFFUSION_VAE_DECODER_COMFY_KEYS_FILTER")
+ .with_matching(prefix="vae.decoder.")
+ .with_matching(prefix="decoder.")
+ .with_replacement("vae.decoder.", "")
+ .with_replacement("decoder.", "")
+ .with_replacement("t_embedder.mlp.0.", "t_embedder.timestep_embedder.linear_1.")
+ .with_replacement("t_embedder.mlp.2.", "t_embedder.timestep_embedder.linear_2.")
+ .with_matching(prefix="vae.per_channel_statistics.")
+ .with_matching(prefix="per_channel_statistics.")
+ .with_replacement("vae.per_channel_statistics.", "per_channel_statistics.")
+ .with_kv_operation(operation=_drop_coarse_param, key_prefix="coarse_")
+ .with_kv_operation(operation=_drop_gate, key_suffix=".gate_msa")
+ .with_kv_operation(operation=_drop_gate, key_suffix=".gate_mlp")
+ .with_kv_operation(operation=_drop_gate, key_suffix=".gate_ctx")
+ .with_kv_operation(operation=_on_attn_proj, key_suffix=".attn.proj.weight")
+ .with_kv_operation(operation=_on_attn_proj, key_suffix=".attn.proj.bias")
+ .with_kv_operation(operation=_on_mlp_w_down, key_suffix=".mlp.w_down.weight")
+ .with_kv_operation(operation=_on_mlp_w_down, key_suffix=".mlp.w_down.bias")
+ .with_kv_operation(operation=_on_context_proj_weight, key_suffix=".context_proj.weight")
+ .with_kv_operation(operation=_on_context_proj, key_suffix=".context_proj.bias")
+ .with_kv_operation(operation=_split_fused_qkv_param, key_suffix=".qkv.weight")
+ .with_kv_operation(operation=_split_fused_qkv_param, key_suffix=".qkv.bias")
+ )
+
+
+# Empty-gate build: QKV/t_embedder/coarse SDOps for unit tests. Weight loading of
+# gated (standalone distilled) checkpoints must use ``video_decoder_sd_ops_for_checkpoint``.
+DIFFUSION_VAE_DECODER_COMFY_KEYS_FILTER = _build_diffusion_vae_decoder_sd_ops({})
+
+
+def _emit_na_softmax_bound(param_key: str, value: torch.Tensor) -> list[KeyValueOperationResult]:
+ """Pass ``attn.k_norm.weight`` through and emit the DSL kernel's softmax bound beside it.
+ The CuTe DSL neighborhood-attention kernel replaces the online row max with a fixed
+ per-row offset built from ``sqrt(head_dim) * max|k_norm.weight|``. Deriving it here
+ means it is computed once, during load, into the buffer
+ ``DiffVAEMode.BLACKWELL_DSL`` registered -- rather than per forward, where reading it
+ off the weight would be a device-to-host sync inside a compiled region.
+ The extra key is harmless when the kernel is not in use: loading is not strict, so
+ a model without the buffer ignores it.
+ """
+ from ltx_kernels.vae import softmax_row_bound # noqa: PLC0415
+
+ bound_key = param_key.removesuffix(_K_NORM_SUFFIX) + f".attn.{NA_SOFTMAX_BOUND_BUFFER}"
+ return [
+ KeyValueOperationResult(param_key, value),
+ KeyValueOperationResult(bound_key, softmax_row_bound(value)),
+ ]
+
+
+def pack_fused_upsample_ctx_weights(
+ w_upsample: torch.Tensor,
+ b_upsample: torch.Tensor,
+ w_ctx: torch.Tensor,
+ b_ctx: torch.Tensor,
+) -> tuple[torch.Tensor, torch.Tensor]:
+ """Compose ``context_proj(pixel_shuffle(upsample(.)))`` into packed Linear weights.
+ Thin wrapper over :func:`ltx_kernels.vae.pack_fused_ctx_weights` so SDOps tests
+ can import from ``model_configurator`` without a hard kernels dependency at
+ module import time.
+ """
+ from ltx_kernels.vae import pack_fused_ctx_weights # noqa: PLC0415
+
+ return pack_fused_ctx_weights(w_upsample, b_upsample, w_ctx, b_ctx)
+
+
[email protected](frozen=True)
+class _Stage4Hop:
+ """``upsamples[3].proj`` and every ``context_proj.bias``, pre-read from a checkpoint.
+ The fused weight a block needs is built from three tensors that arrive at three
+ different keys, and a streaming load sees one key at a time -- so the two the
+ ``context_proj.weight`` op cannot wait for are read up front. The upsample is one
+ tensor for the whole decoder; the biases are one small vector per block. (Same
+ pattern as :func:`_read_diff_vae_gates`, which pre-reads the gates for the fold.)
+ """
+
+ upsample_weight: torch.Tensor
+ upsample_bias: torch.Tensor
+ context_biases: dict[str, torch.Tensor] # post-rename ``....context_proj.bias``
+
+ @classmethod
+ def read(cls, checkpoint_path: str | Path) -> "_Stage4Hop":
+ upsample_weight = upsample_bias = None
+ context_biases: dict[str, torch.Tensor] = {}
+ with safetensors.safe_open(str(checkpoint_path), framework="pt", device="cpu") as handle:
+ for key in handle.keys(): # noqa: SIM118
+ if not key.startswith(_RAW_DIFFUSION_DECODER_PREFIX):
+ continue
+ short = key.removeprefix(_RAW_DIFFUSION_DECODER_PREFIX)
+ if short == _UPSAMPLE3_WEIGHT_KEY:
+ upsample_weight = handle.get_tensor(key)
+ elif short == _UPSAMPLE3_BIAS_KEY:
+ upsample_bias = handle.get_tensor(key)
+ elif short.endswith(_CONTEXT_PROJ_BIAS_SUFFIX):
+ context_biases[short] = handle.get_tensor(key)
+ if upsample_weight is None or upsample_bias is None:
+ raise ValueError(
+ f"DiffVAE checkpoint {checkpoint_path!r} has no {_UPSAMPLE3_WEIGHT_KEY}, which "
+ "na_dsl_kernel needs to fuse the stage-4 hop into context_proj"
+ )
+ return cls(upsample_weight, upsample_bias, context_biases)
+
+ def fused_results(
+ self, weight_key: str, folded_weight: torch.Tensor, gates: dict[str, torch.Tensor]
+ ) -> list[KeyValueOperationResult]:
+ """The two fused buffers for the block owning ``weight_key``.
+ ``folded_weight`` is that block's already gate-folded ``context_proj.weight``; the
+ bias gets the same fold here, so the packed pair carries ``gate_ctx`` exactly once
+ and matches what the unfused ``context_proj`` would have computed.
+ """
+ prefix = weight_key.removesuffix(_CONTEXT_PROJ_WEIGHT_SUFFIX)
+ bias_key = prefix + _CONTEXT_PROJ_BIAS_SUFFIX
+ raw_bias = self.context_biases.get(bias_key)
+ if raw_bias is None:
+ raise ValueError(f"No pre-read {bias_key!r} to fuse alongside {weight_key!r}")
+ folded_bias = _fold_gate_into_linear(bias_key, raw_bias, gates)[0].new_value
+ weight, bias = pack_fused_upsample_ctx_weights(
+ self.upsample_weight, self.upsample_bias, folded_weight, folded_bias
+ )
+ return [
+ KeyValueOperationResult(f"{prefix}.{FUSED_CTX_WEIGHT_BUFFER}", weight),
+ KeyValueOperationResult(f"{prefix}.{FUSED_CTX_BIAS_BUFFER}", bias),
+ ]
+
+
+def video_decoder_sd_ops_for_checkpoint(
+ checkpoint_path: str,
+ *,
+ diffusion_vae: bool | None = None,
+ na_dsl_kernel: bool = False,
+) -> SDOps:
+ """Pick decoder SDOps from checkpoint metadata (conv vs diffusion).
+ For diffusion VAEs, pre-reads ``gate_*`` and builds fold/drop ops so standalone
+ distilled checkpoints load into the ungated ``DiffusionNABlock``.
+ ``na_dsl_kernel`` additionally derives the CuTe DSL kernel's softmax bound from each
+ ``k_norm`` weight and fuses ``upsamples[3]`` into every block's ``context_proj``, so
+ the fused block reads stage-4 directly instead of a full-resolution context. Must be
+ paired with ``DiffVAEMode.BLACKWELL_DSL`` (registers the receiving buffers); apply
+ alone leaves NaN / meta / empty buffers that fail at first forward. ``VideoDecoder``
+ ties both to one flag -- custom builders must do the same.
+ Pass ``diffusion_vae`` when the caller already ran ``is_diffusion_video_vae`` to
+ skip a second metadata open.
+ """
+ if diffusion_vae is None:
+ diffusion_vae = is_diffusion_video_vae(checkpoint_path)
+ if not diffusion_vae:
+ return VAE_DECODER_COMFY_KEYS_FILTER
+ gates = _read_diff_vae_gates(checkpoint_path)
+ if not na_dsl_kernel:
+ return _build_diffusion_vae_decoder_sd_ops(gates)
+ return _build_diffusion_vae_decoder_sd_ops(gates, stage4_hop=_Stage4Hop.read(checkpoint_path)).with_kv_operation(
+ operation=_emit_na_softmax_bound, key_suffix=_K_NORM_SUFFIX
+ )
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/ops.py b/packages/ltx-core/src/ltx_core/model/video_vae/ops.py
index 8912491..7eccea5 100644
--- a/packages/ltx-core/src/ltx_core/model/video_vae/ops.py
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/ops.py
@@ -64,12 +64,14 @@ class PerChannelStatistics(nn.Module):
"""
Per-channel statistics for normalizing and denormalizing the latent representation.
This statics is computed over the entire dataset and stored in model's checkpoint under VAE state_dict.
+ Defaults are identity (std=1, mean=0) so models constructed without a checkpoint
+ do not inherit allocator garbage / NaNs from ``torch.empty``.
"""
def __init__(self, latent_channels: int = 128):
super().__init__()
- self.register_buffer("std-of-means", torch.empty(latent_channels))
- self.register_buffer("mean-of-means", torch.empty(latent_channels))
+ self.register_buffer("std-of-means", torch.ones(latent_channels))
+ self.register_buffer("mean-of-means", torch.zeros(latent_channels))
def un_normalize(self, x: torch.Tensor) -> torch.Tensor:
return (x * self.get_buffer("std-of-means").view(1, -1, 1, 1, 1).to(x)) + self.get_buffer("mean-of-means").view(
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/tiling.py b/packages/ltx-core/src/ltx_core/model/video_vae/tiling.py
deleted file mode 100644
index d6923f8..0000000
--- a/packages/ltx-core/src/ltx_core/model/video_vae/tiling.py
+++ /dev/null
@@ -1,69 +0,0 @@
-from dataclasses import dataclass
-
-
-@dataclass(frozen=True)
-class SpatialTilingConfig:
- """Configuration for dividing each frame into spatial tiles with optional overlap.
- Args:
- tile_size_in_pixels (int): Size of each tile in pixels. Must be at least 64 and divisible by 32.
- tile_overlap_in_pixels (int, optional): Overlap between tiles in pixels. Must be divisible by 32. Defaults to 0.
- """
-
- tile_size_in_pixels: int
- tile_overlap_in_pixels: int = 0
-
- def __post_init__(self) -> None:
- if self.tile_size_in_pixels < 64:
- raise ValueError(f"tile_size_in_pixels must be at least 64, got {self.tile_size_in_pixels}")
- if self.tile_size_in_pixels % 32 != 0:
- raise ValueError(f"tile_size_in_pixels must be divisible by 32, got {self.tile_size_in_pixels}")
- if self.tile_overlap_in_pixels % 32 != 0:
- raise ValueError(f"tile_overlap_in_pixels must be divisible by 32, got {self.tile_overlap_in_pixels}")
- if self.tile_overlap_in_pixels >= self.tile_size_in_pixels:
- raise ValueError(
- f"Overlap must be less than tile size, got {self.tile_overlap_in_pixels} and {self.tile_size_in_pixels}"
- )
-
-
-@dataclass(frozen=True)
-class TemporalTilingConfig:
- """Configuration for dividing a video into temporal tiles (chunks of frames) with optional overlap.
- Args:
- tile_size_in_frames (int): Number of frames in each tile. Must be at least 16 and divisible by 8.
- tile_overlap_in_frames (int, optional): Number of overlapping frames between consecutive tiles.
- Must be divisible by 8. Defaults to 0.
- """
-
- tile_size_in_frames: int
- tile_overlap_in_frames: int = 0
-
- def __post_init__(self) -> None:
- if self.tile_size_in_frames < 16:
- raise ValueError(f"tile_size_in_frames must be at least 16, got {self.tile_size_in_frames}")
- if self.tile_size_in_frames % 8 != 0:
- raise ValueError(f"tile_size_in_frames must be divisible by 8, got {self.tile_size_in_frames}")
- if self.tile_overlap_in_frames % 8 != 0:
- raise ValueError(f"tile_overlap_in_frames must be divisible by 8, got {self.tile_overlap_in_frames}")
- if self.tile_overlap_in_frames >= self.tile_size_in_frames:
- raise ValueError(
- f"Overlap must be less than tile size, got {self.tile_overlap_in_frames} and {self.tile_size_in_frames}"
- )
-
-
-@dataclass(frozen=True)
-class TilingConfig:
- """Configuration for splitting video into tiles with optional overlap.
- Attributes:
- spatial_config: Configuration for splitting spatial dimensions into tiles.
- temporal_config: Configuration for splitting temporal dimension into tiles.
- """
-
- spatial_config: SpatialTilingConfig | None = None
- temporal_config: TemporalTilingConfig | None = None
-
- @classmethod
- def default(cls) -> "TilingConfig":
- return cls(
- spatial_config=SpatialTilingConfig(tile_size_in_pixels=768, tile_overlap_in_pixels=64),
- temporal_config=TemporalTilingConfig(tile_size_in_frames=80, tile_overlap_in_frames=24),
- )
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/__init__.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/__init__.py
new file mode 100644
index 0000000..19281aa
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/__init__.py
@@ -0,0 +1,107 @@
+"""Neighborhood-Attention transformer building blocks for the diffusion video VAE."""
+
+from ltx_core.model.video_vae.transformer.apply import (
+ apply_diffvae_config,
+ apply_diffvae_mode,
+ build_compile_diffusion_decoder_op,
+ build_cutlass_fna_diffusion_decoder_op,
+ build_diffvae_mode_op,
+ resolve_attention_for_host,
+)
+from ltx_core.model.video_vae.transformer.attention import (
+ NAAttentionCallable,
+ NattenAttention,
+ NeighborhoodAttention3D,
+ configure_w_chunks,
+ natten_available,
+)
+from ltx_core.model.video_vae.transformer.blocks import (
+ DiffusionNABlock,
+ NABlock,
+)
+from ltx_core.model.video_vae.transformer.chunked.block import ChunkedDiffusionNABlock
+from ltx_core.model.video_vae.transformer.combined.block import CombinedDiffusionNABlock
+from ltx_core.model.video_vae.transformer.compiling import (
+ compile_diffusion_decoder,
+ configure_cutlass_fna_diffusion_decoder,
+ configure_natten_backend,
+)
+from ltx_core.model.video_vae.transformer.config import (
+ DiffVAEBlockKind,
+ DiffVAEConfig,
+ DiffVAEMode,
+ NAttentionKind,
+)
+from ltx_core.model.video_vae.transformer.dsl_kernels import (
+ NA_SOFTMAX_BOUND_BUFFER,
+ DSLAttention,
+ DSLDiffusionNABlock,
+ enable_blackwell_dsl,
+ na_dsl_available,
+)
+from ltx_core.model.video_vae.transformer.fallback_na import (
+ EagerSdpaAttention,
+ TritonNaAttention,
+ triton_na_available,
+)
+from ltx_core.model.video_vae.transformer.layers import (
+ AdaLNZero,
+ ChannelLinear,
+ LinearPixelShuffleUpsample,
+ modulate,
+)
+from ltx_core.model.video_vae.transformer.qkv import QKVProjections
+from ltx_core.model.video_vae.transformer.rope import (
+ apply_abs_rope,
+ apply_abs_rope_slab,
+ configure_abs_rope,
+ default_rope_dim_split,
+ rope_inv_freqs,
+)
+from ltx_core.model.video_vae.transformer.swiglu import SwiGLU, SwiGLUTileSpec, configure_swiglu_tile
+
+__all__ = [
+ "NA_SOFTMAX_BOUND_BUFFER",
+ "AdaLNZero",
+ "ChannelLinear",
+ "ChunkedDiffusionNABlock",
+ "CombinedDiffusionNABlock",
+ "DSLAttention",
+ "DSLDiffusionNABlock",
+ "DiffVAEBlockKind",
+ "DiffVAEConfig",
+ "DiffVAEMode",
+ "DiffusionNABlock",
+ "EagerSdpaAttention",
+ "LinearPixelShuffleUpsample",
+ "NAAttentionCallable",
+ "NABlock",
+ "NAttentionKind",
+ "NattenAttention",
+ "NeighborhoodAttention3D",
+ "QKVProjections",
+ "SwiGLU",
+ "SwiGLUTileSpec",
+ "TritonNaAttention",
+ "apply_abs_rope",
+ "apply_abs_rope_slab",
+ "apply_diffvae_config",
+ "apply_diffvae_mode",
+ "build_compile_diffusion_decoder_op",
+ "build_cutlass_fna_diffusion_decoder_op",
+ "build_diffvae_mode_op",
+ "compile_diffusion_decoder",
+ "configure_abs_rope",
+ "configure_cutlass_fna_diffusion_decoder",
+ "configure_natten_backend",
+ "configure_swiglu_tile",
+ "configure_w_chunks",
+ "default_rope_dim_split",
+ "enable_blackwell_dsl",
+ "modulate",
+ "na_dsl_available",
+ "natten_available",
+ "resolve_attention_for_host",
+ "rope_inv_freqs",
+ "triton_na_available",
+]
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/apply.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/apply.py
new file mode 100644
index 0000000..b4a619f
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/apply.py
@@ -0,0 +1,206 @@
+"""Install a resolved ``DiffVAEConfig`` onto a loaded ``DiffusionVideoDecoder``.
+Owns all module mutation and ModuleOps builders. Preset → recipe lives in
+``config.py``; ``torch.compile`` mechanics live in ``compiling.py``.
+CHUNKED / BLACKWELL_DSL modes wire ``decoder.upsamples[3]`` onto each diff block
+for deferred stage-4 (upsample Linear then ``context_proj`` — fused into the CuTe
+kernel for BLACKWELL_DSL).
+"""
+
+from __future__ import annotations
+
+from dataclasses import replace
+from typing import TYPE_CHECKING
+
+import torch
+
+from ltx_core.loader.module_ops import ModuleOps
+from ltx_core.model.transformer.compiling import CompilationConfig
+from ltx_core.model.video_vae.transformer.attention import (
+ NeighborhoodAttention3D,
+ configure_w_chunks,
+ natten_available,
+)
+from ltx_core.model.video_vae.transformer.blocks import DiffusionNABlock
+from ltx_core.model.video_vae.transformer.chunked.block import ChunkedDiffusionNABlock
+from ltx_core.model.video_vae.transformer.combined.block import CombinedDiffusionNABlock
+from ltx_core.model.video_vae.transformer.compiling import (
+ compile_diffusion_decoder,
+ configure_natten_backend,
+)
+from ltx_core.model.video_vae.transformer.config import (
+ DiffVAEBlockKind,
+ DiffVAEConfig,
+ DiffVAEMode,
+ NAttentionKind,
+)
+from ltx_core.model.video_vae.transformer.dsl_kernels.block import DSLDiffusionNABlock
+from ltx_core.model.video_vae.transformer.fallback_na import (
+ EagerSdpaAttention,
+ TritonNaAttention,
+ triton_na_available,
+ warn_no_natten,
+)
+
+if TYPE_CHECKING:
+ from ltx_core.model.video_vae.video_vae import DiffusionVideoDecoder
+
+
+def _block_cls_for(cfg: DiffVAEConfig) -> type[DiffusionNABlock]:
+ if cfg.block is DiffVAEBlockKind.COMBINED:
+ return CombinedDiffusionNABlock
+ if cfg.block is DiffVAEBlockKind.CHUNKED:
+ return ChunkedDiffusionNABlock
+ if cfg.block is DiffVAEBlockKind.BLACKWELL_DSL:
+ return DSLDiffusionNABlock
+ raise ValueError(f"Unknown DiffVAEBlockKind: {cfg.block!r}")
+
+
+def resolve_attention_for_host(cfg: DiffVAEConfig) -> DiffVAEConfig:
+ """Remap chunked NATTEN recipes to Triton/eager when natten is missing.
+ ``COMBINED`` (full-volume) compile requires natten — Dynamo + fallback NA is
+ not supported. Chunked modes remapped to fallback also disable ``torch.compile``
+ for now (fallback NA is an opaque custom_op, but the remap still keeps the
+ no-natten path on the eager chunked recipe).
+ """
+ if cfg.attention is not NAttentionKind.NATTEN:
+ return cfg
+ if natten_available():
+ return cfg
+ if cfg.block is DiffVAEBlockKind.COMBINED:
+ raise RuntimeError(
+ "diffvae_optimization=combined_compile requires natten "
+ "(full-volume NA + torch.compile). Install with: "
+ "uv sync --package ltx-core --extra natten "
+ "(or use chunked_eager / chunked_compile, which fall back to Triton/eager)."
+ )
+ kind = NAttentionKind.TRITON if triton_na_available() else NAttentionKind.EAGER_SDPA
+ return replace(
+ cfg,
+ attention=kind,
+ natten_backend=None,
+ compile_blocks=False,
+ compile_det_stages=False,
+ )
+
+
+def _configure_deferred_stage4(decoder: DiffusionVideoDecoder, enabled: bool) -> None:
+ """Toggle deferred stage-4 and wire ``stage4_upsample`` on deferred blocks."""
+ decoder.deferred_stage4_upsample = enabled
+ upsample = decoder.upsamples[3] if enabled else None
+ for block in decoder.diff_blocks:
+ if isinstance(block, (ChunkedDiffusionNABlock, DSLDiffusionNABlock)):
+ block.stage4_upsample = upsample # type: ignore[assignment]
+ elif hasattr(block, "stage4_upsample"):
+ # Drop leftover from a prior deferred → COMBINED class swap.
+ delattr(block, "stage4_upsample")
+
+
+def _set_attention_function(decoder: DiffusionVideoDecoder, attn_fn: object) -> None:
+ for module in decoder.modules():
+ if isinstance(module, NeighborhoodAttention3D):
+ module.attention_function = attn_fn # type: ignore[assignment]
+ module.natten_backend = None
+
+
+def _install_attention(decoder: DiffusionVideoDecoder, cfg: DiffVAEConfig) -> None:
+ if cfg.attention is NAttentionKind.BLACKWELL_DSL:
+ from ltx_core.model.video_vae.transformer.dsl_kernels.apply_dsl import ( # noqa: PLC0415
+ enable_blackwell_dsl,
+ )
+
+ enable_blackwell_dsl(decoder)
+ return
+ if cfg.attention is NAttentionKind.TRITON:
+ warn_no_natten(backend="Triton na3d")
+ _set_attention_function(decoder, TritonNaAttention())
+ return
+ if cfg.attention is NAttentionKind.EAGER_SDPA:
+ warn_no_natten(backend="eager tiled SDPA na3d")
+ _set_attention_function(decoder, EagerSdpaAttention())
+ return
+ if cfg.natten_backend is not None:
+ configure_natten_backend(decoder, cfg.natten_backend)
+
+
+def apply_diffvae_config(
+ decoder: DiffusionVideoDecoder,
+ cfg: DiffVAEConfig,
+ *,
+ compilation_config: CompilationConfig | None = None,
+) -> DiffusionVideoDecoder:
+ """Install ``cfg`` onto ``decoder`` (only mutator for DiffVAE presets)."""
+ cfg = resolve_attention_for_host(cfg)
+ block_cls = _block_cls_for(cfg)
+ for block in decoder.diff_blocks:
+ if isinstance(block, DiffusionNABlock):
+ block.__class__ = block_cls
+
+ deferred = cfg.block in (DiffVAEBlockKind.CHUNKED, DiffVAEBlockKind.BLACKWELL_DSL)
+ _configure_deferred_stage4(decoder, deferred)
+ # W-chunking + rope_num_tiles=1 coupling is for diffusion residual only.
+ for block in decoder.diff_blocks:
+ configure_w_chunks(block, cfg.w_chunks)
+
+ _install_attention(decoder, cfg)
+
+ if cfg.compile_blocks:
+ compile_diffusion_decoder(
+ decoder,
+ config=compilation_config,
+ compile_det_stages=cfg.compile_det_stages,
+ )
+ else:
+ decoder.mark_dynamic_shapes = False
+ return decoder
+
+
+def apply_diffvae_mode(
+ decoder: DiffusionVideoDecoder,
+ mode: DiffVAEMode,
+ *,
+ compilation_config: CompilationConfig | None = None,
+) -> DiffusionVideoDecoder:
+ """Resolve ``mode`` then :func:`apply_diffvae_config`."""
+ return apply_diffvae_config(decoder, mode.resolve(), compilation_config=compilation_config)
+
+
+def _diffusion_decoder_matcher(model: torch.nn.Module) -> bool:
+ from ltx_core.model.video_vae.video_vae import DiffusionVideoDecoder # noqa: PLC0415
+
+ return isinstance(model, DiffusionVideoDecoder)
+
+
+def build_diffvae_mode_op(
+ mode: DiffVAEMode,
+ compilation_config: CompilationConfig | None = None,
+) -> ModuleOps:
+ """ModuleOps mutator that applies ``mode.resolve()`` on the meta model."""
+
+ def mutator(model: torch.nn.Module) -> torch.nn.Module:
+ return apply_diffvae_mode(model, mode, compilation_config=compilation_config) # type: ignore[arg-type]
+
+ return ModuleOps(
+ name=f"diffvae_mode_{mode.value}",
+ matcher=_diffusion_decoder_matcher,
+ mutator=mutator,
+ )
+
+
+def build_cutlass_fna_diffusion_decoder_op() -> ModuleOps:
+ """Backward-compat ModuleOps name; mutator applies :attr:`DiffVAEMode.CHUNKED_EAGER`."""
+ inner = build_diffvae_mode_op(DiffVAEMode.CHUNKED_EAGER)
+ return ModuleOps(
+ name="cutlass_fna_diffusion_decoder",
+ matcher=inner.matcher,
+ mutator=inner.mutator,
+ )
+
+
+def build_compile_diffusion_decoder_op(config: CompilationConfig | None = None) -> ModuleOps:
+ """Backward-compat ModuleOps name; mutator applies :attr:`DiffVAEMode.COMBINED_COMPILE`."""
+ inner = build_diffvae_mode_op(DiffVAEMode.COMBINED_COMPILE, compilation_config=config)
+ return ModuleOps(
+ name="compile_diffusion_decoder",
+ matcher=inner.matcher,
+ mutator=inner.mutator,
+ )
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/attention.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/attention.py
new file mode 100644
index 0000000..550782b
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/attention.py
@@ -0,0 +1,174 @@
+"""3D Neighborhood Attention via NATTEN + absolute RoPE prelude.
+Parameter shell shared by det ``NABlock`` and both diff-attn roles.
+Diffusion AdaLN residuals live in pathway packages (each owns its RoPE);
+det stages use ``det_attn_rope`` from :meth:`NeighborhoodAttention3D.forward`.
+``attention_function`` selects the NA backend (NATTEN, Triton/eager fallback, or CuTe DSL).
+"""
+
+from __future__ import annotations
+
+from typing import Protocol
+
+import torch
+from torch import nn
+
+from ltx_core.model.video_vae.transformer.det_attn_rope import det_qkv_rope
+from ltx_core.model.video_vae.transformer.qkv import QKVProjections
+from ltx_core.model.video_vae.transformer.rope_math import (
+ DEFAULT_ABS_ROPE_NUM_TILES,
+ default_rope_dim_split,
+ rope_inv_freqs,
+)
+
+try:
+ import natten
+
+ _NATTEN_AVAILABLE = True
+except ImportError: # pragma: no cover
+ natten = None # type: ignore[assignment]
+ _NATTEN_AVAILABLE = False
+
+
+def natten_available() -> bool:
+ return _NATTEN_AVAILABLE
+
+
+class NAAttentionCallable(Protocol):
+ """A windowed 3D neighborhood-attention backend.
+ Q/K/V arrive as ``(B, T, H, W, NH, HD)``, already normed, scaled and RoPE'd;
+ the return is ``(B, T, H, W, NH*HD)`` or anything reshapeable to it. The owning
+ module is passed so a backend can read configuration (``kernel_size``, softmax
+ bound, …). Backend-specific settings (NATTEN's kernel pin) live on the callable.
+ """
+
+ def __call__(
+ self,
+ attn: NeighborhoodAttention3D,
+ q: torch.Tensor,
+ k: torch.Tensor,
+ v: torch.Tensor,
+ ) -> torch.Tensor: ...
+
+
+class NattenAttention(NAAttentionCallable):
+ """``natten.na3d``, the default backend.
+ ``backend`` pins ``na3d``'s own kernel choice (e.g. ``"cutlass-fna"``); ``None``
+ leaves NATTEN's auto-pick (hopper-fna on H100, etc.).
+ """
+
+ def __init__(self, backend: str | None = None) -> None:
+ self._backend = backend
+
+ def __call__(
+ self,
+ attn: NeighborhoodAttention3D,
+ q: torch.Tensor,
+ k: torch.Tensor,
+ v: torch.Tensor,
+ ) -> torch.Tensor:
+ if not _NATTEN_AVAILABLE:
+ raise ImportError(
+ "natten is required for NeighborhoodAttention3D. "
+ "Install with: uv sync --package ltx-core --extra natten "
+ '(or: uv pip install "natten==0.21.7+torch2130cu132" -f https://whl.natten.org; '
+ "requires torch==2.13.0+cu132)"
+ )
+ # scale=1.0: callers already applied ``attn.scale`` to Q.
+ # RMSNorm under bf16 autocast can leave Q/K in float32 while V stays bf16;
+ # natten requires a uniform dtype (same cast pattern as flash-attn paths).
+ if q.dtype != v.dtype or k.dtype != v.dtype:
+ q = q.to(dtype=v.dtype)
+ k = k.to(dtype=v.dtype)
+ return natten.na3d(q, k, v, kernel_size=attn.kernel_size, scale=1.0, backend=self._backend)
+
+
+class NeighborhoodAttention3D(nn.Module):
+ """3D Neighborhood Attention with absolute RoPE + pluggable NA backend.
+ Q/K receive absolute RoPE; attention is ``attention_function`` (NATTEN by
+ default; Triton or eager SDPA when natten is missing; CuTe DSL via
+ DiffVAE BLACKWELL_DSL install). Relative gather-based NA is not used as a
+ production gather path on this branch.
+ NATTEN shifts its window inward at grid boundaries instead of
+ clamp-and-mask; interior positions match the gather reference closely,
+ boundary positions may differ slightly.
+ """
+
+ def __init__(
+ self,
+ dim: int,
+ kernel_size: tuple[int, int, int],
+ head_dim: int = 64,
+ rope_dim_split: tuple[int, int, int] | None = None,
+ rope_base: float = 10000.0,
+ ) -> None:
+ super().__init__()
+ assert dim % head_dim == 0, f"dim={dim} not divisible by head_dim={head_dim}"
+ self.dim = dim
+ self.num_heads = dim // head_dim
+ self.head_dim = head_dim
+ self.kernel_size = tuple(kernel_size)
+ self.scale = head_dim**-0.5
+
+ if rope_dim_split is None:
+ rope_dim_split = default_rope_dim_split(head_dim)
+ assert sum(rope_dim_split) == head_dim, f"rope_dim_split={rope_dim_split} must sum to head_dim={head_dim}"
+ self.rope_dim_split = rope_dim_split
+ self.rope_base = rope_base
+ self.rope_num_tiles = DEFAULT_ABS_ROPE_NUM_TILES
+ self.rope_compute_dtype = torch.float32
+ # Kept for the chunked opaque residual (string arg); callable is the swap surface.
+ self.natten_backend: str | None = None
+ self.attention_function: NAAttentionCallable = NattenAttention()
+
+ self.register_buffer("rope_inv_t", rope_inv_freqs(rope_dim_split[0], rope_base), persistent=False)
+ self.register_buffer("rope_inv_h", rope_inv_freqs(rope_dim_split[1], rope_base), persistent=False)
+ self.register_buffer("rope_inv_w", rope_inv_freqs(rope_dim_split[2], rope_base), persistent=False)
+
+ self.qkv = QKVProjections(dim)
+ self.proj = nn.Linear(dim, dim, bias=True)
+ self.q_norm = nn.RMSNorm(head_dim, eps=1e-6)
+ self.k_norm = nn.RMSNorm(head_dim, eps=1e-6)
+
+ # W-chunking configuration (consumed by ``chunked.attn``).
+ self.w_chunks = 1 # 1 = no chunking
+
+ def project_qkv(self, x: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
+ """Q/K/V as owned contiguous ``(B,T,H,W,NH,HD)`` tensors."""
+ batch, t, h, w, _ = x.shape
+ q, k, v = self.qkv(x)
+ shape = (batch, t, h, w, self.num_heads, self.head_dim)
+ return q.view(shape), k.view(shape), v.view(shape)
+
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
+ """Det-stage NA: opaque abs-RoPE via ``det_attn_rope`` + ``attention_function``.
+ ``x``/output: (B, T, H, W, C) — channels-last. RoPE positions are local
+ 0-based (see ``det_attn_rope`` module docstring for why that is
+ equivalent under tiled decode).
+ """
+ batch, t, h, w, _ = x.shape
+ kt, kh, kw = self.kernel_size
+ if t < kt or h < kh or w < kw:
+ raise ValueError(
+ f"3D neighborhood attention requires spatial dims >= kernel_size; "
+ f"got (T,H,W)=({t},{h},{w}) vs kernel={self.kernel_size}"
+ )
+
+ q, k, v = det_qkv_rope(self, x)
+ # natten's CUTLASS kernel silently produces wrong output if inputs are non-contiguous.
+ q, k, v = q.contiguous(), k.contiguous(), v.contiguous()
+ out = self.attention_function(self, q, k, v)
+ out = out.reshape(batch, t, h, w, self.dim)
+ return self.proj(out)
+
+
+def configure_w_chunks(module_root: nn.Module, w_chunks: int = 1) -> None:
+ """Set W-chunking on ``NeighborhoodAttention3D`` under ``module_root``.
+ When ``w_chunks > 1``, also sets ``rope_num_tiles=1`` so ``chunked.attn``
+ owns the W axis (RoPE W-tiling would double-split). Pass only the diffusion
+ residual subtree — det-stage attention must keep its default RoPE tiling.
+ """
+ for module in module_root.modules():
+ if isinstance(module, NeighborhoodAttention3D):
+ module.w_chunks = w_chunks
+ if w_chunks > 1:
+ module.rope_num_tiles = 1
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/blocks.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/blocks.py
new file mode 100644
index 0000000..45f9d8e
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/blocks.py
@@ -0,0 +1,83 @@
+"""NABlock and DiffusionNABlock parameter shells for DiffVAE.
+Pathway subclasses live in ``chunked/`` and ``combined/``; ``apply`` installs
+them via ``__class__`` swap (same pattern as ``Fp8CastLinear``). The shell owns
+weights + shared AdaLN helpers only — no pathway forward.
+"""
+
+from __future__ import annotations
+
+import torch
+from torch import nn
+
+from ltx_core.model.video_vae.transformer.attention import NeighborhoodAttention3D
+from ltx_core.model.video_vae.transformer.layers import AdaLNZero
+from ltx_core.model.video_vae.transformer.swiglu import SwiGLU, plain_mlp
+
+__all__ = [
+ "DiffusionNABlock",
+ "NABlock",
+]
+
+
+class NABlock(nn.Module):
+ """Pre-norm transformer block: NA -> SwiGLU MLP with residual adds."""
+
+ def __init__(
+ self,
+ dim: int,
+ kernel_size: tuple[int, int, int],
+ head_dim: int = 64,
+ mlp_ratio: float = 4.0,
+ rope_dim_split: tuple[int, int, int] | None = None,
+ ) -> None:
+ super().__init__()
+ self.norm1 = nn.RMSNorm(dim, eps=1e-6)
+ self.attn = NeighborhoodAttention3D(dim, kernel_size, head_dim=head_dim, rope_dim_split=rope_dim_split)
+ self.norm2 = nn.RMSNorm(dim, eps=1e-6)
+ hidden = (int(dim * mlp_ratio) + 15) // 16 * 16
+ self.mlp = SwiGLU(dim, hidden)
+
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
+ """Channels-last in/out: (B, T, H, W, C)."""
+ x = x + self.attn(self.norm1(x))
+ x = plain_mlp(x, self.mlp, self.norm2, self.mlp.tile)
+ return x
+
+
+class DiffusionNABlock(nn.Module):
+ """Parameter shell for diffusion NA + SwiGLU with shared AdaLN-Zero.
+ Mode-specific subclasses (:class:`~ltx_core.model.video_vae.transformer.combined.block.CombinedDiffusionNABlock`,
+ :class:`~ltx_core.model.video_vae.transformer.chunked.block.ChunkedDiffusionNABlock`)
+ are installed via ModuleOps ``__class__`` swap and own the forward path.
+ Not a ``Protocol``: must be a concrete ``nn.Module`` so checkpoint load and
+ ``__class__`` swap keep one parameter identity.
+ """
+
+ def __init__(
+ self,
+ dim: int,
+ kernel_size: tuple[int, int, int],
+ context_channels: int,
+ head_dim: int = 64,
+ mlp_ratio: float = 4.0,
+ rope_dim_split: tuple[int, int, int] | None = None,
+ ) -> None:
+ super().__init__()
+ self.context_channels = context_channels
+ self.context_proj = nn.Linear(context_channels, dim, bias=True)
+ self.scale_shift_table = nn.Parameter(torch.zeros(AdaLNZero.NUM_CHUNKS, dim))
+
+ self.norm1 = nn.RMSNorm(dim, eps=1e-6)
+ self.attn = NeighborhoodAttention3D(dim, kernel_size, head_dim=head_dim, rope_dim_split=rope_dim_split)
+ self.norm2 = nn.RMSNorm(dim, eps=1e-6)
+ hidden = (int(dim * mlp_ratio) + 15) // 16 * 16
+ self.mlp = SwiGLU(dim, hidden)
+ self.attn.proj.reset_parameters()
+
+ def _modulation(
+ self, modulation: tuple[torch.Tensor, ...]
+ ) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]:
+ scale_msa, shift_msa, _, scale_mlp, shift_mlp, _, _ = [
+ modulation[i] + self.scale_shift_table[i].view(1, 1, 1, 1, -1) for i in range(AdaLNZero.NUM_CHUNKS)
+ ]
+ return scale_msa, shift_msa, scale_mlp, shift_mlp
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/chunked/__init__.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/chunked/__init__.py
new file mode 100644
index 0000000..42960f6
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/chunked/__init__.py
@@ -0,0 +1 @@
+"""Chunked DiffVAE pathway: deferred inject, W-chunked residual attn, modulating MLP."""
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/chunked/attn.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/chunked/attn.py
new file mode 100644
index 0000000..febacea
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/chunked/attn.py
@@ -0,0 +1,420 @@
+"""Chunked* diffusion AdaLN residual attention (W-loop + halo + in-slab RoPE).
+Owns the fixed-extent W-chunk residual and its in-slab abs-RoPE (``w_pos``).
+Does **not** call ``combined.attn``; shares only NA module weights (+ ``rope_math``).
+NA goes through ``attn.attention_function`` (same pluggable backend as combined / det).
+The W-chunk loop stays behind opaque ``ltx_core::na_residual_w_chunked`` so Dynamo
+does not unroll it; the callable is bound via a contextvar around the op call
+(custom_op schemas cannot take Python callables as args).
+"""
+
+from __future__ import annotations
+
+from collections.abc import Callable, Iterator
+from contextlib import contextmanager
+from contextvars import ContextVar
+from types import SimpleNamespace
+
+import torch
+import torch.nn.functional as F
+from torch import nn
+
+from ltx_core.model.video_vae.transformer.attention import (
+ NAAttentionCallable,
+ NattenAttention,
+ NeighborhoodAttention3D,
+ natten_available,
+)
+from ltx_core.model.video_vae.transformer.rope_math import (
+ h_positions,
+ rot_abs_axis_impl,
+ t_positions,
+)
+
+# Bound by ``chunked()`` for the duration of the opaque custom_op. Dynamo only sees
+# the op call site; the Python body reads these at runtime.
+_CHUNKED_ATTENTION_FUNCTION: ContextVar[NAAttentionCallable | None] = ContextVar(
+ "ltx_chunked_attention_function",
+ default=None,
+)
+_CHUNKED_ATTN_MODULE: ContextVar[NeighborhoodAttention3D | None] = ContextVar(
+ "ltx_chunked_attn_module",
+ default=None,
+)
+
+
+@contextmanager
+def _bound_chunked_attention(
+ attention_function: NAAttentionCallable,
+ attn: NeighborhoodAttention3D,
+) -> Iterator[None]:
+ t_fn = _CHUNKED_ATTENTION_FUNCTION.set(attention_function)
+ t_mod = _CHUNKED_ATTN_MODULE.set(attn)
+ try:
+ yield
+ finally:
+ _CHUNKED_ATTENTION_FUNCTION.reset(t_fn)
+ _CHUNKED_ATTN_MODULE.reset(t_mod)
+
+
+def _resolve_chunked_attention() -> tuple[NAAttentionCallable, NeighborhoodAttention3D]:
+ fn = _CHUNKED_ATTENTION_FUNCTION.get()
+ mod = _CHUNKED_ATTN_MODULE.get()
+ if fn is None or mod is None:
+ raise RuntimeError(
+ "ltx_core::na_residual_w_chunked requires attention_function binding; "
+ "call via chunked(), not the custom_op directly"
+ )
+ return fn, mod
+
+
+def _apply_in_slab_abs_rope(
+ x: torch.Tensor,
+ rope_split: tuple[int, int, int],
+ inv_freqs: tuple[torch.Tensor, torch.Tensor, torch.Tensor],
+ w_pos: torch.Tensor,
+ *,
+ compute_dtype: torch.dtype,
+) -> torch.Tensor:
+ """Single-extent abs-RoPE via raw rot (no RoPE tile loop, no nested region).
+ Used inside the W-chunk residual body: the chunk is already one W slab.
+ Nested-in-nested breaks FakeTensor mode matching under Inductor.
+ ``w_pos`` must be length ``x.shape[3]`` (global W coords for this slab).
+ """
+ d_t, d_h, _ = rope_split
+ inv_t, inv_h, inv_w = inv_freqs
+ t = x.shape[1]
+ h = x.shape[2]
+ xt = rot_abs_axis_impl(x[..., :d_t], t_positions(t, x.device), inv_t, axis=1, compute_dtype=compute_dtype)
+ xh = rot_abs_axis_impl(
+ x[..., d_t : d_t + d_h],
+ h_positions(h, x.device),
+ inv_h,
+ axis=2,
+ compute_dtype=compute_dtype,
+ )
+ xw = rot_abs_axis_impl(x[..., d_t + d_h :], w_pos, inv_w, axis=3, compute_dtype=compute_dtype)
+ return torch.cat([xt, xh, xw], dim=-1)
+
+
+def _attn_on_chunk_impl( # noqa: PLR0913
+ attention_function: NAAttentionCallable,
+ attn: NeighborhoodAttention3D | SimpleNamespace,
+ x_chunk: torch.Tensor,
+ w_pos: torch.Tensor,
+ scale: torch.Tensor,
+ shift: torch.Tensor,
+ norm_weight: torch.Tensor,
+ q_w: torch.Tensor,
+ q_b: torch.Tensor,
+ k_w: torch.Tensor,
+ k_b: torch.Tensor,
+ v_w: torch.Tensor,
+ v_b: torch.Tensor,
+ q_norm_w: torch.Tensor,
+ k_norm_w: torch.Tensor,
+ proj_w: torch.Tensor,
+ proj_b: torch.Tensor,
+ inv_t: torch.Tensor,
+ inv_h: torch.Tensor,
+ inv_w: torch.Tensor,
+ d_t: int,
+ d_h: int,
+ d_w: int,
+ kt: int,
+ kh: int,
+ kw: int,
+ num_heads: int,
+ head_dim: int,
+ dim: int,
+ attn_scale: float,
+ rope_num_tiles: int,
+ rope_compute_bf16: bool,
+) -> torch.Tensor:
+ """One W-slab: rms_norm + modulate + QKV / in-slab RoPE / ``attention_function`` / proj."""
+ del rope_num_tiles, kt, kh, kw # chunk is already one W slab; kernel_size lives on ``attn``
+ if not natten_available() and type(attention_function) is NattenAttention:
+ raise ImportError("natten is required for W-chunked residual attention")
+
+ batch, t, h, ext_w, _ = x_chunk.shape
+ eps = 1e-6
+ rope_dtype = torch.bfloat16 if rope_compute_bf16 else torch.float32
+ inv_freqs = (inv_t, inv_h, inv_w)
+ rope_split = (d_t, d_h, d_w)
+
+ y = F.rms_norm(x_chunk, (dim,), norm_weight, eps)
+ y = y * (1.0 + scale) + shift
+
+ head_shape = (batch, t, h, ext_w, num_heads, head_dim)
+ q = F.linear(y, q_w, q_b).view(head_shape)
+ q = F.rms_norm(q, (head_dim,), q_norm_w, eps) * attn_scale
+ q = _apply_in_slab_abs_rope(q, rope_split, inv_freqs, w_pos, compute_dtype=rope_dtype)
+ k = F.linear(y, k_w, k_b).view(head_shape)
+ k = F.rms_norm(k, (head_dim,), k_norm_w, eps)
+ k = _apply_in_slab_abs_rope(k, rope_split, inv_freqs, w_pos, compute_dtype=rope_dtype)
+ v = F.linear(y, v_w, v_b).view(head_shape)
+ del y
+
+ out = attention_function(attn, q.contiguous(), k.contiguous(), v.contiguous()) # type: ignore[arg-type]
+ del q, k, v
+ return F.linear(out.reshape(batch, t, h, ext_w, dim), proj_w, proj_b)
+
+
+def _pack_residual_weights(attn: NeighborhoodAttention3D, norm: nn.RMSNorm, x: torch.Tensor) -> tuple:
+ """Pack NA + norm weights / RoPE meta for the opaque chunked residual op."""
+ d_t, d_h, d_w = attn.rope_dim_split
+ kt, kh, kw = attn.kernel_size
+ inv_t = attn.rope_inv_t.to(device=x.device)
+ inv_h = attn.rope_inv_h.to(device=x.device)
+ inv_w = attn.rope_inv_w.to(device=x.device)
+ return (
+ norm.weight,
+ attn.qkv.to_q.weight,
+ attn.qkv.to_q.bias,
+ attn.qkv.to_k.weight,
+ attn.qkv.to_k.bias,
+ attn.qkv.to_v.weight,
+ attn.qkv.to_v.bias,
+ attn.q_norm.weight,
+ attn.k_norm.weight,
+ attn.proj.weight,
+ attn.proj.bias,
+ inv_t,
+ inv_h,
+ inv_w,
+ d_t,
+ d_h,
+ d_w,
+ kt,
+ kh,
+ kw,
+ attn.num_heads,
+ attn.head_dim,
+ attn.dim,
+ float(attn.scale),
+ attn.rope_num_tiles,
+ attn.rope_compute_dtype == torch.bfloat16,
+ )
+
+
+def _run_w_chunked_residual(
+ x: torch.Tensor,
+ scale: torch.Tensor,
+ shift: torch.Tensor,
+ packed: tuple,
+ w_chunks: int,
+ halo: int,
+ attn_fn: Callable[..., torch.Tensor],
+) -> torch.Tensor:
+ """In-place ``x += attn(...)`` with fixed-extent W slabs.
+ Neighbor-sourced halos are copied when available. Missing true-boundary
+ left/right halo slots (volume edges) are edge-replicated — same spirit as
+ trailing-frame replicate — so NA never sees zero-padded W boundaries.
+ """
+ _, _, _, w, c = x.shape
+ chunk_w = (w + w_chunks - 1) // w_chunks
+ extent = chunk_w + 2 * halo
+ left_halo: torch.Tensor | None = None
+
+ for i in range(w_chunks):
+ core_start = i * chunk_w
+ core_end = min(w, (i + 1) * chunk_w)
+ core_len = core_end - core_start
+
+ buf = x.new_zeros(*x.shape[:3], extent, c)
+ if i > 0:
+ assert left_halo is not None
+ lh = left_halo.shape[3]
+ buf[:, :, :, halo - lh : halo, :] = left_halo
+ buf[:, :, :, halo : halo + core_len, :] = x[:, :, :, core_start:core_end, :]
+ right_filled = 0
+ if i + 1 < w_chunks:
+ right_end = min(w, core_end + halo)
+ right = x[:, :, :, core_end:right_end, :]
+ right_filled = right.shape[3]
+ buf[:, :, :, halo + core_len : halo + core_len + right_filled, :] = right
+
+ # True W-boundary: replicate-pad missing halo slots (do not overwrite neighbors).
+ if i == 0 and halo > 0 and core_len > 0:
+ edge_l = buf[:, :, :, halo : halo + 1, :]
+ buf[:, :, :, :halo, :] = edge_l.expand(*x.shape[:3], halo, c)
+ missing_right = extent - (halo + core_len + right_filled)
+ if missing_right > 0 and core_len > 0:
+ edge_r = buf[:, :, :, halo + core_len - 1 : halo + core_len, :]
+ lo_r = halo + core_len + right_filled
+ buf[:, :, :, lo_r:extent, :] = edge_r.expand(*x.shape[:3], missing_right, c)
+
+ if i + 1 < w_chunks:
+ take = min(halo, core_len)
+ left_halo = x[:, :, :, core_end - take : core_end, :].clone()
+
+ w_pos = torch.arange(extent, device=x.device, dtype=torch.float32) + (core_start - halo)
+ out = attn_fn(buf, w_pos, scale, shift, *packed)
+ x[:, :, :, core_start:core_end, :].add_(out[:, :, :, halo : halo + core_len, :])
+
+ return x
+
+
[email protected]_op("ltx_core::na_residual_w_chunked", mutates_args=("x",))
+def _na_residual_w_chunked_op( # noqa: PLR0913
+ x: torch.Tensor,
+ scale: torch.Tensor,
+ shift: torch.Tensor,
+ norm_weight: torch.Tensor,
+ q_w: torch.Tensor,
+ q_b: torch.Tensor,
+ k_w: torch.Tensor,
+ k_b: torch.Tensor,
+ v_w: torch.Tensor,
+ v_b: torch.Tensor,
+ q_norm_w: torch.Tensor,
+ k_norm_w: torch.Tensor,
+ proj_w: torch.Tensor,
+ proj_b: torch.Tensor,
+ inv_t: torch.Tensor,
+ inv_h: torch.Tensor,
+ inv_w: torch.Tensor,
+ d_t: int,
+ d_h: int,
+ d_w: int,
+ kt: int,
+ kh: int,
+ kw: int,
+ num_heads: int,
+ head_dim: int,
+ dim: int,
+ attn_scale: float,
+ rope_num_tiles: int,
+ rope_compute_bf16: bool,
+ w_chunks: int,
+) -> None:
+ """Opaque in-place W-chunked residual — Dynamo does not unroll the chunk loop.
+ Reads ``attention_function`` / NA module from the contextvars set by ``chunked()``.
+ """
+ attention_function, attn = _resolve_chunked_attention()
+ halo = kw // 2
+ packed = (
+ norm_weight,
+ q_w,
+ q_b,
+ k_w,
+ k_b,
+ v_w,
+ v_b,
+ q_norm_w,
+ k_norm_w,
+ proj_w,
+ proj_b,
+ inv_t,
+ inv_h,
+ inv_w,
+ d_t,
+ d_h,
+ d_w,
+ kt,
+ kh,
+ kw,
+ num_heads,
+ head_dim,
+ dim,
+ attn_scale,
+ rope_num_tiles,
+ rope_compute_bf16,
+ )
+
+ def _slab(
+ x_chunk: torch.Tensor,
+ w_pos: torch.Tensor,
+ scale_: torch.Tensor,
+ shift_: torch.Tensor,
+ *rest: object,
+ ) -> torch.Tensor:
+ return _attn_on_chunk_impl(attention_function, attn, x_chunk, w_pos, scale_, shift_, *rest) # type: ignore[arg-type]
+
+ _run_w_chunked_residual(x, scale, shift, packed, w_chunks, halo, _slab)
+
+
+@_na_residual_w_chunked_op.register_fake
+def _na_residual_w_chunked_fake( # noqa: PLR0913
+ x: torch.Tensor,
+ scale: torch.Tensor,
+ shift: torch.Tensor,
+ norm_weight: torch.Tensor,
+ q_w: torch.Tensor,
+ q_b: torch.Tensor,
+ k_w: torch.Tensor,
+ k_b: torch.Tensor,
+ v_w: torch.Tensor,
+ v_b: torch.Tensor,
+ q_norm_w: torch.Tensor,
+ k_norm_w: torch.Tensor,
+ proj_w: torch.Tensor,
+ proj_b: torch.Tensor,
+ inv_t: torch.Tensor,
+ inv_h: torch.Tensor,
+ inv_w: torch.Tensor,
+ d_t: int,
+ d_h: int,
+ d_w: int,
+ kt: int,
+ kh: int,
+ kw: int,
+ num_heads: int,
+ head_dim: int,
+ dim: int,
+ attn_scale: float,
+ rope_num_tiles: int,
+ rope_compute_bf16: bool,
+ w_chunks: int,
+) -> None:
+ del (
+ x,
+ scale,
+ shift,
+ norm_weight,
+ q_w,
+ q_b,
+ k_w,
+ k_b,
+ v_w,
+ v_b,
+ q_norm_w,
+ k_norm_w,
+ proj_w,
+ proj_b,
+ inv_t,
+ inv_h,
+ inv_w,
+ d_t,
+ d_h,
+ d_w,
+ kt,
+ kh,
+ kw,
+ num_heads,
+ head_dim,
+ dim,
+ attn_scale,
+ rope_num_tiles,
+ rope_compute_bf16,
+ w_chunks,
+ )
+
+
+def chunked(
+ x: torch.Tensor,
+ attn: NeighborhoodAttention3D,
+ norm: nn.RMSNorm,
+ scale: torch.Tensor,
+ shift: torch.Tensor,
+) -> torch.Tensor:
+ """In-place W-chunked ``x += NA(modulate(norm(x)))`` with in-slab RoPE.
+ Opaque to Dynamo via ``ltx_core::na_residual_w_chunked``; NA uses
+ ``attn.attention_function`` (bound for the op body via contextvar).
+ """
+ if attn.w_chunks < 1:
+ raise ValueError(f"w_chunks must be >= 1, got {attn.w_chunks}")
+ packed = _pack_residual_weights(attn, norm, x)
+ with _bound_chunked_attention(attn.attention_function, attn):
+ _na_residual_w_chunked_op(x, scale, shift, *packed, attn.w_chunks)
+ return x
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/chunked/block.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/chunked/block.py
new file mode 100644
index 0000000..db567b2
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/chunked/block.py
@@ -0,0 +1,70 @@
+"""ChunkedDiffusionNABlock: deferred inject + W-chunked attn + modulating MLP."""
+
+from __future__ import annotations
+
+import torch
+
+from ltx_core.model.video_vae.transformer.blocks import DiffusionNABlock
+from ltx_core.model.video_vae.transformer.chunked.attn import chunked as residual_attn
+from ltx_core.model.video_vae.transformer.chunked.context import deferred as inject_context
+from ltx_core.model.video_vae.transformer.chunked.mlp import residual_modulating_mlp
+from ltx_core.model.video_vae.transformer.layers import LinearPixelShuffleUpsample
+
+
+class ChunkedDiffusionNABlock(DiffusionNABlock):
+ """Deferred-context diffusion block.
+ ``forward`` / ``forward_x_ctx``: in-place inject (eager) then attn+mlp.
+ ``forward_attn_mlp``: opaque void-mutate residual + SwiGLU — this is what
+ ChunkedCompile ``torch.compile``s (do not compile inject).
+ ``stage4_upsample`` is wired by ``apply`` to ``decoder.upsamples[3]`` so
+ inject runs sequential upsample Linear then ``context_proj``.
+ """
+
+ stage4_upsample: LinearPixelShuffleUpsample | None
+
+ def forward_attn_mlp(
+ self,
+ x: torch.Tensor,
+ scale_msa: torch.Tensor,
+ shift_msa: torch.Tensor,
+ scale_mlp: torch.Tensor,
+ shift_mlp: torch.Tensor,
+ ) -> torch.Tensor:
+ """In-place chunked NA residual + modulating SwiGLU (compile target)."""
+ x = residual_attn(x, self.attn, self.norm1, scale_msa, shift_msa)
+ x = residual_modulating_mlp(x, self.mlp, self.norm2, scale_mlp, shift_mlp, self.mlp.tile)
+ return x
+
+ def forward_x_ctx(
+ self,
+ x: torch.Tensor,
+ stage4_feat: torch.Tensor,
+ modulation: tuple[torch.Tensor, ...],
+ *,
+ drop_leading_frame: bool = True,
+ ) -> torch.Tensor:
+ if self.stage4_upsample is None:
+ raise RuntimeError("stage4_upsample not configured; apply DiffVAEConfig with block=CHUNKED")
+
+ scale_msa, shift_msa, scale_mlp, shift_mlp = self._modulation(modulation)
+ upsample = self.stage4_upsample
+ x = inject_context(
+ x,
+ stage4_feat,
+ upsample.proj,
+ self.context_proj,
+ tuple(upsample.stride), # type: ignore[arg-type]
+ w_chunks=self.attn.w_chunks,
+ drop_leading_frame=drop_leading_frame,
+ )
+ return self.forward_attn_mlp(x, scale_msa, shift_msa, scale_mlp, shift_mlp)
+
+ def forward(
+ self,
+ x: torch.Tensor,
+ stage4_feat: torch.Tensor,
+ modulation: tuple[torch.Tensor, ...],
+ *,
+ drop_leading_frame: bool = True,
+ ) -> torch.Tensor:
+ return self.forward_x_ctx(x, stage4_feat, modulation, drop_leading_frame=drop_leading_frame)
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/chunked/context.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/chunked/context.py
new file mode 100644
index 0000000..67130cf
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/chunked/context.py
@@ -0,0 +1,88 @@
+"""Deferred stage-4 context inject: sequential upsample then context_proj (W-chunked).
+Eager in-place Python W-loop — stays outside ChunkedCompile's ``forward_attn_mlp``
+graph so Inductor never sees inject. Runs ``upsamples[3].proj`` (pixel-shuffle)
+then ``context_proj``; no fused Linear.
+"""
+
+from __future__ import annotations
+
+import torch
+import torch.nn.functional as F
+from einops import rearrange
+from torch import nn
+
+
+def _upsample_then_ctx(
+ feat: torch.Tensor,
+ up_w: torch.Tensor,
+ up_b: torch.Tensor,
+ ctx_w: torch.Tensor,
+ ctx_b: torch.Tensor | None,
+ stride: tuple[int, int, int],
+ *,
+ drop_leading_frame: bool,
+) -> torch.Tensor:
+ """``context_proj(pixel_shuffle(upsample_proj(feat)))``."""
+ p1, p2, p3 = stride
+ up = F.linear(feat, up_w, up_b)
+ up = rearrange(
+ up,
+ "b t h w (c p1 p2 p3) -> b (t p1) (h p2) (w p3) c",
+ p1=p1,
+ p2=p2,
+ p3=p3,
+ )
+ if p1 == 2 and drop_leading_frame:
+ up = up[:, 1:, :, :, :]
+ return F.linear(up, ctx_w, ctx_b)
+
+
+def deferred(
+ x: torch.Tensor,
+ stage4_feat: torch.Tensor,
+ upsample_proj: nn.Linear,
+ context_proj: nn.Linear,
+ stride: tuple[int, int, int],
+ *,
+ w_chunks: int,
+ drop_leading_frame: bool,
+) -> torch.Tensor:
+ """Chunk stage-4 feat along W, upsample+``context_proj`` each slab, ``add_`` into ``x``.
+ Returns ``x`` (mutated).
+ """
+ assert upsample_proj.bias is not None
+ p3 = stride[2]
+ up_w, up_b = upsample_proj.weight, upsample_proj.bias
+ ctx_w, ctx_b = context_proj.weight, context_proj.bias
+
+ if w_chunks <= 1:
+ x.add_(
+ _upsample_then_ctx(
+ stage4_feat,
+ up_w,
+ up_b,
+ ctx_w,
+ ctx_b,
+ stride,
+ drop_leading_frame=drop_leading_frame,
+ )
+ )
+ return x
+
+ feat_chunks = torch.chunk(stage4_feat, w_chunks, dim=3)
+ w_hi = x.shape[3]
+ lo = 0
+ for feat_chunk in feat_chunks:
+ hi = min(w_hi, lo + feat_chunk.shape[3] * p3)
+ ctx = _upsample_then_ctx(
+ feat_chunk,
+ up_w,
+ up_b,
+ ctx_w,
+ ctx_b,
+ stride,
+ drop_leading_frame=drop_leading_frame,
+ )
+ x[:, :, :, lo:hi, :].add_(ctx[:, :, :, : hi - lo, :])
+ lo = hi
+ return x
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/chunked/mlp.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/chunked/mlp.py
new file mode 100644
index 0000000..adf98de
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/chunked/mlp.py
@@ -0,0 +1,178 @@
+"""Chunked pathway MLP: inplace fused ``x += swiglu(modulate(rms_norm(x)))``."""
+
+from __future__ import annotations
+
+import torch
+import torch.nn.functional as F
+from torch import nn
+
+from ltx_core.model.video_vae.transformer.swiglu import (
+ SwiGLUTileSpec,
+ _fused_gate_up_swiglu_triton,
+ _fused_up_mul_torch,
+ _fused_up_mul_triton,
+ _tile_from_op_args,
+ dual_gate_up_triton_eligible,
+ token_intervals,
+ triton_swiglu_available,
+)
+from ltx_core.tiling import DimensionInterval
+
+
+def _channel_affine_bc(scale: torch.Tensor, shift: torch.Tensor, dim: int) -> tuple[torch.Tensor, torch.Tensor]:
+ s = scale.reshape(-1, dim)
+ sh = shift.reshape(-1, dim)
+ if s.shape[0] != 1 or sh.shape[0] != 1:
+ if s.shape[0] != sh.shape[0]:
+ raise ValueError(f"scale/shift batch mismatch: {tuple(s.shape)} vs {tuple(sh.shape)}")
+ if s.shape[0] != 1:
+ raise ValueError(
+ f"swiglu residual modulated expects broadcastable channel affine "
+ f"(got scale {tuple(scale.shape)}); B>1 not supported"
+ )
+ return s, sh
+
+
+def _chunked_residual_modulated_impl(
+ x: torch.Tensor,
+ norm_weight: torch.Tensor,
+ scale: torch.Tensor,
+ shift: torch.Tensor,
+ w_gate: torch.Tensor,
+ w_up: torch.Tensor,
+ w_down: torch.Tensor,
+ intervals: list[DimensionInterval],
+ *,
+ use_triton: bool,
+ eps: float = 1e-6,
+) -> None:
+ """In-place: ``x += swiglu(modulate(rms_norm(x)))`` with peak O(chunk·hidden)."""
+ if use_triton and not triton_swiglu_available():
+ raise RuntimeError("use_triton=True but Triton/CUDA is unavailable")
+
+ dim = x.shape[-1]
+ if norm_weight.shape != (dim,):
+ raise ValueError(f"norm_weight shape {tuple(norm_weight.shape)} != ({dim},)")
+ x_flat = x.reshape(-1, dim)
+ if not x_flat.is_contiguous():
+ raise ValueError("x must be contiguous channels-last so reshape(-1, dim) is a writable view")
+ n_tok = x_flat.shape[0]
+ hidden = w_gate.shape[0]
+ if w_up.shape[0] != hidden or w_gate.shape[1] != dim or w_up.shape[1] != dim:
+ raise ValueError(
+ f"weight shapes incompatible with x[..., {dim}]: gate={tuple(w_gate.shape)} up={tuple(w_up.shape)}"
+ )
+ if w_down.shape[1] != hidden or w_down.shape[0] != dim:
+ raise ValueError(f"w_down {tuple(w_down.shape)} incompatible with hidden={hidden} dim={dim}")
+ if n_tok == 0:
+ return
+
+ s, sh = _channel_affine_bc(scale, shift, dim)
+ max_chunk = max((iv.end - iv.start for iv in intervals), default=0)
+ workspace = torch.empty((max_chunk, hidden), device=x.device, dtype=x.dtype)
+ y_buf = torch.empty((max_chunk, dim), device=x.device, dtype=x.dtype)
+ out_buf = torch.empty((max_chunk, dim), device=x.device, dtype=x.dtype)
+ use_dual = bool(use_triton) and dual_gate_up_triton_eligible(x, w_gate, w_up)
+ w_gate_c = w_gate.contiguous() if use_dual else w_gate
+ w_up_c = w_up.contiguous() if use_triton else w_up
+
+ for iv in intervals:
+ start, end = iv.start, iv.end
+ if start >= end:
+ continue
+ n = end - start
+ xc = x_flat[start:end]
+ y = y_buf[:n]
+ y.copy_(F.rms_norm(xc, (dim,), norm_weight, eps))
+ y.mul_(1.0 + s).add_(sh)
+
+ ws = workspace[:n]
+ if use_dual:
+ _fused_gate_up_swiglu_triton(y, w_gate_c, w_up_c, ws)
+ else:
+ torch.mm(y, w_gate.t(), out=ws)
+ F.silu(ws, inplace=True)
+ if use_triton:
+ _fused_up_mul_triton(y, w_up_c, ws)
+ else:
+ _fused_up_mul_torch(y, w_up, ws)
+ torch.mm(ws, w_down.t(), out=out_buf[:n])
+ xc.add_(out_buf[:n])
+
+
[email protected]_op("ltx_core::swiglu_tiled_residual_modulated", mutates_args=("x",))
+def _swiglu_tiled_residual_modulated_op(
+ x: torch.Tensor,
+ norm_weight: torch.Tensor,
+ scale: torch.Tensor,
+ shift: torch.Tensor,
+ w_gate: torch.Tensor,
+ w_up: torch.Tensor,
+ w_down: torch.Tensor,
+ tile_size: int,
+ num_tiles: int,
+ use_triton: bool,
+) -> None:
+ """Opaque op: chunked ``x += swiglu(modulate(rms_norm(x)))`` (compile-friendly)."""
+ tile = _tile_from_op_args(tile_size, num_tiles)
+ n_tok = x.reshape(-1, x.shape[-1]).shape[0]
+ _chunked_residual_modulated_impl(
+ x,
+ norm_weight,
+ scale,
+ shift,
+ w_gate,
+ w_up,
+ w_down,
+ token_intervals(n_tok, tile),
+ use_triton=use_triton,
+ )
+
+
+@_swiglu_tiled_residual_modulated_op.register_fake
+def _swiglu_tiled_residual_modulated_fake(
+ x: torch.Tensor,
+ norm_weight: torch.Tensor,
+ scale: torch.Tensor,
+ shift: torch.Tensor,
+ w_gate: torch.Tensor,
+ w_up: torch.Tensor,
+ w_down: torch.Tensor,
+ tile_size: int,
+ num_tiles: int,
+ use_triton: bool,
+) -> None:
+ del x, norm_weight, scale, shift, w_gate, w_up, w_down, tile_size, num_tiles, use_triton
+
+
+def residual_modulating_mlp(
+ x: torch.Tensor,
+ mlp: nn.Module,
+ norm: nn.RMSNorm,
+ scale: torch.Tensor,
+ shift: torch.Tensor,
+ tile: SwiGLUTileSpec,
+) -> torch.Tensor:
+ """Inplace fused ``x += swiglu(modulate(rms_norm(x)))`` (Chunked path)."""
+ if x.numel() == 0:
+ return x
+ if not x.is_contiguous():
+ x = x.contiguous()
+
+ tile_size = int(tile.tile_size) if tile.tile_size is not None else 0
+ num_tiles = int(tile.num_tiles) if tile.num_tiles is not None else 0
+ use_triton = triton_swiglu_available() and x.is_cuda
+
+ _swiglu_tiled_residual_modulated_op(
+ x,
+ norm.weight,
+ scale,
+ shift,
+ mlp.w_gate.weight,
+ mlp.w_up.weight,
+ mlp.w_down.weight,
+ tile_size,
+ num_tiles,
+ bool(use_triton),
+ )
+ return x
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/combined/__init__.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/combined/__init__.py
new file mode 100644
index 0000000..2b3f6c3
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/combined/__init__.py
@@ -0,0 +1 @@
+"""Combined DiffVAE pathway: context_and_x inject, full-volume residual attn, residual MLP."""
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/combined/attn.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/combined/attn.py
new file mode 100644
index 0000000..49bb97c
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/combined/attn.py
@@ -0,0 +1,123 @@
+"""Combined* diffusion AdaLN residual attention (full-volume NA + nested RoPE).
+Owns nested full-volume abs-RoPE for the Combined / ``w_chunks==1`` path.
+Does not share a residual body with ``chunked`` — only the NA module weights.
+"""
+
+from __future__ import annotations
+
+import torch
+from torch import nn
+
+from ltx_core.model.video_vae.transformer.attention import NeighborhoodAttention3D
+from ltx_core.model.video_vae.transformer.rope_math import (
+ h_positions,
+ rot_abs_axis_impl,
+ t_positions,
+)
+
+# Transparent path: innermost per-axis rotation is a nested compile region.
+_rot_abs_axis = torch.compiler.nested_compile_region(rot_abs_axis_impl)
+
+
+def _apply_nested_abs_rope_slab(
+ x: torch.Tensor,
+ rope_split: tuple[int, int, int],
+ inv_freqs: tuple[torch.Tensor, torch.Tensor, torch.Tensor],
+ *,
+ w_pos: torch.Tensor,
+ compute_dtype: torch.dtype,
+) -> torch.Tensor:
+ """Rotate one W-extent with nested per-axis abs-RoPE."""
+ d_t, d_h, _ = rope_split
+ inv_t, inv_h, inv_w = inv_freqs
+ t = x.shape[1]
+ h = x.shape[2]
+ xt = _rot_abs_axis(x[..., :d_t], t_positions(t, x.device), inv_t, axis=1, compute_dtype=compute_dtype)
+ xh = _rot_abs_axis(
+ x[..., d_t : d_t + d_h],
+ h_positions(h, x.device),
+ inv_h,
+ axis=2,
+ compute_dtype=compute_dtype,
+ )
+ xw = _rot_abs_axis(x[..., d_t + d_h :], w_pos, inv_w, axis=3, compute_dtype=compute_dtype)
+ return torch.cat([xt, xh, xw], dim=-1)
+
+
+def _apply_nested_full_volume_rope(
+ x: torch.Tensor,
+ rope_split: tuple[int, int, int],
+ inv_freqs: tuple[torch.Tensor, torch.Tensor, torch.Tensor],
+ *,
+ num_tiles: int,
+ compute_dtype: torch.dtype,
+) -> torch.Tensor:
+ """Fixed-``num_tiles`` W split + nested per-slab rotation (Dynamo-safe)."""
+ slabs = torch.chunk(x, num_tiles, dim=3)
+ w_off = 0
+ parts: list[torch.Tensor] = []
+ for slab in slabs:
+ w_slab = slab.shape[3]
+ w_pos = torch.arange(w_slab, dtype=torch.float32, device=x.device) + w_off
+ parts.append(
+ _apply_nested_abs_rope_slab(
+ slab,
+ rope_split,
+ inv_freqs,
+ w_pos=w_pos,
+ compute_dtype=compute_dtype,
+ )
+ )
+ w_off = w_off + w_slab
+ return torch.cat(parts, dim=3)
+
+
+def _qkv_nested_rope(attn: NeighborhoodAttention3D, x: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
+ """Q/K/V proj + norm/scale + nested full-volume abs-RoPE."""
+ q, k, v = attn.project_qkv(x)
+ q = attn.q_norm(q) * attn.scale
+ k = attn.k_norm(k)
+ inv_freqs = (
+ attn.rope_inv_t.to(device=x.device),
+ attn.rope_inv_h.to(device=x.device),
+ attn.rope_inv_w.to(device=x.device),
+ )
+ q = _apply_nested_full_volume_rope(
+ q,
+ attn.rope_dim_split,
+ inv_freqs,
+ num_tiles=attn.rope_num_tiles,
+ compute_dtype=attn.rope_compute_dtype,
+ )
+ k = _apply_nested_full_volume_rope(
+ k,
+ attn.rope_dim_split,
+ inv_freqs,
+ num_tiles=attn.rope_num_tiles,
+ compute_dtype=attn.rope_compute_dtype,
+ )
+ return q, k, v
+
+
+def full(
+ x: torch.Tensor,
+ attn: NeighborhoodAttention3D,
+ norm: nn.RMSNorm,
+ scale: torch.Tensor,
+ shift: torch.Tensor,
+) -> torch.Tensor:
+ """``x + NA(modulate(norm(x)))`` with nested full-volume abs-RoPE."""
+ y = norm(x) * (1.0 + scale) + shift
+ batch, t, h, w, _ = y.shape
+ kt, kh, kw = attn.kernel_size
+ if t < kt or h < kh or w < kw:
+ raise ValueError(
+ f"3D neighborhood attention requires spatial dims >= kernel_size; "
+ f"got (T,H,W)=({t},{h},{w}) vs kernel={attn.kernel_size}"
+ )
+
+ q, k, v = _qkv_nested_rope(attn, y)
+ q, k, v = q.contiguous(), k.contiguous(), v.contiguous()
+ out = attn.attention_function(attn, q, k, v)
+ out = out.reshape(batch, t, h, w, attn.dim)
+ return x + attn.proj(out)
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/combined/block.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/combined/block.py
new file mode 100644
index 0000000..b7395b5
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/combined/block.py
@@ -0,0 +1,32 @@
+"""CombinedDiffusionNABlock: context_and_x inject + full-volume attn + residual MLP."""
+
+from __future__ import annotations
+
+import torch
+
+from ltx_core.model.video_vae.transformer.blocks import DiffusionNABlock
+from ltx_core.model.video_vae.transformer.combined.attn import full as residual_attn
+from ltx_core.model.video_vae.transformer.combined.context import combined as inject_context
+from ltx_core.model.video_vae.transformer.combined.mlp import residual_mlp
+
+
+class CombinedDiffusionNABlock(DiffusionNABlock):
+ """Combined-context diffusion block: ``forward`` / ``forward_combined``."""
+
+ def forward_combined(
+ self,
+ context_and_x: torch.Tensor,
+ modulation: tuple[torch.Tensor, ...],
+ ) -> torch.Tensor:
+ scale_msa, shift_msa, scale_mlp, shift_mlp = self._modulation(modulation)
+ x = inject_context(context_and_x, self.context_proj.weight, self.context_proj.bias)
+ x = residual_attn(x, self.attn, self.norm1, scale_msa, shift_msa)
+ x = residual_mlp(x, self.mlp, self.norm2, scale_mlp, shift_mlp, self.mlp.tile)
+ return x
+
+ def forward(
+ self,
+ context_and_x: torch.Tensor,
+ modulation: tuple[torch.Tensor, ...],
+ ) -> torch.Tensor:
+ return self.forward_combined(context_and_x, modulation)
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/combined/context.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/combined/context.py
new file mode 100644
index 0000000..7219574
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/combined/context.py
@@ -0,0 +1,21 @@
+"""Combined context residual: project context half of ``context_and_x`` into ``x``."""
+
+from __future__ import annotations
+
+import torch
+import torch.nn.functional as F
+
+
+def combined(
+ context_and_x: torch.Tensor,
+ w_proj: torch.Tensor,
+ b_proj: torch.Tensor | None,
+) -> torch.Tensor:
+ """Split ``context_and_x`` via ``w_proj.shape[1]`` (context channels), add projected ctx.
+ Returns the updated ``x`` half (not the full concatenated buffer).
+ ``w_proj`` is ``context_proj.weight`` with shape ``(dim, context_channels)``.
+ """
+ context_channels = w_proj.shape[1]
+ latent_context = context_and_x[..., :context_channels]
+ x = context_and_x[..., context_channels:]
+ return x + F.linear(latent_context, w_proj, b_proj)
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/combined/mlp.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/combined/mlp.py
new file mode 100644
index 0000000..386d113
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/combined/mlp.py
@@ -0,0 +1,24 @@
+"""Combined pathway MLP: out-of-place AdaLN SwiGLU residual."""
+
+from __future__ import annotations
+
+import torch
+from torch import nn
+
+from ltx_core.model.video_vae.transformer.layers import modulate
+from ltx_core.model.video_vae.transformer.swiglu import SwiGLUTileSpec, swiglu_tiled
+
+
+def residual_mlp(
+ x: torch.Tensor,
+ mlp: nn.Module,
+ norm: nn.RMSNorm,
+ scale: torch.Tensor,
+ shift: torch.Tensor,
+ tile: SwiGLUTileSpec,
+) -> torch.Tensor:
+ """Combined*: ``x + swiglu_tiled(modulate(norm(x), scale, shift))``."""
+ y = modulate(norm(x), scale, shift)
+ if y.numel() == 0:
+ return x
+ return x + swiglu_tiled(y, mlp.w_gate.weight, mlp.w_up.weight, mlp.w_down.weight, tile)
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/compiling.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/compiling.py
new file mode 100644
index 0000000..20a766d
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/compiling.py
@@ -0,0 +1,95 @@
+"""``torch.compile`` mechanics for DiffusionVideoDecoder (no DiffVAEMode / resolve)."""
+
+from __future__ import annotations
+
+from typing import TYPE_CHECKING, Any, Callable
+
+import torch
+from torch import nn
+
+from ltx_core.model.transformer.compiling import CompilationConfig
+
+if TYPE_CHECKING:
+ from ltx_core.model.video_vae.video_vae import DiffusionVideoDecoder
+
+
+def configure_natten_backend(module_root: nn.Module, backend: str | None) -> None:
+ """Pin NATTEN on every ``NeighborhoodAttention3D`` under ``module_root``.
+ Installs a :class:`~ltx_core.model.video_vae.transformer.attention.NattenAttention`
+ as ``attention_function`` (combined / det / chunked all route through it) and mirrors
+ the pin onto ``natten_backend`` for introspection. ``backend=None`` restores NATTEN
+ auto-selection.
+ """
+ from ltx_core.model.video_vae.transformer.attention import ( # noqa: PLC0415
+ NattenAttention,
+ NeighborhoodAttention3D,
+ )
+
+ attn_fn = NattenAttention(backend)
+ for module in module_root.modules():
+ if isinstance(module, NeighborhoodAttention3D):
+ module.attention_function = attn_fn
+ module.natten_backend = backend
+
+
+def configure_cutlass_fna_diffusion_decoder(decoder: DiffusionVideoDecoder) -> None:
+ """Eager DiffVAE path: pin all NA modules to ``cutlass-fna`` for lower peak VRAM."""
+ configure_natten_backend(decoder, "cutlass-fna")
+
+
+def compile_diffusion_decoder(
+ decoder: DiffusionVideoDecoder,
+ *,
+ config: CompilationConfig | None = None,
+ compile_det_stages: bool = True,
+) -> DiffusionVideoDecoder:
+ """``torch.compile`` pre-diffusion and/or diffusion-step block methods.
+ Diff-step (matches ``feature/diffvae-attn-w-chunking-backup``):
+ - Combined: ``forward_combined``
+ - Chunked: ``forward_attn_mlp`` only (inject stays eager in-place outside
+ the compiled region — keeps peak VRAM near ChunkedEager).
+ Det stages optional via ``compile_det_stages``.
+ """
+ cfg = config or CompilationConfig()
+
+ try:
+ import natten # noqa: PLC0415
+
+ natten.use_kv_parallelism_in_fused_na(False)
+ except ImportError:
+ pass
+
+ compile_kwargs: dict[str, Any] = {
+ "mode": cfg.mode,
+ "backend": cfg.backend,
+ "fullgraph": cfg.fullgraph,
+ "dynamic": cfg.dynamic,
+ }
+
+ def _compile(fn: Callable[..., Any]) -> Callable[..., Any]:
+ with (
+ torch._inductor.config.patch(**cfg.inductor_config),
+ torch._dynamo.config.patch(**cfg.dynamo_config), # type: ignore[attr-defined]
+ ):
+ return torch.compile(fn, **compile_kwargs)
+
+ from ltx_core.model.video_vae.transformer.chunked.block import ChunkedDiffusionNABlock # noqa: PLC0415
+ from ltx_core.model.video_vae.transformer.combined.block import CombinedDiffusionNABlock # noqa: PLC0415
+ from ltx_core.model.video_vae.transformer.dsl_kernels.block import DSLDiffusionNABlock # noqa: PLC0415
+
+ if compile_det_stages:
+ for stage_blocks in decoder.det_stages:
+ for block in stage_blocks:
+ block.forward = _compile(block.forward) # type: ignore[method-assign]
+
+ for block in decoder.diff_blocks:
+ if isinstance(block, DSLDiffusionNABlock):
+ # Fused stage-5 is a CuTe launch; do not torch.compile it.
+ continue
+ if isinstance(block, ChunkedDiffusionNABlock):
+ block.forward_attn_mlp = _compile(block.forward_attn_mlp) # type: ignore[method-assign]
+ elif isinstance(block, CombinedDiffusionNABlock):
+ block.forward_combined = _compile(block.forward_combined) # type: ignore[method-assign]
+
+ decoder.mark_dynamic_shapes = True
+ return decoder
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/config.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/config.py
new file mode 100644
index 0000000..2489fc3
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/config.py
@@ -0,0 +1,110 @@
+"""DiffVAE decode presets and resolved install recipes (pure data — no module I/O)."""
+
+from __future__ import annotations
+
+from dataclasses import dataclass
+from enum import Enum
+
+# Default eager DiffVAE pin: lower VRAM than hopper-fna TokPerm.
+_CUTLASS_FNA_BACKEND = "cutlass-fna"
+
+# Fixed W split for Chunked* modes (matrix sweet spot at ~1088x1920).
+_CHUNKED_W_CHUNKS = 4
+
+
+class NAttentionKind(Enum):
+ """Which neighborhood-attention backend ``apply`` installs on NA modules."""
+
+ NATTEN = "natten"
+ BLACKWELL_DSL = "blackwell_dsl"
+ TRITON = "triton"
+ EAGER_SDPA = "eager_sdpa"
+
+
+class DiffVAEBlockKind(Enum):
+ """Which DiffusionNABlock subclass ``apply`` installs via ``__class__`` swap."""
+
+ COMBINED = "combined"
+ CHUNKED = "chunked"
+ BLACKWELL_DSL = "blackwell_dsl"
+
+
+@dataclass(frozen=True, slots=True)
+class DiffVAEConfig:
+ """Resolved install recipe — facts ``apply`` reads, not runtime forward knobs.
+ ``block`` selects the pathway (chunked vs combined vs Blackwell DSL); class swap
+ implies deferred inject + W-chunked attn + modulating MLP, combined context +
+ full-volume attn + residual MLP, or deferred stage-4 + fused CuTe DSL block.
+ """
+
+ block: DiffVAEBlockKind
+ w_chunks: int
+ natten_backend: str | None
+ attention: NAttentionKind
+ compile_blocks: bool
+ compile_det_stages: bool
+
+
+class DiffVAEMode(Enum):
+ """User-facing DiffVAE decode presets.
+ Relative performance (order-of-magnitude; hardware varies — no absolute
+ timings or VRAM figures):
+ - **Compile:** ``chunked_compile`` roughly ~2x faster to compile than
+ ``combined_compile`` (det stages not compiled).
+ - **Warm runtime:** relative to ``combined_compile`` (fastest):
+ ``chunked_compile`` roughly ~1.4x slower, ``chunked_eager`` roughly
+ ~2-2.5x slower.
+ - **Peak VRAM:** ``chunked_*`` roughly ~½ of ``combined_compile``.
+ - **BLACKWELL_DSL:** datacenter Blackwell CuTe DSL NA + fused stage-5
+ (deferred stage-4 inputs; upsample+context_proj inside the fused kernel).
+ CHUNKED_* always use deferred stage-4 + w_chunks=4. COMBINED_COMPILE is
+ combined context + w_chunks=1 (best runtime, highest memory) and **requires
+ natten**. Chunked modes fall back to Triton/eager when natten is missing.
+ """
+
+ CHUNKED_EAGER = "chunked_eager"
+ CHUNKED_COMPILE = "chunked_compile"
+ COMBINED_COMPILE = "combined_compile"
+ BLACKWELL_DSL = "blackwell_dsl"
+
+ def resolve(self) -> DiffVAEConfig:
+ """Expand this preset into a concrete install recipe.
+ This is the only place preset → recipe expansion lives.
+ """
+ if self is DiffVAEMode.CHUNKED_EAGER:
+ return DiffVAEConfig(
+ block=DiffVAEBlockKind.CHUNKED,
+ w_chunks=_CHUNKED_W_CHUNKS,
+ natten_backend=_CUTLASS_FNA_BACKEND,
+ attention=NAttentionKind.NATTEN,
+ compile_blocks=False,
+ compile_det_stages=False,
+ )
+ if self is DiffVAEMode.CHUNKED_COMPILE:
+ return DiffVAEConfig(
+ block=DiffVAEBlockKind.CHUNKED,
+ w_chunks=_CHUNKED_W_CHUNKS,
+ natten_backend=None,
+ attention=NAttentionKind.NATTEN,
+ compile_blocks=True,
+ compile_det_stages=False,
+ )
+ if self is DiffVAEMode.COMBINED_COMPILE:
+ return DiffVAEConfig(
+ block=DiffVAEBlockKind.COMBINED,
+ w_chunks=1,
+ natten_backend=None,
+ attention=NAttentionKind.NATTEN,
+ compile_blocks=True,
+ compile_det_stages=True,
+ )
+ if self is DiffVAEMode.BLACKWELL_DSL:
+ return DiffVAEConfig(
+ block=DiffVAEBlockKind.BLACKWELL_DSL,
+ w_chunks=1,
+ natten_backend=None,
+ attention=NAttentionKind.BLACKWELL_DSL,
+ compile_blocks=True,
+ compile_det_stages=True,
+ )
+ raise ValueError(f"Unknown DiffVAEMode: {self!r}")
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/det_attn_rope.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/det_attn_rope.py
new file mode 100644
index 0000000..5888182
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/det_attn_rope.py
@@ -0,0 +1,175 @@
+"""Opaque full-volume abs-RoPE for deterministic (pre-diffusion) NA.
+Owns QKV + opaque ``custom_op`` packaging for det ``NA.forward``. Det stages
+have differently shaped T/H/W; the opaque op keeps Dynamo from specializing
+on each stage shape. Diffusion paths use ``diff_attn/`` RoPE — not this file.
+No T/H/W origin/offset is threaded for tiled decode, and none is needed:
+every attention call here is ``natten.na3d``, a local window with no
+cross-tile tokens. Absolute-vs-local RoPE differs by a global phase that
+cancels inside the attention softmax over that window, so the attention
+output is unchanged. Since every tiled-decode call processes exactly one
+tile in isolation, using each tile's local 0-based positions is identical
+to using its true absolute origin. Absolute origin still matters for
+whether a tile contains the latent's first frame (``drop_leading_frame``),
+which is handled outside RoPE in the decoder stage / per-tile decode.
+"""
+
+from __future__ import annotations
+
+import torch
+
+from ltx_core.model.video_vae.transformer.rope_math import (
+ DEFAULT_ABS_ROPE_NUM_TILES,
+ h_positions,
+ rot_abs_axis_impl,
+ t_positions,
+)
+
+
+def _apply_opaque_rope_slab(
+ x: torch.Tensor,
+ rope_split: tuple[int, int, int],
+ inv_freqs: tuple[torch.Tensor, torch.Tensor, torch.Tensor],
+ *,
+ w_pos: torch.Tensor,
+ compute_dtype: torch.dtype,
+) -> torch.Tensor:
+ """Rotate one W-extent with raw abs-RoPE (runs inside the opaque op)."""
+ d_t, d_h, _ = rope_split
+ inv_t, inv_h, inv_w = inv_freqs
+ t = x.shape[1]
+ h = x.shape[2]
+ xt = rot_abs_axis_impl(x[..., :d_t], t_positions(t, x.device), inv_t, axis=1, compute_dtype=compute_dtype)
+ xh = rot_abs_axis_impl(
+ x[..., d_t : d_t + d_h],
+ h_positions(h, x.device),
+ inv_h,
+ axis=2,
+ compute_dtype=compute_dtype,
+ )
+ xw = rot_abs_axis_impl(x[..., d_t + d_h :], w_pos, inv_w, axis=3, compute_dtype=compute_dtype)
+ return torch.cat([xt, xh, xw], dim=-1)
+
+
+def _apply_opaque_tiled_rope(
+ x: torch.Tensor,
+ rope_split: tuple[int, int, int],
+ inv_freqs: tuple[torch.Tensor, torch.Tensor, torch.Tensor],
+ *,
+ num_tiles: int,
+ compute_dtype: torch.dtype,
+) -> torch.Tensor:
+ """Fixed-``num_tiles`` W split + per-slab rotation (body of the opaque op)."""
+ slabs = torch.chunk(x, num_tiles, dim=3)
+ w_off = 0
+ parts: list[torch.Tensor] = []
+ for slab in slabs:
+ w_slab = slab.shape[3]
+ w_pos = torch.arange(w_slab, dtype=torch.float32, device=x.device) + w_off
+ parts.append(
+ _apply_opaque_rope_slab(
+ slab,
+ rope_split,
+ inv_freqs,
+ w_pos=w_pos,
+ compute_dtype=compute_dtype,
+ )
+ )
+ w_off = w_off + w_slab
+ return torch.cat(parts, dim=3)
+
+
[email protected]_op("ltx_core::abs_rope", mutates_args=())
+def _abs_rope_op(
+ x: torch.Tensor,
+ inv_t: torch.Tensor,
+ inv_h: torch.Tensor,
+ inv_w: torch.Tensor,
+ d_t: int,
+ d_h: int,
+ d_w: int,
+ num_tiles: int,
+ compute_dtype_is_bf16: bool,
+) -> torch.Tensor:
+ """Opaque out-of-place abs-RoPE: Dynamo sees one node."""
+ compute_dtype = torch.bfloat16 if compute_dtype_is_bf16 else torch.float32
+ return _apply_opaque_tiled_rope(
+ x,
+ (d_t, d_h, d_w),
+ (inv_t, inv_h, inv_w),
+ num_tiles=num_tiles,
+ compute_dtype=compute_dtype,
+ )
+
+
+@_abs_rope_op.register_fake
+def _abs_rope_fake(
+ x: torch.Tensor,
+ inv_t: torch.Tensor,
+ inv_h: torch.Tensor,
+ inv_w: torch.Tensor,
+ d_t: int,
+ d_h: int,
+ d_w: int,
+ num_tiles: int,
+ compute_dtype_is_bf16: bool,
+) -> torch.Tensor:
+ del inv_t, inv_h, inv_w, d_t, d_h, d_w, num_tiles, compute_dtype_is_bf16
+ return torch.empty(x.shape, device=x.device, dtype=x.dtype)
+
+
+def _apply_opaque_abs_rope(
+ x: torch.Tensor,
+ rope_split: tuple[int, int, int],
+ inv_freqs: tuple[torch.Tensor, torch.Tensor, torch.Tensor],
+ *,
+ num_tiles: int,
+ compute_dtype: torch.dtype,
+) -> torch.Tensor:
+ if num_tiles < 1:
+ raise ValueError(f"num_tiles must be >= 1, got {num_tiles}")
+ if compute_dtype not in (torch.float32, torch.bfloat16):
+ raise ValueError(f"compute_dtype must be float32 or bfloat16, got {compute_dtype}")
+ d_t, d_h, d_w = rope_split
+ inv_t, inv_h, inv_w = inv_freqs
+ return _abs_rope_op(
+ x,
+ inv_t,
+ inv_h,
+ inv_w,
+ d_t,
+ d_h,
+ d_w,
+ num_tiles,
+ compute_dtype == torch.bfloat16,
+ )
+
+
+def det_qkv_rope(attn: object, x: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
+ """Q/K/V proj + norm/scale + opaque full-volume abs-RoPE."""
+ q, k, v = attn.project_qkv(x) # type: ignore[attr-defined]
+ q = attn.q_norm(q) # type: ignore[attr-defined]
+ k = attn.k_norm(k) # type: ignore[attr-defined]
+ q = q * attn.scale # type: ignore[attr-defined]
+
+ inv_freqs = (
+ attn.rope_inv_t.to(device=x.device), # type: ignore[attr-defined]
+ attn.rope_inv_h.to(device=x.device), # type: ignore[attr-defined]
+ attn.rope_inv_w.to(device=x.device), # type: ignore[attr-defined]
+ )
+ num_tiles = getattr(attn, "rope_num_tiles", DEFAULT_ABS_ROPE_NUM_TILES)
+ compute_dtype = getattr(attn, "rope_compute_dtype", torch.float32)
+ q = _apply_opaque_abs_rope(
+ q,
+ attn.rope_dim_split, # type: ignore[attr-defined]
+ inv_freqs,
+ num_tiles=num_tiles,
+ compute_dtype=compute_dtype,
+ )
+ k = _apply_opaque_abs_rope(
+ k,
+ attn.rope_dim_split, # type: ignore[attr-defined]
+ inv_freqs,
+ num_tiles=num_tiles,
+ compute_dtype=compute_dtype,
+ )
+ return q, k, v
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/dsl_kernels/__init__.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/dsl_kernels/__init__.py
new file mode 100644
index 0000000..6b3d4a6
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/dsl_kernels/__init__.py
@@ -0,0 +1,39 @@
+"""Blackwell CuTe DSL pathway for DiffVAE (deferred stage-4 + fused stage-5)."""
+
+from ltx_core.model.video_vae.transformer.dsl_kernels.apply_dsl import enable_blackwell_dsl
+from ltx_core.model.video_vae.transformer.dsl_kernels.attn import (
+ NA_SOFTMAX_BOUND_BUFFER,
+ DSLAttention,
+ na_attention_dsl,
+ na_dsl_available,
+ require_softmax_bound,
+)
+from ltx_core.model.video_vae.transformer.dsl_kernels.block import (
+ FUSED_CTX_BIAS_BUFFER,
+ FUSED_CTX_WEIGHT_BUFFER,
+ DSLDiffusionNABlock,
+ fused_na_block_supported,
+)
+from ltx_core.model.video_vae.transformer.dsl_kernels.chain import (
+ DSLChannelLinear,
+ DSLDiffusionBlockChain,
+ alloc_block_volume,
+ linear_into_block_volume,
+)
+
+__all__ = [
+ "FUSED_CTX_BIAS_BUFFER",
+ "FUSED_CTX_WEIGHT_BUFFER",
+ "NA_SOFTMAX_BOUND_BUFFER",
+ "DSLAttention",
+ "DSLChannelLinear",
+ "DSLDiffusionBlockChain",
+ "DSLDiffusionNABlock",
+ "alloc_block_volume",
+ "enable_blackwell_dsl",
+ "fused_na_block_supported",
+ "linear_into_block_volume",
+ "na_attention_dsl",
+ "na_dsl_available",
+ "require_softmax_bound",
+]
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/dsl_kernels/apply_dsl.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/dsl_kernels/apply_dsl.py
new file mode 100644
index 0000000..7bb509b
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/dsl_kernels/apply_dsl.py
@@ -0,0 +1,111 @@
+"""Install BLACKWELL_DSL attention + fused blocks onto a DiffusionVideoDecoder."""
+
+from __future__ import annotations
+
+import math
+
+import torch
+from torch import nn
+
+from ltx_core.model.video_vae.transformer.attention import NeighborhoodAttention3D
+from ltx_core.model.video_vae.transformer.blocks import DiffusionNABlock
+from ltx_core.model.video_vae.transformer.dsl_kernels.attn import (
+ NA_SOFTMAX_BOUND_BUFFER,
+ DSLAttention,
+)
+from ltx_core.model.video_vae.transformer.dsl_kernels.block import (
+ FUSED_CTX_BIAS_BUFFER,
+ FUSED_CTX_WEIGHT_BUFFER,
+ DSLDiffusionNABlock,
+)
+from ltx_core.model.video_vae.transformer.dsl_kernels.chain import DSLChannelLinear, DSLDiffusionBlockChain
+from ltx_core.model.video_vae.transformer.layers import ChannelLinear
+
+
+def enable_blackwell_dsl(decoder: nn.Module) -> nn.Module:
+ """Install CuTe DSL attention + fused deferred stage-5 blocks.
+ Runs on the meta model before weights exist: the softmax bound (NaN sentinel) and
+ the fused-context weights get empty buffers here, which
+ ``video_decoder_sd_ops_for_checkpoint(na_dsl_kernel=True)`` fills at load. The two
+ must be paired -- ``ltx_pipelines.utils.blocks.VideoDecoder`` does that from one
+ flag; a custom builder that applies this without the matching SDOps fails at first
+ forward (meta / NaN / empty fused buffers), not at install.
+ GPU capability is *not* gated here so wiring can be unit-tested on any host; the
+ kernel launchers still require datacenter Blackwell + cutlass-dsl. Callers that
+ build a runnable decoder (e.g. ``VideoDecoder``) should still refuse early via
+ ``na_dsl_available()``.
+ Every block must already carry its ``stage4_upsample`` -- ``load_state_dict`` checks
+ shapes even with ``assign=True``, so the fused buffers can only be registered once
+ the hop that decides their shape is known.
+ The stage-4 ``upsamples[3].proj`` and each block's ``context_proj`` stay on the
+ module after install: the hot path reads only the fused buffers, but the Linears
+ remain as load/shape ballast (and for reference / non-fused comparisons).
+ """
+ try:
+ import ltx_kernels.vae # noqa: F401, PLC0415
+ except ImportError as exc:
+ raise RuntimeError(
+ "DiffVAEMode.BLACKWELL_DSL needs the ltx-kernels package "
+ "(uv sync --group kernels); kernel launch additionally needs datacenter "
+ "Blackwell + nvidia-cutlass-dsl"
+ ) from exc
+
+ dsl_attention = DSLAttention()
+ for module in decoder.modules():
+ if isinstance(module, NeighborhoodAttention3D):
+ module.attention_function = dsl_attention
+ if getattr(module, NA_SOFTMAX_BOUND_BUFFER, None) is None:
+ # NaN until SDOps overwrite: an apply-without-fill path must not look "set".
+ module.register_buffer(
+ NA_SOFTMAX_BOUND_BUFFER,
+ torch.full((), float("nan"), device=module.k_norm.weight.device, dtype=torch.float32),
+ )
+ elif isinstance(module, DiffusionNABlock):
+ module.__class__ = DSLDiffusionNABlock
+ _register_fused_ctx_buffers(module)
+
+ if isinstance(getattr(decoder, "diff_blocks", None), nn.ModuleList):
+ decoder.diff_blocks.__class__ = DSLDiffusionBlockChain
+ if isinstance(getattr(decoder, "conv_in_x_t", None), ChannelLinear):
+ decoder.conv_in_x_t.__class__ = DSLChannelLinear
+
+ return decoder
+
+
+def _register_fused_ctx_buffers(block: DSLDiffusionNABlock) -> None:
+ """Give ``block`` empty ``(P*C, Ctx)`` / ``(P*C,)`` buffers for SDOps to load into.
+ The shape is the stage-4 upsample's own Linear: it expands ``Ctx`` to ``P*C`` and the
+ pixel-shuffle only permutes that, so composing a *square* ``context_proj`` onto it
+ leaves the shape alone. Fusion requires ``context_proj`` in_features == out_features
+ (``stage5_channels == stage_channels[-1]``); a non-square checkpoint fails here at
+ apply / pack time rather than silently mis-sizing the fused buffers.
+ """
+ if getattr(block, FUSED_CTX_WEIGHT_BUFFER, None) is not None:
+ return
+ upsample = block.stage4_upsample
+ if upsample is None:
+ raise RuntimeError(
+ "BLACKWELL_DSL needs each block's stage4_upsample wired before its fused-context "
+ "buffers can be sized; apply_diffvae_config does that first"
+ )
+ weight = upsample.proj.weight
+ channels = block.context_proj.out_features
+ if block.context_proj.in_features != channels:
+ raise RuntimeError(
+ f"BLACKWELL_DSL fused context requires square context_proj (C, C); got "
+ f"{tuple(block.context_proj.weight.shape)} — stage5_channels must equal "
+ f"stage_channels[-1] (context width after stage-4 shuffle)"
+ )
+ if weight.shape[0] != math.prod(upsample.stride) * channels:
+ raise RuntimeError(
+ f"stage4_upsample {tuple(weight.shape)} at stride {tuple(upsample.stride)} does not "
+ f"shuffle out to this block's {channels} channels, so it cannot fuse into context_proj"
+ )
+ block.register_buffer(
+ FUSED_CTX_WEIGHT_BUFFER,
+ torch.empty(weight.shape, device=weight.device, dtype=torch.bfloat16),
+ )
+ block.register_buffer(
+ FUSED_CTX_BIAS_BUFFER,
+ torch.empty(weight.shape[:1], device=weight.device, dtype=torch.bfloat16),
+ )
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/dsl_kernels/attn.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/dsl_kernels/attn.py
new file mode 100644
index 0000000..99cc85e
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/dsl_kernels/attn.py
@@ -0,0 +1,88 @@
+"""CuTe DSL neighborhood-attention callable for DiffVAE NA modules."""
+
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+import torch
+
+from ltx_core.model.video_vae.transformer.attention import NAAttentionCallable
+
+if TYPE_CHECKING:
+ from ltx_core.model.video_vae.transformer.attention import NeighborhoodAttention3D
+
+#: Buffer holding the kernels' softmax bound. Registered by BLACKWELL_DSL apply
+#: (NaN sentinel) and filled by DiffVAE decoder SDOps (``na_dsl_kernel=True``).
+NA_SOFTMAX_BOUND_BUFFER = "softmax_bound"
+
+_SOFTMAX_BOUND_UNSET = (
+ f"{NA_SOFTMAX_BOUND_BUFFER} is unset: apply DiffVAEMode.BLACKWELL_DSL "
+ "with video_decoder_sd_ops_for_checkpoint(na_dsl_kernel=True)"
+)
+
+
+def na_dsl_available() -> bool:
+ """Whether the CuTe DSL neighborhood-attention kernel can run on this GPU."""
+ try:
+ from ltx_kernels.vae import na_attn_available # noqa: PLC0415
+ except ImportError:
+ return False
+ return na_attn_available()
+
+
+def require_softmax_bound(attn: NeighborhoodAttention3D) -> torch.Tensor:
+ """Return ``attn``'s filled softmax bound, or raise if apply/SDOps were unpaired.
+ Apply registers a NaN 0-d buffer; SDOps overwrite it at load. Rejecting meta, empty,
+ and non-finite values catches both a missed key under ``assign=True`` (meta left
+ behind) and an apply-without-SDOps path that left the NaN sentinel on CUDA.
+ The non-finite probe is skipped while ``torch.compile`` is tracing: ``isfinite().all()``
+ is data-dependent and forces specialization that conflicts with the decoder's hard
+ ``mark_dynamic`` on T/H/W. Meta/empty checks still run under compile; the NaN sentinel
+ is caught on eager first-call warmups and non-compiled paths.
+ """
+ bound = getattr(attn, NA_SOFTMAX_BOUND_BUFFER, None)
+ if bound is None or bound.is_meta or bound.numel() == 0:
+ raise RuntimeError(_SOFTMAX_BOUND_UNSET)
+ if not torch.compiler.is_compiling() and not torch.isfinite(bound).all():
+ raise RuntimeError(_SOFTMAX_BOUND_UNSET)
+ return bound
+
+
[email protected]_op("ltx_core::na_attention_dsl", mutates_args=())
+def na_attention_dsl(
+ q: torch.Tensor,
+ k: torch.Tensor,
+ v: torch.Tensor,
+ kernel_size: list[int],
+ softmax_bound: torch.Tensor,
+) -> torch.Tensor:
+ """One launch of the DSL NA kernel, as an opaque op so the block's graph stays whole."""
+ from ltx_kernels.vae import run_na_attention_bound # noqa: PLC0415
+
+ return run_na_attention_bound(q, k, v, kernel_size=tuple(kernel_size), k_bound=softmax_bound)
+
+
+@na_attention_dsl.register_fake
+def _na_attention_dsl_fake(
+ q: torch.Tensor,
+ k: torch.Tensor,
+ v: torch.Tensor,
+ kernel_size: list[int],
+ softmax_bound: torch.Tensor,
+) -> torch.Tensor:
+ del k, v, kernel_size, softmax_bound
+ batch, t, h, w, num_heads, head_dim = q.shape
+ return q.new_empty((batch, t, h, w, num_heads * head_dim))
+
+
+class DSLAttention(NAAttentionCallable):
+ """The CuTe DSL neighborhood-attention kernel."""
+
+ def __call__(
+ self,
+ attn: NeighborhoodAttention3D,
+ q: torch.Tensor,
+ k: torch.Tensor,
+ v: torch.Tensor,
+ ) -> torch.Tensor:
+ return na_attention_dsl(q, k, v, list(attn.kernel_size), require_softmax_bound(attn))
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/dsl_kernels/block.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/dsl_kernels/block.py
new file mode 100644
index 0000000..567a9e4
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/dsl_kernels/block.py
@@ -0,0 +1,151 @@
+"""Fused CuTe DSL DiffusionNABlock for deferred stage-4 inputs."""
+
+from __future__ import annotations
+
+import torch
+
+from ltx_core.model.video_vae.transformer.blocks import DiffusionNABlock
+from ltx_core.model.video_vae.transformer.dsl_kernels.attn import require_softmax_bound
+from ltx_core.model.video_vae.transformer.layers import AdaLNZero, LinearPixelShuffleUpsample
+
+#: The stage-4 upsample fused into ``context_proj``, packed by SDOps as one Linear per
+#: pixel-shuffle subpixel: ``(P * C, Ctx)`` / ``(P * C,)``. Registered empty by
+#: BLACKWELL_DSL apply, which runs on the meta model before any weight exists.
+FUSED_CTX_WEIGHT_BUFFER = "fused_ctx_weight"
+FUSED_CTX_BIAS_BUFFER = "fused_ctx_bias"
+
+
+def fused_ctx_weights(block: DiffusionNABlock) -> "tuple[torch.Tensor, torch.Tensor] | None":
+ """This block's packed fused-context weights, or ``None`` if they never landed.
+ A load that skipped the DSL SDOps leaves the buffers apply registered untouched, and
+ since that apply runs on the meta model and the load assigns rather than copies, what
+ is left is still on meta -- which is the check.
+ """
+ weight = getattr(block, FUSED_CTX_WEIGHT_BUFFER, None)
+ bias = getattr(block, FUSED_CTX_BIAS_BUFFER, None)
+ if weight is None or bias is None or weight.is_meta or weight.numel() == 0:
+ return None
+ return weight, bias
+
+
+def fused_na_block_supported(block: DiffusionNABlock, x: torch.Tensor) -> bool:
+ """Whether the fused kernel serves this block at this volume."""
+ from ltx_kernels.vae import fna_supported # noqa: PLC0415
+
+ fused = fused_ctx_weights(block)
+ upsample = block.stage4_upsample
+ if fused is None or upsample is None:
+ return False
+ _, t, h, w, channels = x.shape
+ return fna_supported(
+ C=channels,
+ Ctx=int(fused[0].shape[1]),
+ Hidd=int(block.mlp.w_gate.weight.shape[0]),
+ num_heads=block.attn.num_heads,
+ kernel_size=block.attn.kernel_size,
+ T=t,
+ H=h,
+ W=w,
+ upsample_stride=tuple(upsample.stride), # type: ignore[arg-type]
+ )
+
+
+class DSLDiffusionNABlock(DiffusionNABlock):
+ """Deferred-context diffusion block that runs as one fused CuTe DSL launch.
+ Installed via ``__class__`` swap. Signature matches deferred decode:
+ ``(x, stage4_feat, modulation)``, and ``forward`` / ``forward_x_ctx`` are the same
+ entry (Chunked naming).
+ There is no host fallback: a shape the kernel declines raises rather than quietly
+ running a slower route, because in this pathway that is a decode the caller should
+ have tiled differently, not a shape to absorb. Use another
+ :class:`~ltx_core.model.video_vae.transformer.config.DiffVAEMode` for volumes the
+ kernel does not serve.
+ """
+
+ stage4_upsample: LinearPixelShuffleUpsample | None
+
+ def forward_x_ctx(
+ self,
+ x: torch.Tensor,
+ stage4_feat: torch.Tensor,
+ modulation: tuple[torch.Tensor, ...],
+ *,
+ drop_leading_frame: bool = True,
+ out: torch.Tensor | None = None,
+ ) -> torch.Tensor:
+ return self._fused_forward_x_ctx(x, stage4_feat, modulation, drop_leading_frame=drop_leading_frame, out=out)
+
+ def forward(
+ self,
+ x: torch.Tensor,
+ stage4_feat: torch.Tensor,
+ modulation: tuple[torch.Tensor, ...],
+ *,
+ drop_leading_frame: bool = True,
+ out: torch.Tensor | None = None,
+ ) -> torch.Tensor:
+ return self.forward_x_ctx(x, stage4_feat, modulation, drop_leading_frame=drop_leading_frame, out=out)
+
+ @torch.compiler.disable
+ def _fused_forward_x_ctx(
+ self,
+ x: torch.Tensor,
+ stage4_feat: torch.Tensor,
+ modulation: tuple[torch.Tensor, ...],
+ *,
+ drop_leading_frame: bool,
+ out: torch.Tensor | None,
+ ) -> torch.Tensor:
+ """Marshal weights into :func:`ltx_kernels.vae.run_block_fna_dsl`."""
+ from ltx_kernels.vae import run_block_fna_dsl # noqa: PLC0415
+
+ upsample = self.stage4_upsample
+ if upsample is None:
+ raise RuntimeError("stage4_upsample not configured; apply DiffVAEConfig with block=BLACKWELL_DSL")
+ fused = fused_ctx_weights(self)
+ if fused is None:
+ raise RuntimeError(
+ f"{FUSED_CTX_WEIGHT_BUFFER} unset: apply DiffVAEMode.BLACKWELL_DSL with "
+ "video_decoder_sd_ops_for_checkpoint(na_dsl_kernel=True)"
+ )
+ w_fused, b_fused = fused
+ scale_msa, shift_msa, _, scale_mlp, shift_mlp, _, _ = [
+ modulation[i] + self.scale_shift_table[i].view(1, 1, 1, 1, -1) for i in range(AdaLNZero.NUM_CHUNKS)
+ ]
+ attn = self.attn
+ return run_block_fna_dsl(
+ x,
+ stage4_feat,
+ w_ctx=w_fused,
+ b_ctx=b_fused,
+ upsample_stride=tuple(upsample.stride), # type: ignore[arg-type]
+ drop_leading_frame=drop_leading_frame,
+ norm1_weight=self.norm1.weight,
+ norm2_weight=self.norm2.weight,
+ q_norm_weight=attn.q_norm.weight,
+ k_norm_weight=attn.k_norm.weight,
+ softmax_bound=require_softmax_bound(attn),
+ scale_msa=scale_msa,
+ shift_msa=shift_msa,
+ scale_mlp=scale_mlp,
+ shift_mlp=shift_mlp,
+ w_q=attn.qkv.to_q.weight,
+ w_k=attn.qkv.to_k.weight,
+ w_v=attn.qkv.to_v.weight,
+ w_o=attn.proj.weight,
+ b_q=attn.qkv.to_q.bias,
+ b_k=attn.qkv.to_k.bias,
+ b_v=attn.qkv.to_v.bias,
+ b_o=attn.proj.bias,
+ w_gate=self.mlp.w_gate.weight,
+ w_up=self.mlp.w_up.weight,
+ w_down=self.mlp.w_down.weight,
+ inv_t=attn.rope_inv_t.to(device=x.device),
+ inv_h=attn.rope_inv_h.to(device=x.device),
+ inv_w=attn.rope_inv_w.to(device=x.device),
+ num_heads=attn.num_heads,
+ attn_scale=attn.scale,
+ rope_dim_split=tuple(attn.rope_dim_split),
+ kernel_size=tuple(attn.kernel_size),
+ out=out,
+ ).to(dtype=x.dtype)
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/dsl_kernels/chain.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/dsl_kernels/chain.py
new file mode 100644
index 0000000..1919b5e
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/dsl_kernels/chain.py
@@ -0,0 +1,79 @@
+"""Stage-5 block chain ping-pong buffers for fused DSL launches."""
+
+from __future__ import annotations
+
+import torch
+from torch import nn
+
+from ltx_core.model.video_vae.transformer.layers import ChannelLinear
+
+
+def _out_slack_rows() -> int:
+ from ltx_kernels.vae import OUT_SLACK_ROWS # noqa: PLC0415
+
+ return int(OUT_SLACK_ROWS)
+
+
+def alloc_block_volume(shape: tuple[int, ...], *, device: torch.device, dtype: torch.dtype) -> torch.Tensor:
+ """A ``(1,T,H,W,C)`` tensor whose storage carries the fused kernel's lane slack."""
+ _, t, h, w, c = shape
+ rows = torch.empty((t * h * w + _out_slack_rows(), c), device=device, dtype=dtype)
+ return rows[: t * h * w].view(1, t, h, w, c)
+
+
+def linear_into_block_volume(linear: nn.Linear, x: torch.Tensor) -> torch.Tensor:
+ """``linear(x)`` written straight into an :func:`alloc_block_volume` buffer."""
+ out = alloc_block_volume((*x.shape[:-1], linear.out_features), device=x.device, dtype=x.dtype)
+ n_rows = out.numel() // linear.out_features
+ rows = out.view(n_rows, linear.out_features)
+ torch.mm(x.reshape(n_rows, linear.in_features), linear.weight.t(), out=rows)
+ if linear.bias is not None:
+ rows.add_(linear.bias)
+ return out
+
+
+def _recyclable_rows(volume: torch.Tensor) -> torch.Tensor | None:
+ """``volume``'s backing ``(rows, C)`` buffer, if it was allocated with lane slack."""
+ if volume.ndim != 5 or volume.dtype != torch.bfloat16 or volume.storage_offset() != 0:
+ return None
+ channels = volume.shape[-1]
+ n_rows = volume.numel() // channels
+ want = n_rows + _out_slack_rows()
+ have = volume.untyped_storage().nbytes() // (volume.element_size() * channels)
+ if not volume.is_contiguous() or have < want:
+ return None
+ return torch.as_strided(volume, (want, channels), (channels, 1))
+
+
+class DSLChannelLinear(ChannelLinear):
+ """``conv_in_x_t`` producing a volume the fused block chain can recycle."""
+
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
+ return linear_into_block_volume(self, x)
+
+
+class DSLDiffusionBlockChain(nn.ModuleList):
+ """Stage-5 blocks as one callable chain, alternating two output buffers.
+ Signature matches deferred decode: ``(x, stage4_feat, modulation)``.
+ """
+
+ def forward(
+ self,
+ x: torch.Tensor,
+ stage4_feat: torch.Tensor,
+ modulation: tuple[torch.Tensor, ...],
+ *,
+ drop_leading_frame: bool = True,
+ ) -> torch.Tensor:
+ spare: torch.Tensor | None = None
+ for block in self:
+ y = block(
+ x,
+ stage4_feat,
+ modulation,
+ drop_leading_frame=drop_leading_frame,
+ out=spare,
+ )
+ spare = _recyclable_rows(x)
+ x = y
+ return x
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/fallback_na/__init__.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/fallback_na/__init__.py
new file mode 100644
index 0000000..474ef62
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/fallback_na/__init__.py
@@ -0,0 +1,154 @@
+"""DiffVAE NA fallbacks when natten is unavailable: Triton then eager SDPA.
+Vendored from comfy-kitchen (Apache-2.0). Selection order for NATTEN-kind recipes::
+ natten → (loud warning) Triton → eager tiled SDPA
+"""
+
+from __future__ import annotations
+
+import logging
+from typing import TYPE_CHECKING
+
+import torch
+
+from ltx_core.model.video_vae.transformer.fallback_na.eager import na3d as eager_na3d
+
+if TYPE_CHECKING:
+ from ltx_core.model.video_vae.transformer.attention import NAAttentionCallable, NeighborhoodAttention3D
+
+logger = logging.getLogger(__name__)
+
+_NO_NATTEN_WARNING = (
+ "================================================================================\n"
+ "DiffVAE: natten is NOT installed. Falling back to a slower neighborhood-attention\n"
+ "backend (Triton if available, else pure-PyTorch tiled SDPA). This path is for\n"
+ "compatibility only — install natten for production DiffVAE decode:\n"
+ " uv sync --package ltx-core --extra natten\n"
+ "================================================================================"
+)
+
+
+def triton_na_available() -> bool:
+ """True when CUDA is available and the ``triton`` package imports cleanly.
+ Triton on Windows is supported via the community ``triton-windows`` builds
+ (https://github.com/triton-lang/triton-windows); there is no platform ban here.
+ Import failures beyond ``ImportError`` (e.g. ``OSError`` when libcuda is missing)
+ are treated as unavailable so hosts fall back to eager SDPA.
+ """
+ if not torch.cuda.is_available():
+ return False
+ try:
+ import triton # noqa: F401, PLC0415
+ except (ImportError, OSError):
+ return False
+ return True
+
+
[email protected]_op("ltx_core::na_attention_eager", mutates_args=())
+def na_attention_eager(
+ q: torch.Tensor,
+ k: torch.Tensor,
+ v: torch.Tensor,
+ kernel_size: list[int],
+) -> torch.Tensor:
+ """Opaque eager tiled-SDPA NA so Dynamo does not graph-break into the Python loop."""
+ return eager_na3d(q, k, v, kernel_size=kernel_size, is_causal=None, scale=1.0)
+
+
+@na_attention_eager.register_fake
+def _na_attention_eager_fake(
+ q: torch.Tensor,
+ k: torch.Tensor,
+ v: torch.Tensor,
+ kernel_size: list[int],
+) -> torch.Tensor:
+ del k, v, kernel_size
+ return torch.empty_like(q)
+
+
[email protected]_op("ltx_core::na_attention_triton", mutates_args=())
+def na_attention_triton(
+ q: torch.Tensor,
+ k: torch.Tensor,
+ v: torch.Tensor,
+ kernel_size: list[int],
+) -> torch.Tensor:
+ """Opaque Triton NA launch so the surrounding block graph stays whole under compile."""
+ from ltx_core.model.video_vae.transformer.fallback_na.triton_na import ( # noqa: PLC0415
+ na3d as triton_na3d,
+ )
+
+ return triton_na3d(q, k, v, kernel_size=kernel_size, is_causal=None, scale=1.0)
+
+
+@na_attention_triton.register_fake
+def _na_attention_triton_fake(
+ q: torch.Tensor,
+ k: torch.Tensor,
+ v: torch.Tensor,
+ kernel_size: list[int],
+) -> torch.Tensor:
+ del k, v, kernel_size
+ return torch.empty_like(q)
+
+
+class EagerSdpaAttention:
+ """Limited-workspace tiled SDPA NA (always available)."""
+
+ def __call__(
+ self,
+ attn: NeighborhoodAttention3D,
+ q: torch.Tensor,
+ k: torch.Tensor,
+ v: torch.Tensor,
+ ) -> torch.Tensor:
+ if q.dtype != v.dtype or k.dtype != v.dtype:
+ q = q.to(dtype=v.dtype)
+ k = k.to(dtype=v.dtype)
+ return na_attention_eager(q, k, v, list(attn.kernel_size))
+
+
+class TritonNaAttention:
+ """Triton flash-style NA (hosts with CUDA + a working Triton install)."""
+
+ def __call__(
+ self,
+ attn: NeighborhoodAttention3D,
+ q: torch.Tensor,
+ k: torch.Tensor,
+ v: torch.Tensor,
+ ) -> torch.Tensor:
+ if not triton_na_available():
+ raise ImportError(
+ "Triton neighborhood attention requires CUDA and the triton package "
+ "(on Windows: https://github.com/triton-lang/triton-windows)."
+ )
+ if q.dtype != v.dtype or k.dtype != v.dtype:
+ q = q.to(dtype=v.dtype)
+ k = k.to(dtype=v.dtype)
+ return na_attention_triton(q, k, v, list(attn.kernel_size))
+
+
+def warn_no_natten(*, backend: str) -> None:
+ """Emit the loud no-natten banner and which fallback backend was chosen."""
+ logger.warning(_NO_NATTEN_WARNING)
+ logger.warning("DiffVAE NA fallback: using %s.", backend)
+
+
+def fallback_na_attention() -> NAAttentionCallable:
+ """Pick Triton if usable, else eager; emit the no-natten warning."""
+ if triton_na_available():
+ warn_no_natten(backend="Triton na3d")
+ return TritonNaAttention()
+ warn_no_natten(backend="eager tiled SDPA na3d")
+ return EagerSdpaAttention()
+
+
+__all__ = [
+ "EagerSdpaAttention",
+ "TritonNaAttention",
+ "fallback_na_attention",
+ "na_attention_eager",
+ "na_attention_triton",
+ "triton_na_available",
+ "warn_no_natten",
+]
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/fallback_na/eager.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/fallback_na/eager.py
new file mode 100644
index 0000000..36ac07a
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/fallback_na/eager.py
@@ -0,0 +1,166 @@
+# SPDX-FileCopyrightText: Copyright (c) 2025 Comfy Org. All rights reserved.
+# SPDX-License-Identifier: Apache-2.0
+"""Limited-workspace 3D neighborhood attention (NATTEN ``na3d`` semantics) in pure torch.
+Vendored from comfy-kitchen ``backends/eager/na.py`` (Apache-2.0) for DiffVAE hosts
+without natten or Triton. Queries are tiled; tiles that share window geometry stack
+into batched ``scaled_dot_product_attention`` calls with one additive mask per group.
+"""
+
+from __future__ import annotations
+
+import math
+
+import torch
+from torch.nn import functional
+
+# Element budget for one tile's [Nq, Nk] attention mask (bounds the mask
+# allocation and, on CPU, the math-backend score materialization).
+NA_SCORE_BUDGET = 2**25
+# Element budget for the stacked K/V copies of one batched SDPA call on CUDA.
+NA_KV_STACK_BUDGET = 2**28
+
+
+def _window_bounds(length: int, kernel: int, causal: bool) -> tuple[list[int], list[int]]:
+ """Per-index (start, end) of the attended window along one axis."""
+ starts: list[int] = []
+ ends: list[int] = []
+ if causal:
+ for i in range(length):
+ starts.append(max(0, i - kernel + 1))
+ ends.append(i + 1)
+ else:
+ kernel = min(kernel, length)
+ lo = length - kernel
+ half = kernel // 2
+ for i in range(length):
+ start = min(max(i - half, 0), lo)
+ starts.append(start)
+ ends.append(start + kernel)
+ return starts, ends
+
+
+def _pick_tiles(dims: tuple[int, int, int], kernels: list[int]) -> list[int]:
+ """Per-axis query-tile lengths keeping one tile's [Nq, Nk] under budget."""
+ tiles = list(dims)
+
+ def cost(ts: list[int]) -> int:
+ nq = math.prod(ts)
+ nk = math.prod(min(d, t + k - 1) for t, k, d in zip(ts, kernels, dims, strict=True))
+ return nq * nk
+
+ while cost(tiles) > NA_SCORE_BUDGET and max(tiles) > 1:
+ i = max(range(3), key=lambda a: tiles[a] / kernels[a])
+ if tiles[i] <= 1:
+ break
+ tiles[i] = max(1, (tiles[i] + 1) // 2)
+ return tiles
+
+
+def _group_mask(
+ rel_bounds: tuple[tuple[tuple[int, ...], tuple[int, ...]], ...],
+ dtype: torch.dtype,
+ device: torch.device,
+) -> torch.Tensor:
+ """Additive ``[1, 1, Nq, Nk]`` mask for one tile-geometry group."""
+ bools = []
+ for starts, ends in rel_bounds:
+ st = torch.tensor(starts, device=device)
+ en = torch.tensor(ends, device=device)
+ kj = torch.arange(int(en.max()), device=device)
+ bools.append((kj[None, :] >= st[:, None]) & (kj[None, :] < en[:, None]))
+ visible = (
+ bools[0][:, None, None, :, None, None]
+ & bools[1][None, :, None, None, :, None]
+ & bools[2][None, None, :, None, None, :]
+ )
+ nq = visible.shape[0] * visible.shape[1] * visible.shape[2]
+ nk = visible.shape[3] * visible.shape[4] * visible.shape[5]
+ mask = torch.zeros((nq, nk), dtype=dtype, device=device)
+ mask.masked_fill_(~visible.reshape(nq, nk), torch.finfo(dtype).min)
+ return mask.reshape(1, 1, nq, nk)
+
+
+def na3d(
+ q: torch.Tensor,
+ k: torch.Tensor,
+ v: torch.Tensor,
+ kernel_size: list[int] | tuple[int, ...],
+ is_causal: list[bool] | None = None,
+ scale: float | None = None,
+) -> torch.Tensor:
+ """3D neighborhood attention over ``(B, T, H, W, NH, HD)`` tensors.
+ ``scale`` defaults to ``head_dim**-0.5``. Pass ``scale=1.0`` when Q is already scaled.
+ """
+ batch, t, h, w, nh, hd = q.shape
+ dims = (t, h, w)
+ causal = [False, False, False] if is_causal is None else list(is_causal)
+ kernels = [k_ if c else min(k_, d) for k_, c, d in zip(kernel_size, causal, dims, strict=True)]
+ if scale is None:
+ scale = hd**-0.5
+ device = q.device
+ if scale != 1.0:
+ q = q * scale
+
+ bounds = [_window_bounds(d, k_, c) for d, k_, c in zip(dims, kernels, causal, strict=True)]
+ tile_t, tile_h, tile_w = _pick_tiles(dims, [min(k_, d) for k_, d in zip(kernels, dims, strict=True)])
+
+ groups: dict[
+ tuple[
+ tuple[tuple[int, ...], tuple[int, ...]],
+ tuple[tuple[int, ...], tuple[int, ...]],
+ tuple[tuple[int, ...], tuple[int, ...]],
+ ],
+ list[tuple[tuple[slice, slice, slice], tuple[slice, slice, slice]]],
+ ] = {}
+ for t0 in range(0, t, tile_t):
+ t1 = min(t0 + tile_t, t)
+ rt0, rt1 = bounds[0][0][t0], bounds[0][1][t1 - 1]
+ rel_t = (
+ tuple(s - rt0 for s in bounds[0][0][t0:t1]),
+ tuple(e - rt0 for e in bounds[0][1][t0:t1]),
+ )
+ for h0 in range(0, h, tile_h):
+ h1 = min(h0 + tile_h, h)
+ rh0, rh1 = bounds[1][0][h0], bounds[1][1][h1 - 1]
+ rel_h = (
+ tuple(s - rh0 for s in bounds[1][0][h0:h1]),
+ tuple(e - rh0 for e in bounds[1][1][h0:h1]),
+ )
+ for w0 in range(0, w, tile_w):
+ w1 = min(w0 + tile_w, w)
+ rw0, rw1 = bounds[2][0][w0], bounds[2][1][w1 - 1]
+ rel_w = (
+ tuple(s - rw0 for s in bounds[2][0][w0:w1]),
+ tuple(e - rw0 for e in bounds[2][1][w0:w1]),
+ )
+ groups.setdefault((rel_t, rel_h, rel_w), []).append(
+ (
+ (slice(t0, t1), slice(h0, h1), slice(w0, w1)),
+ (slice(rt0, rt1), slice(rh0, rh1), slice(rw0, rw1)),
+ )
+ )
+
+ out = torch.empty((batch, t, h, w, nh, hd), device=device, dtype=v.dtype)
+ for rel, tiles in groups.items():
+ mask = _group_mask(rel, q.dtype, device)
+ nq, nk = mask.shape[2], mask.shape[3]
+ g_max = max(1, NA_KV_STACK_BUDGET // max(1, batch * nh * nk * hd * 2)) if device.type == "cuda" else 1
+ qs0, _ = tiles[0]
+ tq = qs0[0].stop - qs0[0].start
+ th = qs0[1].stop - qs0[1].start
+ tw = qs0[2].stop - qs0[2].start
+ for c0 in range(0, len(tiles), g_max):
+ chunk = tiles[c0 : c0 + g_max]
+ g = len(chunk)
+ q_s = torch.stack([q[:, qs[0], qs[1], qs[2]] for qs, _ in chunk])
+ k_s = torch.stack([k[:, rs[0], rs[1], rs[2]] for _, rs in chunk])
+ v_s = torch.stack([v[:, rs[0], rs[1], rs[2]] for _, rs in chunk])
+ q_s = q_s.permute(0, 1, 5, 2, 3, 4, 6).reshape(g * batch, nh, nq, hd)
+ k_s = k_s.permute(0, 1, 5, 2, 3, 4, 6).reshape(g * batch, nh, nk, hd)
+ v_s = v_s.permute(0, 1, 5, 2, 3, 4, 6).reshape(g * batch, nh, nk, hd)
+ o = functional.scaled_dot_product_attention(q_s, k_s, v_s, attn_mask=mask, scale=1.0)
+ o = o.view(g, batch, nh, tq, th, tw, hd).permute(0, 1, 3, 4, 5, 2, 6)
+ for i, (qs, _) in enumerate(chunk):
+ out[:, qs[0], qs[1], qs[2]] = o[i]
+
+ return out
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/fallback_na/triton_na.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/fallback_na/triton_na.py
new file mode 100644
index 0000000..e0e863f
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/fallback_na/triton_na.py
@@ -0,0 +1,181 @@
+# SPDX-FileCopyrightText: Copyright (c) 2025 Comfy Org. All rights reserved.
+# SPDX-License-Identifier: Apache-2.0
+# ruff: noqa: ANN001, ANN202, PLR0912, PLR0913, PLR0915
+"""Triton 3D neighborhood attention (NATTEN ``na3d`` semantics).
+Vendored from comfy-kitchen ``backends/triton/na.py`` (Apache-2.0) for DiffVAE hosts
+without natten. One program handles a run of ``BLOCK_Q`` queries along W at a fixed
+(t, h); online softmax, fp32 accumulation, no materialized scores.
+"""
+
+from __future__ import annotations
+
+import torch
+import triton
+import triton.language as tl
+
+# Triton requires module-level JIT globals to be constexpr instances (not annotations).
+_NEG_INF = tl.constexpr(-3.0e38)
+
+
+def _na3d_kernel(
+ q_ptr,
+ k_ptr,
+ v_ptr,
+ out_ptr,
+ t_size,
+ h_size,
+ w_size,
+ num_heads,
+ s_b,
+ s_t,
+ s_h,
+ s_w,
+ s_n,
+ scale,
+ kt: tl.constexpr,
+ kh: tl.constexpr,
+ kw: tl.constexpr,
+ causal_t: tl.constexpr,
+ causal_h: tl.constexpr,
+ causal_w: tl.constexpr,
+ hd: tl.constexpr,
+ hd_pad: tl.constexpr,
+ block_q: tl.constexpr,
+ block_k: tl.constexpr,
+ is_fp32: tl.constexpr,
+):
+ pid_w = tl.program_id(0)
+ pid_th = tl.program_id(1)
+ pid_bn = tl.program_id(2)
+
+ t_q = pid_th // h_size
+ h_q = pid_th % h_size
+ base = (pid_bn // num_heads) * s_b + (pid_bn % num_heads) * s_n
+
+ w_off = pid_w * block_q + tl.arange(0, block_q)
+ w_valid = w_off < w_size
+ d_off = tl.arange(0, hd_pad)
+ d_mask = d_off < hd
+
+ q_ptrs = q_ptr + base + t_q * s_t + h_q * s_h + w_off[:, None] * s_w + d_off[None, :]
+ q_blk = tl.load(q_ptrs, mask=w_valid[:, None] & d_mask[None, :], other=0.0)
+
+ if causal_t:
+ t_lo = tl.maximum(t_q - kt + 1, 0)
+ t_hi = t_q + 1
+ else:
+ t_lo = tl.minimum(tl.maximum(t_q - kt // 2, 0), t_size - kt)
+ t_hi = t_lo + kt
+ if causal_h:
+ h_lo = tl.maximum(h_q - kh + 1, 0)
+ h_hi = h_q + 1
+ else:
+ h_lo = tl.minimum(tl.maximum(h_q - kh // 2, 0), h_size - kh)
+ h_hi = h_lo + kh
+
+ w_q = tl.where(w_valid, w_off, w_size - 1)
+ if causal_w:
+ w_start = tl.maximum(w_q - kw + 1, 0)
+ w_end = w_q + 1
+ blk_first = tl.minimum(pid_w * block_q, w_size - 1)
+ blk_last = tl.minimum(pid_w * block_q + block_q - 1, w_size - 1)
+ w_lo = tl.maximum(blk_first - kw + 1, 0)
+ w_hi = blk_last + 1
+ else:
+ w_start = tl.minimum(tl.maximum(w_q - kw // 2, 0), w_size - kw)
+ w_end = w_start + kw
+ blk_first = tl.minimum(pid_w * block_q, w_size - 1)
+ blk_last = tl.minimum(pid_w * block_q + block_q - 1, w_size - 1)
+ w_lo = tl.minimum(tl.maximum(blk_first - kw // 2, 0), w_size - kw)
+ w_hi = tl.minimum(tl.maximum(blk_last - kw // 2, 0), w_size - kw) + kw
+
+ m_i = tl.full((block_q,), _NEG_INF, dtype=tl.float32)
+ l_i = tl.zeros((block_q,), dtype=tl.float32)
+ acc = tl.zeros((block_q, hd_pad), dtype=tl.float32)
+
+ for tk in range(t_lo, t_hi):
+ for hk in range(h_lo, h_hi):
+ plane = base + tk * s_t + hk * s_h
+ for wk0 in range(w_lo, w_hi, block_k):
+ wk = wk0 + tl.arange(0, block_k)
+ kmask = wk < w_hi
+ kv_ptrs = plane + wk[:, None] * s_w + d_off[None, :]
+ kv_mask = kmask[:, None] & d_mask[None, :]
+ k_blk = tl.load(k_ptr + kv_ptrs, mask=kv_mask, other=0.0)
+ if is_fp32:
+ s = tl.dot(q_blk, tl.trans(k_blk), input_precision="ieee") * scale
+ else:
+ s = tl.dot(q_blk, tl.trans(k_blk)) * scale
+ vis = (wk[None, :] >= w_start[:, None]) & (wk[None, :] < w_end[:, None]) & kmask[None, :]
+ s = tl.where(vis, s, _NEG_INF)
+ m_new = tl.maximum(m_i, tl.max(s, 1))
+ alpha = tl.exp(m_i - m_new)
+ p = tl.exp(s - m_new[:, None])
+ l_i = l_i * alpha + tl.sum(p, 1)
+ v_blk = tl.load(v_ptr + kv_ptrs, mask=kv_mask, other=0.0)
+ if is_fp32:
+ acc = acc * alpha[:, None] + tl.dot(p, v_blk, input_precision="ieee")
+ else:
+ acc = acc * alpha[:, None] + tl.dot(p.to(v_blk.dtype), v_blk)
+ m_i = m_new
+
+ out = acc / tl.maximum(l_i, 1e-30)[:, None]
+ out_ptrs = out_ptr + base + t_q * s_t + h_q * s_h + w_off[:, None] * s_w + d_off[None, :]
+ tl.store(out_ptrs, out.to(out_ptr.dtype.element_ty), mask=w_valid[:, None] & d_mask[None, :])
+
+
+def na3d(
+ q: torch.Tensor,
+ k: torch.Tensor,
+ v: torch.Tensor,
+ kernel_size: list[int] | tuple[int, ...],
+ is_causal: list[bool] | None = None,
+ scale: float | None = None,
+) -> torch.Tensor:
+ """3D neighborhood attention over ``(B, T, H, W, NH, HD)`` tensors."""
+ batch, t, h, w, nh, hd = q.shape
+ causal = [False, False, False] if is_causal is None else list(is_causal)
+ kt, kh, kw = (k_ if c else min(k_, d) for k_, c, d in zip(kernel_size, causal, (t, h, w), strict=True))
+ if scale is None:
+ scale = hd**-0.5
+
+ q = q.contiguous()
+ k = k.contiguous()
+ v = v.contiguous()
+ out = torch.empty_like(q)
+
+ hd_p = max(16, triton.next_power_of_2(hd))
+ block_q = 16
+ block_k = max(16, min(32, triton.next_power_of_2(min(w, block_q + kw))))
+
+ grid = (triton.cdiv(w, block_q), t * h, batch * nh)
+ _na3d_kernel[grid](
+ q,
+ k,
+ v,
+ out,
+ t,
+ h,
+ w,
+ nh,
+ q.stride(0),
+ q.stride(1),
+ q.stride(2),
+ q.stride(3),
+ q.stride(4),
+ scale,
+ kt=kt,
+ kh=kh,
+ kw=kw,
+ causal_t=causal[0],
+ causal_h=causal[1],
+ causal_w=causal[2],
+ hd=hd,
+ hd_pad=hd_p,
+ block_q=block_q,
+ block_k=block_k,
+ is_fp32=q.dtype == torch.float32,
+ num_warps=4,
+ )
+ return out
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/layers.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/layers.py
new file mode 100644
index 0000000..f41a1b3
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/layers.py
@@ -0,0 +1,86 @@
+"""Shared small layers for the diffusion-VAE NA transformer stack."""
+
+from __future__ import annotations
+
+import math
+
+import torch
+import torch.nn.functional as F
+from einops import rearrange
+from torch import nn
+
+
+class ChannelLinear(nn.Linear):
+ """``nn.Linear`` exposing ``in_channels``/``out_channels`` for config introspection."""
+
+ @property
+ def in_channels(self) -> int:
+ return self.in_features
+
+ @property
+ def out_channels(self) -> int:
+ return self.out_features
+
+
+class LinearPixelShuffleUpsample(nn.Module):
+ """Decoder-side resampler: Linear channel-expand, then channels-last PixelShuffle."""
+
+ def __init__(
+ self,
+ in_channels: int,
+ stride: tuple[int, int, int],
+ out_channels_reduction_factor: int = 1,
+ ) -> None:
+ super().__init__()
+ self.stride = stride
+ self.proj_out_channels = math.prod(stride) * in_channels // out_channels_reduction_factor
+ self.out_channels = self.proj_out_channels // math.prod(stride)
+ self.proj = nn.Linear(in_channels, self.proj_out_channels, bias=True)
+
+ def forward(self, x: torch.Tensor, drop_leading_frame: bool = True) -> torch.Tensor:
+ """Upsample; when ``stride[0] == 2`` the pixel-shuffle produces a duplicate
+ leading frame that must be dropped to preserve the causal 1:2 (then
+ composed 1:8) frame mapping. ``drop_leading_frame`` gates that drop: it
+ must be ``True`` only for the chunk that contains the tensor's true
+ temporal origin (t=0). Tiled callers processing a later chunk in
+ isolation must pass ``False`` -- that chunk has no duplicate leading
+ frame of its own to drop, since the one duplicate frame in the full
+ (untiled) tensor belongs solely to the origin chunk.
+ """
+ x = self.proj(x)
+ x = rearrange(
+ x,
+ "b t h w (c p1 p2 p3) -> b (t p1) (h p2) (w p3) c",
+ p1=self.stride[0],
+ p2=self.stride[1],
+ p3=self.stride[2],
+ )
+ if self.stride[0] == 2 and drop_leading_frame:
+ x = x[:, 1:, :, :, :]
+ return x
+
+
+class AdaLNZero(nn.Module):
+ """Per-block AdaLN-Zero modulation: ``t_emb`` -> 7 (scale/shift/gate) chunks.
+ Zero-init output projection so the block is an identity at every timestep
+ until the modulation pathway opens up during training.
+ """
+
+ NUM_CHUNKS: int = 7 # scale_msa, shift_msa, gate_msa, scale_mlp, shift_mlp, gate_mlp, gate_ctx
+
+ def __init__(self, dim: int, t_emb_dim: int) -> None:
+ super().__init__()
+ self.dim = dim
+ self.proj = nn.Linear(t_emb_dim, self.NUM_CHUNKS * dim, bias=True)
+ nn.init.zeros_(self.proj.weight)
+ nn.init.zeros_(self.proj.bias)
+
+ def forward(self, t_emb: torch.Tensor) -> tuple[torch.Tensor, ...]:
+ h = self.proj(F.silu(t_emb))
+ chunks = h.chunk(self.NUM_CHUNKS, dim=-1)
+ return tuple(c[:, None, None, None, :] for c in chunks)
+
+
+def modulate(x: torch.Tensor, scale: torch.Tensor, shift: torch.Tensor) -> torch.Tensor:
+ """Apply AdaLN-style scale + shift modulation to a channels-last tensor."""
+ return x * (1.0 + scale) + shift
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/qkv.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/qkv.py
new file mode 100644
index 0000000..e285e81
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/qkv.py
@@ -0,0 +1,34 @@
+"""Split Q/K/V projections for Neighborhood Attention."""
+
+from __future__ import annotations
+
+import torch
+from torch import nn
+
+
+class QKVProjections(nn.Module):
+ """Three Q/K/V linears (separate GEMMs).
+ A fused ``nn.Linear(dim, 3*dim)`` + ``chunk`` looks cheaper, but on
+ ``(B,T,H,W,3*C)`` the chunks are non-contiguous (q|k|v interleaved per
+ spatial site). Making them contiguous while the fused buffer is alive
+ peaks at ``6*C`` channels (~+2 GB at stage-5) vs ``3*C`` from three
+ separate GEMMs -- and, unlike a fused tensor, Q/K/V here are independently
+ owned tensors with different lifetimes (e.g. Q is consumed immediately by
+ the score matmul while K/V live through the whole neighborhood gather),
+ so each can be freed as soon as its last use completes instead of all
+ three staying alive as long as the fused parent does. At production
+ shape the runtime difference is ~20 ms/step; the memory win dominates.
+ Checkpoint files still ship fused ``qkv.weight`` / ``qkv.bias``; those are
+ split into ``to_q`` / ``to_k`` / ``to_v`` during load by
+ ``DIFFUSION_VAE_DECODER_COMFY_KEYS_FILTER`` (``SDOps.with_kv_operation``).
+ """
+
+ def __init__(self, dim: int) -> None:
+ super().__init__()
+ self.dim = dim
+ self.to_q = nn.Linear(dim, dim, bias=True)
+ self.to_k = nn.Linear(dim, dim, bias=True)
+ self.to_v = nn.Linear(dim, dim, bias=True)
+
+ def forward(self, x: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
+ return self.to_q(x), self.to_k(x), self.to_v(x)
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/rope.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/rope.py
new file mode 100644
index 0000000..e3a95b4
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/rope.py
@@ -0,0 +1,109 @@
+"""Shared absolute-RoPE helpers and knobs (no packaging policy).
+Packaging lives with the consumer:
+ - det → ``det_attn_rope`` (opaque ``custom_op``)
+ - Combined diff → ``combined.attn`` (nested)
+ - Chunked diff → ``chunked.attn`` (in-slab)
+"""
+
+from __future__ import annotations
+
+import torch
+from torch import nn
+
+from ltx_core.model.video_vae.transformer.rope_math import (
+ DEFAULT_ABS_ROPE_NUM_TILES,
+ default_rope_dim_split,
+ h_positions,
+ rope_inv_freqs,
+ rot_abs_axis_impl,
+ t_positions,
+)
+
+# Re-export math for existing call sites / tests.
+__all__ = [
+ "DEFAULT_ABS_ROPE_NUM_TILES",
+ "apply_abs_rope",
+ "apply_abs_rope_slab",
+ "configure_abs_rope",
+ "default_rope_dim_split",
+ "rope_inv_freqs",
+]
+
+
+def apply_abs_rope_slab(
+ x: torch.Tensor,
+ rope_split: tuple[int, int, int],
+ inv_freqs: tuple[torch.Tensor, torch.Tensor, torch.Tensor],
+ *,
+ w_pos: torch.Tensor,
+ compute_dtype: torch.dtype = torch.float32,
+) -> torch.Tensor:
+ """Rotate this W-extent (full volume or one slab). Returns a new tensor."""
+ d_t, d_h, _ = rope_split
+ inv_t, inv_h, inv_w = inv_freqs
+ t = x.shape[1]
+ h = x.shape[2]
+ xt = rot_abs_axis_impl(x[..., :d_t], t_positions(t, x.device), inv_t, axis=1, compute_dtype=compute_dtype)
+ xh = rot_abs_axis_impl(
+ x[..., d_t : d_t + d_h],
+ h_positions(h, x.device),
+ inv_h,
+ axis=2,
+ compute_dtype=compute_dtype,
+ )
+ xw = rot_abs_axis_impl(x[..., d_t + d_h :], w_pos, inv_w, axis=3, compute_dtype=compute_dtype)
+ return torch.cat([xt, xh, xw], dim=-1)
+
+
+def apply_abs_rope(
+ x: torch.Tensor,
+ rope_split: tuple[int, int, int],
+ inv_freqs: tuple[torch.Tensor, torch.Tensor, torch.Tensor],
+ *,
+ num_tiles: int = DEFAULT_ABS_ROPE_NUM_TILES,
+ compute_dtype: torch.dtype = torch.float32,
+) -> torch.Tensor:
+ """Eager fixed-``num_tiles`` W-slab abs-RoPE (test / reference helper).
+ Production packaging is owned by ``det_attn_rope`` / ``diff_attn`` — not here.
+ """
+ if num_tiles < 1:
+ raise ValueError(f"num_tiles must be >= 1, got {num_tiles}")
+ if compute_dtype not in (torch.float32, torch.bfloat16):
+ raise ValueError(f"compute_dtype must be float32 or bfloat16, got {compute_dtype}")
+
+ slabs = torch.chunk(x, num_tiles, dim=3)
+ w_off = 0
+ parts: list[torch.Tensor] = []
+ for slab in slabs:
+ w_slab = slab.shape[3]
+ w_pos = torch.arange(w_slab, dtype=torch.float32, device=x.device) + w_off
+ parts.append(
+ apply_abs_rope_slab(
+ slab,
+ rope_split,
+ inv_freqs,
+ w_pos=w_pos,
+ compute_dtype=compute_dtype,
+ )
+ )
+ w_off = w_off + w_slab
+ return torch.cat(parts, dim=3)
+
+
+def configure_abs_rope(
+ module_root: nn.Module,
+ *,
+ num_tiles: int = DEFAULT_ABS_ROPE_NUM_TILES,
+ compute_dtype: torch.dtype = torch.float32,
+) -> None:
+ """Set abs-RoPE tile count / compute dtype on every ``NeighborhoodAttention3D``."""
+ from ltx_core.model.video_vae.transformer.attention import NeighborhoodAttention3D # noqa: PLC0415
+
+ if num_tiles < 1:
+ raise ValueError(f"num_tiles must be >= 1, got {num_tiles}")
+ if compute_dtype not in (torch.float32, torch.bfloat16):
+ raise ValueError(f"compute_dtype must be float32 or bfloat16, got {compute_dtype}")
+ for module in module_root.modules():
+ if isinstance(module, NeighborhoodAttention3D):
+ module.rope_num_tiles = num_tiles
+ module.rope_compute_dtype = compute_dtype
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/rope_math.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/rope_math.py
new file mode 100644
index 0000000..a671a8c
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/rope_math.py
@@ -0,0 +1,61 @@
+"""Shared absolute-RoPE math helpers (no consumer policy)."""
+
+from __future__ import annotations
+
+import numpy as np
+import torch
+
+DEFAULT_ABS_ROPE_NUM_TILES = 4
+
+
+def t_positions(t: int, device: torch.device) -> torch.Tensor:
+ return torch.arange(t, dtype=torch.float32, device=device)
+
+
+def h_positions(h: int, device: torch.device) -> torch.Tensor:
+ return torch.arange(h, dtype=torch.float32, device=device)
+
+
+def default_rope_dim_split(head_dim: int) -> tuple[int, int, int]:
+ """Default split of head_dim across (T, H, W) RoPE chunks."""
+ assert head_dim % 8 == 0, f"head_dim={head_dim} must be a multiple of 8 for default split"
+ d_t = (head_dim // 4) // 2 * 2
+ d_hw = (head_dim - d_t) // 2
+ if d_hw % 2 != 0:
+ d_t -= 2
+ d_hw = (head_dim - d_t) // 2
+ assert d_t > 0
+ assert d_hw > 0
+ return (d_t, d_hw, d_hw)
+
+
+def rope_inv_freqs(dim: int, base: float = 10000.0) -> torch.Tensor:
+ """Inverse RoPE frequencies: ``1 / base**(i/dim)`` for ``i`` in ``[0, dim, 2)``."""
+ assert dim % 2 == 0, f"RoPE dim must be even, got {dim}"
+ exponents = np.arange(0, dim, 2, dtype=np.float64) / dim
+ inv_freqs = 1.0 / np.power(float(base), exponents)
+ return torch.from_numpy(inv_freqs).to(torch.float32)
+
+
+def rot_abs_axis_impl(
+ xc: torch.Tensor,
+ pos: torch.Tensor,
+ inv: torch.Tensor,
+ axis: int,
+ *,
+ compute_dtype: torch.dtype,
+) -> torch.Tensor:
+ """Absolute RoPE on one axis chunk ``xc[..., D]`` (D even) → new tensor."""
+ out_dtype = xc.dtype
+ pairs = xc.reshape(*xc.shape[:-1], xc.shape[-1] // 2, 2)
+ xe = pairs[..., 0].to(compute_dtype)
+ xo = pairs[..., 1].to(compute_dtype)
+ shape = [1, 1, 1, 1, 1, inv.shape[0]]
+ shape[axis] = pos.shape[0]
+ ang = (pos[:, None] * inv[None, :]).reshape(shape)
+ c = ang.cos().to(compute_dtype)
+ s = ang.sin().to(compute_dtype)
+ re = xe * c - xo * s
+ ro = xe * s + xo * c
+ out = torch.stack([re, ro], dim=-1).reshape(xc.shape)
+ return out.to(out_dtype) if out.dtype != out_dtype else out
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/transformer/swiglu.py b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/swiglu.py
new file mode 100644
index 0000000..c2ee73e
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/transformer/swiglu.py
@@ -0,0 +1,479 @@
+# ruff: noqa: ANN001, N803, ANN202, PLR0913
+
+"""SwiGLU shell, tiled kernel, det plain residual, and shared tile/fuse helpers.
+Pathway residuals:
+ - Combined → ``combined.mlp.residual_mlp``
+ - Chunked → ``chunked.mlp.residual_modulating_mlp``
+"""
+
+from __future__ import annotations
+
+import logging
+from dataclasses import dataclass
+from typing import Final
+
+import torch
+import torch.nn.functional as F
+from torch import nn
+
+from ltx_core.tiling import DimensionInterval, split_by_count, split_by_size
+
+logger = logging.getLogger(__name__)
+
+try:
+ import triton
+ import triton.language as tl
+
+ _TRITON_AVAILABLE = True
+except ImportError: # pragma: no cover
+ triton = None # type: ignore[assignment]
+ tl = None # type: ignore[assignment]
+ _TRITON_AVAILABLE = False
+
+# Match visual_fidelity ``DEFAULT_CHUNK_TOKENS`` — hard token cap for peak VRAM.
+DEFAULT_SWIGLU_TILE_SIZE: Final[int] = 16_384
+DEFAULT_SWIGLU_TILES: Final[int] = 4
+
+
+@dataclass(frozen=True)
+class SwiGLUTileSpec:
+ """Token tiling: provide exactly one of ``num_tiles`` or ``tile_size``."""
+
+ num_tiles: int | None = None
+ tile_size: int | None = None
+
+ def __post_init__(self) -> None:
+ if (self.num_tiles is None) == (self.tile_size is None):
+ raise ValueError("Provide exactly one of num_tiles or tile_size")
+ if self.num_tiles is not None and self.num_tiles < 1:
+ raise ValueError(f"num_tiles must be >= 1, got {self.num_tiles}")
+ if self.tile_size is not None and self.tile_size < 1:
+ raise ValueError(f"tile_size must be >= 1, got {self.tile_size}")
+
+ @classmethod
+ def by_count(cls, num_tiles: int = DEFAULT_SWIGLU_TILES) -> SwiGLUTileSpec:
+ return cls(num_tiles=num_tiles)
+
+ @classmethod
+ def by_size(cls, tile_size: int = DEFAULT_SWIGLU_TILE_SIZE) -> SwiGLUTileSpec:
+ return cls(tile_size=tile_size)
+
+
+DEFAULT_SWIGLU_TILE_SPEC = SwiGLUTileSpec(tile_size=DEFAULT_SWIGLU_TILE_SIZE)
+
+
+def triton_swiglu_available() -> bool:
+ """True when a CUDA-capable Triton install can run the fused up-mul kernel."""
+ return _TRITON_AVAILABLE and torch.cuda.is_available()
+
+
+def token_intervals(n_tok: int, tile: SwiGLUTileSpec) -> list[DimensionInterval]:
+ """Split ``n_tok`` tokens per ``tile`` (count or size). Overlap is always 0."""
+ if n_tok < 0:
+ raise ValueError(f"n_tok must be >= 0, got {n_tok}")
+ if n_tok == 0:
+ return []
+ if tile.num_tiles is not None:
+ tiles = min(tile.num_tiles, n_tok)
+ if tiles <= 1:
+ return [DimensionInterval(start=0, end=n_tok, left_ramp=0, right_ramp=0)]
+ return list(split_by_count(num_tiles=tiles, overlap=0)(n_tok).intervals)
+ assert tile.tile_size is not None
+ if n_tok <= tile.tile_size:
+ return [DimensionInterval(start=0, end=n_tok, left_ramp=0, right_ramp=0)]
+ return list(split_by_size(tile.tile_size, overlap=0)(n_tok).intervals)
+
+
+if _TRITON_AVAILABLE:
+
+ @triton.jit
+ def _fused_up_mul_kernel(
+ x_ptr,
+ w_ptr,
+ g_ptr,
+ M,
+ K,
+ N,
+ stride_xm,
+ stride_xk,
+ stride_wn,
+ stride_wk,
+ stride_gm,
+ stride_gn,
+ BLOCK_M: tl.constexpr,
+ BLOCK_N: tl.constexpr,
+ BLOCK_K: tl.constexpr,
+ ):
+ """``g = g * (x @ w.T)`` with ``w`` shaped ``(N, K)`` (nn.Linear layout)."""
+ pid_m = tl.program_id(0)
+ pid_n = tl.program_id(1)
+
+ offs_m = pid_m * BLOCK_M + tl.arange(0, BLOCK_M)
+ offs_n = pid_n * BLOCK_N + tl.arange(0, BLOCK_N)
+ mask_m = offs_m < M
+ mask_n = offs_n < N
+
+ acc = tl.zeros((BLOCK_M, BLOCK_N), dtype=tl.float32)
+ for k0 in range(0, K, BLOCK_K):
+ offs_k = k0 + tl.arange(0, BLOCK_K)
+ mask_k = offs_k < K
+ x = tl.load(
+ x_ptr + offs_m[:, None] * stride_xm + offs_k[None, :] * stride_xk,
+ mask=mask_m[:, None] & mask_k[None, :],
+ other=0.0,
+ )
+ w = tl.load(
+ w_ptr + offs_n[None, :] * stride_wn + offs_k[:, None] * stride_wk,
+ mask=mask_k[:, None] & mask_n[None, :],
+ other=0.0,
+ )
+ acc += tl.dot(x, w)
+
+ g = tl.load(
+ g_ptr + offs_m[:, None] * stride_gm + offs_n[None, :] * stride_gn,
+ mask=mask_m[:, None] & mask_n[None, :],
+ other=0.0,
+ )
+ out = g * acc.to(g.dtype)
+ tl.store(
+ g_ptr + offs_m[:, None] * stride_gm + offs_n[None, :] * stride_gn,
+ out,
+ mask=mask_m[:, None] & mask_n[None, :],
+ )
+
+ @triton.jit
+ def _fused_gate_up_swiglu_kernel(
+ x_ptr,
+ w_gate_ptr,
+ w_up_ptr,
+ out_ptr,
+ M,
+ K,
+ N,
+ stride_xm,
+ stride_xk,
+ stride_gate_n,
+ stride_gate_k,
+ stride_up_n,
+ stride_up_k,
+ stride_om,
+ stride_on,
+ BLOCK_M: tl.constexpr,
+ BLOCK_N: tl.constexpr,
+ BLOCK_K: tl.constexpr,
+ ):
+ """One x load → gate+up GEMMs → SiLU → gated product into ``out`` (BF16).
+ Rounding matches the unfused BF16 path: SiLU is rounded to BF16 before the
+ product, then ``(silu_f32 * up_f32).to(bf16)`` for the store.
+ """
+ pid_m = tl.program_id(0)
+ pid_n = tl.program_id(1)
+
+ offs_m = pid_m * BLOCK_M + tl.arange(0, BLOCK_M)
+ offs_n = pid_n * BLOCK_N + tl.arange(0, BLOCK_N)
+ mask_m = offs_m < M
+ mask_n = offs_n < N
+
+ gate_acc = tl.zeros((BLOCK_M, BLOCK_N), dtype=tl.float32)
+ up_acc = tl.zeros((BLOCK_M, BLOCK_N), dtype=tl.float32)
+ for k0 in range(0, K, BLOCK_K):
+ offs_k = k0 + tl.arange(0, BLOCK_K)
+ mask_k = offs_k < K
+ x = tl.load(
+ x_ptr + offs_m[:, None] * stride_xm + offs_k[None, :] * stride_xk,
+ mask=mask_m[:, None] & mask_k[None, :],
+ other=0.0,
+ )
+ gate_w = tl.load(
+ w_gate_ptr + offs_n[None, :] * stride_gate_n + offs_k[:, None] * stride_gate_k,
+ mask=mask_k[:, None] & mask_n[None, :],
+ other=0.0,
+ )
+ up_w = tl.load(
+ w_up_ptr + offs_n[None, :] * stride_up_n + offs_k[:, None] * stride_up_k,
+ mask=mask_k[:, None] & mask_n[None, :],
+ other=0.0,
+ )
+ gate_acc += tl.dot(x, gate_w)
+ up_acc += tl.dot(x, up_w)
+
+ silu_bf16 = (gate_acc * tl.sigmoid(gate_acc)).to(tl.bfloat16)
+ product = (silu_bf16.to(tl.float32) * up_acc).to(tl.bfloat16)
+ tl.store(
+ out_ptr + offs_m[:, None] * stride_om + offs_n[None, :] * stride_on,
+ product,
+ mask=mask_m[:, None] & mask_n[None, :],
+ )
+
+
+_DUAL_GATE_UP_DIM_MIN: Final[int] = 256
+_DUAL_GATE_UP_DIM_MAX: Final[int] = 2048
+
+
+def dual_gate_up_triton_eligible(
+ x: torch.Tensor,
+ w_gate: torch.Tensor,
+ w_up: torch.Tensor,
+) -> bool:
+ """True when the fused gate+up SwiGLU Triton kernel can run.
+ Requires BF16 activations/weights, ``hidden == 4 * dim``, and ``dim`` in
+ ``[256, 2048]`` (DiffVAE MLP shapes).
+ """
+ if not triton_swiglu_available() or not x.is_cuda:
+ return False
+ if x.dtype != torch.bfloat16 or w_gate.dtype != torch.bfloat16 or w_up.dtype != torch.bfloat16:
+ return False
+ dim = x.shape[-1]
+ hidden = w_gate.shape[0]
+ if w_up.shape[0] != hidden or w_gate.shape[1] != dim or w_up.shape[1] != dim:
+ return False
+ if hidden != 4 * dim:
+ return False
+ return _DUAL_GATE_UP_DIM_MIN <= dim <= _DUAL_GATE_UP_DIM_MAX
+
+
+def _fused_gate_up_swiglu_triton(
+ x: torch.Tensor,
+ w_gate: torch.Tensor,
+ w_up: torch.Tensor,
+ out: torch.Tensor,
+) -> None:
+ """``out = silu(x @ W_gateᵀ) * (x @ W_upᵀ)`` with one x-tile load (BF16)."""
+ if not _TRITON_AVAILABLE:
+ raise RuntimeError("Triton is not available")
+ m, k = x.shape
+ n = w_gate.shape[0]
+ block_m, block_n, block_k = 64, 64, 32
+ grid = (triton.cdiv(m, block_m), triton.cdiv(n, block_n))
+ _fused_gate_up_swiglu_kernel[grid](
+ x,
+ w_gate,
+ w_up,
+ out,
+ m,
+ k,
+ n,
+ x.stride(0),
+ x.stride(1),
+ w_gate.stride(0),
+ w_gate.stride(1),
+ w_up.stride(0),
+ w_up.stride(1),
+ out.stride(0),
+ out.stride(1),
+ BLOCK_M=block_m,
+ BLOCK_N=block_n,
+ BLOCK_K=block_k,
+ )
+
+
+def _fused_up_mul_triton(x: torch.Tensor, w_up: torch.Tensor, silu_gate: torch.Tensor) -> None:
+ """Inplace: ``silu_gate *= (x @ w_up.T)``."""
+ if not _TRITON_AVAILABLE:
+ raise RuntimeError("Triton is not available")
+ m, k = x.shape
+ n = w_up.shape[0]
+ block_m, block_n, block_k = 64, 64, 32
+ grid = (triton.cdiv(m, block_m), triton.cdiv(n, block_n))
+ _fused_up_mul_kernel[grid](
+ x,
+ w_up,
+ silu_gate,
+ m,
+ k,
+ n,
+ x.stride(0),
+ x.stride(1),
+ w_up.stride(0),
+ w_up.stride(1),
+ silu_gate.stride(0),
+ silu_gate.stride(1),
+ BLOCK_M=block_m,
+ BLOCK_N=block_n,
+ BLOCK_K=block_k,
+ )
+
+
+def _fused_up_mul_torch(x: torch.Tensor, w_up: torch.Tensor, silu_gate: torch.Tensor) -> None:
+ """PyTorch fallback: temporary ``up`` chunk, then inplace mul into ``silu_gate``."""
+ up = F.linear(x, w_up)
+ silu_gate.mul_(up)
+
+
+def swiglu(
+ x: torch.Tensor,
+ w_gate: torch.Tensor,
+ w_up: torch.Tensor,
+ w_down: torch.Tensor,
+) -> torch.Tensor:
+ """Reference: ``w_down(silu(x@W_gateᵀ) * (x@W_upᵀ))`` (full materialization)."""
+ return F.linear(F.silu(F.linear(x, w_gate)) * F.linear(x, w_up), w_down)
+
+
+def _tile_from_op_args(tile_size: int, num_tiles: int) -> SwiGLUTileSpec:
+ """Decode custom_op int knobs: exactly one of ``tile_size`` / ``num_tiles`` is > 0."""
+ if (tile_size > 0) == (num_tiles > 0):
+ raise ValueError(f"need exactly one of tile_size>0 or num_tiles>0, got {tile_size=}, {num_tiles=}")
+ if tile_size > 0:
+ return SwiGLUTileSpec(tile_size=tile_size)
+ return SwiGLUTileSpec(num_tiles=num_tiles)
+
+
+def _swiglu_chunked_impl(
+ x: torch.Tensor,
+ w_gate: torch.Tensor,
+ w_up: torch.Tensor,
+ w_down: torch.Tensor,
+ intervals: list[DimensionInterval],
+ *,
+ use_triton: bool,
+) -> torch.Tensor:
+ """Chunked SwiGLU: one reusable ``(chunk, hidden)`` workspace (runs via custom_op)."""
+ if use_triton and not triton_swiglu_available():
+ raise RuntimeError("use_triton=True but Triton/CUDA is unavailable")
+
+ # RMSNorm under bf16 autocast can leave activations in float32 while Linear weights
+ # stay bf16. Inside this custom_op autocast does not cast for ``torch.mm``.
+ if x.dtype != w_gate.dtype:
+ x = x.to(dtype=w_gate.dtype)
+
+ leading = x.shape[:-1]
+ dim = x.shape[-1]
+ x_flat = x.reshape(-1, dim).contiguous()
+ n_tok = x_flat.shape[0]
+ hidden = w_gate.shape[0]
+ if w_up.shape[0] != hidden or w_gate.shape[1] != dim or w_up.shape[1] != dim:
+ raise ValueError(
+ f"weight shapes incompatible with x[..., {dim}]: gate={tuple(w_gate.shape)} up={tuple(w_up.shape)}"
+ )
+ if w_down.shape[1] != hidden or w_down.shape[0] != dim:
+ raise ValueError(f"w_down {tuple(w_down.shape)} incompatible with hidden={hidden} dim={dim}")
+ if n_tok == 0:
+ return x
+
+ out_flat = torch.empty((n_tok, dim), device=x.device, dtype=x.dtype)
+ max_chunk = max((iv.end - iv.start for iv in intervals), default=0)
+ workspace = torch.empty((max_chunk, hidden), device=x.device, dtype=x.dtype)
+ use_dual = bool(use_triton) and dual_gate_up_triton_eligible(x_flat, w_gate, w_up)
+ w_gate_c = w_gate.contiguous() if use_dual else w_gate
+ w_up_c = w_up.contiguous() if use_triton else w_up
+
+ for iv in intervals:
+ start, end = iv.start, iv.end
+ if start >= end:
+ continue
+ xc = x_flat[start:end]
+ ws = workspace[: end - start]
+ if use_dual:
+ _fused_gate_up_swiglu_triton(xc, w_gate_c, w_up_c, ws)
+ else:
+ torch.mm(xc, w_gate.t(), out=ws)
+ F.silu(ws, inplace=True)
+ if use_triton:
+ _fused_up_mul_triton(xc, w_up_c, ws)
+ else:
+ _fused_up_mul_torch(xc, w_up, ws)
+ torch.mm(ws, w_down.t(), out=out_flat[start:end])
+
+ return out_flat.view(*leading, dim)
+
+
[email protected]_op("ltx_core::swiglu_tiled", mutates_args=())
+def _swiglu_tiled_op(
+ x: torch.Tensor,
+ w_gate: torch.Tensor,
+ w_up: torch.Tensor,
+ w_down: torch.Tensor,
+ tile_size: int,
+ num_tiles: int,
+ use_triton: bool,
+) -> torch.Tensor:
+ """Opaque op: memory-efficient chunked SwiGLU (compile-friendly; no Dynamo unroll)."""
+ tile = _tile_from_op_args(tile_size, num_tiles)
+ n_tok = x.reshape(-1, x.shape[-1]).shape[0]
+ return _swiglu_chunked_impl(x, w_gate, w_up, w_down, token_intervals(n_tok, tile), use_triton=use_triton)
+
+
+@_swiglu_tiled_op.register_fake
+def _swiglu_tiled_fake(
+ x: torch.Tensor,
+ w_gate: torch.Tensor,
+ w_up: torch.Tensor,
+ w_down: torch.Tensor,
+ tile_size: int,
+ num_tiles: int,
+ use_triton: bool,
+) -> torch.Tensor:
+ del w_gate, w_up, w_down, tile_size, num_tiles, use_triton
+ return torch.empty(x.shape, device=x.device, dtype=x.dtype)
+
+
+def swiglu_tiled(
+ x: torch.Tensor,
+ w_gate: torch.Tensor,
+ w_up: torch.Tensor,
+ w_down: torch.Tensor,
+ tile: SwiGLUTileSpec,
+ *,
+ use_triton: bool | None = None,
+) -> torch.Tensor:
+ """Memory-efficient SwiGLU on the full activation; tiling is internal (custom_op)."""
+ tile_size = int(tile.tile_size) if tile.tile_size is not None else 0
+ num_tiles = int(tile.num_tiles) if tile.num_tiles is not None else 0
+ if use_triton is None:
+ use_triton = triton_swiglu_available() and x.is_cuda
+ return _swiglu_tiled_op(x, w_gate, w_up, w_down, tile_size, num_tiles, bool(use_triton))
+
+
+def plain_mlp(x: torch.Tensor, mlp: nn.Module, norm: nn.RMSNorm, tile: SwiGLUTileSpec) -> torch.Tensor:
+ """Det ``NABlock``: ``x + swiglu_tiled(norm(x))`` (no AdaLN)."""
+ y = norm(x)
+ if y.numel() == 0:
+ return x
+ return x + swiglu_tiled(y, mlp.w_gate.weight, mlp.w_up.weight, mlp.w_down.weight, tile)
+
+
+class SwiGLU(nn.Module):
+ """Gated MLP weights: ``w_down(silu(w_gate(x)) * w_up(x))``."""
+
+ def __init__(
+ self,
+ dim: int,
+ hidden_dim: int,
+ tile: SwiGLUTileSpec = DEFAULT_SWIGLU_TILE_SPEC,
+ ) -> None:
+ super().__init__()
+ self.w_up = nn.Linear(dim, hidden_dim, bias=False)
+ self.w_gate = nn.Linear(dim, hidden_dim, bias=False)
+ self.w_down = nn.Linear(hidden_dim, dim, bias=False)
+ self.tile = tile
+
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
+ """Tiled SwiGLU on ``x`` (tests / direct calls). Block residuals use pathway fns."""
+ if x.numel() == 0:
+ return x
+ return swiglu_tiled(
+ x,
+ self.w_gate.weight,
+ self.w_up.weight,
+ self.w_down.weight,
+ self.tile,
+ )
+
+
+def configure_swiglu_tile(
+ module_root: nn.Module,
+ *,
+ num_tiles: int | None = None,
+ tile_size: int | None = None,
+) -> None:
+ """Set tile spec on every ``SwiGLU`` under ``module_root``.
+ Pass exactly one of ``num_tiles`` or ``tile_size``. Calling with both omitted
+ is a no-op (leaves each module's existing ``tile``).
+ """
+ if num_tiles is None and tile_size is None:
+ return
+ tile = SwiGLUTileSpec(num_tiles=num_tiles, tile_size=tile_size)
+ for module in module_root.modules():
+ if isinstance(module, SwiGLU):
+ module.tile = tile
diff --git a/packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py b/packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py
index f75dbcc..e743ba7 100644
--- a/packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py
+++ b/packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py
@@ -1,34 +1,35 @@
+import itertools
import logging
-from typing import Any, Callable, Iterator, List, Tuple
+from typing import Any, Callable, Iterator, List, Protocol, Tuple
import torch
-from einops import rearrange
from torch import nn
from ltx_core.model.common.normalization import PixelNorm
-from ltx_core.model.transformer.timestep_embedding import PixArtAlphaCombinedTimestepSizeEmbeddings
+from ltx_core.model.disposable import Disposable
+from ltx_core.model.transformer.attention import AttentionCallable, AttentionFunction
+from ltx_core.model.video_vae.attention import AttnBlock3D
from ltx_core.model.video_vae.convolution import make_conv_nd
from ltx_core.model.video_vae.enums import LogVarianceType, NormLayerType, PaddingModeType
-from ltx_core.model.video_vae.ops import PerChannelStatistics, patchify, unpatchify
+from ltx_core.model.video_vae.ops import PerChannelStatistics, patchify
from ltx_core.model.video_vae.resnet import ResnetBlock3D, UNetMidBlock3D
-from ltx_core.model.video_vae.sampling import DepthToSpaceUpsample, SpaceToDepthDownsample
-from ltx_core.model.video_vae.tiling import TilingConfig
+from ltx_core.model.video_vae.sampling import SpaceToDepthDownsample
from ltx_core.tiling import (
DEFAULT_MAPPING_OPERATION,
DEFAULT_SPLIT_OPERATION,
DimensionIntervals,
MappingOperation,
Tile,
+ TileCountConfig,
+ TileSizeConfig,
+ TilingConfig,
+ _validate_overlap,
compute_rectangular_mask_1d,
compute_trapezoidal_mask_1d,
create_tiles,
- split_temporal,
-)
-from ltx_core.tiling import (
- split_by_size as split_in_spatial,
-)
-from ltx_core.tiling import (
- split_temporal_causal as split_in_temporal,
+ masks_are_complementary,
+ scale_by_masks_1d,
+ untiled_mask_1d,
)
from ltx_core.types import VIDEO_SCALE_FACTORS, SpatioTemporalScaleFactors, VideoLatentShape
@@ -43,6 +44,7 @@ def _make_encoder_block(
norm_layer: NormLayerType,
norm_num_groups: int,
spatial_padding_mode: PaddingModeType,
+ attention: AttentionFunction | AttentionCallable,
) -> Tuple[nn.Module, int]:
out_channels = in_channels
@@ -135,13 +137,15 @@ def _make_encoder_block(
stride=(2, 1, 1),
spatial_padding_mode=spatial_padding_mode,
)
+ elif block_name == "attn":
+ block = AttnBlock3D(in_channels=in_channels, attention=attention)
else:
raise ValueError(f"unknown block: {block_name}")
return block, out_channels
-class VideoEncoder(nn.Module):
+class VideoEncoder(nn.Module, Disposable):
_DEFAULT_NORM_NUM_GROUPS = 32
"""
Variational Autoencoder Encoder. Encodes video frames into a latent representation.
@@ -183,6 +187,7 @@ class VideoEncoder(nn.Module):
norm_layer: NormLayerType = NormLayerType.PIXEL_NORM,
latent_log_var: LogVarianceType = LogVarianceType.UNIFORM,
encoder_spatial_padding_mode: PaddingModeType = PaddingModeType.ZEROS,
+ attention: AttentionFunction | AttentionCallable = AttentionFunction.PYTORCH,
):
super().__init__()
@@ -191,6 +196,8 @@ class VideoEncoder(nn.Module):
self.latent_channels = out_channels
self.latent_log_var = latent_log_var
self._norm_num_groups = self._DEFAULT_NORM_NUM_GROUPS
+ # Spatiotemporal downscaling derived from the block list (see SpatioTemporalScaleFactors.from_blocks).
+ self.video_scale_factors = SpatioTemporalScaleFactors.from_blocks(encoder_blocks, patch_size)
# Per-channel statistics for normalizing latents
self.per_channel_statistics = PerChannelStatistics(latent_channels=out_channels)
@@ -223,6 +230,7 @@ class VideoEncoder(nn.Module):
norm_layer=norm_layer,
norm_num_groups=self._norm_num_groups,
spatial_padding_mode=encoder_spatial_padding_mode,
+ attention=attention,
)
self.down_blocks.append(block)
@@ -265,13 +273,15 @@ class VideoEncoder(nn.Module):
Example: (B, 3, 33, 512, 512) -> (B, 128, 5, 16, 16).
"""
# Validate frame count (crop to nearest valid length if needed)
+ temporal_factor = self.video_scale_factors.time
frames_count = sample.shape[2]
- if ((frames_count - 1) % 8) != 0:
- frames_to_crop = (frames_count - 1) % 8
+ if ((frames_count - 1) % temporal_factor) != 0:
+ frames_to_crop = (frames_count - 1) % temporal_factor
logger.warning(
- "Invalid number of frames %s for encode; cropping last %s frames to satisfy 1 + 8*k.",
+ "Invalid number of frames %s for encode; cropping last %s frames to satisfy 1 + %s*k.",
frames_count,
frames_to_crop,
+ temporal_factor,
)
sample = sample[:, :, :-frames_to_crop, ...]
@@ -351,10 +361,10 @@ class VideoEncoder(nn.Module):
batch, _, frames, height, width = video.shape
# Check frame count and crop if needed
- if (frames - 1) % VIDEO_SCALE_FACTORS.time != 0:
- frames_to_crop = (frames - 1) % VIDEO_SCALE_FACTORS.time
+ if (frames - 1) % self.video_scale_factors.time != 0:
+ frames_to_crop = (frames - 1) % self.video_scale_factors.time
logger.warning(
- f"Number of frames {frames} of input video is not ({VIDEO_SCALE_FACTORS.time} * k + 1), "
+ f"Number of frames {frames} of input video is not ({self.video_scale_factors.time} * k + 1), "
f"last {frames_to_crop} frames will be cropped"
)
video = video[:, :, :-frames_to_crop, ...]
@@ -365,13 +375,14 @@ class VideoEncoder(nn.Module):
latent_shape = VideoLatentShape(
batch=batch,
channels=self.latent_channels, # 128 for standard VAE
- frames=(frames - 1) // VIDEO_SCALE_FACTORS.time + 1,
- height=height // VIDEO_SCALE_FACTORS.height,
- width=width // VIDEO_SCALE_FACTORS.width,
+ frames=(frames - 1) // self.video_scale_factors.time + 1,
+ height=height // self.video_scale_factors.height,
+ width=width // self.video_scale_factors.width,
)
# Prepare tiles (operates on VIDEO dimensions)
- tiles = prepare_tiles_for_encoding(video, tiling_config)
+ tiles = prepare_tiles_for_encoding(video, tiling_config, scale_factors=self.video_scale_factors)
+ complementary = masks_are_complementary(tiles, latent_shape.to_torch_shape())
# Initialize accumulation buffers on model device
latent_buffer = torch.zeros(
@@ -379,7 +390,7 @@ class VideoEncoder(nn.Module):
device=model_device,
dtype=model_dtype,
)
- weights_buffer = torch.zeros_like(latent_buffer)
+ weights_buffer: torch.Tensor | None = None if complementary else torch.zeros_like(latent_buffer)
# Process each tile
for tile in tiles:
@@ -393,19 +404,16 @@ class VideoEncoder(nn.Module):
# Encode tile to latent (output on model device)
latent_tile = self.forward(video_tile)
- # Move blend mask to model device
- mask = tile.blend_mask.to(
- device=model_device,
- dtype=model_dtype,
- )
-
- # Weighted accumulation in latent space
- latent_buffer[tile.out_coords] += latent_tile * mask
- weights_buffer[tile.out_coords] += mask
+ masks = tuple(m.to(device=model_device, dtype=torch.float32) for m in tile.masks_1d)
+ latent_buffer[tile.out_coords] += scale_by_masks_1d(latent_tile, masks)
+ if weights_buffer is not None:
+ strength = torch.ones(latent_tile.shape, device=model_device, dtype=torch.float32)
+ weights_buffer[tile.out_coords] += scale_by_masks_1d(strength, masks)
- del latent_tile, mask, video_tile
+ del latent_tile, video_tile
- # Normalize by accumulated weights
+ if weights_buffer is None:
+ return latent_buffer
weights_buffer = weights_buffer.clamp(min=1e-8)
return latent_buffer / weights_buffer
@@ -413,605 +421,104 @@ class VideoEncoder(nn.Module):
def prepare_tiles_for_encoding(
video: torch.Tensor,
tiling_config: TilingConfig | None = None,
+ scale_factors: SpatioTemporalScaleFactors = VIDEO_SCALE_FACTORS,
) -> List[Tile]:
"""Prepare tiles for VAE encoding.
+ Splits on the latent grid via ``tiling_config.to_splitters``, maps each
+ interval to pixel ``in_coords`` (encode-specific) and latent ``out_coords``,
+ and builds :class:`~ltx_core.tiling.Tile` values. Size- and count-based
+ configs share this path.
Args:
video: Input video tensor (B, 3, F, H, W) in range [-1, 1]
- tiling_config: Tiling configuration for the video tensor
+ tiling_config: Size- or count-based tiling configuration
Returns:
List of tiles for the video tensor
"""
-
- splitters = [DEFAULT_SPLIT_OPERATION] * len(video.shape)
- mappers = [DEFAULT_MAPPING_OPERATION] * len(video.shape)
- minimum_spatial_overlap_px = 64
- minimum_temporal_overlap_frames = 16
-
- if tiling_config is not None and tiling_config.spatial_config is not None:
- cfg = tiling_config.spatial_config
-
- tile_size_px = cfg.tile_size_in_pixels
- overlap_px = cfg.tile_overlap_in_pixels
-
- # Set minimum spatial overlap to 64 pixels in order to allow cutting padding from
- # the front and back of the tiles and concatenate tiles without artifacts.
- # The encoder uses symmetric padding (pad=1) in H and W at each conv layer. At tile
- # boundaries, convs see padding (zeros/reflect) instead of real neighbor pixels, causing
- # incorrect context near edges.
- # For each overlap we discard 1 latent per edge (32px at scale 32) and concatenate tiles at a
- # shared region with the next tile.
- if overlap_px < minimum_spatial_overlap_px:
- logger.warning(
- f"Overlap pixels {overlap_px} in spatial tiling is less than \
- {minimum_spatial_overlap_px}, setting to minimum required {minimum_spatial_overlap_px}"
- )
- overlap_px = minimum_spatial_overlap_px
-
- # Define split and map operations for the spatial dimensions
-
- # Height axis (H)
- splitters[3] = split_in_spatial(tile_size_px, overlap_px)
- mappers[3] = to_mapping_operation(map_spatial_interval_to_latent, scale=VIDEO_SCALE_FACTORS.height)
-
- # Width axis (W)
- splitters[4] = split_in_spatial(tile_size_px, overlap_px)
- mappers[4] = to_mapping_operation(map_spatial_interval_to_latent, scale=VIDEO_SCALE_FACTORS.width)
-
- if tiling_config is not None and tiling_config.temporal_config is not None:
- cfg = tiling_config.temporal_config
- tile_size_frames = cfg.tile_size_in_frames
- overlap_frames = cfg.tile_overlap_in_frames
-
- if overlap_frames < minimum_temporal_overlap_frames:
- logger.warning(f"Overlap frames {overlap_frames} is less than 16, setting to minimum required 16")
- overlap_frames = minimum_temporal_overlap_frames
-
- splitters[2] = split_temporal(tile_size_frames, overlap_frames)
- mappers[2] = to_mapping_operation(map_temporal_interval_to_latent, scale=VIDEO_SCALE_FACTORS.time)
-
- return create_tiles(video.shape, splitters, mappers)
-
-
-def _make_decoder_block(
- block_name: str,
- block_config: dict[str, Any],
- in_channels: int,
- convolution_dimensions: int,
- norm_layer: NormLayerType,
- timestep_conditioning: bool,
- norm_num_groups: int,
- spatial_padding_mode: PaddingModeType,
-) -> Tuple[nn.Module, int]:
- out_channels = in_channels
- if block_name == "res_x":
- block = UNetMidBlock3D(
- dims=convolution_dimensions,
- in_channels=in_channels,
- num_layers=block_config["num_layers"],
- resnet_eps=1e-6,
- resnet_groups=norm_num_groups,
- norm_layer=norm_layer,
- inject_noise=block_config.get("inject_noise", False),
- timestep_conditioning=timestep_conditioning,
- spatial_padding_mode=spatial_padding_mode,
- )
- elif block_name == "attn_res_x":
- block = UNetMidBlock3D(
- dims=convolution_dimensions,
- in_channels=in_channels,
- num_layers=block_config["num_layers"],
- resnet_groups=norm_num_groups,
- norm_layer=norm_layer,
- inject_noise=block_config.get("inject_noise", False),
- timestep_conditioning=timestep_conditioning,
- attention_head_dim=block_config["attention_head_dim"],
- spatial_padding_mode=spatial_padding_mode,
+ if tiling_config is None:
+ return create_tiles(
+ video.shape,
+ [DEFAULT_SPLIT_OPERATION] * len(video.shape),
+ [DEFAULT_MAPPING_OPERATION] * len(video.shape),
)
- elif block_name == "res_x_y":
- out_channels = in_channels // block_config.get("multiplier", 2)
- block = ResnetBlock3D(
- dims=convolution_dimensions,
- in_channels=in_channels,
- out_channels=out_channels,
- eps=1e-6,
- groups=norm_num_groups,
- norm_layer=norm_layer,
- inject_noise=block_config.get("inject_noise", False),
- timestep_conditioning=False,
- spatial_padding_mode=spatial_padding_mode,
- )
- elif block_name == "compress_time":
- out_channels = in_channels // block_config.get("multiplier", 1)
- block = DepthToSpaceUpsample(
- dims=convolution_dimensions,
- in_channels=in_channels,
- stride=(2, 1, 1),
- out_channels_reduction_factor=block_config.get("multiplier", 1),
- spatial_padding_mode=spatial_padding_mode,
- )
- elif block_name == "compress_space":
- out_channels = in_channels // block_config.get("multiplier", 1)
- block = DepthToSpaceUpsample(
- dims=convolution_dimensions,
- in_channels=in_channels,
- stride=(1, 2, 2),
- out_channels_reduction_factor=block_config.get("multiplier", 1),
- spatial_padding_mode=spatial_padding_mode,
- )
- elif block_name == "compress_all":
- out_channels = in_channels // block_config.get("multiplier", 1)
- block = DepthToSpaceUpsample(
- dims=convolution_dimensions,
- in_channels=in_channels,
- stride=(2, 2, 2),
- residual=block_config.get("residual", False),
- out_channels_reduction_factor=block_config.get("multiplier", 1),
- spatial_padding_mode=spatial_padding_mode,
- )
- else:
- raise ValueError(f"unknown layer: {block_name}")
-
- return block, out_channels
-
-class VideoDecoder(nn.Module):
- _DEFAULT_NORM_NUM_GROUPS = 32
- """
- Variational Autoencoder Decoder. Decodes latent representation into video frames.
- The decoder upsamples latents through a series of upsampling operations (inverse of encoder).
- Output dimensions: F = 8x(F'-1) + 1, H = 32xH', W = 32xW' for standard LTX Video configuration.
- Upsampling blocks expand dimensions by 2x in specified dimensions:
- - "compress_time": temporal only
- - "compress_space": spatial only (H and W)
- - "compress_all": all dimensions (F, H, W)
- - "res_x" / "res_x_y" / "attn_res_x": no upsampling
- Causal Mode:
- causal=False (standard): Symmetric padding, allows future frame dependencies.
- causal=True: Causal padding, each frame depends only on past/current frames.
- First frame removed after temporal upsampling in both modes. Output shape unchanged.
- Example: (B, 128, 5, 16, 16) -> (B, 3, 33, 512, 512) for both modes.
- Args:
- convolution_dimensions: The number of dimensions to use in convolutions (2D or 3D).
- in_channels: The number of input channels (latent channels). Default is 128.
- out_channels: The number of output channels. For RGB images, this is 3.
- decoder_blocks: The list of blocks to construct the decoder. Each block is a tuple of (block_name, params)
- where params is either an int (num_layers) or a dict with configuration.
- patch_size: Final spatial expansion factor. For standard LTX Video, use 4 for 4x spatial expansion:
- H -> Hx4, W -> Wx4. Should be a power of 2.
- norm_layer: The normalization layer to use. Can be either `group_norm` or `pixel_norm`.
- causal: Whether to use causal convolutions. For standard LTX Video, use False for symmetric padding.
- When True, uses causal padding (past/current frames only).
- timestep_conditioning: Whether to condition the decoder on timestep for denoising.
- """
-
- def __init__(
- self,
- convolution_dimensions: int = 3,
- in_channels: int = 128,
- out_channels: int = 3,
- decoder_blocks: List[Tuple[str, int | dict]] = [], # noqa: B006
- patch_size: int = 4,
- norm_layer: NormLayerType = NormLayerType.PIXEL_NORM,
- causal: bool = False,
- timestep_conditioning: bool = False,
- decoder_spatial_padding_mode: PaddingModeType = PaddingModeType.REFLECT,
- base_channels: int = 128,
- ):
- super().__init__()
-
- # Spatiotemporal downscaling between decoded video space and VAE latents.
- # According to the LTXV paper, the standard configuration downsamples
- # video inputs by a factor of 8 in the temporal dimension and 32 in
- # each spatial dimension (height and width). This parameter determines how
- # many video frames and pixels correspond to a single latent cell.
- self.video_downscale_factors = SpatioTemporalScaleFactors(
- time=8,
- height=32,
- width=32,
- )
-
- self.patch_size = patch_size
- out_channels = out_channels * patch_size**2
- self.causal = causal
- self.timestep_conditioning = timestep_conditioning
- self._norm_num_groups = self._DEFAULT_NORM_NUM_GROUPS
-
- # Per-channel statistics for denormalizing latents
- self.per_channel_statistics = PerChannelStatistics(latent_channels=in_channels)
-
- # Noise and timestep parameters for decoder conditioning
- self.decode_noise_scale = 0.025
- self.decode_timestep = 0.05
-
- # LTX VAE decoder architecture uses 3 upsampler blocks with multiplier equals to 2.
- # Hence the total feature_channels is multiplied by 8 (2^3).
- feature_channels = base_channels * 8
-
- self.conv_in = make_conv_nd(
- dims=convolution_dimensions,
- in_channels=in_channels,
- out_channels=feature_channels,
- kernel_size=3,
- stride=1,
- padding=1,
- causal=True,
- spatial_padding_mode=decoder_spatial_padding_mode,
- )
-
- self.up_blocks = nn.ModuleList([])
-
- for block_name, block_params in list(reversed(decoder_blocks)):
- # Convert int to dict format for uniform handling
- block_config = {"num_layers": block_params} if isinstance(block_params, int) else block_params
-
- block, feature_channels = _make_decoder_block(
- block_name=block_name,
- block_config=block_config,
- in_channels=feature_channels,
- convolution_dimensions=convolution_dimensions,
- norm_layer=norm_layer,
- timestep_conditioning=timestep_conditioning,
- norm_num_groups=self._norm_num_groups,
- spatial_padding_mode=decoder_spatial_padding_mode,
+ # Conv-VAE encode needs enough overlap to discard symmetric-pad edge artifacts.
+ _validate_overlap(tiling_config, min_overlap_frames=16, min_overlap_pixels=64)
+ _, _, frames, height, width = video.shape
+ latent_frames = (frames - 1) // scale_factors.time + 1
+ latent_height = height // scale_factors.height
+ latent_width = width // scale_factors.width
+ t_split, h_split, w_split = tiling_config.to_splitters(scale_factors, causal_temporal=True)
+ t_intervals = t_split(latent_frames).intervals
+ h_intervals = h_split(latent_height).intervals
+ w_intervals = w_split(latent_width).intervals
+
+ tiles: List[Tile] = []
+ for t_iv, h_iv, w_iv in itertools.product(t_intervals, h_intervals, w_intervals):
+ t_in, _ = map_temporal_slice(t_iv.start, t_iv.end, t_iv.left_ramp, t_iv.right_ramp, scale_factors.time)
+ h_in, _ = map_spatial_slice(h_iv.start, h_iv.end, h_iv.left_ramp, h_iv.right_ramp, scale_factors.height)
+ w_in, _ = map_spatial_slice(w_iv.start, w_iv.end, w_iv.left_ramp, w_iv.right_ramp, scale_factors.width)
+ tiles.append(
+ Tile(
+ in_coords=(slice(None), slice(None), t_in, h_in, w_in),
+ out_coords=(
+ slice(None),
+ slice(None),
+ slice(t_iv.start, t_iv.end),
+ slice(h_iv.start, h_iv.end),
+ slice(w_iv.start, w_iv.end),
+ ),
+ masks_1d=(
+ untiled_mask_1d(),
+ untiled_mask_1d(),
+ compute_trapezoidal_mask_1d(t_iv.end - t_iv.start, t_iv.left_ramp, t_iv.right_ramp, True),
+ compute_trapezoidal_mask_1d(h_iv.end - h_iv.start, h_iv.left_ramp, h_iv.right_ramp, False),
+ compute_trapezoidal_mask_1d(w_iv.end - w_iv.start, w_iv.left_ramp, w_iv.right_ramp, False),
+ ),
)
-
- self.up_blocks.append(block)
-
- if norm_layer == NormLayerType.GROUP_NORM:
- self.conv_norm_out = nn.GroupNorm(num_channels=feature_channels, num_groups=self._norm_num_groups, eps=1e-6)
- elif norm_layer == NormLayerType.PIXEL_NORM:
- self.conv_norm_out = PixelNorm()
-
- self.conv_act = nn.SiLU()
- self.conv_out = make_conv_nd(
- dims=convolution_dimensions,
- in_channels=feature_channels,
- out_channels=out_channels,
- kernel_size=3,
- padding=1,
- causal=True,
- spatial_padding_mode=decoder_spatial_padding_mode,
)
+ return tiles
- if timestep_conditioning:
- self.timestep_scale_multiplier = nn.Parameter(torch.tensor(1000.0))
- self.last_time_embedder = PixArtAlphaCombinedTimestepSizeEmbeddings(
- embedding_dim=feature_channels * 2, size_emb_dim=0
- )
- self.last_scale_shift_table = nn.Parameter(torch.empty(2, feature_channels))
-
- def forward(
- self,
- sample: torch.Tensor,
- timestep: torch.Tensor | None = None,
- generator: torch.Generator | None = None,
- ) -> torch.Tensor:
- r"""
- Decode latent representation into video frames.
- Args:
- sample: Latent tensor (B, 128, F', H', W').
- timestep: Timestep for conditioning (if timestep_conditioning=True). Uses default 0.05 if None.
- generator: Random generator for deterministic noise injection (if inject_noise=True in blocks).
- Returns:
- Decoded video (B, 3, F, H, W) where F = 8x(F'-1) + 1, H = 32xH', W = 32xW'.
- Example: (B, 128, 5, 16, 16) -> (B, 3, 33, 512, 512).
- Note: First frame is removed after temporal upsampling regardless of causal mode.
- When causal=False, allows future frame dependencies in convolutions but maintains same output shape.
- """
- batch_size = sample.shape[0]
- output_dtype = sample.dtype
- weights_dtype = next(self.parameters()).dtype
- sample = sample.to(weights_dtype)
-
- # Add noise if timestep conditioning is enabled
- if self.timestep_conditioning:
- noise = (
- torch.randn(
- sample.size(),
- generator=generator,
- dtype=sample.dtype,
- device=sample.device,
- )
- * self.decode_noise_scale
- )
-
- sample = noise + (1.0 - self.decode_noise_scale) * sample
-
- # Denormalize latents
- sample = self.per_channel_statistics.un_normalize(sample)
-
- # Use default decode_timestep if timestep not provided
- if timestep is None and self.timestep_conditioning:
- timestep = torch.full((batch_size,), self.decode_timestep, device=sample.device, dtype=sample.dtype)
-
- sample = self.conv_in(sample, causal=self.causal)
-
- scaled_timestep = None
- if self.timestep_conditioning:
- if timestep is None:
- raise ValueError("'timestep' parameter must be provided when 'timestep_conditioning' is True")
- scaled_timestep = timestep * self.timestep_scale_multiplier.to(sample)
-
- for up_block in self.up_blocks:
- if isinstance(up_block, UNetMidBlock3D):
- block_kwargs = {
- "causal": self.causal,
- "timestep": scaled_timestep if self.timestep_conditioning else None,
- "generator": generator,
- }
- sample = up_block(sample, **block_kwargs)
- elif isinstance(up_block, ResnetBlock3D):
- sample = up_block(sample, causal=self.causal, generator=generator)
- else:
- sample = up_block(sample, causal=self.causal)
-
- sample = self.conv_norm_out(sample)
-
- if self.timestep_conditioning:
- embedded_timestep = self.last_time_embedder(
- timestep=scaled_timestep.flatten(),
- hidden_dtype=sample.dtype,
- )
- embedded_timestep = embedded_timestep.view(batch_size, embedded_timestep.shape[-1], 1, 1, 1)
- ada_values = self.last_scale_shift_table[None, ..., None, None, None].to(
- device=sample.device, dtype=sample.dtype
- ) + embedded_timestep.reshape(
- batch_size,
- 2,
- -1,
- embedded_timestep.shape[-3],
- embedded_timestep.shape[-2],
- embedded_timestep.shape[-1],
- )
- shift, scale = ada_values.unbind(dim=1)
- sample = sample * (1 + scale) + shift
-
- sample = self.conv_act(sample)
- sample = self.conv_out(sample, causal=self.causal)
-
- # Final spatial expansion: reverse the initial patchify from encoder
- # Moves pixels from channels back to spatial dimensions
- # Example: (B, 48, F, 128, 128) -> (B, 3, F, 512, 512) with patch_size=4
- sample = unpatchify(sample, patch_size_hw=self.patch_size, patch_size_t=1)
-
- return sample.to(output_dtype)
-
- def _prepare_tiles(
- self,
- latent: torch.Tensor,
- tiling_config: TilingConfig | None = None,
- ) -> List[Tile]:
- splitters = [DEFAULT_SPLIT_OPERATION] * len(latent.shape)
- mappers = [DEFAULT_MAPPING_OPERATION] * len(latent.shape)
- if tiling_config is not None and tiling_config.spatial_config is not None:
- cfg = tiling_config.spatial_config
- long_side = max(latent.shape[3], latent.shape[4])
-
- def enable_on_axis(axis_idx: int, factor: int) -> None:
- size = cfg.tile_size_in_pixels // factor
- overlap = cfg.tile_overlap_in_pixels // factor
- axis_length = latent.shape[axis_idx]
- lower_threshold = max(2, overlap + 1)
- tile_size = max(lower_threshold, round(size * axis_length / long_side))
- splitters[axis_idx] = split_in_spatial(tile_size, overlap)
- mappers[axis_idx] = to_mapping_operation(map_spatial_slice, scale=factor)
-
- enable_on_axis(3, self.video_downscale_factors.height)
- enable_on_axis(4, self.video_downscale_factors.width)
-
- if tiling_config is not None and tiling_config.temporal_config is not None:
- cfg = tiling_config.temporal_config
- tile_size = cfg.tile_size_in_frames // self.video_downscale_factors.time
- overlap = cfg.tile_overlap_in_frames // self.video_downscale_factors.time
- splitters[2] = split_in_temporal(tile_size, overlap)
- mappers[2] = to_mapping_operation(map_temporal_slice, scale=self.video_downscale_factors.time)
-
- return create_tiles(latent.shape, splitters, mappers)
-
- def tiled_decode(
- self,
- latent: torch.Tensor,
- tiling_config: TilingConfig | None = None,
- timestep: torch.Tensor | None = None,
- generator: torch.Generator | None = None,
- ) -> Iterator[torch.Tensor]:
- """
- Decode a latent tensor into video frames using tiled processing.
- Splits the latent tensor into tiles, decodes each tile individually,
- and yields video chunks as they become available.
- Args:
- latent: Input latent tensor (B, C, F', H', W').
- tiling_config: Tiling configuration for the latent tensor.
- timestep: Optional timestep for decoder conditioning.
- generator: Optional random generator for deterministic decoding.
- Yields:
- Video chunks (B, C, T, H, W) by temporal slices;
- """
-
- # Calculate full video shape from latent shape to get spatial dimensions
- full_video_shape = VideoLatentShape.from_torch_shape(latent.shape).upscale(self.video_downscale_factors)
- tiles = self._prepare_tiles(latent, tiling_config)
- temporal_groups = self._group_tiles_by_temporal_slice(tiles)
-
- # State for temporal overlap handling
- previous_chunk = None
- previous_weights = None
- previous_temporal_slice = None
-
- for temporal_group_tiles in temporal_groups:
- curr_temporal_slice = temporal_group_tiles[0].out_coords[2]
-
- # Calculate the shape of the temporal buffer for this group of tiles.
- # The temporal length depends on whether this is the first tile (starts at 0) or not.
- # - First tile: (frames - 1) * scale + 1
- # - Subsequent tiles: frames * scale
- # This logic is handled by TemporalAxisMapping and reflected in out_coords.
- temporal_tile_buffer_shape = full_video_shape._replace(
- frames=curr_temporal_slice.stop - curr_temporal_slice.start,
- )
-
- buffer = torch.zeros(
- temporal_tile_buffer_shape.to_torch_shape(),
- device=latent.device,
- dtype=latent.dtype,
- )
-
- curr_weights = self._accumulate_temporal_group_into_buffer(
- group_tiles=temporal_group_tiles,
- buffer=buffer,
- latent=latent,
- timestep=timestep,
- generator=generator,
- )
+class VideoDecoder(Protocol):
+ """Structural interface for video VAE decoders.
+ Implementations decode a latent tensor into pixel-space video chunks
+ (e.g. ``ConvVideoDecoder``, ``DiffusionVideoDecoder``,
+ ``DistributedVideoDecoder``).
+ """
- # Blend with previous temporal chunk if it exists
- if previous_chunk is not None:
- # Check if current temporal slice overlaps with previous temporal slice
- if previous_temporal_slice.stop > curr_temporal_slice.start:
- overlap_len = previous_temporal_slice.stop - curr_temporal_slice.start
- temporal_overlap_slice = slice(curr_temporal_slice.start - previous_temporal_slice.start, None)
-
- # The overlap is already masked before it reaches this step. Each tile is accumulated into buffer
- # with its trapezoidal mask, and curr_weights accumulates the same mask. In the overlap blend we add
- # the masked values (buffer[...]) and the corresponding weights (curr_weights[...]) into the
- # previous buffers, then later normalize by weights.
- previous_chunk[:, :, temporal_overlap_slice, :, :] += buffer[:, :, slice(0, overlap_len), :, :]
- previous_weights[:, :, temporal_overlap_slice, :, :] += curr_weights[
- :, :, slice(0, overlap_len), :, :
- ]
-
- buffer[:, :, slice(0, overlap_len), :, :] = previous_chunk[:, :, temporal_overlap_slice, :, :]
- curr_weights[:, :, slice(0, overlap_len), :, :] = previous_weights[
- :, :, temporal_overlap_slice, :, :
- ]
-
- # Yield the non-overlapping part of the previous chunk
- previous_weights = previous_weights.clamp(min=1e-8)
- yield_len = curr_temporal_slice.start - previous_temporal_slice.start
- yield (previous_chunk / previous_weights)[:, :, :yield_len, :, :]
-
- # Update state for next iteration
- previous_chunk = buffer
- previous_weights = curr_weights
- previous_temporal_slice = curr_temporal_slice
-
- # Yield any remaining chunk
- if previous_chunk is not None:
- previous_weights = previous_weights.clamp(min=1e-8)
- yield previous_chunk / previous_weights
+ video_downscale_factors: SpatioTemporalScaleFactors
def decode_video(
self,
latent: torch.Tensor,
- tiling_config: TilingConfig | None = None,
+ tiling_config: TileSizeConfig | TileCountConfig | None = None,
generator: torch.Generator | None = None,
) -> Iterator[torch.Tensor]:
- """Decode a video latent tensor, yielding float chunks ``[f, h, w, c]`` in ``[0, 1]``.
- Subclasses (e.g. ``DistributedVideoDecoder``) may override this to
- control eagerness or distribution across ranks.
- """
-
- def to_rgb(frames: torch.Tensor) -> torch.Tensor:
- video = rearrange(frames[0], "c f h w -> f h w c")
- return video.add_(1.0).mul_(0.5).clamp_(0.0, 1.0)
-
- if tiling_config is not None:
- for frames in self.tiled_decode(latent, tiling_config, generator=generator):
- yield to_rgb(frames)
- else:
- decoded = self(latent, generator=generator)
- yield to_rgb(decoded)
+ """Decode a video latent tensor, yielding float chunks ``[f, h, w, c]`` in ``[0, 1]``."""
+ ...
- def _group_tiles_by_temporal_slice(self, tiles: List[Tile]) -> List[List[Tile]]:
- """Group tiles by their temporal output slice."""
- if not tiles:
- return []
- groups = []
- current_slice = tiles[0].out_coords[2]
- current_group = []
-
- for tile in tiles:
- tile_slice = tile.out_coords[2]
- if tile_slice == current_slice:
- current_group.append(tile)
- else:
- groups.append(current_group)
- current_slice = tile_slice
- current_group = [tile]
-
- # Add the final group
- if current_group:
- groups.append(current_group)
-
- return groups
-
- def _accumulate_temporal_group_into_buffer(
- self,
- group_tiles: List[Tile],
- buffer: torch.Tensor,
- latent: torch.Tensor,
- timestep: torch.Tensor | None,
- generator: torch.Generator | None,
- ) -> torch.Tensor:
- """
- Decode and accumulate all tiles of a temporal group into a local buffer.
- The buffer is local to the group and always starts at time 0; temporal coordinates
- are rebased by subtracting temporal_slice.start.
- """
- temporal_slice = group_tiles[0].out_coords[2]
-
- weights = torch.zeros_like(buffer)
-
- for tile in group_tiles:
- decoded_tile = self.forward(latent[tile.in_coords], timestep, generator)
- mask = tile.blend_mask.to(device=buffer.device, dtype=buffer.dtype)
- temporal_offset = tile.out_coords[2].start - temporal_slice.start
- # Use the tile's output coordinate length, not the decoded tile's length,
- # as the decoder may produce a different number of frames than expected
- expected_temporal_len = tile.out_coords[2].stop - tile.out_coords[2].start
- decoded_temporal_len = decoded_tile.shape[2]
-
- # Ensure we don't exceed the buffer or decoded tile bounds
- actual_temporal_len = min(expected_temporal_len, decoded_temporal_len, buffer.shape[2] - temporal_offset)
-
- chunk_coords = (
- slice(None), # batch
- slice(None), # channels
- slice(temporal_offset, temporal_offset + actual_temporal_len),
- tile.out_coords[3], # height
- tile.out_coords[4], # width
- )
-
- # Slice decoded_tile and mask to match the actual length we're writing
- decoded_slice = decoded_tile[:, :, :actual_temporal_len, :, :]
- mask_slice = mask[:, :, :actual_temporal_len, :, :] if mask.shape[2] > 1 else mask
-
- buffer[chunk_coords] += decoded_slice * mask_slice
- weights[chunk_coords] += mask_slice
-
- return weights
-
-
-def get_video_chunks_number(num_frames: int, tiling_config: TilingConfig | None = None) -> int:
+def get_video_chunks_number(
+ num_frames: int,
+ tiling_config: TileSizeConfig | TileCountConfig | None = None,
+) -> int:
"""
Get the number of video chunks for a given number of frames and tiling configuration.
+ Delegates to :meth:`TileSizeConfig.video_chunks_number` /
+ :meth:`TileCountConfig.video_chunks_number`.
Args:
num_frames: Number of frames in the video.
tiling_config: Tiling configuration.
Returns:
Number of video chunks.
"""
- if not tiling_config or not tiling_config.temporal_config:
+ if tiling_config is None:
return 1
- cfg = tiling_config.temporal_config
- frame_stride = cfg.tile_size_in_frames - cfg.tile_overlap_in_frames
- return (num_frames - 1 + frame_stride - 1) // frame_stride
+ return tiling_config.video_chunks_number(num_frames)
def to_mapping_operation(
- map_func: Callable[[int, int, int, int, int], Tuple[slice, torch.Tensor | None]],
+ map_func: Callable[[int, int, int, int, int], Tuple[slice, torch.Tensor]],
scale: int,
) -> MappingOperation:
"""Create a mapping operation over a set of tiling intervals.
@@ -1025,9 +532,9 @@ def to_mapping_operation(
dimension.
"""
- def map_op(intervals: DimensionIntervals) -> tuple[list[slice], list[torch.Tensor | None]]:
+ def map_op(intervals: DimensionIntervals) -> tuple[list[slice], list[torch.Tensor]]:
output_slices: list[slice] = []
- masks_1d: list[torch.Tensor | None] = []
+ masks_1d: list[torch.Tensor] = []
for interval in intervals.intervals:
output_slice, mask_1d = map_func(
interval.start, interval.end, interval.left_ramp, interval.right_ramp, scale
@@ -1110,3 +617,21 @@ def map_spatial_interval_to_latent(
mask_1d = compute_rectangular_mask_1d(stop - start, left_ramp, right_ramp)
return slice(start, stop), mask_1d
+
+
+from ltx_core.model.video_vae.conv_video_decoder import ConvVideoDecoder # noqa: E402
+from ltx_core.model.video_vae.diffusion_video_decoder import DiffusionVideoDecoder # noqa: E402
+
+__all__ = [
+ "ConvVideoDecoder",
+ "DiffusionVideoDecoder",
+ "VideoDecoder",
+ "VideoEncoder",
+ "get_video_chunks_number",
+ "map_spatial_interval_to_latent",
+ "map_spatial_slice",
+ "map_temporal_interval_to_latent",
+ "map_temporal_slice",
+ "prepare_tiles_for_encoding",
+ "to_mapping_operation",
+]
diff --git a/packages/ltx-core/src/ltx_core/multigpu/gemma/accelerate_wrapper.py b/packages/ltx-core/src/ltx_core/multigpu/gemma/accelerate_wrapper.py
index 8922c9c..4bdc782 100644
--- a/packages/ltx-core/src/ltx_core/multigpu/gemma/accelerate_wrapper.py
+++ b/packages/ltx-core/src/ltx_core/multigpu/gemma/accelerate_wrapper.py
@@ -1,5 +1,5 @@
"""Accelerate-based Gemma text encoder wrapper for multi-GPU inference.
-One rank (``src_rank``) holds the real ``GemmaTextEncoder`` loaded with
+One rank (``src_rank``) holds the real ``LTXGemmaTextEncoder`` loaded with
``device_map="auto"``; other ranks hold a lightweight stub. Every public
method runs on the source rank and broadcasts results to all ranks via the
provided NCCL process group.
@@ -15,16 +15,9 @@ from ltx_core.multigpu.gemma.broadcast_wrapper import BroadcastGemmaWrapper
class AccelerateGemmaWrapper(BroadcastGemmaWrapper):
- """Source-rank encode + NCCL broadcast around a sharded ``GemmaTextEncoder``."""
+ """Source-rank encode + NCCL broadcast around a sharded ``LTXGemmaTextEncoder``."""
- def encode(
- self,
- prompts: list[str],
- padding_side: str = "left",
- ) -> list[tuple[tuple[torch.Tensor, ...], torch.Tensor]]:
+ def encode(self, prompts: list[str]) -> list[tuple[tuple[torch.Tensor, ...], torch.Tensor]]:
"""Fuse all prompts into one Gemma call on the source rank, broadcast each output."""
- if self._rank == self._src_rank:
- local_outputs = self._encoder.encode(prompts, padding_side)
- else:
- local_outputs = [(None, None)] * len(prompts)
+ local_outputs = self._encoder.encode(prompts) if self._rank == self._src_rank else [(None, None)] * len(prompts)
return [self._broadcast_encoder_output(hs, mask, self._src_rank) for hs, mask in local_outputs]
diff --git a/packages/ltx-core/src/ltx_core/multigpu/gemma/batch_parallel_wrapper.py b/packages/ltx-core/src/ltx_core/multigpu/gemma/batch_parallel_wrapper.py
index d31185d..365edf2 100644
--- a/packages/ltx-core/src/ltx_core/multigpu/gemma/batch_parallel_wrapper.py
+++ b/packages/ltx-core/src/ltx_core/multigpu/gemma/batch_parallel_wrapper.py
@@ -1,5 +1,5 @@
"""Batch-parallel Gemma text encoder wrapper for multi-GPU inference.
-Each rank holds a full :class:`GemmaTextEncoder` replica resident on its
+Each rank holds a full :class:`LTXGemmaTextEncoder` replica resident on its
own GPU. ``encode`` partitions the prompt list across ranks (each rank
encodes a disjoint slice) and broadcasts every prompt's outputs from its
encoding rank to all other ranks, so all ranks end up with the full list
@@ -14,7 +14,7 @@ import torch
import torch.distributed as dist
from ltx_core.multigpu.gemma.broadcast_wrapper import BroadcastGemmaWrapper
-from ltx_core.text_encoders.gemma.encoders.base_encoder import GemmaTextEncoder
+from ltx_core.text_encoders.gemma.encoders.base_encoder import LTXGemmaTextEncoder
def _partition(total: int, world_size: int) -> list[int]:
@@ -26,11 +26,11 @@ def _partition(total: int, world_size: int) -> list[int]:
class BatchParallelGemmaWrapper(BroadcastGemmaWrapper):
"""Per-rank Gemma replica; ``encode`` parallelises a batch across ranks."""
- _encoder: GemmaTextEncoder # always resident on every rank, unlike the base's optional encoder
+ _encoder: LTXGemmaTextEncoder # always resident on every rank, unlike the base's optional encoder
def __init__(
self,
- encoder: GemmaTextEncoder,
+ encoder: LTXGemmaTextEncoder,
broadcast_group: dist.ProcessGroup | None,
src_rank: int,
dtype: torch.dtype = torch.bfloat16,
@@ -49,11 +49,7 @@ class BatchParallelGemmaWrapper(BroadcastGemmaWrapper):
super().__init__(encoder, broadcast_group, src_rank, dtype, device)
self._world_size = dist.get_world_size(broadcast_group)
- def encode(
- self,
- prompts: list[str],
- padding_side: str = "left",
- ) -> list[tuple[tuple[torch.Tensor, ...], torch.Tensor]]:
+ def encode(self, prompts: list[str]) -> list[tuple[tuple[torch.Tensor, ...], torch.Tensor]]:
"""Partition prompts across ranks, encode in parallel, broadcast per-prompt outputs.
With B prompts on W ranks, each rank gets ``ceil(B/W)`` or ``floor(B/W)``
prompts; the typical pos+neg case (B=2, W=2) gives one prompt per rank,
@@ -65,7 +61,7 @@ class BatchParallelGemmaWrapper(BroadcastGemmaWrapper):
counts = _partition(n, self._world_size)
start = sum(counts[: self._rank])
local_prompts = prompts[start : start + counts[self._rank]]
- local_outputs = self._encoder.encode(local_prompts, padding_side) if local_prompts else []
+ local_outputs = self._encoder.encode(local_prompts) if local_prompts else []
all_outputs: list[tuple[tuple[torch.Tensor, ...], torch.Tensor]] = []
for owner_rank, owner_count in enumerate(counts):
diff --git a/packages/ltx-core/src/ltx_core/multigpu/gemma/broadcast_wrapper.py b/packages/ltx-core/src/ltx_core/multigpu/gemma/broadcast_wrapper.py
index 2de6607..e8ce742 100644
--- a/packages/ltx-core/src/ltx_core/multigpu/gemma/broadcast_wrapper.py
+++ b/packages/ltx-core/src/ltx_core/multigpu/gemma/broadcast_wrapper.py
@@ -5,10 +5,11 @@ from __future__ import annotations
import torch
import torch.distributed as dist
-from ltx_core.text_encoders.gemma.encoders.base_encoder import GemmaTextEncoder
+from ltx_core.model.disposable import Disposable
+from ltx_core.text_encoders.gemma.encoders.base_encoder import LTXGemmaTextEncoder
-class BroadcastGemmaWrapper(torch.nn.Module):
+class BroadcastGemmaWrapper(torch.nn.Module, Disposable):
"""Encoder/group plumbing, prompt enhancement, and result broadcast.
Subclasses implement ``encode`` (the stub below raises).
Args:
@@ -24,7 +25,7 @@ class BroadcastGemmaWrapper(torch.nn.Module):
def __init__(
self,
- encoder: GemmaTextEncoder | None,
+ encoder: LTXGemmaTextEncoder | None,
broadcast_group: dist.ProcessGroup | None,
src_rank: int,
dtype: torch.dtype = torch.bfloat16,
@@ -40,37 +41,48 @@ class BroadcastGemmaWrapper(torch.nn.Module):
self._dtype = dtype
self._device = device
- def encode(
- self,
- prompts: list[str],
- padding_side: str = "left",
- ) -> list[tuple[tuple[torch.Tensor, ...], torch.Tensor]]:
+ def encode(self, prompts: list[str]) -> list[tuple[tuple[torch.Tensor, ...], torch.Tensor]]:
"""Encode a batch of prompts to per-prompt hidden states; implemented by subclasses."""
raise NotImplementedError
def enhance_t2v(
self,
prompt: str,
- max_new_tokens: int = 512,
+ max_new_tokens: int | None = None,
system_prompt: str | None = None,
seed: int = 10,
+ static_cache: bool = False,
) -> str:
result = None
if self._rank == self._src_rank:
- result = self._encoder.enhance_t2v(prompt, max_new_tokens, system_prompt, seed)
+ result = self._encoder.enhance_t2v(
+ prompt,
+ max_new_tokens=max_new_tokens,
+ system_prompt=system_prompt,
+ seed=seed,
+ static_cache=static_cache,
+ )
return self._broadcast_str(result)
def enhance_i2v(
self,
prompt: str,
image: torch.Tensor,
- max_new_tokens: int = 512,
+ max_new_tokens: int | None = None,
system_prompt: str | None = None,
seed: int = 10,
+ static_cache: bool = False,
) -> str:
result = None
if self._rank == self._src_rank:
- result = self._encoder.enhance_i2v(prompt, image, max_new_tokens, system_prompt, seed)
+ result = self._encoder.enhance_i2v(
+ prompt,
+ image,
+ max_new_tokens=max_new_tokens,
+ system_prompt=system_prompt,
+ seed=seed,
+ static_cache=static_cache,
+ )
return self._broadcast_str(result)
def _broadcast_str(self, value: str | None) -> str:
diff --git a/packages/ltx-core/src/ltx_core/multigpu/gemma/loader.py b/packages/ltx-core/src/ltx_core/multigpu/gemma/loader.py
index 04a9cd6..9f5e5b3 100644
--- a/packages/ltx-core/src/ltx_core/multigpu/gemma/loader.py
+++ b/packages/ltx-core/src/ltx_core/multigpu/gemma/loader.py
@@ -1,4 +1,4 @@
-"""Load GemmaTextEncoder with Accelerate ``device_map="auto"``.
+"""Load LTXGemmaTextEncoder with Accelerate ``device_map="auto"``.
The Gemma LLM backbone is spread across available CUDA devices using
HuggingFace Accelerate's automatic device placement.
Mirrors the ``PromptEncoder`` text-encoder loading in
@@ -10,46 +10,111 @@ from __future__ import annotations
import logging
+import safetensors
import torch
-from transformers import AutoImageProcessor, Gemma3ForConditionalGeneration, Gemma3Processor
+from accelerate import dispatch_model, infer_auto_device_map, init_empty_weights
+from accelerate.utils import get_balanced_memory
+from transformers import AutoModelForImageTextToText
-from ltx_core.text_encoders.gemma.encoders.base_encoder import GemmaTextEncoder
-from ltx_core.text_encoders.gemma.tokenizer import LTXVGemmaTokenizer
+from ltx_core.text_encoders.gemma.encoders.base_encoder import LTXGemmaTextEncoder, build_gemma_tokenizer
+from ltx_core.text_encoders.gemma.encoders.encoder_configurator import get_gemma_ops
+from ltx_core.text_encoders.gemma.gemma_assets import (
+ GemmaAssets,
+ build_gemma_hf_config,
+ build_gemma_processor,
+ is_safetensors_file,
+)
from ltx_core.utils import find_matching_file
logger = logging.getLogger(__name__)
+# LTXGemmaTextEncoder nests the HuggingFace model at ``.model``, so the shared SDOps emit
+# keys one level deeper than the raw HF module tree this loader builds.
+_LTX_ENCODER_PREFIX = "model."
+
def load_gemma_with_device_map(
gemma_root_path: str,
dtype: torch.dtype = torch.bfloat16,
-) -> GemmaTextEncoder:
- """Load GemmaTextEncoder with the LLM backbone spread across GPUs.
- Uses ``Gemma3ForConditionalGeneration.from_pretrained(device_map="auto")``
- to distribute layers across available CUDA devices.
- Args:
- gemma_root_path: Path to Gemma model directory.
- dtype: Data type for model weights.
+) -> LTXGemmaTextEncoder:
+ """Load LTXGemmaTextEncoder with the LLM backbone spread across GPUs.
+ Accepts a directory ``gemma_root`` (``from_pretrained(device_map="auto")``) or a packed
+ single-file TE (meta init + SDOps load + balanced ``device_map`` via
+ :func:`accelerate.utils.get_balanced_memory`).
"""
- model_folder = str(find_matching_file(gemma_root_path, "model*.safetensors").parent)
- tokenizer_path = str(find_matching_file(gemma_root_path, "tokenizer.model").parent)
- processor_path = str(find_matching_file(gemma_root_path, "preprocessor_config.json").parent)
+ assets = GemmaAssets.load(gemma_root_path)
- logger.info("Loading Gemma LLM with device_map='auto'...")
- gemma_model = Gemma3ForConditionalGeneration.from_pretrained(
- model_folder,
- dtype=dtype,
- device_map="auto",
- local_files_only=True,
- )
+ if is_safetensors_file(gemma_root_path):
+ gemma_model = _load_single_file_with_device_map(assets, dtype)
+ else:
+ model_folder = str(find_matching_file(gemma_root_path, "model*.safetensors").parent)
+ logger.info("Loading Gemma LLM with device_map='auto'...")
+ gemma_model = AutoModelForImageTextToText.from_pretrained(
+ model_folder,
+ dtype=dtype,
+ device_map="auto",
+ local_files_only=True,
+ )
- tokenizer = LTXVGemmaTokenizer(tokenizer_path, 1024)
- image_processor = AutoImageProcessor.from_pretrained(processor_path, local_files_only=True, use_fast=False)
- processor = Gemma3Processor(image_processor=image_processor, tokenizer=tokenizer.tokenizer)
+ tokenizer = build_gemma_tokenizer(assets)
+ processor = build_gemma_processor(assets, tokenizer.tokenizer)
- return GemmaTextEncoder(
+ return LTXGemmaTextEncoder(
model=gemma_model,
tokenizer=tokenizer,
processor=processor,
dtype=dtype,
)
+
+
+def _hf_state_dict_from_single_file(assets: GemmaAssets, dtype: torch.dtype) -> dict[str, torch.Tensor]:
+ """Remap TE checkpoint keys onto the raw HF module tree (strip LTX wrapper prefix)."""
+ sd_ops, _ = get_gemma_ops(assets.source)
+ state_dict: dict[str, torch.Tensor] = {}
+ for weight_path in assets.weight_paths:
+ with safetensors.safe_open(weight_path, framework="pt") as f:
+ for key in f.keys(): # noqa: SIM118 -- safe_open is not a Mapping; keys() is the only iterator
+ mapped = sd_ops.apply_to_key(key)
+ if mapped is None:
+ continue
+ for result in sd_ops.apply_to_key_value(mapped, f.get_tensor(key).to(dtype)):
+ if not result.new_key.startswith(_LTX_ENCODER_PREFIX):
+ raise ValueError(f"SDOps produced key {result.new_key!r} outside the encoder module tree.")
+ state_dict[result.new_key.removeprefix(_LTX_ENCODER_PREFIX)] = result.new_value
+ if not state_dict:
+ raise ValueError(
+ f"No Gemma weights matched the text-encoder SDOps in {assets.source}. "
+ f"Is this a split text-encoder checkpoint?"
+ )
+ return state_dict
+
+
+def _load_single_file_with_device_map(assets: GemmaAssets, dtype: torch.dtype) -> torch.nn.Module:
+ config = build_gemma_hf_config(assets)
+
+ # include_buffers=False (default): keep rotary inv_freq etc. from __init__, not meta.
+ with init_empty_weights():
+ model = AutoModelForImageTextToText.from_config(config)
+
+ logger.info("Loading single-file Gemma TE from %s and dispatching across GPUs...", assets.source)
+ state_dict = _hf_state_dict_from_single_file(assets, dtype)
+ model.load_state_dict(state_dict, strict=True, assign=True)
+ # After from_config under init_empty_weights, find_tied_parameters is empty; without this,
+ # infer_auto_device_map can put lm_head and embed_tokens on different GPUs.
+ model.tie_weights()
+
+ # Match from_pretrained(device_map="auto"): bare infer_auto_device_map packs onto GPU 0.
+ # Coerce to list — HF stores _no_split_modules as a set; Accelerate wraps non-list as [value].
+ no_split = list(getattr(model, "_no_split_modules", None) or ())
+ max_memory = get_balanced_memory(
+ model,
+ dtype=dtype,
+ no_split_module_classes=no_split,
+ )
+ device_map = infer_auto_device_map(
+ model,
+ max_memory=max_memory,
+ dtype=dtype,
+ no_split_module_classes=no_split,
+ )
+ return dispatch_model(model, device_map)
diff --git a/packages/ltx-core/src/ltx_core/multigpu/transformer/sequence_parallel.py b/packages/ltx-core/src/ltx_core/multigpu/transformer/sequence_parallel.py
index bf80fa4..a830513 100644
--- a/packages/ltx-core/src/ltx_core/multigpu/transformer/sequence_parallel.py
+++ b/packages/ltx-core/src/ltx_core/multigpu/transformer/sequence_parallel.py
@@ -82,6 +82,15 @@ def pad_modality_for_uniform_sharding(
positions_pad = torch.zeros(positions_pad_shape, dtype=modality.positions.dtype, device=modality.positions.device)
positions = torch.cat([modality.positions, positions_pad], dim=2)
+ # Padded tokens are not keyframes, so they pad with 0 and pick up no marker. Their outputs are
+ # sliced off after the gather anyway.
+ keyframes_mask = modality.keyframes_mask
+ if keyframes_mask is not None:
+ mask_pad_shape = list(keyframes_mask.shape)
+ mask_pad_shape[1] = pad
+ mask_pad = torch.zeros(mask_pad_shape, dtype=keyframes_mask.dtype, device=keyframes_mask.device)
+ keyframes_mask = torch.cat([keyframes_mask, mask_pad], dim=1)
+
if modality.attention_mask is None:
# Key-only padding mask in the canonical [0, 1] form: 1 on valid keys,
# 0 on padded keys. Shape (1, 1, T_padded) broadcasts across batch and
@@ -107,6 +116,7 @@ def pad_modality_for_uniform_sharding(
timesteps=timesteps,
positions=positions,
attention_mask=attention_mask,
+ keyframes_mask=keyframes_mask,
)
return padded, t_orig
@@ -154,11 +164,19 @@ def tile_modality_for_rank(
# Tile positions: (B, 3, T, 2) -> (B, 3, T_local, 2)
tiled_positions = modality.positions[:, :, start:end, :]
+ # Tile keyframes_mask: (B, T, 1) -> (B, T_local, 1). Sharding splits the sequence, so each
+ # rank must carry the marker for its own slice -- the embedding is applied per rank, before
+ # the all-to-all.
+ tiled_keyframes_mask = None
+ if modality.keyframes_mask is not None:
+ tiled_keyframes_mask = modality.keyframes_mask[:, start:end]
+
tiled_modality = replace(
modality,
latent=tiled_latent,
timesteps=tiled_timesteps,
positions=tiled_positions,
+ keyframes_mask=tiled_keyframes_mask,
)
return tiled_modality, token_counts
diff --git a/packages/ltx-core/src/ltx_core/multigpu/vae/distributed_decoder.py b/packages/ltx-core/src/ltx_core/multigpu/vae/distributed_decoder.py
index 10156ac..7eb9144 100644
--- a/packages/ltx-core/src/ltx_core/multigpu/vae/distributed_decoder.py
+++ b/packages/ltx-core/src/ltx_core/multigpu/vae/distributed_decoder.py
@@ -16,14 +16,13 @@ from __future__ import annotations
import logging
from collections.abc import Callable, Iterator
from dataclasses import dataclass
-from typing import TYPE_CHECKING
import torch
import torch.distributed as dist
from einops import rearrange
from torch.multiprocessing import Queue
-from ltx_core.model.video_vae.tiling import TilingConfig
+from ltx_core.model.disposable import Disposable
from ltx_core.model.video_vae.video_vae import (
VideoDecoder,
map_spatial_slice,
@@ -32,18 +31,23 @@ from ltx_core.model.video_vae.video_vae import (
)
from ltx_core.tiling import (
Tile,
+ TileCountConfig,
+ TilingConfig,
+ compute_summed_weights,
create_tiles,
- split_by_count,
- split_by_count_temporal_causal,
+ masks_are_complementary,
+ scale_by_masks_1d,
)
from ltx_core.types import SpatioTemporalScaleFactors, VideoLatentShape
-if TYPE_CHECKING:
- from ltx_core.tiling import TileCountConfig
-
logger = logging.getLogger(__name__)
+def _sgpu_has_temporal_tiling(tiling_config: TilingConfig | None, num_frames: int) -> bool:
+ """True when SGPU tiling would produce more than one temporal chunk for ``num_frames``."""
+ return tiling_config is not None and tiling_config.video_chunks_number(num_frames) > 1
+
+
# ------------------------------------------------------------------
# Data structures
# ------------------------------------------------------------------
@@ -54,7 +58,7 @@ class DecodedTile:
"""A VAE-decoded tile with pixel-space placement.
Attributes:
pixels: ``[F_tile, H_tile, W_tile, C]`` in the decoder's native dtype.
- pixel_tile: Carries ``out_coords`` (f, h, w slices) and ``blend_mask``.
+ pixel_tile: Carries ``out_coords`` (f, h, w slices) and separable ``masks_1d``.
"""
pixels: torch.Tensor
@@ -67,36 +71,13 @@ class DecodedTile:
def _to_decoded_tile(
- raw: torch.Tensor,
+ pixels: torch.Tensor,
tile: Tile,
) -> DecodedTile:
- """Convert raw decoder output ``[B, C, F, H, W]`` to a :class:`DecodedTile`.
- Rearranges to ``[F, H, W, C]`` and normalises ``[-1, 1] → [0, 1]``.
- """
- pixels = rearrange(raw[0], "c f h w -> f h w c")
- pixels = ((pixels + 1.0) / 2.0).clamp(0.0, 1.0)
+ """Wrap ``decode_video`` output ``[F, H, W, C]`` in ``[0, 1]`` as a :class:`DecodedTile`."""
return DecodedTile(pixels=pixels, pixel_tile=tile)
-# ------------------------------------------------------------------
-# Tile assembly
-# ------------------------------------------------------------------
-
-
-def compute_summed_weights(
- tiles: list[DecodedTile],
- total_frames: int,
- output_height: int,
- output_width: int,
-) -> torch.Tensor:
- """Build the ``[F, H, W]`` denominator for weighted blending."""
- weights = torch.zeros(total_frames, output_height, output_width)
- for tile in tiles:
- f_slice, h_slice, w_slice = tile.pixel_tile.out_coords
- weights[f_slice, h_slice, w_slice] += tile.pixel_tile.blend_mask
- return weights.clamp(min=1e-8)
-
-
def gather_frames(
tiles: list[DecodedTile],
total_frames: int,
@@ -104,12 +85,15 @@ def gather_frames(
output_width: int,
num_temporal_batches: int,
world_size: int,
- weights: torch.Tensor,
+ weights: torch.Tensor | None = None,
device_fn: Callable[[int], str | torch.device] | None = None,
) -> Iterator[torch.Tensor]:
"""Assemble decoded tiles into temporal batches distributed across GPUs.
Each temporal batch is allocated on the device returned by *device_fn(batch_index)*.
By default batches are placed round-robin on ``cuda:0`` … ``cuda:<world_size-1>``.
+ Blending multiplies by separable ``mf*mh*mw``. When *weights* is ``None``, masks
+ are assumed complementary and the denominator pass is skipped; otherwise
+ ``output`` is divided by *weights*.
"""
if device_fn is None:
device_fn = lambda b: f"cuda:{b % world_size}" # noqa: E731
@@ -136,11 +120,18 @@ def gather_frames(
tile_frames = slice(overlap.start - f_slice.start, overlap.stop - f_slice.start)
out_frames = slice(overlap.start - batch_range.start, overlap.stop - batch_range.start)
- blend = tile.pixel_tile.blend_mask[tile_frames].to(device=device)
- output[out_frames, h_slice, w_slice, :] += tile.pixels[tile_frames].to(device=device) * blend[:, :, :, None]
+ # Blend weights stay float32 so the multiply promotes bf16/fp16 pixels.
+ mf, mh, mw = (m.to(device=device, dtype=torch.float32) for m in tile.pixel_tile.masks_1d)
+ mf = mf[tile_frames]
+ pix = tile.pixels[tile_frames].to(device=device, non_blocking=True)
+ # Channel axis is not on the pixel Tile; length-1 ones broadcasts over C.
+ output[out_frames, h_slice, w_slice, :] += scale_by_masks_1d(
+ pix, (mf, mh, mw, torch.ones(1, device=device, dtype=torch.float32))
+ )
- batch_weights = weights[batch_range.start : batch_range.stop].to(device=device)
- output.div_(batch_weights[:, :, :, None])
+ if weights is not None:
+ batch_weights = weights[batch_range.start : batch_range.stop].to(device=device)
+ output.div_(batch_weights[:, :, :, None])
yield output
@@ -149,8 +140,12 @@ def gather_frames(
# ------------------------------------------------------------------
-class DistributedVideoDecoder(torch.nn.Module):
+class DistributedVideoDecoder(torch.nn.Module, Disposable):
"""Distributed VAE decoder with queue-based tile collection.
+ Wraps any :class:`~ltx_core.model.video_vae.video_vae.VideoDecoder`
+ (conv or diffusion) and decodes each MGPU tile via public
+ ``decode_video`` (already ``[F, H, W, C]`` in ``[0, 1]``). Full-video
+ assembly is :func:`gather_frames` on the driver.
All ranks decode their latent tile in parallel. Workers send
their :class:`DecodedTile` to the driver rank via the shared
``mp.Queue`` (CUDA IPC — zero-copy). The driver collects all
@@ -189,14 +184,22 @@ class DistributedVideoDecoder(torch.nn.Module):
self.vae_tiling = vae_tiling
self.driver_rank = driver_rank
+ @property
+ def video_downscale_factors(self) -> SpatioTemporalScaleFactors:
+ return self.decoder.video_downscale_factors
+
def forward(
self,
sample: torch.Tensor,
- timestep: torch.Tensor | None = None,
generator: torch.Generator | None = None,
) -> torch.Tensor:
- """Non-tiled path: fall back to local decode."""
- return self.decoder(sample, timestep, generator)
+ """Non-tiled path: full local ``decode_video``, returned as ``[B, C, F, H, W]``.
+ Uses the public decoder API (Conv: single-pass; Diff: full Euler loop)
+ rather than ``decoder.forward``, which is one diffusion step on Diff.
+ """
+ chunks = list(self.decoder.decode_video(sample, tiling_config=None, generator=generator))
+ pixels = torch.cat(chunks, dim=0) # [F, H, W, C] in [0, 1]
+ return rearrange(pixels, "f h w c -> 1 c f h w")
def decode_video(
self,
@@ -213,17 +216,6 @@ class DistributedVideoDecoder(torch.nn.Module):
3. The driver collects all tiles, blends overlaps, and returns
temporal batches distributed across GPUs.
"""
- if (
- self.vae_tiling.frames.num_tiles > 1
- and tiling_config is not None
- and tiling_config.temporal_config is not None
- ):
- raise ValueError(
- "Cannot combine multi-GPU temporal tiling (vae_tiling.frames.num_tiles > 1) "
- "with single-GPU temporal tiling (tiling_config.temporal_config). "
- "Use only one to avoid causal decoding conflicts."
- )
-
latent_shape = VideoLatentShape.from_torch_shape(latent.shape)
scale = self.decoder.video_downscale_factors
full_shape = latent_shape.upscale(scale)
@@ -238,7 +230,20 @@ class DistributedVideoDecoder(torch.nn.Module):
# Phase 3: driver collects and assembles.
all_tiles = self._collect_tiles(my_tiles)
- weights = compute_summed_weights(all_tiles, full_shape.frames, full_shape.height, full_shape.width)
+ if masks_are_complementary(
+ [t.pixel_tile for t in all_tiles],
+ (full_shape.frames, full_shape.height, full_shape.width),
+ ):
+ weights = None
+ else:
+ logger.warning(
+ "VAE blend masks are not complementary; falling back to dense [F,H,W] "
+ "weight normalization (expensive for large videos)."
+ )
+ weights = compute_summed_weights(
+ [t.pixel_tile for t in all_tiles],
+ (full_shape.frames, full_shape.height, full_shape.width),
+ )
batches = gather_frames(
all_tiles,
full_shape.frames,
@@ -264,13 +269,10 @@ class DistributedVideoDecoder(torch.nn.Module):
tiling_config: TilingConfig | None = None,
) -> list[DecodedTile]:
"""Decode this rank's assigned latent tiles and convert to :class:`DecodedTile` list."""
+ t_split, h_split, w_split = self.vae_tiling.to_splitters(scale, causal_temporal=True)
all_tiles = create_tiles(
torch.Size([latent_shape.frames, latent_shape.height, latent_shape.width]),
- splitters=[
- split_by_count_temporal_causal(self.vae_tiling.frames.num_tiles, self.vae_tiling.frames.overlap),
- split_by_count(self.vae_tiling.height.num_tiles, self.vae_tiling.height.overlap),
- split_by_count(self.vae_tiling.width.num_tiles, self.vae_tiling.width.overlap),
- ],
+ splitters=[t_split, h_split, w_split],
mappers=[
to_mapping_operation(map_temporal_slice, scale.time),
to_mapping_operation(map_spatial_slice, scale.height),
@@ -278,24 +280,33 @@ class DistributedVideoDecoder(torch.nn.Module):
],
)
my_tiles = [t for i, t in enumerate(all_tiles) if i % self.world_size == self.rank]
+ if self.vae_tiling.frames.num_tiles > 1 and tiling_config is not None:
+ for tile in my_tiles:
+ latent_f = tile.in_coords[0].stop - tile.in_coords[0].start
+ pixel_f = (latent_f - 1) * scale.time + 1
+ if _sgpu_has_temporal_tiling(tiling_config, pixel_f):
+ raise ValueError(
+ "Cannot combine multi-GPU temporal tiling (vae_tiling.frames.num_tiles > 1) "
+ "with single-GPU temporal tiling that would split this rank's tile "
+ f"({pixel_f} frames → {tiling_config.video_chunks_number(pixel_f)} chunks). "
+ "Use only one to avoid causal decoding conflicts."
+ )
decoded = []
for tile in my_tiles:
+ # One MGPU tile only — cat stitches SGPU temporal yields of this tile,
+ # not the full video (full assembly is gather_frames on the driver).
latent_slice = latent[:, :, tile.in_coords[0], tile.in_coords[1], tile.in_coords[2]]
- if tiling_config is not None:
- chunks = list(self.decoder.tiled_decode(latent_slice, tiling_config, generator=generator))
- raw = torch.cat(chunks, dim=2)
- else:
- raw = self.decoder.forward(latent_slice, generator=generator)
- decoded.append(_to_decoded_tile(raw, tile))
+ chunks = list(self.decoder.decode_video(latent_slice, tiling_config, generator=generator))
+ pixels = torch.cat(chunks, dim=0) # [F, H, W, C] in [0, 1]
+ decoded.append(_to_decoded_tile(pixels, tile))
return decoded
def _collect_tiles(self, driver_tiles: list[DecodedTile]) -> list[DecodedTile]:
"""Collect tiles from all workers via the queue. Returns flat list of all tiles.
- Sorted by rank so the downstream reduction in ``gather_frames`` /
- ``compute_summed_weights`` (in-place ``+=`` over overlapping pixel
- regions) processes tiles in a fixed order. Queue-arrival order would
- otherwise vary run-to-run and yield 1-ulp bf16 drift from
- non-associative floating-point summation.
+ Sorted by rank so the downstream reduction in ``gather_frames``
+ (in-place ``+=`` over overlapping pixel regions) processes tiles in a
+ fixed order. Queue-arrival order would otherwise vary run-to-run and
+ yield 1-ulp bf16 drift from non-associative floating-point summation.
"""
per_rank: dict[int, list[DecodedTile]] = {self.driver_rank: driver_tiles}
for _ in range(self.world_size - 1):
diff --git a/packages/ltx-core/src/ltx_core/quantization/blockwise/_impl.py b/packages/ltx-core/src/ltx_core/quantization/blockwise/_impl.py
index 2941c9f..1e3d214 100644
--- a/packages/ltx-core/src/ltx_core/quantization/blockwise/_impl.py
+++ b/packages/ltx-core/src/ltx_core/quantization/blockwise/_impl.py
@@ -290,7 +290,8 @@ def _blockwise_fp8_fuse(
scale_key = key.replace(".weight", ".weight_scale")
if scale_key not in model_sd.sd:
return bf16_fuse_rule(key, weight, deltas, model_sd)
- weight_scale = model_sd.sd[scale_key]
+ # ``weight`` is already on the fusion device; companion scale may still be CPU-retained.
+ weight_scale = model_sd.sd[scale_key].to(device=weight.device)
bf16_weight = _blockwise_dequantize_2d(weight, weight_scale)
merged = bf16_weight + deltas.to(dtype=bf16_weight.dtype)
new_fp8_weight, new_weight_scale = fp8_blockwise_quantize_weights_torch(merged.cuda())
@@ -321,7 +322,8 @@ def _blockwise_fp6_fuse(
scale_key = key.replace(".weight", ".weight_scale")
if scale_key not in model_sd.sd:
return bf16_fuse_rule(key, weight, deltas, model_sd)
- weight_scale = model_sd.sd[scale_key]
+ # ``weight`` is already on the fusion device; companion scale may still be CPU-retained.
+ weight_scale = model_sd.sd[scale_key].to(device=weight.device)
# Packed shape is [out, (in // 4) * 3]; recover in_features.
original_n = weight.shape[-1] * 4 // 3
fp8_view = fp6_unpack_tensor(weight, original_n).view(torch.float8_e4m3fn)
@@ -358,8 +360,8 @@ class BlockwiseFP8LTXModelConfigurator(ModelConfigurator[LTXModel]):
OPS: ClassVar[TransformerOpsConfig] = _BLOCKWISE_OPS
@classmethod
- def from_config(cls, config: dict) -> LTXModel:
- return cls.BASE.from_config(config, ops=cls.OPS)
+ def from_metadata(cls, metadata: dict) -> LTXModel:
+ return cls.BASE.from_metadata(metadata, ops=cls.OPS)
class BlockwiseFP8LTXVideoOnlyModelConfigurator(BlockwiseFP8LTXModelConfigurator):
diff --git a/packages/ltx-core/src/ltx_core/quantization/nvfp4/__init__.py b/packages/ltx-core/src/ltx_core/quantization/nvfp4/__init__.py
new file mode 100644
index 0000000..1185afb
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/quantization/nvfp4/__init__.py
@@ -0,0 +1,64 @@
+"""NVFP4 Linear via ``ltx_kernels.nvfp4`` (cast + prequant policies).
+The implementation modules (``linear``, ``convert``, …) import
+``ltx_kernels.nvfp4`` at top level. This package stays importable without those
+kernels; the gate fires when a policy builder is called (same pattern as
+``ltx_core.quantization.blockwise``).
+"""
+
+from __future__ import annotations
+
+from ltx_core.quantization.nvfp4.types import ActScale
+from ltx_core.quantization.policy import QuantizationPolicy
+
+__all__ = [
+ "ActScale",
+ "build_nvfp4_cast_policy",
+ "build_nvfp4_prequant_policy",
+]
+
+
+def _import_impl(): # noqa: ANN202 - internal helper
+ try:
+ from ltx_kernels import nvfp4 as nvfp4_mod # noqa: PLC0415
+ except ImportError as e:
+ raise RuntimeError(
+ "ltx-kernels not built; NVFP4 quantization requires the nvfp4 extension. "
+ "Build on a CUDA host: TORCH_CUDA_ARCH_LIST='10.0' "
+ "uv sync --group kernels (or "
+ "`uv pip install -e packages/ltx-kernels --no-build-isolation`)."
+ ) from e
+ if reason := nvfp4_mod.unavailable_reason():
+ raise RuntimeError(reason)
+ # Absolute sibling imports (avoid relative from . import X / importlib).
+ from ltx_core.quantization.nvfp4 import convert, fuse, prequant # noqa: PLC0415
+
+ return convert, prequant, fuse
+
+
+def build_nvfp4_cast_policy(*, act_scale: ActScale = ActScale.FIXED_1) -> QuantizationPolicy:
+ """Cast policy: FV allowlist meta-swap + load-time BF16→NVFP4 ``SDOps``.
+ Raises ``RuntimeError`` if ``ltx-kernels`` nvfp4 is not usable.
+ """
+ convert, _prequant, fuse = _import_impl()
+ return QuantizationPolicy(
+ sd_ops=convert.build_convert_sd_ops(),
+ module_ops=convert.get_convert_module_ops(act_scale=act_scale),
+ fuse_rule=fuse.nvfp4_fuse_rule,
+ )
+
+
+def build_nvfp4_prequant_policy(
+ checkpoint_path: str,
+ *,
+ act_scale: ActScale = ActScale.STATIC,
+) -> QuantizationPolicy:
+ """Prequant policy: discover layers from ckpt + load-time pass-through SDOps.
+ Default ``ActScale.STATIC`` loads calibrated ``.input_scale`` per Linear.
+ Raises ``RuntimeError`` if ``ltx-kernels`` nvfp4 is not usable.
+ """
+ _convert, prequant, fuse = _import_impl()
+ return QuantizationPolicy(
+ sd_ops=prequant.build_prequant_sd_ops(checkpoint_path, act_scale=act_scale),
+ module_ops=prequant.get_prequant_swap_module_ops(checkpoint_path, act_scale=act_scale),
+ fuse_rule=fuse.nvfp4_fuse_rule,
+ )
diff --git a/packages/ltx-core/src/ltx_core/quantization/nvfp4/convert.py b/packages/ltx-core/src/ltx_core/quantization/nvfp4/convert.py
new file mode 100644
index 0000000..ccb048d
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/quantization/nvfp4/convert.py
@@ -0,0 +1,126 @@
+"""Convert-policy helpers: meta swap + load-time BF16→NVFP4 ``SDOps``.
+FV allowlist: 12 Linear suffixes per transformer block. Deliberately excluded:
+``to_gate_logits`` (N=32 FP4 GEMM unsupported), the full audio branch, and
+``adaln_single.linear``.
+"""
+
+from __future__ import annotations
+
+import re
+
+import torch
+from ltx_kernels import nvfp4
+from torch import nn
+
+from ltx_core.loader.module_ops import ModuleOps
+from ltx_core.loader.sd_ops import KeyValueOperationResult, SDOps
+from ltx_core.model.transformer import LTXModel
+from ltx_core.quantization.nvfp4.linear import NVFP4Linear
+from ltx_core.quantization.nvfp4.types import ActScale
+
+_LTX2_FV_NVFP4_SUFFIXES: tuple[str, ...] = (
+ "attn1.to_q",
+ "attn1.to_k",
+ "attn1.to_v",
+ "attn1.to_out.0",
+ "attn2.to_q",
+ "attn2.to_out.0",
+ "audio_to_video_attn.to_q",
+ "audio_to_video_attn.to_out.0",
+ "video_to_audio_attn.to_k",
+ "video_to_audio_attn.to_v",
+ "ff.net.0.proj",
+ "ff.net.2",
+)
+
+# ``(?:\._orig_mod)?``: load keys may include compile's remap insert.
+_LAYER_PATTERN = re.compile(
+ r"^transformer_blocks\.\d+(?:\._orig_mod)?\.(" + "|".join(re.escape(s) for s in _LTX2_FV_NVFP4_SUFFIXES) + r")$"
+)
+
+
+def _is_ltx2_fv_nvfp4_layer(name: str) -> bool:
+ """True iff ``name`` is ``transformer_blocks.<int>.<one of FV suffixes>``."""
+ return _LAYER_PATTERN.match(name) is not None
+
+
+def quantize_bf16_weight_to_nvfp4(
+ weight: torch.Tensor,
+) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
+ """BF16 ``[out, in]`` → packed weight, uint8 block scales, decode scale."""
+ orig_device = weight.device
+ w = weight.detach()
+ if w.device.type != "cuda":
+ w = w.to(device="cuda", dtype=torch.bfloat16)
+ elif w.dtype != torch.bfloat16:
+ w = w.to(dtype=torch.bfloat16)
+
+ decode = nvfp4.per_tensor_decode_scale(w)
+ weight_fp4, weight_scale = nvfp4.quantize_nvfp4(w, decode)
+ return (
+ weight_fp4.to(device=orig_device),
+ weight_scale.to(device=orig_device),
+ decode.to(device=orig_device),
+ )
+
+
+def build_convert_sd_ops() -> SDOps:
+ """Quantize FV-allowlisted ``.weight`` tensors to NVFP4 at load; emit scale companions."""
+
+ def _on_weight(key: str, value: torch.Tensor) -> list[KeyValueOperationResult]:
+ if not _is_ltx2_fv_nvfp4_layer(key.removesuffix(".weight")):
+ return [KeyValueOperationResult(key, value)]
+ if value.dim() != 2 or value.dtype not in (torch.bfloat16, torch.float16, torch.float32):
+ return [KeyValueOperationResult(key, value)]
+
+ weight_fp4, weight_scale, alpha = quantize_bf16_weight_to_nvfp4(value)
+ scale_key = key.replace(".weight", ".weight_scale")
+ scale_2_key = key.replace(".weight", ".weight_scale_2")
+ return [
+ KeyValueOperationResult(key, weight_fp4),
+ KeyValueOperationResult(scale_key, weight_scale),
+ KeyValueOperationResult(scale_2_key, alpha),
+ ]
+
+ return SDOps("NVFP4_CONVERT_WEIGHTS").with_kv_operation(
+ key_prefix="transformer_blocks.",
+ key_suffix=".weight",
+ operation=_on_weight,
+ )
+
+
+def swap_convert_linears(
+ model: nn.Module,
+ *,
+ act_scale: ActScale = ActScale.FIXED_1,
+) -> nn.Module:
+ """Meta-device swap: replace FV-allowlisted ``nn.Linear`` with ``NVFP4Linear`` shells."""
+ replacements: list[tuple[nn.Module, str, nn.Linear]] = []
+ for name, module in model.named_modules():
+ if not isinstance(module, nn.Linear) or isinstance(module, NVFP4Linear):
+ continue
+ if not _is_ltx2_fv_nvfp4_layer(name):
+ continue
+ if "." in name:
+ parent_name, attr_name = name.rsplit(".", 1)
+ parent = model.get_submodule(parent_name)
+ else:
+ parent, attr_name = model, name
+ replacements.append((parent, attr_name, module))
+
+ for parent, attr_name, linear in replacements:
+ setattr(parent, attr_name, NVFP4Linear.from_linear(linear, act_scale=act_scale))
+ return model
+
+
+def get_convert_module_ops(
+ *,
+ act_scale: ActScale = ActScale.FIXED_1,
+) -> tuple[ModuleOps, ...]:
+ return (
+ ModuleOps(
+ name="nvfp4_convert_swap",
+ matcher=lambda model: isinstance(model, LTXModel),
+ mutator=lambda model: swap_convert_linears(model, act_scale=act_scale),
+ ),
+ )
diff --git a/packages/ltx-core/src/ltx_core/quantization/nvfp4/fuse.py b/packages/ltx-core/src/ltx_core/quantization/nvfp4/fuse.py
new file mode 100644
index 0000000..ef05a2b
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/quantization/nvfp4/fuse.py
@@ -0,0 +1,50 @@
+"""LoRA fuse rule for NVFP4 cast / prequant policies."""
+
+from __future__ import annotations
+
+import torch
+from ltx_kernels import nvfp4
+
+from ltx_core.loader.fuse_loras import FuseRule, bf16_fuse_rule
+from ltx_core.loader.primitives import StateDict
+from ltx_core.quantization.nvfp4.convert import quantize_bf16_weight_to_nvfp4
+
+
+def _nvfp4_fuse(
+ key: str,
+ weight: torch.Tensor,
+ deltas: torch.Tensor,
+ model_sd: StateDict,
+) -> dict[str, torch.Tensor]:
+ """Dequant NVFP4 ``.weight`` → BF16, add delta, re-quant; emit weight + scales.
+ NVFP4 layers are identified by the ``.weight_scale`` + ``.weight_scale_2``
+ companions. Other layers (plain BF16) fall back to ``bf16_fuse_rule``.
+ ``input_scale`` is an activation scale and is left untouched.
+ """
+ scale_key = key.replace(".weight", ".weight_scale")
+ scale_2_key = key.replace(".weight", ".weight_scale_2")
+ if scale_key not in model_sd.sd or scale_2_key not in model_sd.sd:
+ return bf16_fuse_rule(key, weight, deltas, model_sd)
+
+ # ``weight`` is already on the fusion device; companions may still be CPU-retained.
+ weight_scale = model_sd.sd[scale_key].to(device=weight.device)
+ weight_scale_2 = model_sd.sd[scale_2_key].to(device=weight.device, dtype=torch.float32).reshape(())
+
+ orig_device = weight.device
+ packed = weight
+ if packed.device.type != "cuda":
+ packed = packed.to(device="cuda")
+ weight_scale = weight_scale.to(device="cuda")
+ weight_scale_2 = weight_scale_2.to(device="cuda")
+
+ bf16_weight = nvfp4.dequantize_nvfp4(packed, weight_scale_2, weight_scale, out_dtype=torch.bfloat16)
+ merged = bf16_weight + deltas.to(device=bf16_weight.device, dtype=torch.bfloat16)
+ new_fp4, new_scale, new_scale_2 = quantize_bf16_weight_to_nvfp4(merged)
+ return {
+ key: new_fp4.to(device=orig_device),
+ scale_key: new_scale.to(device=orig_device),
+ scale_2_key: new_scale_2.to(device=orig_device),
+ }
+
+
+nvfp4_fuse_rule = FuseRule(aggregation_dtype=torch.bfloat16, fuse_fn=_nvfp4_fuse)
diff --git a/packages/ltx-core/src/ltx_core/quantization/nvfp4/linear.py b/packages/ltx-core/src/ltx_core/quantization/nvfp4/linear.py
new file mode 100644
index 0000000..4ba1803
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/quantization/nvfp4/linear.py
@@ -0,0 +1,139 @@
+"""``NVFP4Linear``: NVFP4 GEMM via ``ltx_kernels.nvfp4``.
+Weights are expected already quantized (``weight`` / ``weight_scale`` /
+``weight_scale_2``) — conversion happens in policy ``SDOps`` at load time, not here.
+Parameter layout:
+* ``weight`` — packed NVFP4 ``uint8`` ``[out, in // 2]`` (two E2M1 values per byte;
+ element ``2j`` in the high nibble)
+* ``weight_scale`` — E4M3 block scales as ``uint8``, cuBLAS 128x4 tiled layout
+* ``weight_scale_2`` — scalar FP32 weight-only per-tensor decode scale
+* ``input_scale`` — scalar FP32 activation per-tensor decode scale (``ActScale.STATIC``)
+"""
+
+from __future__ import annotations
+
+import torch
+from ltx_kernels import nvfp4
+from torch import nn
+from typing_extensions import assert_never
+
+from ltx_core.quantization.nvfp4.types import ActScale
+
+E4M3_MAX = 448.0
+E2M1_MAX = 6.0
+GLOBAL_RANGE = E4M3_MAX * E2M1_MAX
+
+
+class NVFP4Linear(nn.Module):
+ """Drop-in ``nn.Linear`` replacement using NVFP4 quantize + cuBLASLt GEMM.
+ ``act_scale`` controls the activation *per-tensor* decode scale:
+ * ``ActScale.FIXED_1`` — constant 1.0 (no activation amax; ``alpha = weight_scale_2``)
+ * ``ActScale.DYNAMIC`` — per-forward ``amax / GLOBAL_RANGE``
+ * ``ActScale.STATIC`` — calibrated ``input_scale`` from the checkpoint (``alpha =
+ input_scale * weight_scale_2``). Per-16 E4M3 block scales are still computed each
+ forward.
+ """
+
+ in_features: int
+ out_features: int
+ act_scale: ActScale
+
+ def __init__(
+ self,
+ in_features: int,
+ out_features: int,
+ bias: bool = True,
+ *,
+ act_scale: ActScale = ActScale.FIXED_1,
+ weight_scale_rows: int | None = None,
+ device: torch.device | str | None = None,
+ ) -> None:
+ super().__init__()
+ if in_features % 16 != 0:
+ raise ValueError(f"in_features must be divisible by 16, got {in_features}")
+
+ self.in_features = in_features
+ self.out_features = out_features
+ self.act_scale = act_scale
+
+ self.weight = nn.Parameter(
+ torch.empty(out_features, in_features // 2, dtype=torch.uint8, device=device),
+ requires_grad=False,
+ )
+ # Default: cuBLAS-tiled row pad (matches ``ltx_kernels.nvfp4.quantize_nvfp4``).
+ rows = weight_scale_rows if weight_scale_rows is not None else (out_features + 127) // 128 * 128
+ scale_cols = ((in_features // 16) + 3) // 4 * 4
+ self.weight_scale = nn.Parameter(
+ torch.empty(rows, scale_cols, dtype=torch.uint8, device=device),
+ requires_grad=False,
+ )
+ self.weight_scale_2 = nn.Parameter(torch.empty((), dtype=torch.float32, device=device), requires_grad=False)
+
+ match act_scale:
+ case ActScale.STATIC:
+ self.input_scale = nn.Parameter(
+ torch.empty((), dtype=torch.float32, device=device), requires_grad=False
+ )
+ case ActScale.FIXED_1 | ActScale.DYNAMIC:
+ self.register_parameter("input_scale", None)
+ case _:
+ assert_never(act_scale)
+
+ if bias:
+ self.bias = nn.Parameter(torch.empty(out_features, dtype=torch.bfloat16, device=device))
+ else:
+ self.register_parameter("bias", None)
+
+ @classmethod
+ def from_linear(
+ cls,
+ linear: nn.Linear,
+ *,
+ act_scale: ActScale = ActScale.FIXED_1,
+ ) -> "NVFP4Linear":
+ match act_scale:
+ case ActScale.STATIC:
+ raise ValueError(
+ "act_scale=ActScale.STATIC requires a calibrated checkpoint input_scale; "
+ "use build_nvfp4_prequant_policy, not online convert / from_linear."
+ )
+ case ActScale.FIXED_1 | ActScale.DYNAMIC:
+ pass
+ case _:
+ assert_never(act_scale)
+ # Online convert writes cuBLAS-tiled block scales (rows padded to 128).
+ scale_rows = (linear.out_features + 127) // 128 * 128
+ return cls(
+ linear.in_features,
+ linear.out_features,
+ bias=linear.bias is not None,
+ act_scale=act_scale,
+ weight_scale_rows=scale_rows,
+ device=linear.weight.device,
+ )
+
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
+ original_shape = x.shape
+ x_2d = x.reshape(-1, original_shape[-1])
+ x_bf16 = x_2d if x_2d.dtype in (torch.bfloat16, torch.float16) else x_2d.to(torch.bfloat16)
+
+ match self.act_scale:
+ case ActScale.FIXED_1:
+ tensor_scale_a: torch.Tensor | None = None
+ case ActScale.DYNAMIC:
+ tensor_scale_a = nvfp4.per_tensor_decode_scale(x_bf16)
+ case ActScale.STATIC:
+ if self.input_scale is None:
+ raise RuntimeError("act_scale=ActScale.STATIC requires a loaded input_scale parameter")
+ tensor_scale_a = self.input_scale
+ case _:
+ assert_never(self.act_scale)
+
+ out = nvfp4.linear_nvfp4(
+ x_bf16,
+ self.weight,
+ self.weight_scale,
+ self.weight_scale_2,
+ bias=self.bias,
+ act_scale=tensor_scale_a,
+ )
+ return out.view(*original_shape[:-1], self.out_features)
diff --git a/packages/ltx-core/src/ltx_core/quantization/nvfp4/prequant.py b/packages/ltx-core/src/ltx_core/quantization/nvfp4/prequant.py
new file mode 100644
index 0000000..c3e89b5
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/quantization/nvfp4/prequant.py
@@ -0,0 +1,207 @@
+"""Prequant checkpoint discovery + load-time SDOps for NVFP4.
+Loads on-disk packed NVFP4 weights and scales into ``NVFP4Linear`` without
+rewriting nibble order.
+"""
+
+from __future__ import annotations
+
+import json
+import struct
+from typing import Any
+
+import torch
+from torch import nn
+
+from ltx_core.loader.module_ops import ModuleOps
+from ltx_core.loader.sd_ops import KeyValueOperationResult, SDOps
+from ltx_core.model.transformer import LTXModel
+from ltx_core.quantization.nvfp4.types import ActScale
+
+SafetensorsHeader = dict[str, dict[str, Any]]
+
+
+def _read_safetensors_header(path: str) -> SafetensorsHeader:
+ with open(path, "rb") as f:
+ header_size = struct.unpack("<Q", f.read(8))[0]
+ header = json.loads(f.read(header_size).decode("utf-8"))
+ return {k: v for k, v in header.items() if k != "__metadata__"}
+
+
+def _discover_nvfp4_layers(header: SafetensorsHeader) -> dict[str, int]:
+ """Return ``{layer_path: weight_scale_rows}`` for paired U8/F8/F32 NVFP4 tensors."""
+ weight_keys = frozenset(k.removesuffix(".weight") for k in header if k.endswith(".weight"))
+ layers: dict[str, int] = {}
+ for layer in weight_keys:
+ has_scale = f"{layer}.weight_scale" in header
+ has_scale_2 = f"{layer}.weight_scale_2" in header
+ if has_scale != has_scale_2:
+ raise ValueError(
+ f"{layer!r} has exactly one of .weight_scale/.weight_scale_2 — "
+ "expected both or neither (NVFP4 checkpoints pair them 1:1:1)."
+ )
+ if not (has_scale and has_scale_2):
+ continue
+ weight_info = header[f"{layer}.weight"]
+ scale_info = header[f"{layer}.weight_scale"]
+ scale_2_info = header[f"{layer}.weight_scale_2"]
+ if not (weight_info["dtype"] == "U8" and scale_info["dtype"] == "F8_E4M3" and scale_2_info["dtype"] == "F32"):
+ continue
+ layers[layer] = scale_info["shape"][0]
+ return layers
+
+
+def _layers_with_input_scale(header: SafetensorsHeader, layers: dict[str, int]) -> frozenset[str]:
+ """Subset of ``layers`` that also have a scalar FP32 ``.input_scale``."""
+ out: set[str] = set()
+ for layer in layers:
+ info = header.get(f"{layer}.input_scale")
+ if info is not None and info["dtype"] == "F32":
+ out.add(layer)
+ return frozenset(out)
+
+
+def _require_static_input_scales(
+ header: SafetensorsHeader,
+ layers: dict[str, int],
+) -> None:
+ with_input = _layers_with_input_scale(header, layers)
+ missing = sorted(set(layers) - with_input)
+ if missing:
+ raise ValueError(
+ f"act_scale=ActScale.STATIC requires .input_scale on every NVFP4 layer; "
+ f"missing for {len(missing)} layers (e.g. {missing[0]!r})."
+ )
+
+
+def _discover_prequant(
+ checkpoint_path: str,
+ *,
+ act_scale: ActScale,
+) -> dict[str, int]:
+ """Read the checkpoint header once; return ``{layer_path: weight_scale_rows}``.
+ Every discovered NVFP4 Linear is hosted as ``NVFP4Linear``, including layers whose
+ ``weight_scale`` rows are cuBLAS-padded above ``out_features`` (``NVFP4Linear``
+ accepts ``weight_scale_rows`` independently of ``out_features``). There is no BF16
+ dequant fallback for those; revisit only if a real checkpoint fails to load or run.
+ """
+ header = _read_safetensors_header(checkpoint_path)
+ layers = _discover_nvfp4_layers(header)
+ if not layers:
+ raise ValueError(
+ f"nvfp4 prequant requires a pre-quantized checkpoint with paired "
+ f".weight_scale/.weight_scale_2 tensors, but {checkpoint_path!r} has none."
+ )
+ match act_scale:
+ case ActScale.STATIC:
+ _require_static_input_scales(header, layers)
+ case ActScale.FIXED_1 | ActScale.DYNAMIC:
+ pass
+ return layers
+
+
+def _matching_layer(name: str, layer_set: dict) -> str | None:
+ suffix = "." + name
+ return next((p for p in layer_set if p == name or p.endswith(suffix)), None)
+
+
+def _layer_from_param_key(key: str, suffix: str, layer_set: dict) -> str | None:
+ path = key.removesuffix(suffix)
+ if path in layer_set:
+ return path
+ return _matching_layer(path, layer_set)
+
+
+def build_prequant_sd_ops(checkpoint_path: str, *, act_scale: ActScale = ActScale.STATIC) -> SDOps:
+ """Pass through packed NVFP4 weights/scales into ``NVFP4Linear`` parameters.
+ When ``act_scale=ActScale.STATIC``, also loads calibrated ``.input_scale`` scalars.
+ """
+ nvfp4_layers = _discover_prequant(checkpoint_path, act_scale=act_scale)
+
+ def _on_weight(key: str, value: torch.Tensor) -> list[KeyValueOperationResult]:
+ if _layer_from_param_key(key, ".weight", nvfp4_layers) is None:
+ return [KeyValueOperationResult(key, value)]
+ if value.dtype != torch.uint8:
+ raise ValueError(f"expected U8 NVFP4 weight for {key!r}, got {value.dtype}")
+ return [KeyValueOperationResult(key, value)]
+
+ def _on_weight_scale(key: str, value: torch.Tensor) -> list[KeyValueOperationResult]:
+ if _layer_from_param_key(key, ".weight_scale", nvfp4_layers) is None:
+ return [KeyValueOperationResult(key, value)]
+ return [KeyValueOperationResult(key, value.view(torch.uint8).contiguous())]
+
+ def _on_weight_scale_2(key: str, value: torch.Tensor) -> list[KeyValueOperationResult]:
+ if _layer_from_param_key(key, ".weight_scale_2", nvfp4_layers) is None:
+ return [KeyValueOperationResult(key, value)]
+ return [KeyValueOperationResult(key, value.float().reshape(()))]
+
+ def _on_input_scale(key: str, value: torch.Tensor) -> list[KeyValueOperationResult]:
+ if _layer_from_param_key(key, ".input_scale", nvfp4_layers) is None:
+ return [KeyValueOperationResult(key, value)]
+ match act_scale:
+ case ActScale.STATIC:
+ return [KeyValueOperationResult(key, value.float().reshape(()))]
+ case ActScale.FIXED_1 | ActScale.DYNAMIC:
+ # Not consumed by the module; drop so unused-key checks stay quiet.
+ return []
+
+ return (
+ SDOps("NVFP4_PREQUANT")
+ .with_kv_operation(key_suffix=".input_scale", operation=_on_input_scale)
+ .with_kv_operation(key_suffix=".weight_scale_2", operation=_on_weight_scale_2)
+ .with_kv_operation(key_suffix=".weight_scale", operation=_on_weight_scale)
+ .with_kv_operation(key_suffix=".weight", operation=_on_weight)
+ )
+
+
+def get_prequant_swap_module_ops(
+ checkpoint_path: str,
+ *,
+ act_scale: ActScale = ActScale.STATIC,
+) -> tuple[ModuleOps, ...]:
+ """Swap discovered NVFP4 layers to ``NVFP4Linear``."""
+ # Imported here so header discovery stays kernels-free.
+ from ltx_core.quantization.nvfp4.linear import NVFP4Linear # noqa: PLC0415
+
+ nvfp4_layers = _discover_prequant(checkpoint_path, act_scale=act_scale)
+
+ def _matching(name: str) -> str | None:
+ return _matching_layer(name, nvfp4_layers)
+
+ def _swap(model: nn.Module) -> nn.Module:
+ replacements: list[tuple[nn.Module, str, nn.Linear, int]] = []
+ for name, module in model.named_modules():
+ if not isinstance(module, nn.Linear) or isinstance(module, NVFP4Linear):
+ continue
+ matched = _matching(name)
+ if matched is None:
+ continue
+ if "." in name:
+ parent_name, attr_name = name.rsplit(".", 1)
+ parent = model.get_submodule(parent_name)
+ else:
+ parent = model
+ attr_name = name
+ replacements.append((parent, attr_name, module, nvfp4_layers[matched]))
+
+ for parent, attr_name, linear, weight_scale_rows in replacements:
+ setattr(
+ parent,
+ attr_name,
+ NVFP4Linear(
+ linear.in_features,
+ linear.out_features,
+ bias=linear.bias is not None,
+ act_scale=act_scale,
+ weight_scale_rows=weight_scale_rows,
+ device=linear.weight.device,
+ ),
+ )
+ return model
+
+ return (
+ ModuleOps(
+ name="nvfp4_prequant_swap",
+ matcher=lambda model: isinstance(model, LTXModel),
+ mutator=_swap,
+ ),
+ )
diff --git a/packages/ltx-core/src/ltx_core/quantization/nvfp4/types.py b/packages/ltx-core/src/ltx_core/quantization/nvfp4/types.py
new file mode 100644
index 0000000..f1277c8
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/quantization/nvfp4/types.py
@@ -0,0 +1,13 @@
+"""Kernels-free NVFP4 typing helpers."""
+
+from __future__ import annotations
+
+from enum import Enum
+
+
+class ActScale(str, Enum):
+ """Activation per-tensor decode-scale mode for ``NVFP4Linear``."""
+
+ DYNAMIC = "dynamic" # Per-forward amax / GLOBAL_RANGE.
+ FIXED_1 = "fixed_1" # Constant 1.0; alpha equals weight_scale_2.
+ STATIC = "static" # Calibrated checkpoint input_scale; alpha = input_scale * weight_scale_2.
diff --git a/packages/ltx-core/src/ltx_core/text_encoders/gemma/__init__.py b/packages/ltx-core/src/ltx_core/text_encoders/gemma/__init__.py
index 009a38d..54f44dd 100644
--- a/packages/ltx-core/src/ltx_core/text_encoders/gemma/__init__.py
+++ b/packages/ltx-core/src/ltx_core/text_encoders/gemma/__init__.py
@@ -6,28 +6,44 @@ from ltx_core.text_encoders.gemma.embeddings_processor import (
convert_to_additive_mask,
)
from ltx_core.text_encoders.gemma.encoders.base_encoder import (
- GemmaTextEncoder,
+ LTXGemmaTextEncoder,
+ build_gemma_tokenizer,
module_ops_from_gemma_root,
)
from ltx_core.text_encoders.gemma.encoders.encoder_configurator import (
EMBEDDINGS_PROCESSOR_KEY_OPS,
- GEMMA_LLM_KEY_OPS,
- GEMMA_MODEL_OPS,
VIDEO_ONLY_EMBEDDINGS_PROCESSOR_KEY_OPS,
EmbeddingsProcessorConfigurator,
GemmaTextEncoderConfigurator,
+ gemma_model_config,
+ gemma_model_type,
+ get_gemma_ops,
+)
+from ltx_core.text_encoders.gemma.gemma_assets import (
+ GemmaAssets,
+ build_gemma_hf_config,
+ build_gemma_hf_tokenizer,
+ build_gemma_processor,
+ resolve_gemma_weight_paths,
)
__all__ = [
"EMBEDDINGS_PROCESSOR_KEY_OPS",
- "GEMMA_LLM_KEY_OPS",
- "GEMMA_MODEL_OPS",
"VIDEO_ONLY_EMBEDDINGS_PROCESSOR_KEY_OPS",
"EmbeddingsProcessor",
"EmbeddingsProcessorConfigurator",
"EmbeddingsProcessorOutput",
- "GemmaTextEncoder",
+ "GemmaAssets",
"GemmaTextEncoderConfigurator",
+ "LTXGemmaTextEncoder",
+ "build_gemma_hf_config",
+ "build_gemma_hf_tokenizer",
+ "build_gemma_processor",
+ "build_gemma_tokenizer",
"convert_to_additive_mask",
+ "gemma_model_config",
+ "gemma_model_type",
+ "get_gemma_ops",
"module_ops_from_gemma_root",
+ "resolve_gemma_weight_paths",
]
diff --git a/packages/ltx-core/src/ltx_core/text_encoders/gemma/config.py b/packages/ltx-core/src/ltx_core/text_encoders/gemma/config.py
deleted file mode 100644
index 8b23e91..0000000
--- a/packages/ltx-core/src/ltx_core/text_encoders/gemma/config.py
+++ /dev/null
@@ -1,75 +0,0 @@
-from dataclasses import asdict, dataclass, field
-
-
-@dataclass
-class Gemma3RopeScaling:
- factor: float = 8.0
- rope_type: str = "linear"
-
-
-@dataclass
-class Gemma3TextConfig:
- attention_bias: bool = False
- attention_dropout: float = 0.0
- attn_logit_softcapping: float | None = None
- cache_implementation: str = "hybrid"
- final_logit_softcapping: float | None = None
- head_dim: int = 256
- hidden_activation: str = "gelu_pytorch_tanh"
- hidden_size: int = 3840
- initializer_range: float = 0.02
- intermediate_size: int = 15360
- max_position_embeddings: int = 131072
- model_type: str = "gemma3_text"
- num_attention_heads: int = 16
- num_hidden_layers: int = 48
- num_key_value_heads: int = 8
- query_pre_attn_scalar: int = 256
- rms_norm_eps: float = 1e-06
- rope_local_base_freq: int = 10000
- rope_scaling: Gemma3RopeScaling = field(default_factory=Gemma3RopeScaling)
- rope_theta: int = 1000000
- sliding_window: int = 1024
- sliding_window_pattern: int = 6
- torch_dtype: str = "float32"
- use_cache: bool = True
- vocab_size: int = 262208
-
-
-@dataclass
-class Gemma3VisionConfig:
- attention_dropout: float = 0.0
- hidden_act: str = "gelu_pytorch_tanh"
- hidden_size: int = 1152
- image_size: int = 896
- intermediate_size: int = 4304
- layer_norm_eps: float = 1e-06
- model_type: str = "siglip_vision_model"
- num_attention_heads: int = 16
- num_channels: int = 3
- num_hidden_layers: int = 27
- patch_size: int = 14
- torch_dtype: str = "float32"
- vision_use_head: bool = False
-
-
-@dataclass
-class Gemma3ConfigData:
- architectures: list[str] = field(default_factory=lambda: ["Gemma3ForConditionalGeneration"])
- boi_token_index: int = 255999
- eoi_token_index: int = 256000
- eos_token_id: list[int] = field(default_factory=lambda: [1, 106])
- image_token_index: int = 262144
- initializer_range: float = 0.02
- mm_tokens_per_image: int = 256
- model_type: str = "gemma3"
- text_config: Gemma3TextConfig = field(default_factory=Gemma3TextConfig)
- torch_dtype: str = "bfloat16"
- transformers_version: str = "4.51.0"
- vision_config: Gemma3VisionConfig = field(default_factory=Gemma3VisionConfig)
-
- def to_dict(self) -> dict:
- return asdict(self)
-
-
-GEMMA3_CONFIG_FOR_LTX = Gemma3ConfigData()
diff --git a/packages/ltx-core/src/ltx_core/text_encoders/gemma/embeddings_connector.py b/packages/ltx-core/src/ltx_core/text_encoders/gemma/embeddings_connector.py
index c4e9d0c..316deda 100644
--- a/packages/ltx-core/src/ltx_core/text_encoders/gemma/embeddings_connector.py
+++ b/packages/ltx-core/src/ltx_core/text_encoders/gemma/embeddings_connector.py
@@ -20,6 +20,7 @@ class _BasicTransformerBlock1D(torch.nn.Module):
dim_head: int,
rope_type: LTXRopeType = LTXRopeType.SPLIT,
apply_gated_attention: bool = False,
+ ff_bias: bool = True,
):
super().__init__()
@@ -34,6 +35,7 @@ class _BasicTransformerBlock1D(torch.nn.Module):
self.ff = FeedForward(
dim,
dim_out=dim,
+ bias=ff_bias,
)
def forward(
@@ -90,7 +92,7 @@ class Embeddings1DConnector(torch.nn.Module):
_supports_gradient_checkpointing = True
- def __init__(
+ def __init__( # noqa: PLR0913
self,
attention_head_dim: int = 128,
num_attention_heads: int = 30,
@@ -102,6 +104,7 @@ class Embeddings1DConnector(torch.nn.Module):
rope_type: LTXRopeType = LTXRopeType.SPLIT,
double_precision_rope: bool = False,
apply_gated_attention: bool = False,
+ ff_bias: bool = True,
):
super().__init__()
self.num_attention_heads = num_attention_heads
@@ -121,6 +124,7 @@ class Embeddings1DConnector(torch.nn.Module):
dim_head=attention_head_dim,
rope_type=rope_type,
apply_gated_attention=apply_gated_attention,
+ ff_bias=ff_bias,
)
for _ in range(num_layers)
]
@@ -191,8 +195,8 @@ class Embeddings1DConnectorConfigurator(ModelConfigurator[Embeddings1DConnector]
"""Configurator for video embeddings connector."""
@classmethod
- def from_config(cls: type[Embeddings1DConnector], config: dict) -> Embeddings1DConnector:
- transformer_config = config.get("transformer", {})
+ def from_metadata(cls, metadata: dict) -> Embeddings1DConnector:
+ transformer_config = metadata.get("config", {}).get("transformer", {})
rope_type = LTXRopeType(transformer_config.get("rope_type", "split"))
double_precision_rope = transformer_config.get("frequencies_precision", False) == "float64"
pe_max_pos = transformer_config.get("connector_positional_embedding_max_pos", [1])
@@ -210,6 +214,7 @@ class Embeddings1DConnectorConfigurator(ModelConfigurator[Embeddings1DConnector]
rope_type=rope_type,
double_precision_rope=double_precision_rope,
apply_gated_attention=transformer_config.get("connector_apply_gated_attention", False),
+ ff_bias=transformer_config.get("connector_ff_bias", True),
)
return connector
@@ -218,8 +223,8 @@ class AudioEmbeddings1DConnectorConfigurator(ModelConfigurator[Embeddings1DConne
"""Configurator for audio embeddings connector with separate dimension settings."""
@classmethod
- def from_config(cls: type[Embeddings1DConnector], config: dict) -> Embeddings1DConnector:
- transformer_config = config.get("transformer", {})
+ def from_metadata(cls, metadata: dict) -> Embeddings1DConnector:
+ transformer_config = metadata.get("config", {}).get("transformer", {})
rope_type = LTXRopeType(transformer_config.get("rope_type", "split"))
double_precision_rope = transformer_config.get("frequencies_precision", False) == "float64"
pe_max_pos = transformer_config.get("connector_positional_embedding_max_pos", [1])
@@ -246,5 +251,6 @@ class AudioEmbeddings1DConnectorConfigurator(ModelConfigurator[Embeddings1DConne
rope_type=rope_type,
double_precision_rope=double_precision_rope,
apply_gated_attention=transformer_config.get("connector_apply_gated_attention", False),
+ ff_bias=transformer_config.get("connector_ff_bias", True),
)
return connector
diff --git a/packages/ltx-core/src/ltx_core/text_encoders/gemma/embeddings_processor.py b/packages/ltx-core/src/ltx_core/text_encoders/gemma/embeddings_processor.py
index c12d88f..d0a999b 100644
--- a/packages/ltx-core/src/ltx_core/text_encoders/gemma/embeddings_processor.py
+++ b/packages/ltx-core/src/ltx_core/text_encoders/gemma/embeddings_processor.py
@@ -3,6 +3,7 @@ from typing import NamedTuple
import torch
from torch import nn
+from ltx_core.model.disposable import Disposable
from ltx_core.text_encoders.gemma.embeddings_connector import Embeddings1DConnector
@@ -47,7 +48,7 @@ def _to_binary_mask(encoded_mask: torch.Tensor, lead_shape: tuple[int, int]) ->
return (encoded_mask < 0.000001).to(torch.int64).reshape([lead_shape[0], lead_shape[1], 1])
-class EmbeddingsProcessor(nn.Module):
+class EmbeddingsProcessor(nn.Module, Disposable):
"""Wraps feature extractor + video connector + optional audio connector.
Can operate in two modes:
1. create_embeddings(): Takes pre-computed features + additive mask (backward compat, used by trainer)
diff --git a/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/base_encoder.py b/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/base_encoder.py
index d280972..6dce7c8 100644
--- a/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/base_encoder.py
+++ b/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/base_encoder.py
@@ -1,25 +1,43 @@
+from __future__ import annotations
+
import functools
from pathlib import Path
+from typing import Any
import torch
-from transformers import AutoImageProcessor, Gemma3ForConditionalGeneration, Gemma3Processor
+from transformers import PreTrainedModel, ProcessorMixin
from ltx_core.loader.module_ops import ModuleOps
-from ltx_core.text_encoders.gemma.tokenizer import LTXVGemmaTokenizer
-from ltx_core.utils import find_matching_file
-
-
-class GemmaTextEncoder(torch.nn.Module):
+from ltx_core.model.disposable import Disposable
+from ltx_core.text_encoders.gemma.gemma_assets import (
+ TOKENIZER_MAX_LENGTH,
+ GemmaAssets,
+ build_gemma_hf_tokenizer,
+ build_gemma_processor,
+)
+from ltx_core.text_encoders.gemma.tokenizer import LTXGemmaTokenizer, PaddingSide
+
+# Sampling decoding for the Gemma 3 self-enhance path.
+GEMMA3_ENHANCE_GENERATION_KWARGS: dict[str, Any] = {"do_sample": True, "temperature": 0.7, "max_new_tokens": 512}
+# Greedy decoding for Gemma 4 instruct enhancers.
+GEMMA4_ENHANCE_GENERATION_KWARGS: dict[str, Any] = {
+ "do_sample": False,
+ "no_repeat_ngram_size": 5,
+ "max_new_tokens": 600,
+}
+
+
+class LTXGemmaTextEncoder(torch.nn.Module, Disposable):
"""Pure Gemma text encoder — runs the LLM and returns raw hidden states.
- Prompt enhancement (generate) is also supported since the full
- Gemma3ForConditionalGeneration model (including lm_head) is loaded.
+ Prompt enhancement (generate) is also supported since the full Gemma
+ multimodal-generation model (including lm_head) is loaded.
"""
def __init__(
self,
- model: Gemma3ForConditionalGeneration | None = None,
- tokenizer: LTXVGemmaTokenizer | None = None,
- processor: Gemma3Processor | None = None,
+ model: PreTrainedModel | None = None,
+ tokenizer: LTXGemmaTokenizer | None = None,
+ processor: ProcessorMixin | None = None,
dtype: torch.dtype = torch.bfloat16,
):
super().__init__()
@@ -28,11 +46,7 @@ class GemmaTextEncoder(torch.nn.Module):
self.processor = processor
self._dtype = dtype
- def encode(
- self,
- prompts: list[str],
- padding_side: str = "left", # noqa: ARG002
- ) -> list[tuple[tuple[torch.Tensor, ...], torch.Tensor]]:
+ def encode(self, prompts: list[str]) -> list[tuple[tuple[torch.Tensor, ...], torch.Tensor]]:
"""Run a single fused Gemma forward over a batch of prompts.
Calls the inner model (self.model.model) to skip lm_head logits computation
(~500 MiB saving). The tokenizer pads every prompt to ``max_length`` (1024),
@@ -56,14 +70,32 @@ class GemmaTextEncoder(torch.nn.Module):
del outputs
return [(tuple(h[i : i + 1] for h in hidden_states), attention_mask[i : i + 1]) for i in range(len(prompts))]
- # --- Prompt enhancement methods ---
+ def _model_type(self) -> str:
+ return getattr(getattr(self.model, "config", None), "model_type", "") or ""
+
+ def _default_generation_kwargs(self) -> dict[str, Any]:
+ model_type = self._model_type()
+ if model_type == "gemma3":
+ return dict(GEMMA3_ENHANCE_GENERATION_KWARGS)
+ if model_type == "gemma4":
+ return dict(GEMMA4_ENHANCE_GENERATION_KWARGS)
+ raise ValueError(f"Unsupported Gemma enhancer model_type={model_type!r}; expected 'gemma3' or 'gemma4'.")
+
+ def _default_system_prompt(self, *, t2v: bool) -> str:
+ model_type = self._model_type()
+ if model_type == "gemma3":
+ return default_gemma3_t2v_system_prompt() if t2v else default_gemma3_i2v_system_prompt()
+ if model_type == "gemma4":
+ return default_gemma4_t2v_system_prompt() if t2v else default_gemma4_i2v_system_prompt()
+ raise ValueError(f"Unsupported Gemma enhancer model_type={model_type!r}; expected 'gemma3' or 'gemma4'.")
def _enhance(
self,
- messages: list[dict[str, str]],
+ messages: list[dict],
image: torch.Tensor | None = None,
- max_new_tokens: int = 512,
+ max_new_tokens: int | None = None,
seed: int = 10,
+ static_cache: bool = False,
) -> str:
text = self.processor.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
@@ -75,16 +107,17 @@ class GemmaTextEncoder(torch.nn.Module):
pad_token_id = self.processor.tokenizer.pad_token_id if self.processor.tokenizer.pad_token_id is not None else 0
model_inputs = _pad_inputs_for_attention_alignment(model_inputs, pad_token_id=pad_token_id)
+ gen_kwargs = self._default_generation_kwargs()
+ if static_cache:
+ gen_kwargs["cache_implementation"] = "static"
+ if max_new_tokens is not None:
+ gen_kwargs["max_new_tokens"] = max_new_tokens
+
# fork_rng device pinning is only supported for CUDA; MPS/CPU fork CPU RNG only.
fork_devices = [self.model.device] if self.model.device.type == "cuda" else []
with torch.inference_mode(), torch.random.fork_rng(devices=fork_devices):
torch.manual_seed(seed)
- outputs = self.model.generate(
- **model_inputs,
- max_new_tokens=max_new_tokens,
- do_sample=True,
- temperature=0.7,
- )
+ outputs = self.model.generate(**model_inputs, **gen_kwargs)
generated_ids = outputs[0][len(model_inputs.input_ids[0]) :]
enhanced_prompt = self.processor.tokenizer.decode(generated_ids, skip_special_tokens=True)
@@ -93,30 +126,30 @@ class GemmaTextEncoder(torch.nn.Module):
def enhance_t2v(
self,
prompt: str,
- max_new_tokens: int = 512,
+ max_new_tokens: int | None = None,
system_prompt: str | None = None,
seed: int = 10,
+ static_cache: bool = False,
) -> str:
"""Enhance a text prompt for T2V generation."""
- system_prompt = system_prompt or self.default_gemma_t2v_system_prompt
-
+ system_prompt = system_prompt or self._default_system_prompt(t2v=True)
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": f"user prompt: {prompt}"},
]
-
- return self._enhance(messages, max_new_tokens=max_new_tokens, seed=seed)
+ return self._enhance(messages, max_new_tokens=max_new_tokens, seed=seed, static_cache=static_cache)
def enhance_i2v(
self,
prompt: str,
image: torch.Tensor,
- max_new_tokens: int = 512,
+ max_new_tokens: int | None = None,
system_prompt: str | None = None,
seed: int = 10,
+ static_cache: bool = False,
) -> str:
"""Enhance a text prompt for I2V generation using a reference image."""
- system_prompt = system_prompt or self.default_gemma_i2v_system_prompt
+ system_prompt = system_prompt or self._default_system_prompt(t2v=False)
messages = [
{"role": "system", "content": system_prompt},
{
@@ -127,44 +160,53 @@ class GemmaTextEncoder(torch.nn.Module):
],
},
]
- return self._enhance(messages, image=image, max_new_tokens=max_new_tokens, seed=seed)
-
- @functools.cached_property
- def default_gemma_i2v_system_prompt(self) -> str:
- return _load_system_prompt("gemma_i2v_system_prompt.txt")
-
- @functools.cached_property
- def default_gemma_t2v_system_prompt(self) -> str:
- return _load_system_prompt("gemma_t2v_system_prompt.txt")
+ return self._enhance(messages, image=image, max_new_tokens=max_new_tokens, seed=seed, static_cache=static_cache)
# --- Standalone utility functions ---
[email protected]_cache(maxsize=2)
[email protected]_cache(maxsize=4)
def _load_system_prompt(prompt_name: str) -> str:
with open(Path(__file__).parent / "prompts" / f"{prompt_name}", "r") as f:
return f.read()
+def default_gemma3_i2v_system_prompt() -> str:
+ return _load_system_prompt("gemma3_i2v_system_prompt.txt")
+
+
+def default_gemma3_t2v_system_prompt() -> str:
+ return _load_system_prompt("gemma3_t2v_system_prompt.txt")
+
+
+def default_gemma4_i2v_system_prompt() -> str:
+ return _load_system_prompt("gemma4_i2v_system_prompt.txt")
+
+
+def default_gemma4_t2v_system_prompt() -> str:
+ return _load_system_prompt("gemma4_t2v_system_prompt.txt")
+
+
def _cat_with_padding(
tensor: torch.Tensor,
padding_length: int,
value: int | float,
) -> torch.Tensor:
- """Concatenate a tensor with a padding tensor of the given value."""
- return torch.cat(
- [
- tensor,
- torch.full(
- (1, padding_length),
- value,
- dtype=tensor.dtype,
- device=tensor.device,
- ),
- ],
- dim=1,
+ """Left-pad a tensor (prepend the padding) with the given value.
+ Decoder-only LLMs must be LEFT-padded for generation: with right-padding the trailing
+ pad positions become the sequence end, so generate() continues from a pad position
+ instead of the real last token. Left-padding keeps the real last token at the end
+ while still aligning the sequence length to a multiple of 8.
+ See https://huggingface.co/docs/transformers/en/llm_tutorial#padding-side
+ """
+ pad = torch.full(
+ (1, padding_length),
+ value,
+ dtype=tensor.dtype,
+ device=tensor.device,
)
+ return torch.cat([pad, tensor], dim=1)
def _pad_inputs_for_attention_alignment(
@@ -186,29 +228,35 @@ def _pad_inputs_for_attention_alignment(
return model_inputs
+def build_gemma_tokenizer(assets: GemmaAssets) -> LTXGemmaTokenizer:
+ return LTXGemmaTokenizer(
+ build_gemma_hf_tokenizer(assets),
+ TOKENIZER_MAX_LENGTH,
+ padding_side=PaddingSide.LEFT,
+ )
+
+
def module_ops_from_gemma_root(gemma_root: str) -> tuple[ModuleOps, ...]:
- tokenizer_root = str(find_matching_file(gemma_root, "tokenizer.model").parent)
- processor_root = str(find_matching_file(gemma_root, "preprocessor_config.json").parent)
+ assets = GemmaAssets.load(gemma_root)
- def load_tokenizer(module: GemmaTextEncoder) -> GemmaTextEncoder:
- module.tokenizer = LTXVGemmaTokenizer(tokenizer_root, 1024)
+ def load_tokenizer(module: LTXGemmaTextEncoder) -> LTXGemmaTextEncoder:
+ module.tokenizer = build_gemma_tokenizer(assets)
return module
- def load_processor(module: GemmaTextEncoder) -> GemmaTextEncoder:
- image_processor = AutoImageProcessor.from_pretrained(processor_root, local_files_only=True, use_fast=False)
+ def load_processor(module: LTXGemmaTextEncoder) -> LTXGemmaTextEncoder:
if not module.tokenizer:
raise ValueError("Tokenizer model operation must be performed before processor model operation")
- module.processor = Gemma3Processor(image_processor=image_processor, tokenizer=module.tokenizer.tokenizer)
+ module.processor = build_gemma_processor(assets, module.tokenizer.tokenizer)
return module
tokenizer_load_ops = ModuleOps(
"TokenizerLoad",
- matcher=lambda module: isinstance(module, GemmaTextEncoder) and module.tokenizer is None,
+ matcher=lambda module: isinstance(module, LTXGemmaTextEncoder) and module.tokenizer is None,
mutator=load_tokenizer,
)
processor_load_ops = ModuleOps(
"ProcessorLoad",
- matcher=lambda module: isinstance(module, GemmaTextEncoder) and module.processor is None,
+ matcher=lambda module: isinstance(module, LTXGemmaTextEncoder) and module.processor is None,
mutator=load_processor,
)
return (tokenizer_load_ops, processor_load_ops)
diff --git a/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/encoder_configurator.py b/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/encoder_configurator.py
index 02ad973..1b2c2c1 100644
--- a/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/encoder_configurator.py
+++ b/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/encoder_configurator.py
@@ -1,51 +1,105 @@
+import hashlib
+import logging
+from os import fspath
+
import torch
-import transformers
-from transformers import Gemma3Config
+from transformers import AutoModelForImageTextToText, PretrainedConfig
from transformers.modeling_rope_utils import ROPE_INIT_FUNCTIONS
-from transformers.models.gemma3 import Gemma3ForConditionalGeneration
-from ltx_core.loader import KeyValueOperationResult
+from ltx_core.loader import KeyValueOperationResult, parse_model_version
from ltx_core.loader.module_ops import ModuleOps
from ltx_core.loader.sd_ops import SDOps
from ltx_core.model.model_protocol import ModelConfigurator
-from ltx_core.text_encoders.gemma.config import GEMMA3_CONFIG_FOR_LTX
from ltx_core.text_encoders.gemma.embeddings_connector import (
AudioEmbeddings1DConnectorConfigurator,
Embeddings1DConnectorConfigurator,
)
from ltx_core.text_encoders.gemma.embeddings_processor import EmbeddingsProcessor
-from ltx_core.text_encoders.gemma.encoders.base_encoder import GemmaTextEncoder
+from ltx_core.text_encoders.gemma.encoders.base_encoder import LTXGemmaTextEncoder, module_ops_from_gemma_root
from ltx_core.text_encoders.gemma.feature_extractor import (
FeatureExtractorV1,
FeatureExtractorV2,
)
+from ltx_core.text_encoders.gemma.gemma_assets import GemmaAssets, build_gemma_hf_config, resolve_gemma_weight_paths
+
+logger = logging.getLogger(__name__)
+
+
+def _load_gemma_config(gemma_model_path: str) -> PretrainedConfig:
+ """Load the Hugging Face config from a Gemma directory or single-file TE checkpoint."""
+ return build_gemma_hf_config(GemmaAssets.load(gemma_model_path))
+
+
+def gemma_model_config(gemma_model_path: str) -> dict:
+ """Return the Hugging Face Gemma config as a plain dict (includes ``model_type``)."""
+ return _load_gemma_config(gemma_model_path).to_dict()
+
+
+def gemma_model_type(gemma_model_path: str) -> str:
+ """Return the ``model_type`` declared in a Gemma checkpoint config."""
+ return gemma_model_config(gemma_model_path).get("model_type", "") or ""
+
+
+def _path_bound_configurator(cls: type, gemma_model_path: str) -> type:
+ """Subclass ``cls`` with a path-unique name so ``module_registry_key`` distinguishes HF roots.
+ ``from_metadata`` loads structure from the bound path (not from safetensors metadata), so a
+ shared ``__qualname__`` would collide across different Gemma trees.
+ """
+ digest = hashlib.sha256(fspath(gemma_model_path).encode()).hexdigest()[:16]
+ return type(f"{cls.__name__}_{digest}", (cls,), {"gemma_model_path": gemma_model_path})
-_TRANSFORMERS_V5: bool = int(transformers.__version__.split(".", 1)[0]) >= 5
+class GemmaTextEncoderConfigurator(ModelConfigurator[LTXGemmaTextEncoder]):
+ gemma_model_path: str | None = None
-class GemmaTextEncoderConfigurator(ModelConfigurator[GemmaTextEncoder]):
@classmethod
- def from_config(cls, config: dict) -> GemmaTextEncoder: # noqa: ARG003
- gemma_config = Gemma3Config.from_dict(GEMMA3_CONFIG_FOR_LTX.to_dict())
+ def with_gemma_model_path(cls, gemma_model_path: str) -> type["GemmaTextEncoderConfigurator"]:
+ """Return a configurator subclass bound to ``gemma_model_path``."""
+ return _path_bound_configurator(cls, gemma_model_path) # type: ignore[return-value]
+
+ @classmethod
+ def from_metadata(cls, metadata: dict) -> LTXGemmaTextEncoder: # noqa: ARG003
+ if cls.gemma_model_path is None:
+ raise ValueError(
+ "GemmaTextEncoderConfigurator must be specialized via "
+ "GemmaTextEncoderConfigurator.with_gemma_model_path(gemma_model_path) before use."
+ )
+
+ gemma_config = _load_gemma_config(cls.gemma_model_path)
+
with torch.device("meta"):
- model = Gemma3ForConditionalGeneration(gemma_config)
+ model = AutoModelForImageTextToText.from_config(gemma_config)
- return GemmaTextEncoder(model=model)
+ return LTXGemmaTextEncoder(model=model)
class EmbeddingsProcessorConfigurator(ModelConfigurator[EmbeddingsProcessor]):
+ gemma_model_path: str | None = None
+
+ @classmethod
+ def with_gemma_model_path(cls, gemma_model_path: str) -> type["EmbeddingsProcessorConfigurator"]:
+ return _path_bound_configurator(cls, gemma_model_path) # type: ignore[return-value]
+
@classmethod
- def from_config(cls, config: dict) -> EmbeddingsProcessor:
+ def from_metadata(cls, metadata: dict) -> EmbeddingsProcessor:
+ if cls.gemma_model_path is None:
+ raise ValueError(
+ "EmbeddingsProcessorConfigurator must be specialized via "
+ "EmbeddingsProcessorConfigurator.with_gemma_model_path(gemma_model_path) before use."
+ )
+ config = metadata.get("config", {})
transformer_config = config.get("transformer", {})
+ gemma_config = _load_gemma_config(cls.gemma_model_path)
+ _check_gemma_version(metadata, gemma_config, cls.gemma_model_path)
# Create video embeddings connector (always needed)
- video_connector = Embeddings1DConnectorConfigurator.from_config(config)
+ video_connector = Embeddings1DConnectorConfigurator.from_metadata(metadata)
# Create audio embeddings connector
- audio_connector = AudioEmbeddings1DConnectorConfigurator.from_config(config)
+ audio_connector = AudioEmbeddings1DConnectorConfigurator.from_metadata(metadata)
# Create feature extractor
- feature_extractor = _create_feature_extractor(transformer_config)
+ feature_extractor = _create_feature_extractor(transformer_config, gemma_config.text_config)
return EmbeddingsProcessor(
video_connector=video_connector,
@@ -54,6 +108,58 @@ class EmbeddingsProcessorConfigurator(ModelConfigurator[EmbeddingsProcessor]):
)
+# Floor from which a checkpoint must declare gemma_source_checkpoint. Deliberately below the
+# LTX-2.5 stamp so pre-release builds are covered too; LTX-2.3 / gemma3 checkpoints stay under it.
+_GEMMA_SOURCE_CHECKPOINT_REQUIRED_SINCE = (2, 4, 0)
+
+
+def _check_gemma_version(metadata: dict, gemma_config: PretrainedConfig, gemma_model_path: str) -> None:
+ """Verify the checkpoint's expected Gemma version matches the Gemma model being loaded.
+ Checkpoints that declare a ``gemma_source_checkpoint`` (LTX 2.5 / gemma4) must match its
+ ``gemma_version`` against the Gemma config's top-level ``gemma_version``. Older
+ checkpoints (no ``gemma_source_checkpoint``) are only checked for using a Gemma 3 text
+ encoder, unless their declared ``model_version`` is at or above
+ ``_GEMMA_SOURCE_CHECKPOINT_REQUIRED_SINCE``, in which case a ``gemma_source_checkpoint``
+ was required and its absence is itself an error.
+ """
+ gemma_source_checkpoint = metadata.get("gemma_source_checkpoint")
+ if gemma_source_checkpoint is not None:
+ expected_gemma_version = gemma_source_checkpoint.get("gemma_version")
+ actual_gemma_version = getattr(gemma_config, "gemma_version", None)
+ if expected_gemma_version != actual_gemma_version:
+ raise ValueError(
+ f"Gemma version mismatch: checkpoint's gemma_source_checkpoint expects "
+ f"gemma_version={expected_gemma_version!r}, but the Gemma config at "
+ f"{gemma_model_path!r} has gemma_version={actual_gemma_version!r}."
+ )
+ return
+
+ model_version = metadata.get("model_version")
+ if model_version is not None and parse_model_version(model_version) >= _GEMMA_SOURCE_CHECKPOINT_REQUIRED_SINCE:
+ actual_gemma_version = getattr(gemma_config, "gemma_version", None)
+ if actual_gemma_version is None:
+ logger.warning(
+ "Checkpoint model_version=%r requires gemma_source_checkpoint.gemma_version but "
+ "does not declare it, and the Gemma config at %r also has no gemma_version. "
+ "Skipping version check — verify compatibility manually.",
+ model_version,
+ gemma_model_path,
+ )
+ return
+ raise ValueError(
+ f"Checkpoint model_version={model_version!r} must declare "
+ "gemma_source_checkpoint.gemma_version, but none was found."
+ )
+
+ model_type = getattr(gemma_config, "model_type", None)
+ if model_type != "gemma3":
+ raise ValueError(
+ f"Checkpoint has no gemma_source_checkpoint (model_version={model_version!r}); "
+ f"expected a Gemma 3 config (model_type='gemma3') at {gemma_model_path!r}, got "
+ f"model_type={model_type!r}."
+ )
+
+
_V2_EXPECTED_CONFIG = {
"caption_proj_before_connector": True,
"caption_projection_first_linear": False,
@@ -62,14 +168,16 @@ _V2_EXPECTED_CONFIG = {
}
-def _create_feature_extractor(transformer_config: dict) -> torch.nn.Module:
+def _create_feature_extractor(transformer_config: dict, gemma_text_config: object) -> torch.nn.Module:
"""Select and create the appropriate feature extractor based on config.
Detection logic:
- V1: V2 config keys absent → projection lives in transformer
- V2: V2 config keys present with exact expected values → per-token RMS norm with dual aggregate embeds
- Anything else: NotImplementedError (config drift)
+ ``gemma_text_config`` is a transformers text-config (e.g. ``Gemma3TextConfig``); only
+ its ``hidden_size`` and ``num_hidden_layers`` fields are read, so this stays
+ family-agnostic.
"""
- gemma_text_config = GEMMA3_CONFIG_FOR_LTX.text_config
embedding_dim = gemma_text_config.hidden_size
num_layers = gemma_text_config.num_hidden_layers + 1 # +1 for the embedding layer
flat_dim = embedding_dim * num_layers
@@ -104,44 +212,121 @@ def _create_feature_extractor(transformer_config: dict) -> torch.nn.Module:
# --- Split SDOps: Gemma LLM keys vs Embeddings Processor keys ---
-def _build_gemma_llm_key_ops(*, transformers_v5: bool) -> SDOps:
- """Build the checkpoint-key remapping for the Gemma multimodal encoder.
- The vision-tower mapping differs between transformers <5 and >=5 because
- upstream PR https://github.com/huggingface/transformers/pull/39847 flattened
- ``Gemma3ForConditionalGeneration.model.vision_tower.vision_model`` into
- ``model.vision_tower``. Checkpoints continue to ship the legacy
- ``vision_tower.vision_model.*`` prefix, so we strip the inner ``vision_model.``
- when targeting v5 and pass it through unchanged for v4.
+def _with_tied_lm_head(ops: SDOps) -> SDOps:
+ """Mirror the shared embed_tokens weight onto lm_head at load time.
+ Gemma's lm_head (output layer) and embed_tokens (input embeddings) share one weight matrix,
+ so the checkpoint stores it only under embed_tokens -- there is no lm_head weight in the file.
+ When that one weight is loaded, also write it to lm_head, otherwise lm_head stays empty and
+ generation fails.
+ """
+ return ops.with_kv_operation(
+ operation=lambda key, value: [
+ KeyValueOperationResult(key, value),
+ KeyValueOperationResult("model.lm_head.weight", value),
+ ],
+ key_prefix="model.model.language_model.embed_tokens.weight",
+ )
+
+
+def _build_gemma3_llm_key_ops() -> SDOps:
+ """Map Gemma 3 checkpoint keys to the loaded model's state_dict keys.
+ Example, checkpoint key then loaded-model key:
+ language_model.model.embed_tokens.weight
+ model.model.language_model.embed_tokens.weight
+ The checkpoint vision key is always vision_tower.vision_model.encoder.X; on the loaded
+ model it lands at model.model.vision_tower.encoder.X. transformers 5.8 flattened
+ SiglipVisionModel -- the inner SiglipVisionTransformer (previously at .vision_model) was
+ hoisted up, so the vision_model. segment is gone.
"""
- base = (
- SDOps("GEMMA_LLM_KEY_OPS")
- # 1. Map language model layers (note the double .model prefix)
+ return _with_tied_lm_head(
+ SDOps("GEMMA3_LLM_KEY_OPS")
.with_matching(prefix="language_model.model.")
- .with_replacement("language_model.model.", "model.model.language_model.")
- # 2. Map the Vision Tower (version-dependent — see docstring)
.with_matching(prefix="vision_tower.")
- )
- if transformers_v5:
- base = base.with_replacement("vision_tower.vision_model.", "model.model.vision_tower.")
- else:
- base = base.with_replacement("vision_tower.", "model.model.vision_tower.")
- return (
- base
- # 3. Map the Multi-Modal Projector
.with_matching(prefix="multi_modal_projector.")
+ .with_replacement("language_model.model.", "model.model.language_model.")
+ .with_replacement("vision_tower.vision_model.", "model.model.vision_tower.")
.with_replacement("multi_modal_projector.", "model.model.multi_modal_projector.")
- # 4. Duplicate embed_tokens to lm_head (needed for prompt enhancement via generate())
- .with_kv_operation(
- operation=lambda key, value: [
- KeyValueOperationResult(key, value),
- KeyValueOperationResult("model.lm_head.weight", value),
- ],
- key_prefix="model.model.language_model.embed_tokens.weight",
+ )
+
+
+def _gemma4_unified_is_comfy_flat(gemma_model_path: str) -> bool:
+ """True when weights use Comfy's flattened ``model.layers.*`` LM layout."""
+ import safetensors # noqa: PLC0415 -- only needed on this probe path
+
+ for path in resolve_gemma_weight_paths(gemma_model_path):
+ with safetensors.safe_open(path, framework="pt") as handle:
+ keys = set(handle.keys())
+ if "model.layers.0.post_feedforward_layernorm.weight" in keys:
+ return True
+ if any(k.startswith("model.language_model.") for k in keys):
+ return False
+ return False
+
+
+def _build_gemma4_unified_llm_key_ops(*, comfy_flat: bool = False) -> SDOps:
+ """Checkpoint-key remapping for Gemma 4 unified (e.g. gemma-4-12B, model_type gemma4_unified).
+ * HF (``comfy_flat=False``): ``model.language_model.*`` / ``model.embed_*`` / ``model.vision_embedder.*``
+ * Comfy-flat (``comfy_flat=True``): LM under ``model.layers.*`` / ``model.embed_tokens.*``, and
+ vision/audio towers under Comfy ``vision_model.*`` / ``multi_modal_projector.*`` /
+ ``audio_projector.*`` (plus legacy HF ``model.vision_embedder.*`` / ``model.embed_*`` for
+ already-published TE files that only flattened the LM).
+ Both land on ``model.model.language_model.*`` / ``model.model.embed_vision.*`` /
+ ``model.model.embed_audio.*`` in the loaded module tree. Vision patch embedder loads as
+ ``embed_vision.``; its projection loads under ``embed_vision.multimodal_embedder.``.
+ """
+ ops = SDOps("GEMMA4_UNIFIED_LLM_KEY_OPS").with_matching(prefix="model.")
+ if comfy_flat:
+ ops = (
+ ops.with_matching(prefix="vision_model.")
+ .with_matching(prefix="multi_modal_projector.")
+ .with_matching(prefix="audio_projector.")
+ .with_replacement("model.layers.", "model.model.language_model.layers.")
+ .with_replacement("model.embed_tokens.", "model.model.language_model.embed_tokens.")
+ .with_replacement("model.norm.", "model.model.language_model.norm.")
+ )
+ else:
+ ops = ops.with_replacement("model.language_model.", "model.model.language_model.")
+ # Legacy HF tower names first (nested HF roots, or TE files that only flattened the LM).
+ # Comfy tower renames must run after these: ``audio_projector.`` → ``model.model.embed_audio.``
+ # would otherwise match the legacy ``model.embed_audio.`` rule and double-prefix.
+ ops = (
+ ops.with_replacement("model.embed_audio.", "model.model.embed_audio.")
+ .with_replacement(
+ "model.embed_vision.embedding_projection.",
+ "model.model.embed_vision.multimodal_embedder.embedding_projection.",
)
+ .with_replacement("model.vision_embedder.", "model.model.embed_vision.")
)
+ if comfy_flat:
+ ops = (
+ ops.with_replacement("vision_model.", "model.model.embed_vision.")
+ .with_replacement(
+ "multi_modal_projector.embedding_projection.",
+ "model.model.embed_vision.multimodal_embedder.embedding_projection.",
+ )
+ .with_replacement("audio_projector.", "model.model.embed_audio.")
+ )
+ return _with_tied_lm_head(ops)
-GEMMA_LLM_KEY_OPS = _build_gemma_llm_key_ops(transformers_v5=_TRANSFORMERS_V5)
+def _build_gemma4_dense_llm_key_ops() -> SDOps:
+ """Checkpoint-key remapping for dense Gemma 4 instruct (e.g. gemma-4-E2B-it, model_type gemma4).
+ Checkpoint keys already sit under ``model.<component>.*`` matching the HF module tree;
+ LTXGemmaTextEncoder nests that HF module at ``.model``, so remap each top-level component under
+ ``model.model.<component>``. (A naive ``model.`` → ``model.model.`` replace would also
+ rewrite the ``model.`` substring inside ``language_model.``.)
+ """
+ return _with_tied_lm_head(
+ SDOps("GEMMA4_DENSE_LLM_KEY_OPS")
+ .with_matching(prefix="model.")
+ .with_replacement("model.language_model.", "model.model.language_model.")
+ .with_replacement("model.vision_tower.", "model.model.vision_tower.")
+ .with_replacement("model.audio_tower.", "model.model.audio_tower.")
+ .with_replacement("model.embed_vision.", "model.model.embed_vision.")
+ .with_replacement("model.embed_audio.", "model.model.embed_audio.")
+ .with_replacement("model.multi_modal_projector.", "model.model.multi_modal_projector.")
+ )
+
EMBEDDINGS_PROCESSOR_KEY_OPS = (
SDOps("EMBEDDINGS_PROCESSOR_KEY_OPS")
@@ -174,51 +359,11 @@ VIDEO_ONLY_EMBEDDINGS_PROCESSOR_KEY_OPS = (
)
-def _resolve_local_base_freq(config: object) -> float:
- rope_parameters = getattr(config, "rope_parameters", None)
- if isinstance(rope_parameters, dict) and "sliding_attention" in rope_parameters:
- sliding = rope_parameters["sliding_attention"]
- if isinstance(sliding, dict) and "rope_theta" in sliding:
- return float(sliding["rope_theta"])
- if hasattr(config, "rope_local_base_freq"):
- return float(config.rope_local_base_freq)
- raise AttributeError(
- "Gemma text_config exposes neither rope_local_base_freq nor rope_parameters['sliding_attention']['rope_theta']"
- )
-
-
-def _resolve_full_rope_type(config: object) -> str:
- rope_parameters = getattr(config, "rope_parameters", None)
- if isinstance(rope_parameters, dict) and "full_attention" in rope_parameters:
- full = rope_parameters["full_attention"]
- if isinstance(full, dict) and "rope_type" in full:
- return str(full["rope_type"])
- rope_scaling = getattr(config, "rope_scaling", None)
- if rope_scaling is not None:
- if isinstance(rope_scaling, dict):
- if "rope_type" in rope_scaling:
- return str(rope_scaling["rope_type"])
- elif hasattr(rope_scaling, "rope_type"):
- return str(rope_scaling.rope_type)
- raise AttributeError(
- "Gemma text_config exposes neither rope_scaling.rope_type nor rope_parameters['full_attention']['rope_type']"
- )
-
-
-def _populate_rotary_v4(l_model: torch.nn.Module, config: object) -> None:
- """transformers <5 layout: separate ``rotary_emb_local`` + ``rotary_emb``."""
- dim = getattr(config, "head_dim", config.hidden_size // config.num_attention_heads)
- base = _resolve_local_base_freq(config)
- local_inv = 1.0 / (base ** (torch.arange(0, dim, 2, dtype=torch.int64).to(dtype=torch.float) / dim))
- full_inv, _ = ROPE_INIT_FUNCTIONS[_resolve_full_rope_type(config)](config)
- l_model.rotary_emb_local.register_buffer("inv_freq", local_inv)
- l_model.rotary_emb.register_buffer("inv_freq", full_inv)
-
-
def _populate_rotary_v5(l_model: torch.nn.Module, config: object) -> None:
- """transformers >=5 layout: single ``rotary_emb`` with per-layer-type buffers.
- Mirrors ``Gemma3PreTrainedModel._init_weights`` for ``Gemma3RotaryEmbedding``
- so meta-built models reach the same numerical state as a from_pretrained load.
+ """transformers >=5 layout: single rotary_emb with per-layer-type buffers.
+ Gemma 4's global ("full_attention") layers use a wider head_dim than the local layers, so when
+ such a layer uses "proportional" RoPE the init must read ``global_head_dim`` instead of the
+ default ``head_dim``. Gemma 3 never uses "proportional" RoPE, so the branch is inert there.
"""
rope_emb = l_model.rotary_emb
for layer_type in dict.fromkeys(config.layer_types):
@@ -229,36 +374,108 @@ def _populate_rotary_v5(l_model: torch.nn.Module, config: object) -> None:
if rope_type == "default":
inv_freq, attn_scaling = rope_emb.compute_default_rope_parameters(config, layer_type=layer_type)
else:
- inv_freq, attn_scaling = ROPE_INIT_FUNCTIONS[rope_type](config, layer_type=layer_type)
+ init_kwargs = {"layer_type": layer_type}
+ if layer_type == "full_attention" and rope_type == "proportional":
+ init_kwargs["head_dim_key"] = "global_head_dim"
+ inv_freq, attn_scaling = ROPE_INIT_FUNCTIONS[rope_type](config, **init_kwargs)
rope_emb.register_buffer(f"{layer_type}_inv_freq", inv_freq, persistent=False)
rope_emb.register_buffer(f"{layer_type}_original_inv_freq", inv_freq.clone(), persistent=False)
setattr(rope_emb, f"{layer_type}_attention_scaling", attn_scaling)
-def create_and_populate(module: GemmaTextEncoder) -> GemmaTextEncoder:
+def _populate_language_model_buffers(module: LTXGemmaTextEncoder) -> LTXGemmaTextEncoder:
+ """Populate the non-persistent rotary and embed-scale buffers shared by all Gemma families."""
model = module.model
- v_tower = model.model.vision_tower
- v_model = v_tower.vision_model if hasattr(v_tower, "vision_model") else v_tower
l_model = model.model.language_model
-
config = model.config.text_config
- if hasattr(l_model, "rotary_emb_local"):
- _populate_rotary_v4(l_model, config)
- else:
- _populate_rotary_v5(l_model, config)
+ _populate_rotary_v5(l_model, config)
- positions_length = len(v_model.embeddings.position_ids[0])
- position_ids = torch.arange(positions_length, dtype=torch.long, device="cpu").unsqueeze(0)
- v_model.embeddings.register_buffer("position_ids", position_ids)
embed_scale = torch.tensor(config.hidden_size**0.5, device="cpu")
- l_model.embed_tokens.register_buffer("embed_scale", embed_scale)
+ l_model.embed_tokens.register_buffer("embed_scale", embed_scale, persistent=False)
+
+ # Dense gemma4 also has per-layer input embeddings; unified/gemma3 do not.
+ if hasattr(l_model, "embed_tokens_per_layer"):
+ per_layer_scale = torch.tensor(config.hidden_size_per_layer_input**0.5, device="cpu")
+ l_model.embed_tokens_per_layer.register_buffer("embed_scale", per_layer_scale, persistent=False)
return module
-GEMMA_MODEL_OPS = ModuleOps(
- name="GemmaModel",
- matcher=lambda module: hasattr(module, "model") and isinstance(module.model, Gemma3ForConditionalGeneration),
- mutator=create_and_populate,
-)
+def _create_and_populate_gemma3(module: LTXGemmaTextEncoder) -> LTXGemmaTextEncoder:
+ module = _populate_language_model_buffers(module)
+
+ v_tower = module.model.model.vision_tower
+ positions_length = len(v_tower.embeddings.position_ids[0])
+ position_ids = torch.arange(positions_length, dtype=torch.long, device="cpu").unsqueeze(0)
+ v_tower.embeddings.register_buffer("position_ids", position_ids, persistent=False)
+
+ return module
+
+
+def _create_and_populate_gemma4_unified(module: LTXGemmaTextEncoder) -> LTXGemmaTextEncoder:
+ """Populate buffers for the Gemma 4 unified text encoder.
+ The unified model is encoder-free: vision/audio inputs go through lightweight embedders
+ (model.model.embed_vision / .embed_audio) that carry no RoPE, so unlike Gemma 3 there is no
+ vision_tower to seed.
+ """
+ return _populate_language_model_buffers(module)
+
+
+def _create_and_populate_gemma4_dense(module: LTXGemmaTextEncoder) -> LTXGemmaTextEncoder:
+ """Populate buffers for dense Gemma 4 instruct (enhance-capable).
+ Same language-model buffers as unified, plus vision-tower RoPE (needed for I2V enhance).
+ """
+ module = _populate_language_model_buffers(module)
+
+ vision_tower = module.model.model.vision_tower
+ rotary = vision_tower.encoder.rotary_emb
+ rope_fn = (
+ ROPE_INIT_FUNCTIONS[rotary.rope_type]
+ if rotary.rope_type != "default"
+ else rotary.compute_default_rope_parameters
+ )
+ inv_freq, _ = rope_fn(rotary.config)
+ rotary.register_buffer("inv_freq", inv_freq, persistent=False)
+ rotary.register_buffer("original_inv_freq", inv_freq.clone(), persistent=False)
+
+ return module
+
+
+def get_gemma_ops(gemma_model_path: str) -> tuple[SDOps, tuple[ModuleOps, ...]]:
+ """Return the SDOps and the full module-ops tuple for loading a Gemma text encoder.
+ The module ops are the config-derived buffer population (family-specific) followed by the
+ tokenizer/processor asset loaders (family-agnostic), ready to pass straight to a Builder.
+ Supported ``model_type`` values:
+ - ``gemma3`` — encode + enhance
+ - ``gemma4_unified`` — encode only
+ - ``gemma4`` — dense instruct, enhance only (same encoder/builder stack)
+ """
+ asset_ops = module_ops_from_gemma_root(gemma_model_path)
+ model_type = gemma_model_type(gemma_model_path)
+ if model_type == "gemma4_unified":
+ gemma4_unified_model_ops = ModuleOps(
+ name="GemmaModel",
+ matcher=lambda module: isinstance(module, LTXGemmaTextEncoder),
+ mutator=_create_and_populate_gemma4_unified,
+ )
+ comfy_flat = _gemma4_unified_is_comfy_flat(gemma_model_path)
+ return _build_gemma4_unified_llm_key_ops(comfy_flat=comfy_flat), (gemma4_unified_model_ops, *asset_ops)
+ if model_type == "gemma4":
+ gemma4_dense_model_ops = ModuleOps(
+ name="GemmaModel",
+ matcher=lambda module: isinstance(module, LTXGemmaTextEncoder),
+ mutator=_create_and_populate_gemma4_dense,
+ )
+ return _build_gemma4_dense_llm_key_ops(), (gemma4_dense_model_ops, *asset_ops)
+ if model_type == "gemma3":
+ gemma3_model_ops = ModuleOps(
+ name="GemmaModel",
+ matcher=lambda module: isinstance(module, LTXGemmaTextEncoder),
+ mutator=_create_and_populate_gemma3,
+ )
+ return _build_gemma3_llm_key_ops(), (gemma3_model_ops, *asset_ops)
+ raise ValueError(
+ f"Unsupported Gemma text-encoder model_type {model_type!r} loaded from {gemma_model_path}. "
+ "Supported model types are 'gemma3', 'gemma4', and 'gemma4_unified'."
+ )
diff --git a/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/prompts/gemma_i2v_system_prompt.txt b/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/prompts/gemma3_i2v_system_prompt.txt
similarity index 100%
rename from packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/prompts/gemma_i2v_system_prompt.txt
rename to packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/prompts/gemma3_i2v_system_prompt.txt
diff --git a/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/prompts/gemma_t2v_system_prompt.txt b/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/prompts/gemma3_t2v_system_prompt.txt
similarity index 100%
rename from packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/prompts/gemma_t2v_system_prompt.txt
rename to packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/prompts/gemma3_t2v_system_prompt.txt
diff --git a/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/prompts/gemma4_i2v_system_prompt.txt b/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/prompts/gemma4_i2v_system_prompt.txt
new file mode 100644
index 0000000..31f58e6
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/prompts/gemma4_i2v_system_prompt.txt
@@ -0,0 +1,27 @@
+You are given a REFERENCE IMAGE (the exact first frame of the video) and a user's short image-to-video request. Write a single, highly detailed audio-visual caption describing the video that BEGINS from this exact reference image and best fulfills that request, in the EXACT style of the training captions used for this video model. The generated video is scored against the user's ORIGINAL request, so preserve every element the user stated; expand faithfully into the full caption style without contradicting or dropping anything they asked for.
+
+FIRST-FRAME / IMAGE GROUNDING (do this first): the opening of your caption must match the reference image exactly — same subject(s), identity, appearance, clothing, setting, lighting, and composition as shown. The video starts on this frame; describe it faithfully, then narrate chronologically as the user's requested action unfolds from it. Never contradict, replace, or invent things not consistent with the image. Single continuous take — no hard cuts.
+
+Match this captioning style precisely:
+
+1. Begin immediately with the action or visual detail. Do NOT use "The scene opens…", "We see…", "There is…".
+
+2. Objective, observable description only. Do not infer emotions or intentions — describe what is visible and audible (e.g. not "he looks sad" but "his eyebrows angle downward and his lips are pressed together").
+
+3. Full visual detail: environment (materials, textures, lighting, colors), character appearance (clothing, posture, facial details), and the spatial positioning of all elements — grounded in and consistent with the reference image. When a human appears, identify them specifically (gendered terms when clearly implied; differentiate multiple people consistently) and describe visible physical attributes — apparent gender presentation, skin tone, estimated age group, hair color/length/style, build, clothing and accessories. Do not infer ethnicity, nationality, religion, or culture.
+
+4. Precise motion and cinematic description. For every shot you MUST include, woven naturally into the prose (never as tags or labels):
+ - Shot type (exactly one: extreme wide shot / wide shot / medium shot / medium close-up / close-up / extreme close-up) — consistent with how the reference image is framed at the start.
+ - Camera motion (always stated; if none, explicitly say the camera remains static). Camera movement is expected and good — match the user if they specified it, otherwise choose the treatment that best presents the requested scene starting from this frame.
+ - Camera viewpoint relative to subject (front-facing / back-facing / side view / over-the-shoulder / top-down / low-angle / high-angle) — matching the reference image's viewpoint at the opening.
+ Express these as flowing prose: "a medium shot frames…, captured from a front-facing angle as the camera slowly pans…". Never as "medium shot, static camera —".
+
+5. Complete soundscape, integrated naturally: any dialogue (quote it exactly, in the original language), tone of voice, background music (type, mood, volume changes), and environmental sounds (footsteps, wind, traffic, animals). If the request implies sound, describe it plausibly.
+
+6. Strict chronological, real-time flow using transitions like "Initially…", "A moment later…", "Simultaneously…". Keep the user's requested motion/action central and in motion throughout.
+
+7. One single continuous paragraph. No bullet points, no section headers, no labels like "Audio:" or "Visual:". Exhaustive and lossless — include background elements, subtle movements, lighting, secondary sounds — detailed enough to reconstruct the scene. Aim for a rich, complete paragraph (roughly 150–220 words).
+
+If the user wrote in another language, produce the English caption of the same content. Output ONLY the caption text — no JSON, no preamble.
+
+AESTHETIC QUALITY (in addition to the above, without breaking the objective caption style or contradicting the reference image): render the described scene with strong visual production value — cinematic, film-grade color and contrast, beautiful natural lighting, crisp fine detail and texture, pleasing composition and depth. Weave these quality descriptors naturally into the same observable prose (e.g. "warm cinematic lighting", "richly saturated film-grade color", "crisp high-resolution detail") — describe how the exact requested scene, starting from this frame, LOOKS at its most visually striking, never adding new objects or actions and never contradicting the first frame. Keep everything else (first-frame grounding, framing triple, soundscape, chronological single paragraph, faithfulness) exactly as specified.
diff --git a/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/prompts/gemma4_t2v_system_prompt.txt b/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/prompts/gemma4_t2v_system_prompt.txt
new file mode 100644
index 0000000..95fc9e8
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/prompts/gemma4_t2v_system_prompt.txt
@@ -0,0 +1,25 @@
+You are given a user's short text-to-video request. Write a single, highly detailed audio-visual caption describing the video that best fulfills that request, in the EXACT style of the training captions used for this video model. The generated video is scored against the user's ORIGINAL request, so preserve every element the user stated; expand faithfully into the full caption style without contradicting or dropping anything they asked for.
+
+Match this captioning style precisely:
+
+1. Begin immediately with the action or visual detail. Do NOT use "The scene opens…", "We see…", "There is…".
+
+2. Objective, observable description only. Do not infer emotions or intentions — describe what is visible and audible (e.g. not "he looks sad" but "his eyebrows angle downward and his lips are pressed together").
+
+3. Full visual detail: environment (materials, textures, lighting, colors), character appearance (clothing, posture, facial details), and the spatial positioning of all elements. When a human appears, identify them specifically (gendered terms when clearly implied; differentiate multiple people consistently) and describe visible physical attributes — apparent gender presentation, skin tone, estimated age group, hair color/length/style, build, clothing and accessories. Do not infer ethnicity, nationality, religion, or culture.
+
+4. Precise motion and cinematic description. For every shot you MUST include, woven naturally into the prose (never as tags or labels):
+ - Shot type (exactly one: extreme wide shot / wide shot / medium shot / medium close-up / close-up / extreme close-up)
+ - Camera motion (always stated; if none, explicitly say the camera remains static). Camera movement is expected and good — match the user if they specified it, otherwise choose the treatment that best presents the requested scene.
+ - Camera viewpoint relative to subject (front-facing / back-facing / side view / over-the-shoulder / top-down / low-angle / high-angle).
+ Express these as flowing prose: "a medium shot frames…, captured from a front-facing angle as the camera slowly pans…". Never as "medium shot, static camera —".
+
+5. Complete soundscape, integrated naturally: any dialogue (quote it exactly, in the original language), tone of voice, background music (type, mood, volume changes), and environmental sounds (footsteps, wind, traffic, animals). If the request implies sound, describe it plausibly.
+
+6. Strict chronological, real-time flow using transitions like "Initially…", "A moment later…", "Simultaneously…". Keep every stated action in motion.
+
+7. One single continuous paragraph. No bullet points, no section headers, no labels like "Audio:" or "Visual:". Exhaustive and lossless — include background elements, subtle movements, lighting, secondary sounds — detailed enough to reconstruct the scene. Aim for a rich, complete paragraph (roughly 150–220 words).
+
+If the user wrote in another language, produce the English caption of the same content. Output ONLY the caption text — no JSON, no preamble.
+
+AESTHETIC QUALITY (in addition to the above, without breaking the objective caption style): render the described scene with strong visual production value — cinematic, film-grade color and contrast, beautiful natural lighting, crisp fine detail and texture, pleasing composition and depth. Weave these quality descriptors naturally into the same observable prose (e.g. "warm cinematic lighting", "richly saturated film-grade color", "crisp high-resolution detail") — describe how the exact requested scene LOOKS at its most visually striking, never adding new objects or actions. Keep everything else (framing triple, soundscape, chronological single paragraph, faithfulness) exactly as specified.
diff --git a/packages/ltx-core/src/ltx_core/text_encoders/gemma/gemma_assets.py b/packages/ltx-core/src/ltx_core/text_encoders/gemma/gemma_assets.py
new file mode 100644
index 0000000..f8ba224
--- /dev/null
+++ b/packages/ltx-core/src/ltx_core/text_encoders/gemma/gemma_assets.py
@@ -0,0 +1,396 @@
+"""In-memory Gemma HuggingFace assets (load + HF builders + TE pack helpers).
+Supports two on-disk layouts via :class:`GemmaAssets`:
+* HF directory root (flat or nested ``_readout_proj``)
+* Packed single-file TE ``.safetensors`` with embedded config / tokenizer / sidecars
+HF objects (config, tokenizer, processor) are built from the in-memory buffers. Pack helpers
+embed a ``gemma_root`` (+ projections) into a TE file.
+"""
+
+from __future__ import annotations
+
+import json
+import logging
+from collections.abc import Mapping
+from dataclasses import dataclass
+from pathlib import Path
+from typing import Any
+
+import numpy as np
+import safetensors
+import torch
+import transformers
+from safetensors.torch import save_file
+from tokenizers import Tokenizer
+from transformers import PretrainedConfig, PreTrainedTokenizerBase, PreTrainedTokenizerFast, ProcessorMixin
+from transformers.feature_extraction_utils import FeatureExtractionMixin
+from transformers.image_processing_utils import BaseImageProcessor
+from transformers.models.auto.configuration_auto import CONFIG_MAPPING
+from transformers.video_processing_utils import BaseVideoProcessor
+
+from ltx_core.utils import find_matching_file
+
+logger = logging.getLogger(__name__)
+
+GEMMA_CONFIG_METADATA_KEY = "gemma_config"
+TOKENIZER_JSON_TENSOR_KEY = "tokenizer_json"
+HF_ASSET_TENSOR_PREFIX = "hf_asset__"
+
+_REQUIRED_ASSET_FILENAMES = (
+ "tokenizer_config.json",
+ "processor_config.json",
+)
+# Older / Comfy packs may store these as metadata strings instead of ``hf_asset__`` tensors.
+_METADATA_FALLBACK_FILENAMES = (
+ *_REQUIRED_ASSET_FILENAMES,
+ "chat_template.jinja",
+ "generation_config.json",
+)
+# Collect by pattern (not allowlist) so future processor sidecars are not silently dropped.
+_ASSET_GLOBS = ("*.json", "*.jinja")
+_ASSET_GLOB_EXCLUDES = frozenset({"config.json", "tokenizer.json"})
+
+
+def is_safetensors_file(path: str | Path) -> bool:
+ p = Path(path)
+ return p.is_file() and p.suffix == ".safetensors"
+
+
+@dataclass(frozen=True, slots=True)
+class GemmaAssets:
+ """In-memory Gemma HF assets loaded from a directory root or a single TE file."""
+
+ source: str
+ config_dict: Mapping[str, Any]
+ tokenizer_json: bytes
+ sidecars: Mapping[str, bytes]
+ weight_paths: tuple[str, ...]
+
+ @classmethod
+ def load(cls, path: str | Path) -> GemmaAssets:
+ p = Path(path)
+ if p.is_dir():
+ return cls.from_root(p)
+ if is_safetensors_file(p):
+ return cls.from_single_file(p)
+ raise FileNotFoundError(f"Gemma path {path!r} is neither a directory nor a .safetensors file.")
+
+ @classmethod
+ def from_root(cls, root: Path) -> GemmaAssets:
+ """Load an HF Gemma directory (flat or nested ``_readout_proj``)."""
+ root = Path(root)
+ config_path = find_matching_file(str(root), "config.json")
+ tokenizer_path = find_matching_file(str(root), "tokenizer.json")
+ config_dict = json.loads(config_path.read_bytes())
+ tokenizer_json = tokenizer_path.read_bytes()
+
+ # Nested roots can duplicate basenames; keep the first hit (matches find_matching_file).
+ sidecars: dict[str, bytes] = {}
+ for pattern in _ASSET_GLOBS:
+ for path in sorted(root.rglob(pattern)):
+ if not path.is_file() or path.name in _ASSET_GLOB_EXCLUDES:
+ continue
+ sidecars.setdefault(path.name, path.read_bytes())
+
+ assets = cls(
+ source=str(root),
+ config_dict=config_dict,
+ tokenizer_json=tokenizer_json,
+ sidecars=sidecars,
+ weight_paths=resolve_gemma_weight_paths(str(root)),
+ )
+ assets._require_sidecars(*_REQUIRED_ASSET_FILENAMES)
+ return assets
+
+ @classmethod
+ def from_single_file(cls, path: Path) -> GemmaAssets:
+ path = Path(path)
+ with safetensors.safe_open(str(path), framework="pt") as f:
+ meta = f.metadata() or {}
+ raw_config = meta.get(GEMMA_CONFIG_METADATA_KEY)
+ if raw_config is None:
+ raise ValueError(
+ f"Safetensors text-encoder {path} is missing metadata key "
+ f"{GEMMA_CONFIG_METADATA_KEY!r} (JSON-encoded HuggingFace config)."
+ )
+ config_dict = json.loads(raw_config)
+
+ keys = set(f.keys())
+ if TOKENIZER_JSON_TENSOR_KEY not in keys:
+ raise ValueError(f"Safetensors text-encoder {path} is missing tensor {TOKENIZER_JSON_TENSOR_KEY!r}.")
+ tokenizer_json = _tensor_to_bytes(f.get_tensor(TOKENIZER_JSON_TENSOR_KEY))
+
+ sidecars: dict[str, bytes] = {}
+ for key in keys:
+ if not key.startswith(HF_ASSET_TENSOR_PREFIX):
+ continue
+ name = key.removeprefix(HF_ASSET_TENSOR_PREFIX)
+ sidecars[name] = _tensor_to_bytes(f.get_tensor(key))
+
+ for name in _METADATA_FALLBACK_FILENAMES:
+ if name in sidecars or name not in meta:
+ continue
+ sidecars[name] = meta[name].encode()
+
+ assets = cls(
+ source=str(path),
+ config_dict=config_dict,
+ tokenizer_json=tokenizer_json,
+ sidecars=sidecars,
+ weight_paths=(str(path.resolve()),),
+ )
+ assets._require_sidecars(*_REQUIRED_ASSET_FILENAMES)
+ return assets
+
+ def sidecar_bytes(self, name: str) -> bytes:
+ try:
+ return self.sidecars[name]
+ except KeyError as exc:
+ raise KeyError(f"Gemma assets from {self.source!r} are missing sidecar {name!r}.") from exc
+
+ def sidecar_json(self, name: str) -> dict[str, Any]:
+ return json.loads(self.sidecar_bytes(name))
+
+ def _require_sidecars(self, *names: str) -> None:
+ missing = [name for name in names if name not in self.sidecars]
+ if missing:
+ raise ValueError(
+ f"Gemma assets from {self.source!r} are missing required sidecar(s): {', '.join(missing)}. "
+ f"Embed as {HF_ASSET_TENSOR_PREFIX}<name> (or metadata for small JSON)."
+ )
+
+
+TOKENIZER_MAX_LENGTH = 1024
+
+# ``added_tokens_decoder`` is for from_pretrained reconstruction; as a kwarg it TypeErrors.
+_TOKENIZER_CONFIG_SKIP = frozenset(
+ {
+ "tokenizer_class",
+ "auto_map",
+ "model_max_length",
+ "backend",
+ "is_local",
+ "local_files_only",
+ "processor_class",
+ "added_tokens_decoder",
+ }
+)
+
+_SUBPROCESSOR_BASES: dict[str, type] = {
+ "image_processor": BaseImageProcessor,
+ "feature_extractor": FeatureExtractionMixin,
+ "video_processor": BaseVideoProcessor,
+}
+
+# gemma3 stores image-processor config in preprocessor_config.json, not nested in processor_config.
+_SUBPROCESSOR_SIDECAR_FALLBACKS: dict[str, tuple[str, ...]] = {
+ "image_processor": ("preprocessor_config.json",),
+ "feature_extractor": ("preprocessor_config.json",),
+ "video_processor": ("video_preprocessor_config.json", "preprocessor_config.json"),
+}
+
+
+def _resolve_transformers_class(name: str, base: type) -> type:
+ if not isinstance(name, str) or not name.isidentifier():
+ raise ValueError(f"Invalid transformers class name {name!r}.")
+ cls = getattr(transformers, name, None)
+ if cls is None or not isinstance(cls, type) or not issubclass(cls, base):
+ raise ValueError(f"transformers.{name} is not a subclass of {base.__name__}.")
+ return cls
+
+
+def _resolve_subprocessor_class(attribute: str, type_name: str) -> type:
+ """Resolve a Processor sub-component class from its declared ``*_type`` name.
+ For ``image_processor``, prefer the PIL backend (``*Pil``) when available. That matches
+ the legacy disk loader's ``AutoImageProcessor.from_pretrained(..., use_fast=False)``
+ (now ``backend="pil"``). The torchvision ``Gemma4ImageProcessor`` path produces
+ slightly different pixel values and shifts I2V enhance goldens.
+ """
+ base = _SUBPROCESSOR_BASES[attribute]
+ if attribute == "image_processor" and not type_name.endswith("Pil"):
+ pil_cls = getattr(transformers, f"{type_name}Pil", None)
+ if isinstance(pil_cls, type) and issubclass(pil_cls, base):
+ return pil_cls
+ return _resolve_transformers_class(type_name, base)
+
+
+def _chat_template_from_assets(assets: GemmaAssets) -> str | None:
+ if (tpl := assets.sidecars.get("chat_template.jinja")) is not None:
+ return tpl.decode()
+ raw = assets.sidecars.get("chat_template.json")
+ if raw is None:
+ return None
+ loaded = json.loads(raw)
+ if isinstance(loaded, str):
+ return loaded
+ if isinstance(loaded, dict) and isinstance(loaded.get("chat_template"), str):
+ return loaded["chat_template"]
+ return None
+
+
+def build_gemma_hf_config(assets: GemmaAssets) -> PretrainedConfig:
+ model_type = assets.config_dict.get("model_type")
+ if not model_type:
+ raise ValueError(f"Gemma config from {assets.source!r} is missing model_type.")
+ try:
+ config_cls = CONFIG_MAPPING[model_type]
+ except KeyError as exc:
+ raise ValueError(f"Unsupported Gemma model_type={model_type!r} in assets from {assets.source!r}.") from exc
+ return config_cls.from_dict(dict(assets.config_dict))
+
+
+def build_gemma_hf_tokenizer(assets: GemmaAssets, max_length: int = TOKENIZER_MAX_LENGTH) -> PreTrainedTokenizerFast:
+ tokenizer_cfg = assets.sidecar_json("tokenizer_config.json")
+ kwargs = {k: v for k, v in tokenizer_cfg.items() if k not in _TOKENIZER_CONFIG_SKIP}
+ if (tpl := _chat_template_from_assets(assets)) is not None:
+ kwargs.setdefault("chat_template", tpl)
+ return PreTrainedTokenizerFast(
+ tokenizer_object=Tokenizer.from_buffer(assets.tokenizer_json),
+ model_max_length=max_length,
+ **kwargs,
+ )
+
+
+def build_gemma_processor(assets: GemmaAssets, hf_tokenizer: PreTrainedTokenizerBase) -> ProcessorMixin:
+ processor_cfg = assets.sidecar_json("processor_config.json")
+ processor_class_name = processor_cfg.get("processor_class")
+ if not processor_class_name:
+ raise ValueError(f"processor_config.json from {assets.source!r} is missing processor_class.")
+ processor_class = _resolve_transformers_class(processor_class_name, ProcessorMixin)
+
+ components: dict[str, Any] = {"tokenizer": hf_tokenizer}
+ for name in processor_class.get_attributes():
+ if name in components:
+ continue
+ if name not in _SUBPROCESSOR_BASES:
+ raise ValueError(
+ f"Unsupported processor attribute {name!r} in {processor_class_name} (assets from {assets.source!r})."
+ )
+ if name in processor_cfg and isinstance(processor_cfg[name], dict):
+ sub_cfg = dict(processor_cfg[name])
+ else:
+ sub_cfg = None
+ for fname in _SUBPROCESSOR_SIDECAR_FALLBACKS.get(name, ()):
+ if fname in assets.sidecars:
+ sub_cfg = assets.sidecar_json(fname)
+ break
+ if sub_cfg is None:
+ raise ValueError(
+ f"No nested {name!r} config in processor_config.json and no fallback sidecar "
+ f"for assets from {assets.source!r}."
+ )
+ type_key = f"{name}_type"
+ type_name = sub_cfg.get(type_key)
+ if not type_name:
+ raise ValueError(f"Missing {type_key!r} for processor attribute {name!r} (assets from {assets.source!r}).")
+ concrete = _resolve_subprocessor_class(name, type_name)
+ components[name] = concrete.from_dict(sub_cfg)
+
+ extra = {
+ k: v for k, v in processor_cfg.items() if k not in processor_class.get_attributes() and k != "processor_class"
+ }
+ return processor_class(**components, **extra)
+
+
+def resolve_gemma_weight_paths(gemma_model_path: str) -> tuple[str, ...]:
+ path = Path(gemma_model_path)
+ if is_safetensors_file(path):
+ return (str(path.resolve()),)
+ model_folder = find_matching_file(gemma_model_path, "model*.safetensors").parent
+ return tuple(str(p) for p in sorted(model_folder.rglob("*.safetensors")))
+
+
+def _tensor_to_bytes(tensor: torch.Tensor) -> bytes:
+ arr = tensor.detach().cpu().numpy()
+ if arr.dtype == np.uint8:
+ return arr.tobytes()
+ # Comfy may store tokenizer_json as int8 (or other integer dtypes).
+ return arr.astype(np.uint8).tobytes()
+
+
+def _bytes_to_uint8_tensor(data: bytes) -> torch.Tensor:
+ return torch.from_numpy(np.frombuffer(data, dtype=np.uint8).copy())
+
+
+def _flatten_gemma4_unified_keys_for_comfy(key: str) -> str:
+ """Map HF ``gemma4_unified`` keys to ComfyUI's LTXAV TE module names.
+ * LM: ``model.language_model.*`` → ``model.*`` so ``detect_te_model`` sees
+ ``model.layers.0.post_feedforward_layernorm.weight``.
+ * Vision / modality towers: HF ``model.vision_embedder.*`` /
+ ``model.embed_vision.*`` / ``model.embed_audio.*`` → Comfy
+ ``vision_model.*`` / ``multi_modal_projector.*`` / ``audio_projector.*``.
+ Without this remap, Comfy ``load_sd(..., strict=False)`` leaves those 11
+ tensors at random init (see ``docs/ltx-2.5-gemma4-missing-tensors.md``).
+ """
+ if key.startswith("model.language_model."):
+ return "model." + key.removeprefix("model.language_model.")
+ if key.startswith("model.vision_embedder."):
+ return "vision_model." + key.removeprefix("model.vision_embedder.")
+ if key.startswith("model.embed_vision."):
+ return "multi_modal_projector." + key.removeprefix("model.embed_vision.")
+ if key.startswith("model.embed_audio."):
+ return "audio_projector." + key.removeprefix("model.embed_audio.")
+ return key
+
+
+def build_text_encoder_tensors_from_gemma_root(
+ gemma_root: str,
+ projection_tensors: dict[str, torch.Tensor],
+ *,
+ gemma_version: str | None = None,
+ comfy_flat_lm_keys: bool = True,
+) -> tuple[dict[str, torch.Tensor], dict[str, str]]:
+ """Assemble TE safetensors payloads (weights + assets) from an HF ``gemma_root``.
+ When ``comfy_flat_lm_keys`` is True (default), HF ``gemma4_unified`` keys are rewritten to
+ ComfyUI's LTXAV TE layout (flat LM under ``model.*``, plus ``vision_model.*`` /
+ ``multi_modal_projector.*`` / ``audio_projector.*``). The pipeline loader accepts both
+ the Comfy layout and legacy HF tower names via :func:`get_gemma_ops`.
+ ``gemma_version`` is an *assertion*, not a stamp: pass the version the diffusion
+ checkpoint expects and packing fails if this root disagrees. Default ``None`` packs
+ whatever the root declares.
+ Returns ``(tensors, metadata_str_values)`` ready for ``safetensors.torch.save_file``.
+ """
+ assets = GemmaAssets.from_root(Path(gemma_root))
+ config = dict(assets.config_dict)
+ declared_version = config.get("gemma_version")
+ if gemma_version is not None:
+ # Assert against the root; do not overwrite a declared version (would defeat load-time checks).
+ if declared_version is not None and declared_version != gemma_version:
+ raise ValueError(
+ f"Gemma version mismatch: caller expects gemma_version={gemma_version!r}, but the "
+ f"Gemma config at {gemma_root!r} declares gemma_version={declared_version!r}."
+ )
+ if declared_version is None:
+ logger.warning(
+ "Gemma config at %s declares no gemma_version; stamping %r from the caller.",
+ gemma_root,
+ gemma_version,
+ )
+ config["gemma_version"] = gemma_version
+
+ tensors: dict[str, torch.Tensor] = {}
+ for wp in assets.weight_paths:
+ with safetensors.safe_open(wp, framework="pt") as f:
+ for key in f.keys(): # noqa: SIM118 -- safe_open is not a Mapping; keys() is the only iterator
+ out_key = _flatten_gemma4_unified_keys_for_comfy(key) if comfy_flat_lm_keys else key
+ tensors[out_key] = f.get_tensor(key)
+
+ tensors.update(projection_tensors)
+ tensors[TOKENIZER_JSON_TENSOR_KEY] = _bytes_to_uint8_tensor(assets.tokenizer_json)
+ for name, data in assets.sidecars.items():
+ tensors[f"{HF_ASSET_TENSOR_PREFIX}{name}"] = _bytes_to_uint8_tensor(data)
+
+ metadata = {
+ "format": "pt",
+ GEMMA_CONFIG_METADATA_KEY: json.dumps(config),
+ }
+ return tensors, metadata
+
+
+def save_text_encoder_safetensors(
+ output_path: str | Path,
+ tensors: dict[str, torch.Tensor],
+ metadata: dict[str, str],
+) -> None:
+ output_path = Path(output_path)
+ output_path.parent.mkdir(parents=True, exist_ok=True)
+ save_file(tensors, str(output_path), metadata=metadata)
diff --git a/packages/ltx-core/src/ltx_core/text_encoders/gemma/tokenizer.py b/packages/ltx-core/src/ltx_core/text_encoders/gemma/tokenizer.py
index 2ac470c..35bc827 100644
--- a/packages/ltx-core/src/ltx_core/text_encoders/gemma/tokenizer.py
+++ b/packages/ltx-core/src/ltx_core/text_encoders/gemma/tokenizer.py
@@ -1,6 +1,6 @@
from enum import Enum
-from transformers import AutoTokenizer
+from transformers import PreTrainedTokenizerBase
class PaddingSide(str, Enum):
@@ -8,24 +8,20 @@ class PaddingSide(str, Enum):
RIGHT = "right"
-class LTXVGemmaTokenizer:
- """
- Tokenizer wrapper for Gemma models compatible with LTXV processes.
- This class wraps HuggingFace's `AutoTokenizer` for use with Gemma text encoders,
- ensuring correct settings and output formatting for downstream consumption.
+class LTXGemmaTokenizer:
+ """Wraps a HuggingFace tokenizer and normalizes padding / BOS for encode.
+ Always ensures a leading ``<bos>``: Gemma 3 already emits it via post_processor;
+ Gemma 4 does not, so we prepend. EOS is not appended on this path.
"""
- def __init__(self, tokenizer_path: str, max_length: int = 256, padding_side: PaddingSide = PaddingSide.LEFT):
- """
- Initialize the tokenizer.
- Args:
- tokenizer_path (str): Path to the pretrained tokenizer files or model directory.
- max_length (int, optional): Max sequence length for encoding. Defaults to 256.
- padding_side (PaddingSide, optional): Side to pad on. Defaults to ``PaddingSide.LEFT``.
- """
- self.tokenizer = AutoTokenizer.from_pretrained(
- tokenizer_path, local_files_only=True, model_max_length=max_length
- )
+ def __init__(
+ self,
+ tokenizer: PreTrainedTokenizerBase,
+ max_length: int = 256,
+ padding_side: PaddingSide = PaddingSide.LEFT,
+ ):
+ self.tokenizer = tokenizer
+ self.tokenizer.model_max_length = max_length
self.tokenizer.padding_side = padding_side.value
if self.tokenizer.pad_token is None:
self.tokenizer.pad_token = self.tokenizer.eos_token
@@ -33,39 +29,35 @@ class LTXVGemmaTokenizer:
self.max_length = max_length
def tokenize_with_weights(self, text: str, return_word_ids: bool = False) -> dict[str, list[tuple[int, int]]]:
- """
- Tokenize the given text and return token IDs and attention weights.
- Args:
- text (str): The input string to tokenize.
- return_word_ids (bool, optional): If True, includes the token's position (index) in the output tuples.
- If False (default), omits the indices.
- Returns:
- dict[str, list[tuple[int, int]]] OR dict[str, list[tuple[int, int, int]]]:
- A dictionary with a "gemma" key mapping to:
- - a list of (token_id, attention_mask) tuples if return_word_ids is False;
- - a list of (token_id, attention_mask, index) tuples if return_word_ids is True.
- Example:
- >>> tokenizer = LTXVGemmaTokenizer("path/to/tokenizer", max_length=8)
- >>> tokenizer.tokenize_with_weights("hello world")
- {'gemma': [(1234, 1), (5678, 1), (2, 0), ...]}
- """
+ """Return ``{"gemma": [(token_id, attn), ...]}``; with ``return_word_ids``, triples include index."""
text = text.strip()
+ bos_id = self.tokenizer.bos_token_id
+ if bos_id is None:
+ raise ValueError("Tokenizer is missing bos_token_id; encode path requires a leading BOS.")
encoded = self.tokenizer(
text,
+ padding=False,
+ truncation=True,
+ max_length=self.max_length,
+ return_tensors="pt",
+ )
+ input_ids = encoded.input_ids[0].tolist()
+ if not input_ids or input_ids[0] != bos_id:
+ input_ids = [bos_id, *input_ids][: self.max_length]
+
+ padded = self.tokenizer.pad(
+ {"input_ids": [input_ids]},
padding="max_length",
max_length=self.max_length,
- truncation=True,
return_tensors="pt",
+ return_attention_mask=True,
)
- input_ids = encoded.input_ids
- attention_mask = encoded.attention_mask
+ input_ids = padded.input_ids
+ attention_mask = padded.attention_mask
tuples = [
(token_id, attn, i) for i, (token_id, attn) in enumerate(zip(input_ids[0], attention_mask[0], strict=True))
]
out = {"gemma": tuples}
-
if not return_word_ids:
- # Return only (token_id, attention_mask) pairs, omitting token position
out = {k: [(t, w) for t, w, _ in v] for k, v in out.items()}
-
return out
diff --git a/packages/ltx-core/src/ltx_core/tiling.py b/packages/ltx-core/src/ltx_core/tiling.py
index 1610444..7fd6b14 100644
--- a/packages/ltx-core/src/ltx_core/tiling.py
+++ b/packages/ltx-core/src/ltx_core/tiling.py
@@ -3,10 +3,12 @@ from __future__ import annotations
import itertools
import math
from dataclasses import dataclass, replace
-from typing import Callable, NamedTuple
+from typing import Callable, NamedTuple, Sequence
import torch
+from ltx_core.types import SpatioTemporalScaleFactors, VideoPixelShape
+
def compute_trapezoidal_mask_1d(
length: int,
@@ -106,7 +108,7 @@ class LatentIntervals:
# Operation to split a single dimension of the tensor into intervals based on the length along the dimension.
SplitOperation = Callable[[int], DimensionIntervals]
# Operation to map the intervals in input dimension to slices and masks along a corresponding output dimension.
-MappingOperation = Callable[[DimensionIntervals], tuple[list[slice], list[torch.Tensor | None]]]
+MappingOperation = Callable[[DimensionIntervals], tuple[list[slice], list[torch.Tensor]]]
def default_split_operation(length: int) -> DimensionIntervals:
@@ -116,10 +118,15 @@ def default_split_operation(length: int) -> DimensionIntervals:
DEFAULT_SPLIT_OPERATION: SplitOperation = default_split_operation
+def untiled_mask_1d() -> torch.Tensor:
+ """Length-1 ones that broadcast over an untiled axis (historical ``None`` mask)."""
+ return torch.ones(1)
+
+
def default_mapping_operation(
_intervals: DimensionIntervals,
-) -> tuple[list[slice], list[torch.Tensor | None]]:
- return [slice(0, None)], [None]
+) -> tuple[list[slice], list[torch.Tensor]]:
+ return [slice(0, None)], [untiled_mask_1d()]
DEFAULT_MAPPING_OPERATION: MappingOperation = default_mapping_operation
@@ -130,14 +137,52 @@ DEFAULT_MAPPING_OPERATION: MappingOperation = default_mapping_operation
# ---------------------------------------------------------------------------
-def split_by_size(size: int, overlap: int) -> SplitOperation:
+def _grow_last_tile_to_min(intervals: list[DimensionInterval], min_tile_size: int) -> list[DimensionInterval]:
+ """Grow a short last tile left to ``min_tile_size``; widen penultimate ``right_ramp``."""
+ if len(intervals) <= 1:
+ return list(intervals)
+ last = intervals[-1]
+ if last.end - last.start >= min_tile_size:
+ return list(intervals)
+ new_start = last.end - min_tile_size
+ prev = intervals[-2]
+ new_overlap = prev.end - new_start
+ return [
+ *intervals[:-2],
+ replace(prev, right_ramp=new_overlap),
+ replace(last, start=new_start, left_ramp=new_overlap),
+ ]
+
+
+def _validate_tile_intervals(intervals: list[DimensionInterval], *, dim_size: int, min_tile_size: int) -> None:
+ """Validate coverage, ramp/overlap consistency, and ``min_tile_size``."""
+ if not intervals or intervals[0].start != 0 or intervals[-1].end != dim_size:
+ raise ValueError(f"tiles must cover [0, {dim_size})")
+ for i, iv in enumerate(intervals):
+ length = iv.end - iv.start
+ if length < min_tile_size:
+ raise ValueError(f"tile {i} length {length} is below min_tile_size={min_tile_size}")
+ if iv.left_ramp < 0 or iv.right_ramp < 0 or iv.left_ramp > length or iv.right_ramp > length:
+ raise ValueError(f"tile {i} has invalid ramps: left={iv.left_ramp}, right={iv.right_ramp}, length={length}")
+ if i == 0:
+ continue
+ overlap = intervals[i - 1].end - iv.start
+ if overlap < 0 or intervals[i - 1].right_ramp != overlap or iv.left_ramp != overlap:
+ raise ValueError(f"tiles {i - 1}/{i}: ramp/overlap mismatch (overlap={overlap})")
+
+
+def split_by_size(size: int, overlap: int, min_tile_size: int | None = None) -> SplitOperation:
"""Split a dimension into overlapping tiles of a given size.
Tiles are sized ``size`` with ``overlap`` shared elements between
consecutive tiles. The last tile may be shorter if the dimension
- doesn't divide evenly.
+ doesn't divide evenly. If ``min_tile_size`` is set and the last tile is
+ shorter, it is grown leftward (penultimate ``right_ramp`` widens); the
+ result is validated and invalid layouts raise ``ValueError``.
Args:
size: Target tile size (in axis units).
overlap: Overlap between consecutive tiles.
+ min_tile_size: Optional minimum tile length. ``None`` keeps legacy
+ short-last-tile behavior.
Returns:
A split operation that divides a dimension into tiles.
"""
@@ -145,8 +190,12 @@ def split_by_size(size: int, overlap: int) -> SplitOperation:
raise ValueError(f"size must be > 0, got {size}")
if overlap < 0 or overlap >= size:
raise ValueError(f"overlap must satisfy 0 <= overlap < size, got overlap={overlap}, size={size}")
+ if min_tile_size is not None and min_tile_size < 1:
+ raise ValueError(f"min_tile_size must be >= 1, got {min_tile_size}")
def split(dimension_size: int) -> DimensionIntervals:
+ if min_tile_size is not None and dimension_size < min_tile_size:
+ return DEFAULT_SPLIT_OPERATION(dimension_size)
if dimension_size <= size:
return DEFAULT_SPLIT_OPERATION(dimension_size)
amount = (dimension_size + size - 2 * overlap - 1) // (size - overlap)
@@ -165,27 +214,33 @@ def split_by_size(size: int, overlap: int) -> SplitOperation:
start=(amount - 1) * (size - overlap), end=dimension_size, left_ramp=overlap, right_ramp=0
),
]
+ if min_tile_size is not None:
+ intervals = _grow_last_tile_to_min(intervals, min_tile_size)
+ _validate_tile_intervals(intervals, dim_size=dimension_size, min_tile_size=min_tile_size)
return DimensionIntervals(intervals=intervals)
return split
-def split_temporal_causal(size: int, overlap: int) -> SplitOperation:
+def split_temporal_causal(size: int, overlap: int, min_tile_size: int | None = None) -> SplitOperation:
"""Split a temporal axis into overlapping tiles with causal handling.
Each tile after the first is shifted back by 1 and its left ramp is
increased by 1, ensuring causal continuity through the blend ramps.
Args:
size: Tile size in axis units.
overlap: Overlap between tiles in the same units.
+ min_tile_size: Optional floor forwarded to :func:`split_by_size`.
Returns:
Split operation that divides temporal dimension with causal handling.
"""
- non_causal_split = split_by_size(size, overlap)
+ non_causal_split = split_by_size(size, overlap, min_tile_size=min_tile_size)
def split(dimension_size: int) -> DimensionIntervals:
if dimension_size <= size:
return DEFAULT_SPLIT_OPERATION(dimension_size)
dim_intervals = non_causal_split(dimension_size)
+ if len(dim_intervals.intervals) <= 1:
+ return dim_intervals
modified_intervals = [dim_intervals.intervals[0]] + [
replace(interval, start=interval.start - 1, left_ramp=interval.left_ramp + 1)
for interval in dim_intervals.intervals[1:]
@@ -217,7 +272,9 @@ def split_temporal(tile_size_frames: int, overlap_frames: int) -> SplitOperation
return split
-def split_by_count_temporal_causal(num_tiles: int, overlap: int = 0) -> SplitOperation:
+def split_by_count_temporal_causal(
+ num_tiles: int, overlap: int = 0, min_tile_size: int | None = None
+) -> SplitOperation:
"""Split a temporal dimension by count with causal handling.
Wraps :func:`split_by_count` with the same causal adjustment as
:func:`split_temporal_causal`: each tile after the first is shifted
@@ -225,10 +282,11 @@ def split_by_count_temporal_causal(num_tiles: int, overlap: int = 0) -> SplitOpe
Args:
num_tiles: Number of tiles. Must be >= 1.
overlap: Overlap between adjacent tiles (default 0).
+ min_tile_size: Optional floor forwarded to :func:`split_by_count`.
Returns:
A split operation that divides a temporal dimension into tiles.
"""
- non_causal_split = split_by_count(num_tiles, overlap)
+ non_causal_split = split_by_count(num_tiles, overlap, min_tile_size=min_tile_size)
def split(dimension_size: int) -> DimensionIntervals:
dim_intervals = non_causal_split(dimension_size)
@@ -243,7 +301,7 @@ def split_by_count_temporal_causal(num_tiles: int, overlap: int = 0) -> SplitOpe
return split
-def split_by_count(num_tiles: int, overlap: int = 0) -> SplitOperation:
+def split_by_count(num_tiles: int, overlap: int = 0, min_tile_size: int | None = None) -> SplitOperation:
"""Split a dimension into a given number of tiles with overlap.
Computes the tile size as
``(dim_size + overlap * (num_tiles - 1)) // num_tiles`` so that
@@ -257,6 +315,7 @@ def split_by_count(num_tiles: int, overlap: int = 0) -> SplitOperation:
num_tiles: Number of tiles. Must be >= 1.
overlap: Overlap between adjacent tiles (default 0). Must be >= 0
and less than the computed tile size.
+ min_tile_size: Optional floor forwarded to last-tile growth / validation.
Returns:
A split operation that divides a dimension into tiles.
"""
@@ -264,6 +323,8 @@ def split_by_count(num_tiles: int, overlap: int = 0) -> SplitOperation:
raise ValueError(f"num_tiles must be >= 1, got {num_tiles}")
if overlap < 0:
raise ValueError(f"overlap must be >= 0, got {overlap}")
+ if min_tile_size is not None and min_tile_size < 1:
+ raise ValueError(f"min_tile_size must be >= 1, got {min_tile_size}")
def split(dim_size: int) -> DimensionIntervals:
if num_tiles > dim_size:
@@ -275,6 +336,11 @@ def split_by_count(num_tiles: int, overlap: int = 0) -> SplitOperation:
total = dim_size + overlap * (num_tiles - 1)
tile_size = total // num_tiles
+ if tile_size <= overlap:
+ raise ValueError(
+ f"split_by_count produced size={tile_size} <= overlap={overlap} "
+ f"for dim_size={dim_size}, num_tiles={num_tiles}"
+ )
remainder = total % num_tiles
base_intervals = split_by_size(tile_size, overlap)(dim_size - remainder).intervals
@@ -286,6 +352,10 @@ def split_by_count(num_tiles: int, overlap: int = 0) -> SplitOperation:
grow = 1 if i < remainder else 0
intervals.append(replace(iv, start=iv.start + shift, end=iv.end + shift + grow))
+ if min_tile_size is not None:
+ intervals = _grow_last_tile_to_min(intervals, min_tile_size)
+ _validate_tile_intervals(intervals, dim_size=dim_size, min_tile_size=min_tile_size)
+
return DimensionIntervals(intervals=intervals)
return split
@@ -296,13 +366,13 @@ def split_by_count(num_tiles: int, overlap: int = 0) -> SplitOperation:
# ---------------------------------------------------------------------------
-def identity_mapping_operation(intervals: DimensionIntervals) -> tuple[list[slice], list[torch.Tensor | None]]:
+def identity_mapping_operation(intervals: DimensionIntervals) -> tuple[list[slice], list[torch.Tensor]]:
"""Map each DimensionInterval to an output region at the same position, with trapezoidal blend masks.
For every interval the output start/end matches the input start/end and a
1-D blending mask is built from the interval's left_ramp and right_ramp.
"""
out_slices: list[slice] = []
- masks: list[torch.Tensor | None] = []
+ masks: list[torch.Tensor] = []
for iv in intervals.intervals:
out_slices.append(slice(iv.start, iv.end))
masks.append(compute_trapezoidal_mask_1d(iv.end - iv.start, iv.left_ramp, iv.right_ramp))
@@ -319,7 +389,8 @@ class Tile(NamedTuple):
Tuple of slices specifying where this tile's OUTPUT should be placed in the reconstructed OUTPUT tensor.
masks_1d:
Per-dimension masks in OUTPUT units.
- These are used to create all-dimensional blending mask.
+ Untiled axes use a length-1 ones tensor (broadcasts). These are used
+ for separable blending (and for the dense ``blend_mask`` property).
Methods:
blend_mask:
Create a single N-D mask from the per-dimension masks.
@@ -327,7 +398,7 @@ class Tile(NamedTuple):
in_coords: tuple[slice, ...]
out_coords: tuple[slice, ...]
- masks_1d: tuple[torch.Tensor | None, ...]
+ masks_1d: tuple[torch.Tensor, ...]
@property
def blend_mask(self) -> torch.Tensor:
@@ -337,14 +408,6 @@ class Tile(NamedTuple):
for dim_idx in range(num_dims):
mask_1d = self.masks_1d[dim_idx]
view_shape = [1] * num_dims
- if mask_1d is None:
- # Broadcast mask along this dimension (length 1).
- one = torch.ones(1)
-
- view_shape[dim_idx] = 1
- per_dimension_masks.append(one.view(*view_shape))
- continue
-
# Reshape (L,) -> (1, ..., L, ..., 1) so masks across dimensions broadcast-multiply.
view_shape[dim_idx] = mask_1d.shape[0]
per_dimension_masks.append(mask_1d.view(*view_shape))
@@ -357,13 +420,84 @@ class Tile(NamedTuple):
return combined_mask
+def scale_by_masks_1d(x: torch.Tensor, masks_1d: Sequence[torch.Tensor]) -> torch.Tensor:
+ """Multiply ``x`` by separable 1d masks with broadcasting.
+ ``len(masks_1d)`` must equal ``x.ndim``. Prefer float32 masks so bf16/fp16 ``x`` promotes.
+ Length-1 masks (untiled axes) broadcast over that dimension.
+ """
+ if len(masks_1d) != x.ndim:
+ raise ValueError(f"masks_1d length {len(masks_1d)} != x.ndim {x.ndim}")
+ out = x
+ for axis, mask in enumerate(masks_1d):
+ view_shape = [1] * x.ndim
+ view_shape[axis] = -1
+ out = out * mask.reshape(*view_shape)
+ return out
+
+
+def masks_are_complementary(
+ tiles: Sequence[Tile],
+ full_shape: Sequence[int],
+ *,
+ atol: float = 1e-5,
+) -> bool:
+ """Return whether per-axis 1d blend masks partition unity (sum to 1).
+ Checks each axis independently over the unique out-slices on that axis
+ (cartesian tile products would otherwise multi-count the same 1d interval).
+ When True, weighted accumulation needs no denominator.
+ """
+ if not tiles:
+ return True
+ ndim = len(full_shape)
+ for tile in tiles:
+ if len(tile.out_coords) != ndim or len(tile.masks_1d) != ndim:
+ raise ValueError(
+ f"Tile out_coords/masks_1d rank {len(tile.out_coords)}/{len(tile.masks_1d)} != full_shape rank {ndim}"
+ )
+ for axis, length in enumerate(full_shape):
+ # Explicit CPU float32: masks may live on CUDA; a non-CPU default device
+ # must not place ``acc`` on GPU (device-mismatch on ``acc[sl] +=``).
+ acc = torch.zeros(length, dtype=torch.float32, device="cpu")
+ seen: set[tuple[int | None, int | None]] = set()
+ for tile in tiles:
+ sl = tile.out_coords[axis]
+ key = (sl.start, sl.stop)
+ if key in seen:
+ continue
+ seen.add(key)
+ # Length-1 untiled masks broadcast over ``acc[sl]``.
+ acc[sl] += tile.masks_1d[axis].detach().float().cpu()
+ if not torch.allclose(acc, torch.ones(length, dtype=torch.float32), atol=atol, rtol=0.0):
+ return False
+ return True
+
+
+def compute_summed_weights(
+ tiles: Sequence[Tile],
+ full_shape: Sequence[int],
+) -> torch.Tensor:
+ """Build the dense denominator for weighted blending over ``full_shape``.
+ Uses separable per-axis mask broadcasts — never ``Tile.blend_mask``.
+ Requires concrete ``out_coords`` (``stop`` not ``None``) on every axis.
+ Always builds on CPU float32 so CUDA masks / a non-CPU default device cannot
+ place a multi-GB ``[F,H,W]`` tensor on GPU.
+ """
+ weights = torch.zeros(*full_shape, dtype=torch.float32, device="cpu")
+ for tile in tiles:
+ masks = tuple(m.detach().float().cpu() for m in tile.masks_1d)
+ region_shape = tuple(s.stop - s.start for s in tile.out_coords)
+ region = torch.ones(region_shape, dtype=torch.float32, device="cpu")
+ weights[tile.out_coords] += scale_by_masks_1d(region, masks)
+ return weights.clamp(min=1e-8)
+
+
def create_tiles_from_intervals_and_mappers(
intervals: LatentIntervals,
mappers: list[MappingOperation],
) -> list[Tile]:
full_dim_input_slices: list[list[slice]] = []
full_dim_output_slices: list[list[slice]] = []
- full_dim_masks_1d: list[list[torch.Tensor | None]] = []
+ full_dim_masks_1d: list[list[torch.Tensor]] = []
for axis_index in range(len(intervals.original_shape)):
dimension_intervals = intervals.dimension_intervals[axis_index]
input_slices = [slice(interval.start, interval.end) for interval in dimension_intervals.intervals]
@@ -409,6 +543,34 @@ def create_tiles(
return create_tiles_from_intervals_and_mappers(latent_intervals, mappers)
+def group_tiles_by_temporal_slice(tiles: list[Tile]) -> list[list[Tile]]:
+ """Group consecutive tiles that share the same temporal ``out_coords`` slice.
+ Assumes ``tiles`` is ordered with the temporal axis varying slowest (true
+ for every tile list this codebase builds via ``itertools.product`` with
+ the temporal axis first), so equal temporal slices are always contiguous.
+ """
+ if not tiles:
+ return []
+
+ groups = []
+ current_slice = tiles[0].out_coords[2]
+ current_group = []
+
+ for tile in tiles:
+ tile_slice = tile.out_coords[2]
+ if tile_slice == current_slice:
+ current_group.append(tile)
+ else:
+ groups.append(current_group)
+ current_slice = tile_slice
+ current_group = [tile]
+
+ if current_group:
+ groups.append(current_group)
+
+ return groups
+
+
# ---------------------------------------------------------------------------
# Video-grid tiling configs
# ---------------------------------------------------------------------------
@@ -418,14 +580,15 @@ def create_tiles(
class DimensionTilingConfig:
"""Tiling parameters for a single dimension of the patchified grid.
Attributes:
- num_tiles: Number of tiles along this dimension.
+ num_tiles: Number of tiles along this dimension. ``1`` with ``overlap=0``
+ means the axis is not tiled.
overlap: Overlap between adjacent tiles, in latent grid units.
Adjacent tiles share ``overlap`` grid cells at their
boundary, producing an overlap zone blended with
trapezoidal masks.
"""
- num_tiles: int
+ num_tiles: int = 1
overlap: int = 0
def __post_init__(self) -> None:
@@ -434,6 +597,10 @@ class DimensionTilingConfig:
if self.overlap < 0:
raise ValueError(f"overlap must be >= 0, got {self.overlap}")
+ def is_tiled(self) -> bool:
+ """True when this axis is split into more than one tile (or has overlap)."""
+ return self.num_tiles > 1 or self.overlap > 0
+
@classmethod
def from_tile_size(cls, dim_size: int, tile_size: int, overlap: int = 0) -> DimensionTilingConfig:
"""Create config by computing ``num_tiles`` from dimension size and tile size.
@@ -449,20 +616,320 @@ class DimensionTilingConfig:
return cls(num_tiles=len(intervals.intervals), overlap=overlap)
+@dataclass(frozen=True)
+class DimensionSizeConfig:
+ """Tile size and overlap for a single video axis (frames / height / width).
+ Mirrors :class:`DimensionTilingConfig`, but specifies tile *size* rather than
+ tile *count*. ``tile_size=0`` means the axis is not tiled (covers the whole
+ length). Axis-specific VAE pixel constraints (divisibility / minimums) are
+ enforced by :meth:`TileSizeConfig.validate` for tiled axes only.
+ """
+
+ tile_size: int = 0
+ overlap: int = 0
+
+ def __post_init__(self) -> None:
+ if self.tile_size < 0:
+ raise ValueError(f"tile_size must be >= 0, got {self.tile_size}")
+ if self.overlap < 0:
+ raise ValueError(f"overlap must be >= 0, got {self.overlap}")
+ if self.tile_size == 0:
+ if self.overlap != 0:
+ raise ValueError("untiled axis (tile_size=0) must have overlap=0")
+ return
+ if self.overlap >= self.tile_size:
+ raise ValueError(f"Overlap must be less than tile size, got {self.overlap} and {self.tile_size}")
+
+ def is_tiled(self) -> bool:
+ """True when this axis has a positive tile size (caller intends to split it)."""
+ return self.tile_size > 0
+
+
@dataclass(frozen=True)
class TileCountConfig:
- """Tiling layout for a ``(F, H, W)`` grid.
- Specifies tile *counts* per dimension (as opposed to tile *sizes*
- which are used by the single-GPU VAE ``TilingConfig``).
+ """Tiling layout for a ``(F, H, W)`` grid by tile *counts*.
+ Overlaps are in latent-grid units. Mirror of :class:`TileSizeConfig`.
Attributes:
frames: Tiling along the temporal (frames) dimension.
height: Tiling along the latent height dimension.
width: Tiling along the latent width dimension.
"""
- frames: DimensionTilingConfig = DimensionTilingConfig(num_tiles=1, overlap=0)
- height: DimensionTilingConfig = DimensionTilingConfig(num_tiles=1, overlap=0)
- width: DimensionTilingConfig = DimensionTilingConfig(num_tiles=1, overlap=0)
+ frames: DimensionTilingConfig = DimensionTilingConfig()
+ height: DimensionTilingConfig = DimensionTilingConfig()
+ width: DimensionTilingConfig = DimensionTilingConfig()
+
+ def validate(self, scale_factors: SpatioTemporalScaleFactors, video_shape: VideoPixelShape) -> None:
+ """Raise if this count layout cannot tile ``video_shape`` under ``scale_factors``.
+ Counts/overlaps are in latent-grid units. ``video_shape.frames <= 0`` skips the
+ temporal axis (duration not yet known). Spatial axes always checked.
+ """
+ check_temporal = _assert_video_on_vae_grid(scale_factors, video_shape)
+ latent_h = video_shape.height // scale_factors.height
+ latent_w = video_shape.width // scale_factors.width
+ _validate_count_axis(self.height, latent_h, "height")
+ _validate_count_axis(self.width, latent_w, "width")
+ if check_temporal:
+ latent_f = (video_shape.frames - 1) // scale_factors.time + 1
+ _validate_count_axis(self.frames, latent_f, "frames")
+
+ def to_splitters(
+ self,
+ scale_factors: SpatioTemporalScaleFactors,
+ min_tile_size: tuple[int, int, int] | None = None,
+ *,
+ causal_temporal: bool = True,
+ ) -> tuple[SplitOperation, SplitOperation, SplitOperation]:
+ """Build ``(T, H, W)`` latent-grid split operations for this count layout.
+ ``scale_factors`` is accepted for signature parity with
+ :meth:`TileSizeConfig.to_splitters` and ignored — counts are already in
+ grid units. When ``causal_temporal`` is True (VAE encode/decode), the
+ frames axis uses :func:`split_by_count_temporal_causal`; otherwise plain
+ :func:`split_by_count`. ``min_tile_size`` is a per-axis floor in the same
+ units as the split.
+ """
+ del scale_factors
+ min_t = min_h = min_w = None
+ if min_tile_size is not None:
+ min_t, min_h, min_w = min_tile_size
+
+ def axis_split(cfg: DimensionTilingConfig, axis_min: int | None, *, temporal: bool) -> SplitOperation:
+ if not cfg.is_tiled():
+ return DEFAULT_SPLIT_OPERATION
+ if temporal and causal_temporal:
+ return split_by_count_temporal_causal(cfg.num_tiles, cfg.overlap, min_tile_size=axis_min)
+ return split_by_count(cfg.num_tiles, cfg.overlap, min_tile_size=axis_min)
+
+ return (
+ axis_split(self.frames, min_t, temporal=True),
+ axis_split(self.height, min_h, temporal=False),
+ axis_split(self.width, min_w, temporal=False),
+ )
+
+ def video_chunks_number(self, num_frames: int) -> int:
+ """Number of temporal decode chunks for ``num_frames`` under this layout."""
+ del num_frames
+ return max(1, self.frames.num_tiles)
+
+
+@dataclass(frozen=True)
+class TileSizeConfig:
+ """Size-based tiling layout for a ``(F, H, W)`` video — mirror of ``TileCountConfig``.
+ Each axis is a non-optional :class:`DimensionSizeConfig`; ``tile_size=0`` means
+ untiled on that axis (:meth:`DimensionSizeConfig.is_tiled`). Sizes and overlaps
+ are in pixel / frame units. Conversion to a split grid is an explicit
+ ``scale_factors`` argument to :meth:`to_splitters` (not stored on the config).
+ Legality vs a VAE grid is checked by :meth:`validate` (same factors decode will
+ pass to :meth:`to_splitters`), not at construction.
+ Attributes:
+ frames: Temporal tile size/overlap in frames.
+ height: Spatial height tile size/overlap in pixels.
+ width: Spatial width tile size/overlap in pixels.
+ """
+
+ frames: DimensionSizeConfig = DimensionSizeConfig()
+ height: DimensionSizeConfig = DimensionSizeConfig()
+ width: DimensionSizeConfig = DimensionSizeConfig()
+
+ def validate(self, scale_factors: SpatioTemporalScaleFactors, video_shape: VideoPixelShape) -> None:
+ """Raise if this size layout is illegal for ``video_shape`` under ``scale_factors``.
+ Checks tile/overlap divisibility and minimums against the VAE grid, and that
+ the video extents are compatible with that grid. ``video_shape.frames <= 0``
+ skips the temporal axis (duration not yet known); height/width always checked.
+ """
+ check_temporal = _assert_video_on_vae_grid(scale_factors, video_shape)
+ _validate_size_axis(self.height, scale_factors.height, "height")
+ _validate_size_axis(self.width, scale_factors.width, "width")
+ if check_temporal:
+ _validate_size_axis(self.frames, scale_factors.time, "frames")
+
+ @classmethod
+ def default(cls) -> TileSizeConfig:
+ return cls(
+ frames=DimensionSizeConfig(tile_size=80, overlap=24),
+ height=DimensionSizeConfig(tile_size=768, overlap=64),
+ width=DimensionSizeConfig(tile_size=768, overlap=64),
+ )
+
+ @classmethod
+ def from_long_side(
+ cls,
+ *,
+ long_side: DimensionSizeConfig,
+ height: int,
+ width: int,
+ scale_factors: SpatioTemporalScaleFactors,
+ frames: DimensionSizeConfig | None = None,
+ ) -> TileSizeConfig:
+ """Aspect-coupled construction — old single-spatial long-side behavior, explicit.
+ Matches main-era ``latent_tile_splitters``: scale the long-side tile in
+ *latent* units with ``round(size_lat * axis_lat / long_lat)``, then
+ multiply back by the VAE factor. Pixel-space ``round`` + ceil-snap would
+ bias the short axis up by almost one latent (e.g. 680 → 704 vs 672).
+ Both axes share ``long_side.overlap``.
+ """
+ if height < 1 or width < 1:
+ raise ValueError(f"height/width must be >= 1, got {height}x{width}")
+ if not long_side.is_tiled():
+ raise ValueError("long_side must be tiled (tile_size > 0)")
+ if scale_factors.height < 1 or scale_factors.width < 1:
+ raise ValueError(f"scale_factors height/width must be >= 1, got {scale_factors}")
+ span = max(height, width)
+
+ def axis_size(axis_len: int, factor: int) -> int:
+ # Latent-grid round (same as main decode enable_on_axis), not pixel ceil.
+ axis_lat = axis_len // factor
+ long_lat = span // factor
+ size_lat = long_side.tile_size // factor
+ overlap_lat = long_side.overlap // factor
+ lower_threshold = max(2, overlap_lat + 1)
+ tile_lat = max(lower_threshold, round(size_lat * axis_lat / long_lat))
+ tile_px = tile_lat * factor
+ min_legal = max(2 * factor, long_side.overlap + factor)
+ return max(tile_px, min_legal)
+
+ return cls(
+ frames=DimensionSizeConfig() if frames is None else frames,
+ height=DimensionSizeConfig(tile_size=axis_size(height, scale_factors.height), overlap=long_side.overlap),
+ width=DimensionSizeConfig(tile_size=axis_size(width, scale_factors.width), overlap=long_side.overlap),
+ )
+
+ def to_splitters(
+ self,
+ scale_factors: SpatioTemporalScaleFactors,
+ min_tile_size: tuple[int, int, int] | None = None,
+ *,
+ causal_temporal: bool = True,
+ ) -> tuple[SplitOperation, SplitOperation, SplitOperation]:
+ """Build ``(T, H, W)`` grid split ops from pixel/frame sizes via ``scale_factors``.
+ When ``causal_temporal`` is True, frames use :func:`split_temporal_causal`.
+ """
+ min_t = min_h = min_w = None
+ if min_tile_size is not None:
+ min_t, min_h, min_w = min_tile_size
+
+ def enable_size_axis(
+ factor: int,
+ axis_min: int | None,
+ cfg: DimensionSizeConfig,
+ axis_name: str,
+ *,
+ temporal: bool,
+ ) -> SplitOperation:
+ if not cfg.is_tiled():
+ return DEFAULT_SPLIT_OPERATION
+ _validate_size_axis(cfg, factor, axis_name)
+ size = cfg.tile_size // factor
+ overlap = cfg.overlap // factor
+ lower_threshold = max(2, overlap + 1)
+ tile = max(lower_threshold, size)
+ if temporal and causal_temporal:
+ return split_temporal_causal(tile, overlap, min_tile_size=axis_min)
+ return split_by_size(tile, overlap, min_tile_size=axis_min)
+
+ return (
+ enable_size_axis(scale_factors.time, min_t, self.frames, "frames", temporal=True),
+ enable_size_axis(scale_factors.height, min_h, self.height, "height", temporal=False),
+ enable_size_axis(scale_factors.width, min_w, self.width, "width", temporal=False),
+ )
+
+ def video_chunks_number(self, num_frames: int) -> int:
+ """Number of temporal decode chunks for ``num_frames`` under this layout."""
+ if not self.frames.is_tiled():
+ return 1
+ frame_stride = self.frames.tile_size - self.frames.overlap
+ return (num_frames - 1 + frame_stride - 1) // frame_stride
+
+
+# Either size-based (single-GPU VAE) or count-based (MGPU / explicit counts).
+TilingConfig = TileSizeConfig | TileCountConfig
+
+
+class AutoTiling:
+ """Sentinel: pipeline should recommend decode tiling (DiffVAE-aware / Conv default).
+ Distinct from ``None``, which means untiled decode.
+ """
+
+ __slots__ = ()
+
+ def __repr__(self) -> str:
+ return "AUTO_TILING"
+
+
+AUTO_TILING = AutoTiling()
+
+# Pipeline ``tiling_config`` argument: explicit layout, auto-recommend, or untiled.
+PipelineTiling = TilingConfig | AutoTiling | None
+
+
+def _assert_video_on_vae_grid(
+ scale_factors: SpatioTemporalScaleFactors,
+ video_shape: VideoPixelShape,
+) -> bool:
+ """Raise if ``video_shape`` is incompatible with the VAE ``scale_factors`` grid.
+ Returns whether the temporal axis is known (``video_shape.frames > 0``). When
+ False, callers skip frames-axis checks (duration not yet resolved).
+ """
+ if scale_factors.time < 1 or scale_factors.height < 1 or scale_factors.width < 1:
+ raise ValueError(f"scale_factors must be >= 1 on each axis, got {scale_factors}")
+ if video_shape.height < 1 or video_shape.width < 1:
+ raise ValueError(f"video_shape height/width must be >= 1, got {video_shape.height}x{video_shape.width}")
+ if video_shape.height % scale_factors.height != 0:
+ raise ValueError(f"video height {video_shape.height} must be divisible by scale {scale_factors.height}")
+ if video_shape.width % scale_factors.width != 0:
+ raise ValueError(f"video width {video_shape.width} must be divisible by scale {scale_factors.width}")
+ if video_shape.frames <= 0:
+ return False
+ if (video_shape.frames - 1) % scale_factors.time != 0:
+ raise ValueError(f"video frames {video_shape.frames} must satisfy (frames - 1) % {scale_factors.time} == 0")
+ return True
+
+
+def _validate_size_axis(cfg: DimensionSizeConfig, factor: int, axis_name: str) -> None:
+ """Pixel/frame size-axis legality vs VAE ``factor``."""
+ if not cfg.is_tiled():
+ return
+ min_size = 2 * factor
+ if cfg.tile_size < min_size:
+ raise ValueError(f"{axis_name}.tile_size must be at least {min_size}, got {cfg.tile_size}")
+ if cfg.tile_size % factor != 0:
+ raise ValueError(f"{axis_name}.tile_size must be divisible by {factor}, got {cfg.tile_size}")
+ if cfg.overlap % factor != 0:
+ raise ValueError(f"{axis_name}.overlap must be divisible by {factor}, got {cfg.overlap}")
+
+
+def _validate_count_axis(cfg: DimensionTilingConfig, latent_extent: int, axis_name: str) -> None:
+ """Latent count-axis legality vs latent ``extent``."""
+ if not cfg.is_tiled():
+ return
+ if cfg.num_tiles > latent_extent:
+ raise ValueError(f"{axis_name}.num_tiles {cfg.num_tiles} exceeds latent {axis_name} extent {latent_extent}")
+ # split_by_count requires overlap < tile_size; tile_size grows with extent/n.
+ max_overlap = latent_extent - cfg.num_tiles
+ if cfg.overlap > max_overlap:
+ raise ValueError(
+ f"{axis_name}.overlap {cfg.overlap} exceeds latent bound {max_overlap} "
+ f"for extent {latent_extent} with {cfg.num_tiles} tiles"
+ )
+
+
+def _validate_overlap(
+ tiling_config: TilingConfig,
+ *,
+ min_overlap_frames: int,
+ min_overlap_pixels: int,
+) -> None:
+ """Raise if any tiled ``TileSizeConfig`` axis overlap is below the given floors."""
+ if not isinstance(tiling_config, TileSizeConfig):
+ return
+
+ for axis_name, cfg, recommended, unit in (
+ ("frames", tiling_config.frames, min_overlap_frames, "frames"),
+ ("height", tiling_config.height, min_overlap_pixels, "px"),
+ ("width", tiling_config.width, min_overlap_pixels, "px"),
+ ):
+ if cfg.is_tiled() and cfg.overlap < recommended:
+ raise ValueError(f"{axis_name} overlap {cfg.overlap} {unit} is below the required {recommended} {unit}.")
def balanced_tile_split(num_tiles: int) -> tuple[int, int]:
diff --git a/packages/ltx-core/src/ltx_core/tools.py b/packages/ltx-core/src/ltx_core/tools.py
index ec1696e..d3ae087 100644
--- a/packages/ltx-core/src/ltx_core/tools.py
+++ b/packages/ltx-core/src/ltx_core/tools.py
@@ -49,7 +49,18 @@ class LatentTools(Protocol):
latent = self.patchifier.patchify(latent_state.latent)
clean_latent = self.patchifier.patchify(latent_state.clean_latent)
denoise_mask = self.patchifier.patchify(latent_state.denoise_mask)
- return replace(latent_state, latent=latent, denoise_mask=denoise_mask, clean_latent=clean_latent)
+ # keyframes_mask shares denoise_mask's layout, so it converts alongside it; leaving it
+ # behind would produce a state mixing patchified and unpatchified per-token tensors.
+ keyframes_mask = (
+ self.patchifier.patchify(latent_state.keyframes_mask) if latent_state.keyframes_mask is not None else None
+ )
+ return replace(
+ latent_state,
+ latent=latent,
+ denoise_mask=denoise_mask,
+ clean_latent=clean_latent,
+ keyframes_mask=keyframes_mask,
+ )
def unpatchify(self, latent_state: LatentState) -> LatentState:
"""
@@ -61,13 +72,30 @@ class LatentTools(Protocol):
denoise_mask = self.patchifier.unpatchify(
latent_state.denoise_mask, output_shape=self.target_shape.mask_shape()
)
- return replace(latent_state, latent=latent, denoise_mask=denoise_mask, clean_latent=clean_latent)
+ keyframes_mask = (
+ self.patchifier.unpatchify(latent_state.keyframes_mask, output_shape=self.target_shape.mask_shape())
+ if latent_state.keyframes_mask is not None
+ else None
+ )
+ return replace(
+ latent_state,
+ latent=latent,
+ denoise_mask=denoise_mask,
+ clean_latent=clean_latent,
+ keyframes_mask=keyframes_mask,
+ )
def clear_conditioning(self, latent_state: LatentState) -> LatentState:
"""
Clear the conditioning from the latent state. This method removes extra tokens from the end of the latent.
Therefore, conditioning items should add extra tokens ONLY to the end of the latent.
+ Generated keyframe slots are *not* conditioning: they are generated output that happens to
+ live outside the target grid. When ``generated_keyframe_layout`` is set, their denoised
+ content is extracted into ``generated_keyframes`` before the extra tokens are dropped, so
+ it survives into the returned state instead of being discarded here.
"""
+ generated_keyframes = self.extract_generated_keyframes(latent_state)
+
latent_state = latent_state.clone()
num_tokens = self.patchifier.get_token_count(self.target_shape)
@@ -82,8 +110,19 @@ class LatentTools(Protocol):
positions=positions,
clean_latent=clean_latent,
attention_mask=None,
+ keyframes_mask=None,
+ generated_keyframe_layout=latent_state.generated_keyframe_layout,
+ generated_keyframes=generated_keyframes,
+ frozen=latent_state.frozen,
)
+ def extract_generated_keyframes(self, latent_state: LatentState) -> torch.Tensor | None:
+ """Extract generated keyframe slot content as a ``(B, C, K, H, W)`` latent.
+ Returns ``None`` when the state carries no generated keyframe slots. Implementations decide;
+ the protocol has no meaningful default.
+ """
+ raise NotImplementedError
+
@dataclass(frozen=True)
class VideoLatentTools(LatentTools):
@@ -134,7 +173,7 @@ class VideoLatentTools(LatentTools):
).float()
positions[:, 0, ...] = positions[:, 0, ...] / self.fps
- return self.patchify(
+ state = self.patchify(
LatentState(
latent=initial_latent,
denoise_mask=denoise_mask,
@@ -142,6 +181,53 @@ class VideoLatentTools(LatentTools):
clean_latent=clean_latent,
)
)
+ return replace(state, keyframes_mask=self._first_frame_keyframes_mask(state))
+
+ def _first_frame_keyframes_mask(self, state: LatentState) -> torch.Tensor:
+ """Mark the target's first latent frame, which encodes a single pixel frame.
+ Because the video encoder is causal, the first temporal latent frame covers 1 pixel frame
+ while every later one covers ``temporal_scale_factor``. That makes it the same token class
+ as a generated keyframe slot, and the reference implementation marks it unconditionally --
+ independently of whether any keyframe slots exist. This is plain data about the latent, so
+ it is always populated; models without the keyframe embedding ignore it.
+ """
+ mask = torch.zeros_like(state.denoise_mask)
+ mask[:, : self.tokens_per_latent_frame] = 1.0
+ return mask
+
+ @property
+ def tokens_per_latent_frame(self) -> int:
+ """Token count of a single latent frame at the target's spatial resolution."""
+ return self.patchifier.get_token_count(self.target_shape._replace(frames=1))
+
+ def extract_generated_keyframes(self, latent_state: LatentState) -> torch.Tensor | None:
+ layout = latent_state.generated_keyframe_layout
+ if layout is None:
+ return None
+
+ available = latent_state.latent.shape[1]
+ if layout.first_token + layout.num_tokens > available:
+ raise ValueError(
+ f"Generated keyframe layout spans tokens [{layout.first_token}, "
+ f"{layout.first_token + layout.num_tokens}) but the state has only {available} tokens. "
+ "The layout was recorded against a different token sequence."
+ )
+ if layout.tokens_per_keyframe != self.tokens_per_latent_frame:
+ raise ValueError(
+ f"Generated keyframe layout has {layout.tokens_per_keyframe} tokens per keyframe, but this "
+ f"target shape uses {self.tokens_per_latent_frame}. The layout belongs to a different resolution."
+ )
+
+ frame_shape = self.target_shape._replace(frames=1)
+ tokens = latent_state.latent[:, layout.token_slice]
+ frames = [
+ self.patchifier.unpatchify(
+ tokens[:, index * layout.tokens_per_keyframe : (index + 1) * layout.tokens_per_keyframe],
+ output_shape=frame_shape,
+ )
+ for index in range(layout.num_keyframes)
+ ]
+ return torch.cat(frames, dim=2)
@dataclass(frozen=True)
@@ -153,6 +239,10 @@ class AudioLatentTools(LatentTools):
patchifier: AudioPatchifier
target_shape: AudioLatentShape
+ def extract_generated_keyframes(self, latent_state: LatentState) -> torch.Tensor | None: # noqa: ARG002
+ """Audio states never carry generated keyframe slots."""
+ return None
+
def create_initial_state(
self,
device: DeviceLikeType,
diff --git a/packages/ltx-core/src/ltx_core/types.py b/packages/ltx-core/src/ltx_core/types.py
index c9dac29..115b1e3 100644
--- a/packages/ltx-core/src/ltx_core/types.py
+++ b/packages/ltx-core/src/ltx_core/types.py
@@ -32,6 +32,40 @@ class SpatioTemporalScaleFactors(NamedTuple):
def default(cls) -> "SpatioTemporalScaleFactors":
return cls(time=8, height=32, width=32)
+ @classmethod
+ def from_blocks(cls, blocks: list, patch_size: int) -> "SpatioTemporalScaleFactors":
+ """Derive the scale factors from a VAE encoder/decoder block list.
+ Each ``compress_*`` block halves (encoder) or doubles (decoder) its target
+ axes by a stride of 2, independent of any channel ``multiplier``. The initial
+ patchify contributes an extra ``patch_size`` of spatial compression. Deriving
+ the factors from the blocks keeps a single source of truth that stays correct
+ across VAE variants (e.g. the 32x32x8 default and the 16x16x4 variant) instead
+ of relying on a hardcoded constant.
+ """
+ spatial_steps = 0
+ temporal_steps = 0
+ for block_name, _ in blocks:
+ if block_name.startswith(("compress_space", "compress_all")):
+ spatial_steps += 1
+ if block_name.startswith(("compress_time", "compress_all")):
+ temporal_steps += 1
+ spatial = patch_size * (2**spatial_steps)
+ return cls(time=2**temporal_steps, height=spatial, width=spatial)
+
+ @classmethod
+ def from_model_config(cls, model_config: dict) -> "SpatioTemporalScaleFactors":
+ """Derive the video scale factors from a checkpoint's model config dict.
+ Reads the embedded VAE block list (see ``from_blocks``). Falls back to the
+ default when the config carries no VAE block list -- either no ``vae`` section
+ or a ``vae`` section without encoder/decoder blocks (e.g. audio-only
+ checkpoints), where video tools are never built.
+ """
+ vae_config = model_config.get("vae", {})
+ blocks = vae_config.get("encoder_blocks") or vae_config.get("decoder_blocks")
+ if not blocks:
+ return cls.default()
+ return cls.from_blocks(blocks, vae_config.get("patch_size", 4))
+
VIDEO_SCALE_FACTORS = SpatioTemporalScaleFactors.default()
@@ -182,6 +216,37 @@ class Audio:
return replace(self, waveform=self.waveform.to(**kwargs))
+@dataclass(frozen=True)
+class GeneratedKeyframeLayout:
+ """Where a state's generated-keyframe slot tokens live, and what they represent.
+ Recorded by :class:`~ltx_core.conditioning.types.keyframe_slots.VideoGeneratedKeyframeSlots`
+ when it appends the slots, so they can later be located and extracted *exactly* rather
+ than by assuming they are the trailing tokens. Conditioning items are applied in list
+ order and each appends to the end, so a state built with slots plus any other appending
+ conditioning item has no fixed trailing layout.
+ Attributes:
+ pixel_frame_indices: Target pixel-frame index of each slot, in token order.
+ tokens_per_keyframe: Number of tokens one slot occupies (one latent frame's worth).
+ first_token: Index of the first slot token in the token sequence.
+ """
+
+ pixel_frame_indices: tuple[int, ...]
+ tokens_per_keyframe: int
+ first_token: int
+
+ @property
+ def num_keyframes(self) -> int:
+ return len(self.pixel_frame_indices)
+
+ @property
+ def num_tokens(self) -> int:
+ return self.num_keyframes * self.tokens_per_keyframe
+
+ @property
+ def token_slice(self) -> slice:
+ return slice(self.first_token, self.first_token + self.num_tokens)
+
+
@dataclass(frozen=True)
class LatentState:
"""
@@ -193,6 +258,22 @@ class LatentState:
clean_latent: Initial state of the latent before denoising, may include conditioning latents.
attention_mask: Optional 2D self-attention mask of shape (B, T, T). Values in [0, 1] where 1 = full attention,
0 = no attention. None means full attention everywhere. Built incrementally by conditioning items.
+ keyframes_mask: Optional per-token marker of shape (B, T, 1) -- same layout as
+ ``denoise_mask`` -- non-zero on tokens whose latent encodes a *single standalone pixel
+ frame* rather than the usual multi-frame span. That set is the target's first latent
+ frame (the video encoder is causal, so its first temporal latent frame covers 1 pixel
+ frame while the rest cover 8) plus any generated keyframe slots. Selects the tokens
+ that receive the model's learned keyframe absolute-position embedding; ignored
+ entirely by models built without ``use_keyframes_abs_pos_embedding``.
+ generated_keyframe_layout: Set when generated keyframe slots were appended; locates them.
+ generated_keyframes: Populated by ``clear_conditioning`` when a layout is present: the
+ denoised slot content as an unpatchified ``(B, C, K, H, W)`` latent, one latent frame
+ per keyframe. Each frame must be decoded as a standalone one-frame clip, never as a
+ K-frame video -- a causal decode would blend slots that were never adjacent.
+ frozen: When True, this stream is held fixed: token denoising is disabled (``denoise_mask``
+ should be all zeros; pipeline builders enforce that) and the scalar noise level used for
+ prompt / cross-modality AdaLN gates is forced to 0 when the state is converted for the
+ transformer.
"""
latent: torch.Tensor
@@ -200,6 +281,10 @@ class LatentState:
positions: torch.Tensor
clean_latent: torch.Tensor
attention_mask: torch.Tensor | None = None
+ keyframes_mask: torch.Tensor | None = None
+ generated_keyframe_layout: GeneratedKeyframeLayout | None = None
+ generated_keyframes: torch.Tensor | None = None
+ frozen: bool = False
def clone(self) -> "LatentState":
return LatentState(
@@ -208,4 +293,8 @@ class LatentState:
positions=self.positions.clone(),
clean_latent=self.clean_latent.clone(),
attention_mask=self.attention_mask.clone() if self.attention_mask is not None else None,
+ keyframes_mask=self.keyframes_mask.clone() if self.keyframes_mask is not None else None,
+ generated_keyframe_layout=self.generated_keyframe_layout,
+ generated_keyframes=(self.generated_keyframes.clone() if self.generated_keyframes is not None else None),
+ frozen=self.frozen,
)
diff --git a/packages/ltx-kernels/README.md b/packages/ltx-kernels/README.md
index 13eb608..ba2b11b 100644
--- a/packages/ltx-kernels/README.md
+++ b/packages/ltx-kernels/README.md
@@ -1,6 +1,6 @@
# ltx-kernels
-Custom CUDA/C++ kernels for `ltx-core`. Three compiled extensions:
+Custom CUDA/C++ kernels for `ltx-core`. Four compiled extensions:
- **`all2all_cpp`** -- All2All communication kernels for multi-GPU tensor
parallelism, used by the sequence-parallel inference path.
@@ -9,10 +9,33 @@ Custom CUDA/C++ kernels for `ltx-core`. Three compiled extensions:
- **`blockwise_cpp`** -- Blockwise FP8 GEMM. SM89 (GeForce/Ada) kernel always;
the SM90 (Hopper, `deep_gemm`) kernel is added when a `9.0` architecture is
requested.
+- **`nvfp4_cpp`** -- NVFP4 (FP4 E2M1 + FP8 E4M3 per-16 block scales) quantize and
+ cuBLASLt block-scaled GEMM. Built for Blackwell arches (`10.0` / `12.0`) that the
+ local nvcc can emit (honors `TORCH_CUDA_ARCH_LIST` when set; skipped entirely if
+ nvcc is too old). Needs a **Blackwell** GPU (SM ≥ 10.0) at runtime -- FP4 tensor
+ cores do not exist before it. Python surface: `ltx_kernels.nvfp4`; see
+ [`docs/NVFP4.md`](docs/NVFP4.md) for the layout contract (cuBLAS 128×4 block
+ scales, Core42 PTQ checkpoint bytes). ltx-core drives it via `NVFP4Linear` and
+ `build_nvfp4_*_policy`.
The Python surface for blockwise quantization lives in
`ltx_kernels.blockwise` (`functional`, `linear`, `triton_ops`).
+`ltx_kernels.vae` adds two JIT-compiled CuTe DSL kernels for the diffusion VAE decoder
+(no C++ extension; `nvidia-cutlass-dsl` compiles them on first call):
+
+- **`na_attn_dsl`** -- standalone 3D neighborhood attention, a drop-in for
+ `natten.na3d`, used by the decoder's deterministic stages.
+- **`block_fna_dsl`** -- a whole `DiffusionNABlock` in one launch, with no full-volume
+ Q/K/V, used by stage 5.
+
+Both need a **datacenter Blackwell** GPU: they use `tcgen05` MMA *and* Tensor Memory
+(`sm_100`/`sm_101`/`sm_103`). Consumer Blackwell has the former but not the latter, and
+Hopper and Ada have neither, so this is not a slower fallback -- the instructions are
+absent from those ISAs. Gate on `ltx_kernels.vae.block_fna_available` /
+`na_attn_available`; each launcher also enforces it. ltx-core drives both through the
+`NA_DSL_KERNELS` module op.
+
## Requirements
- CUDA toolkit (nvcc) matching your GPU architecture
@@ -72,6 +95,13 @@ Tests require a CUDA GPU:
uv run pytest packages/ltx-kernels/tests/ -v
```
+The `ltx_kernels.vae` and `ltx_kernels.nvfp4` tests additionally require a datacenter
+Blackwell GPU and skip elsewhere. NVFP4 layout/API docs: [`docs/NVFP4.md`](docs/NVFP4.md).
+
+```bash
+uv run pytest packages/ltx-kernels/tests/test_nvfp4.py -v
+```
+
## Operations
`all2all_cpp`:
diff --git a/packages/ltx-kernels/csrc/nvfp4/api.cpp b/packages/ltx-kernels/csrc/nvfp4/api.cpp
new file mode 100644
index 0000000..defcefe
--- /dev/null
+++ b/packages/ltx-kernels/csrc/nvfp4/api.cpp
@@ -0,0 +1,85 @@
+// pybind surface for the in-house NVFP4 quantize + GEMM (see docs/NVFP4.md).
+
+#include <torch/extension.h>
+
+#include "nvfp4.h"
+
+namespace ltx_nvfp4 {
+namespace {
+
+int64_t round_up(int64_t x, int64_t multiple) { return (x + multiple - 1) / multiple * multiple; }
+
+std::tuple<int64_t, int64_t> scale_shape(int64_t rows, int64_t k) {
+ return {round_up(rows, 128), round_up(k / kBlockSize, 4)};
+}
+
+std::tuple<torch::Tensor, torch::Tensor> quantize(const torch::Tensor &x, const torch::Tensor &per_tensor_scale,
+ bool hi_first, int64_t variant) {
+ TORCH_CHECK(x.dim() == 2, "quantize_nvfp4 expects a 2-D input, got ", x.dim(), "-D");
+ const int64_t rows = x.size(0);
+ const int64_t k = x.size(1);
+ auto [scale_rows, scale_cols] = scale_shape(rows, k);
+
+ auto byte_opts = x.options().dtype(torch::kUInt8);
+ torch::Tensor packed = torch::empty({rows, k / 2}, byte_opts);
+ // The tiled kernel writes every byte of every 128x4 tile (zeros for padded rows/cols);
+ // the elementwise one only writes live entries, so it needs a zeroed buffer.
+ const bool needs_zero = variant == 1 && ((rows % 128 != 0) || ((k / kBlockSize) % 4 != 0));
+ torch::Tensor scales = needs_zero ? torch::zeros({scale_rows, scale_cols}, byte_opts)
+ : torch::empty({scale_rows, scale_cols}, byte_opts);
+
+ quantize_nvfp4_cuda(x.contiguous(), per_tensor_scale, packed, scales, hi_first, variant);
+ return {packed, scales};
+}
+
+torch::Tensor dequantize(const torch::Tensor &packed, const torch::Tensor &per_tensor_scale,
+ const torch::Tensor &scales, torch::ScalarType out_dtype, bool hi_first) {
+ TORCH_CHECK(packed.dim() == 2, "dequantize_nvfp4 expects a 2-D input");
+ torch::Tensor out = torch::empty({packed.size(0), packed.size(1) * 2}, packed.options().dtype(out_dtype));
+ dequantize_nvfp4_cuda(packed, per_tensor_scale, scales, out, hi_first);
+ return out;
+}
+
+torch::Tensor scaled_mm(const torch::Tensor &a, const torch::Tensor &b, const torch::Tensor &block_scale_a,
+ const torch::Tensor &block_scale_b, const torch::Tensor &alpha,
+ const std::optional<torch::Tensor> &bias, torch::ScalarType out_dtype) {
+ torch::Tensor out = torch::empty({a.size(0), b.size(0)}, a.options().dtype(out_dtype));
+ return scaled_mm_nvfp4_cublaslt(a, b, block_scale_a, block_scale_b, alpha, bias, out);
+}
+
+torch::Tensor mul_scalars(const torch::Tensor &a, const torch::Tensor &b) {
+ torch::Tensor out = torch::empty({1}, a.options().dtype(torch::kFloat32));
+ mul_scalars_cuda(a.reshape({1}).contiguous(), b.reshape({1}).contiguous(), out);
+ return out;
+}
+
+torch::Tensor amax_scale(const torch::Tensor &x, double divisor) {
+ torch::Tensor out = torch::empty({}, x.options().dtype(torch::kFloat32));
+ amax_scale_cuda(x.contiguous(), out, divisor);
+ return out;
+}
+
+} // namespace
+} // namespace ltx_nvfp4
+
+PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
+ m.def("quantize_nvfp4", &ltx_nvfp4::quantize, py::arg("x"), py::arg("per_tensor_scale"), py::arg("hi_first") = true,
+ py::arg("variant") = 2, "Fused NVFP4 quantize -> (packed uint8, E4M3 block scales in cuBLAS 128x4 layout)");
+ m.def("dequantize_nvfp4", &ltx_nvfp4::dequantize, py::arg("packed"), py::arg("per_tensor_scale"), py::arg("scales"),
+ py::arg("out_dtype") = torch::kBFloat16, py::arg("hi_first") = true,
+ "Reference NVFP4 dequantize (tests / debugging)");
+ m.def("scaled_mm_nvfp4", &ltx_nvfp4::scaled_mm, py::arg("a"), py::arg("b"), py::arg("block_scale_a"),
+ py::arg("block_scale_b"), py::arg("alpha"), py::arg("bias") = std::nullopt,
+ py::arg("out_dtype") = torch::kBFloat16, "alpha * (a @ b^T) + bias with NVFP4 operands (cuBLASLt)");
+ m.def("mul_scalars", &ltx_nvfp4::mul_scalars, py::arg("a"), py::arg("b"),
+ "Device-side product of two fp32 scalars (per-tensor scale product for the GEMM)");
+ m.def("amax_scale", &ltx_nvfp4::amax_scale, py::arg("x"), py::arg("divisor") = 1.0,
+ "Single-pass max(|x|) / divisor as an fp32 device scalar (NaN-suppressing)");
+ m.def("gemm_alpha_mode", &ltx_nvfp4::gemm_alpha_mode, "How alpha is passed to cuBLASLt");
+ m.def("set_gemm_alpha_on_device", &ltx_nvfp4::set_gemm_alpha_on_device, py::arg("on_device"),
+ "Toggle device-scalar alpha (CUBLASLT_POINTER_MODE_DEVICE)");
+ m.def("set_gemm_autotune", &ltx_nvfp4::set_gemm_autotune, py::arg("enabled"),
+ "Toggle timing-based selection among cuBLASLt heuristic candidates");
+ m.def("probe_gemm_support", &ltx_nvfp4::probe_gemm_support, py::arg("m"), py::arg("n"), py::arg("k"),
+ py::arg("scale_ptr_value") = 0, "Diagnostic sweep of cuBLASLt FP4 heuristic support");
+}
diff --git a/packages/ltx-kernels/csrc/nvfp4/gemm.cpp b/packages/ltx-kernels/csrc/nvfp4/gemm.cpp
new file mode 100644
index 0000000..812be00
--- /dev/null
+++ b/packages/ltx-kernels/csrc/nvfp4/gemm.cpp
@@ -0,0 +1,374 @@
+// NVFP4 block-scaled GEMM on cuBLASLt (SM >= 10.0).
+//
+// Row-major D(M,N) = alpha * A(M,K) @ B(N,K)^T + bias, all in FP4 E2M1 with 1x16 E4M3
+// block scales. cuBLASLt is column-major, so we compute the transposed problem
+// D_col(N,M) = op_T(Bw)(N,K) @ op_N(Ax)(K,M)
+// which is the TN layout FP4 requires: cuBLAS "A" is our weight, cuBLAS "B" our
+// activation, and D_col(N,M) with ld=N *is* row-major D(M,N).
+//
+// Descriptors + heuristic are cached per (M,N,K,bias,out dtype); pointers are bound per
+// call. `alpha` is a device fp32 scalar (CUBLASLT_POINTER_MODE_DEVICE) so a dynamic
+// activation scale costs neither a host sync nor an extra pass over D.
+
+#include <ATen/cuda/CUDAContext.h>
+#include <c10/cuda/CUDAGuard.h>
+#include <cublasLt.h>
+
+#include <cstdlib>
+#include <mutex>
+#include <sstream>
+#include <unordered_map>
+
+#include "nvfp4.h"
+
+namespace ltx_nvfp4 {
+namespace {
+
+#define LTX_CUBLAS_CHECK(expr) \
+ do { \
+ cublasStatus_t status_ = (expr); \
+ TORCH_CHECK(status_ == CUBLAS_STATUS_SUCCESS, "cuBLASLt call failed (", #expr, ") with status ", \
+ static_cast<int>(status_)); \
+ } while (0)
+
+// 32 MiB matches torch's Lt workspace default. Override with LTX_NVFP4_WORKSPACE_MB to
+// let the heuristic consider split-k algos with bigger scratch needs.
+size_t workspace_bytes() {
+ static const size_t bytes = [] {
+ const char *env = std::getenv("LTX_NVFP4_WORKSPACE_MB");
+ const long mb = env != nullptr ? std::strtol(env, nullptr, 10) : 32;
+ return static_cast<size_t>(mb > 0 ? mb : 32) << 20;
+ }();
+ return bytes;
+}
+
+struct PlanKey {
+ int64_t m, n, k;
+ int out_dtype;
+ bool has_bias;
+
+ bool operator==(const PlanKey &o) const {
+ return m == o.m && n == o.n && k == o.k && out_dtype == o.out_dtype && has_bias == o.has_bias;
+ }
+};
+
+struct PlanKeyHash {
+ size_t operator()(const PlanKey &p) const {
+ size_t h = std::hash<int64_t>()(p.m);
+ h = h * 1000003 ^ std::hash<int64_t>()(p.n);
+ h = h * 1000003 ^ std::hash<int64_t>()(p.k);
+ h = h * 1000003 ^ std::hash<int>()(p.out_dtype);
+ h = h * 1000003 ^ std::hash<bool>()(p.has_bias);
+ return h;
+ }
+};
+
+constexpr int kMaxAlgos = 8;
+
+struct Plan {
+ cublasLtMatmulDesc_t op = nullptr;
+ cublasLtMatrixLayout_t a = nullptr; // weight, (K, N) col-major
+ cublasLtMatrixLayout_t b = nullptr; // activation, (K, M) col-major
+ cublasLtMatrixLayout_t d = nullptr; // output, (N, M) col-major
+ cublasLtMatmulAlgo_t algo{};
+ size_t workspace = 0;
+ // Remaining heuristic candidates, timed on the first eager call (cuBLASLt's own ranking
+ // is not always right for these FP4 shapes; picking by measurement is worth a few %).
+ cublasLtMatmulAlgo_t candidates[kMaxAlgos]{};
+ int num_candidates = 0;
+ bool tuned = false;
+};
+
+std::mutex g_mutex;
+std::unordered_map<PlanKey, Plan, PlanKeyHash> g_plans;
+
+// Persistent per-device scratch: [0] = beta (always 0).
+torch::Tensor &beta_zero(const torch::Device &device) {
+ static std::unordered_map<int, torch::Tensor> cache;
+ auto it = cache.find(device.index());
+ if (it == cache.end()) {
+ it = cache.emplace(device.index(), torch::zeros({1}, torch::TensorOptions().dtype(torch::kFloat32).device(device)))
+ .first;
+ }
+ return it->second;
+}
+
+torch::Tensor &workspace_for(const torch::Device &device) {
+ static std::unordered_map<int, torch::Tensor> cache;
+ auto it = cache.find(device.index());
+ if (it == cache.end()) {
+ it = cache
+ .emplace(device.index(), torch::empty({static_cast<int64_t>(workspace_bytes())},
+ torch::TensorOptions().dtype(torch::kUInt8).device(device)))
+ .first;
+ }
+ return it->second;
+}
+
+cudaDataType_t cuda_dtype(torch::ScalarType t) {
+ switch (t) {
+ case torch::kBFloat16:
+ return CUDA_R_16BF;
+ case torch::kHalf:
+ return CUDA_R_16F;
+ case torch::kFloat32:
+ return CUDA_R_32F;
+ default:
+ TORCH_CHECK(false, "unsupported NVFP4 GEMM output dtype ", t);
+ }
+}
+
+// Pointers cuBLASLt inspects at heuristic time (it derives alignment from them), rebound
+// on every call.
+struct Bindings {
+ const void *a_scale = nullptr; // cuBLAS A == our weight
+ const void *b_scale = nullptr;
+ const void *bias = nullptr;
+};
+
+bool g_alpha_on_device = true;
+bool g_autotune = false;
+
+// Times every heuristic candidate once and keeps the fastest. Called at most once per
+// cached plan, never during cudagraph capture.
+template <typename RunFn> void tune_plan(Plan &plan, const RunFn &run, cudaStream_t stream) {
+ cudaEvent_t start, stop;
+ if (cudaEventCreate(&start) != cudaSuccess)
+ return;
+ if (cudaEventCreate(&stop) != cudaSuccess) {
+ cudaEventDestroy(start);
+ return;
+ }
+ float best_ms = -1.0f;
+ int best = 0;
+ for (int i = 0; i < plan.num_candidates; ++i) {
+ if (run(plan.candidates[i], stream) != CUBLAS_STATUS_SUCCESS)
+ continue; // warmup
+ if (cudaEventRecord(start, stream) != cudaSuccess)
+ break;
+ bool ok = true;
+ for (int rep = 0; rep < 3; ++rep) {
+ ok = ok && run(plan.candidates[i], stream) == CUBLAS_STATUS_SUCCESS;
+ }
+ cudaEventRecord(stop, stream);
+ if (cudaEventSynchronize(stop) != cudaSuccess || !ok)
+ continue;
+ float ms = 0.0f;
+ if (cudaEventElapsedTime(&ms, start, stop) != cudaSuccess)
+ continue;
+ if (best_ms < 0.0f || ms < best_ms) {
+ best_ms = ms;
+ best = i;
+ }
+ }
+ cudaEventDestroy(start);
+ cudaEventDestroy(stop);
+ plan.algo = plan.candidates[best];
+}
+
+Plan &get_plan(const PlanKey &key, torch::ScalarType out_dtype, cudaDataType_t bias_dtype, const Bindings &binds) {
+ auto it = g_plans.find(key);
+ if (it != g_plans.end())
+ return it->second;
+
+ Plan plan;
+ const cudaDataType_t d_type = cuda_dtype(out_dtype);
+ LTX_CUBLAS_CHECK(cublasLtMatmulDescCreate(&plan.op, CUBLAS_COMPUTE_32F, CUDA_R_32F));
+
+ const cublasOperation_t op_t = CUBLAS_OP_T;
+ const cublasOperation_t op_n = CUBLAS_OP_N;
+ LTX_CUBLAS_CHECK(cublasLtMatmulDescSetAttribute(plan.op, CUBLASLT_MATMUL_DESC_TRANSA, &op_t, sizeof(op_t)));
+ LTX_CUBLAS_CHECK(cublasLtMatmulDescSetAttribute(plan.op, CUBLASLT_MATMUL_DESC_TRANSB, &op_n, sizeof(op_n)));
+
+ const int32_t scale_mode = CUBLASLT_MATMUL_MATRIX_SCALE_VEC16_UE4M3;
+ LTX_CUBLAS_CHECK(
+ cublasLtMatmulDescSetAttribute(plan.op, CUBLASLT_MATMUL_DESC_A_SCALE_MODE, &scale_mode, sizeof(scale_mode)));
+ LTX_CUBLAS_CHECK(
+ cublasLtMatmulDescSetAttribute(plan.op, CUBLASLT_MATMUL_DESC_B_SCALE_MODE, &scale_mode, sizeof(scale_mode)));
+
+ LTX_CUBLAS_CHECK(cublasLtMatmulDescSetAttribute(plan.op, CUBLASLT_MATMUL_DESC_A_SCALE_POINTER, &binds.a_scale,
+ sizeof(binds.a_scale)));
+ LTX_CUBLAS_CHECK(cublasLtMatmulDescSetAttribute(plan.op, CUBLASLT_MATMUL_DESC_B_SCALE_POINTER, &binds.b_scale,
+ sizeof(binds.b_scale)));
+
+ if (g_alpha_on_device) {
+ const int32_t pointer_mode = CUBLASLT_POINTER_MODE_DEVICE;
+ LTX_CUBLAS_CHECK(cublasLtMatmulDescSetAttribute(plan.op, CUBLASLT_MATMUL_DESC_POINTER_MODE, &pointer_mode,
+ sizeof(pointer_mode)));
+ }
+
+ if (key.has_bias) {
+ const cublasLtEpilogue_t epilogue = CUBLASLT_EPILOGUE_BIAS;
+ LTX_CUBLAS_CHECK(
+ cublasLtMatmulDescSetAttribute(plan.op, CUBLASLT_MATMUL_DESC_EPILOGUE, &epilogue, sizeof(epilogue)));
+ LTX_CUBLAS_CHECK(
+ cublasLtMatmulDescSetAttribute(plan.op, CUBLASLT_MATMUL_DESC_BIAS_DATA_TYPE, &bias_dtype, sizeof(bias_dtype)));
+ LTX_CUBLAS_CHECK(
+ cublasLtMatmulDescSetAttribute(plan.op, CUBLASLT_MATMUL_DESC_BIAS_POINTER, &binds.bias, sizeof(binds.bias)));
+ }
+
+ LTX_CUBLAS_CHECK(cublasLtMatrixLayoutCreate(&plan.a, CUDA_R_4F_E2M1, key.k, key.n, key.k));
+ LTX_CUBLAS_CHECK(cublasLtMatrixLayoutCreate(&plan.b, CUDA_R_4F_E2M1, key.k, key.m, key.k));
+ LTX_CUBLAS_CHECK(cublasLtMatrixLayoutCreate(&plan.d, d_type, key.n, key.m, key.n));
+
+ cublasLtMatmulPreference_t pref = nullptr;
+ LTX_CUBLAS_CHECK(cublasLtMatmulPreferenceCreate(&pref));
+ size_t ws = workspace_bytes();
+ LTX_CUBLAS_CHECK(
+ cublasLtMatmulPreferenceSetAttribute(pref, CUBLASLT_MATMUL_PREF_MAX_WORKSPACE_BYTES, &ws, sizeof(ws)));
+
+ cublasLtMatmulHeuristicResult_t heuristics[kMaxAlgos]{};
+ int returned = 0;
+ const cublasStatus_t heur_status =
+ cublasLtMatmulAlgoGetHeuristic(at::cuda::getCurrentCUDABlasLtHandle(), plan.op, plan.a, plan.b, plan.d, plan.d,
+ pref, kMaxAlgos, heuristics, &returned);
+ cublasLtMatmulPreferenceDestroy(pref);
+ TORCH_CHECK(heur_status == CUBLAS_STATUS_SUCCESS && returned > 0, "cuBLASLt found no NVFP4 GEMM algo for M=", key.m,
+ " N=", key.n, " K=", key.k, " (status ", static_cast<int>(heur_status),
+ "). NVFP4 needs SM >= 10.0, K % 32 == 0", " and N % 8 == 0.");
+ plan.algo = heuristics[0].algo;
+ plan.workspace = heuristics[0].workspaceSize;
+ plan.num_candidates = returned;
+ for (int i = 0; i < returned; ++i)
+ plan.candidates[i] = heuristics[i].algo;
+
+ return g_plans.emplace(key, plan).first->second;
+}
+
+} // namespace
+
+torch::Tensor scaled_mm_nvfp4_cublaslt(const torch::Tensor &a, const torch::Tensor &b,
+ const torch::Tensor &block_scale_a, const torch::Tensor &block_scale_b,
+ const torch::Tensor &alpha, const std::optional<torch::Tensor> &bias,
+ torch::Tensor &out) {
+ TORCH_CHECK(a.is_cuda() && b.is_cuda(), "NVFP4 GEMM operands must be CUDA tensors");
+ TORCH_CHECK(a.dim() == 2 && b.dim() == 2, "NVFP4 GEMM operands must be 2-D");
+ TORCH_CHECK(a.is_contiguous() && b.is_contiguous(), "NVFP4 GEMM operands must be contiguous");
+ TORCH_CHECK(a.size(1) == b.size(1), "packed K mismatch: ", a.size(1), " vs ", b.size(1));
+ TORCH_CHECK(alpha.is_cuda() && alpha.scalar_type() == torch::kFloat32 && alpha.numel() == 1,
+ "alpha must be a CUDA fp32 scalar");
+
+ const int64_t m = a.size(0);
+ const int64_t n = b.size(0);
+ const int64_t k = a.size(1) * 2;
+ TORCH_CHECK(k % 32 == 0, "NVFP4 GEMM needs K % 32 == 0, got K=", k);
+ TORCH_CHECK(n % 8 == 0, "NVFP4 GEMM needs N % 8 == 0, got N=", n);
+ TORCH_CHECK(out.size(0) == m && out.size(1) == n, "output shape mismatch");
+
+ const c10::cuda::CUDAGuard guard(a.device());
+ const bool has_bias = bias.has_value() && bias->numel() > 0;
+ const cudaDataType_t bias_dtype = has_bias ? cuda_dtype(bias->scalar_type()) : CUDA_R_16BF;
+ const PlanKey key{m, n, k, static_cast<int>(out.scalar_type()), has_bias};
+
+ Bindings binds;
+ binds.a_scale = block_scale_b.data_ptr(); // cuBLAS A == our weight
+ binds.b_scale = block_scale_a.data_ptr();
+ binds.bias = has_bias ? bias->data_ptr() : nullptr;
+
+ std::lock_guard<std::mutex> lock(g_mutex);
+ Plan &plan = get_plan(key, out.scalar_type(), bias_dtype, binds);
+
+ LTX_CUBLAS_CHECK(cublasLtMatmulDescSetAttribute(plan.op, CUBLASLT_MATMUL_DESC_A_SCALE_POINTER, &binds.a_scale,
+ sizeof(binds.a_scale)));
+ LTX_CUBLAS_CHECK(cublasLtMatmulDescSetAttribute(plan.op, CUBLASLT_MATMUL_DESC_B_SCALE_POINTER, &binds.b_scale,
+ sizeof(binds.b_scale)));
+ if (has_bias) {
+ LTX_CUBLAS_CHECK(
+ cublasLtMatmulDescSetAttribute(plan.op, CUBLASLT_MATMUL_DESC_BIAS_POINTER, &binds.bias, sizeof(binds.bias)));
+ }
+
+ // Host alpha fallback: cuBLASLt without device pointer mode gets alpha = 1 and the
+ // per-tensor product is folded in afterwards by the caller.
+ const float host_alpha = 1.0f;
+ const float host_beta = 0.0f;
+ const void *alpha_ptr = g_alpha_on_device ? alpha.data_ptr() : static_cast<const void *>(&host_alpha);
+ const void *beta_ptr = g_alpha_on_device ? beta_zero(a.device()).data_ptr() : static_cast<const void *>(&host_beta);
+
+ torch::Tensor &ws = workspace_for(a.device());
+ auto run = [&](const cublasLtMatmulAlgo_t &algo, cudaStream_t stream) {
+ return cublasLtMatmul(at::cuda::getCurrentCUDABlasLtHandle(), plan.op, alpha_ptr,
+ b.data_ptr(), // cuBLAS A: weight, (K, N) col-major
+ plan.a,
+ a.data_ptr(), // cuBLAS B: activation, (K, M) col-major
+ plan.b, beta_ptr, out.data_ptr(), plan.d, out.data_ptr(), plan.d, &algo, ws.data_ptr(),
+ workspace_bytes(), stream);
+ };
+
+ auto stream = at::cuda::getCurrentCUDAStream();
+ if (g_autotune && !plan.tuned && plan.num_candidates > 1 &&
+ at::cuda::currentStreamCaptureStatusMayInitCtx() == at::cuda::CaptureStatus::None) {
+ plan.tuned = true;
+ tune_plan(plan, run, stream);
+ }
+ LTX_CUBLAS_CHECK(run(plan.algo, stream));
+ return out;
+}
+
+std::string gemm_alpha_mode() { return g_alpha_on_device ? "device_scalar" : "host_scalar"; }
+
+void set_gemm_autotune(bool enabled) {
+ std::lock_guard<std::mutex> lock(g_mutex);
+ g_autotune = enabled;
+ g_plans.clear();
+}
+
+void set_gemm_alpha_on_device(bool on_device) {
+ std::lock_guard<std::mutex> lock(g_mutex);
+ if (on_device != g_alpha_on_device) {
+ g_plans.clear(); // pointer mode is baked into the cached descriptors
+ g_alpha_on_device = on_device;
+ }
+}
+
+// Diagnostic sweep: which cuBLASLt FP4 configurations this driver/library accepts.
+std::string probe_gemm_support(int64_t m, int64_t n, int64_t k, int64_t scale_ptr_value) {
+ std::ostringstream report;
+ const void *fake_scale = reinterpret_cast<const void *>(scale_ptr_value);
+ for (int pointer_dev = 0; pointer_dev < 2; ++pointer_dev) {
+ for (int with_scales = 0; with_scales < 2; ++with_scales) {
+ for (int with_scale_ptr = 0; with_scale_ptr < 2; ++with_scale_ptr) {
+ cublasLtMatmulDesc_t op = nullptr;
+ cublasLtMatrixLayout_t la = nullptr, lb = nullptr, ld = nullptr;
+ cublasLtMatmulDescCreate(&op, CUBLAS_COMPUTE_32F, CUDA_R_32F);
+ const cublasOperation_t op_t = CUBLAS_OP_T, op_n = CUBLAS_OP_N;
+ cublasLtMatmulDescSetAttribute(op, CUBLASLT_MATMUL_DESC_TRANSA, &op_t, sizeof(op_t));
+ cublasLtMatmulDescSetAttribute(op, CUBLASLT_MATMUL_DESC_TRANSB, &op_n, sizeof(op_n));
+ if (with_scales) {
+ const int32_t mode = CUBLASLT_MATMUL_MATRIX_SCALE_VEC16_UE4M3;
+ cublasLtMatmulDescSetAttribute(op, CUBLASLT_MATMUL_DESC_A_SCALE_MODE, &mode, sizeof(mode));
+ cublasLtMatmulDescSetAttribute(op, CUBLASLT_MATMUL_DESC_B_SCALE_MODE, &mode, sizeof(mode));
+ }
+ if (with_scale_ptr) {
+ cublasLtMatmulDescSetAttribute(op, CUBLASLT_MATMUL_DESC_A_SCALE_POINTER, &fake_scale, sizeof(fake_scale));
+ cublasLtMatmulDescSetAttribute(op, CUBLASLT_MATMUL_DESC_B_SCALE_POINTER, &fake_scale, sizeof(fake_scale));
+ }
+ if (pointer_dev) {
+ const int32_t pm = CUBLASLT_POINTER_MODE_DEVICE;
+ cublasLtMatmulDescSetAttribute(op, CUBLASLT_MATMUL_DESC_POINTER_MODE, &pm, sizeof(pm));
+ }
+ cublasLtMatrixLayoutCreate(&la, CUDA_R_4F_E2M1, k, n, k);
+ cublasLtMatrixLayoutCreate(&lb, CUDA_R_4F_E2M1, k, m, k);
+ cublasLtMatrixLayoutCreate(&ld, CUDA_R_16BF, n, m, n);
+
+ cublasLtMatmulPreference_t pref = nullptr;
+ cublasLtMatmulPreferenceCreate(&pref);
+ size_t ws = workspace_bytes();
+ cublasLtMatmulPreferenceSetAttribute(pref, CUBLASLT_MATMUL_PREF_MAX_WORKSPACE_BYTES, &ws, sizeof(ws));
+ cublasLtMatmulHeuristicResult_t heur{};
+ int returned = 0;
+ const cublasStatus_t st = cublasLtMatmulAlgoGetHeuristic(at::cuda::getCurrentCUDABlasLtHandle(), op, la, lb, ld,
+ ld, pref, 1, &heur, &returned);
+ report << "alpha_device=" << pointer_dev << " scale_mode=" << with_scales << " scale_ptr=" << with_scale_ptr
+ << " -> status=" << static_cast<int>(st) << " algos=" << returned << "\n";
+ cublasLtMatmulPreferenceDestroy(pref);
+ cublasLtMatrixLayoutDestroy(la);
+ cublasLtMatrixLayoutDestroy(lb);
+ cublasLtMatrixLayoutDestroy(ld);
+ cublasLtMatmulDescDestroy(op);
+ }
+ }
+ }
+ return report.str();
+}
+
+} // namespace ltx_nvfp4
diff --git a/packages/ltx-kernels/csrc/nvfp4/nvfp4.h b/packages/ltx-kernels/csrc/nvfp4/nvfp4.h
new file mode 100644
index 0000000..baf1705
--- /dev/null
+++ b/packages/ltx-kernels/csrc/nvfp4/nvfp4.h
@@ -0,0 +1,50 @@
+#pragma once
+
+#include <torch/extension.h>
+
+#include <optional>
+
+namespace ltx_nvfp4 {
+
+// FP4 E2M1 / FP8 E4M3 range constants (see docs/NVFP4.md).
+constexpr float kE2M1Max = 6.0f;
+constexpr float kE4M3Max = 448.0f;
+constexpr int kBlockSize = 16;
+
+// Fused NVFP4 quantize: packs `x` (2-D, bf16/fp16/fp32, contiguous) into `out_packed`
+// (uint8, two E2M1 values per byte) and writes E4M3 block scales straight into the
+// cuBLAS 128x4 tiled layout of `out_scales`.
+//
+// `per_tensor_scale` is the *decode* scale (amax / (448 * 6)) as a device fp32 scalar;
+// it is read on the GPU so callers never sync.
+// `variant`: 1 = one thread per 16-element block, 2 = CTA per 128x4 scale tile with the
+// scale bytes staged in shared memory (default; see docs/NVFP4.md optimization log).
+void quantize_nvfp4_cuda(const torch::Tensor &x, const torch::Tensor &per_tensor_scale, torch::Tensor &out_packed,
+ torch::Tensor &out_scales, bool hi_first, int64_t variant = 2);
+
+// Reference dequantize (tests / debugging), reads the same swizzled scale layout.
+void dequantize_nvfp4_cuda(const torch::Tensor &packed, const torch::Tensor &per_tensor_scale,
+ const torch::Tensor &scales, torch::Tensor &out, bool hi_first);
+
+// alpha[0] = a[0] * b[0] on device (fp32 scalars), so the GEMM's per-tensor product
+// never round-trips through the host.
+void mul_scalars_cuda(const torch::Tensor &a, const torch::Tensor &b, torch::Tensor &out);
+
+// out[0] = max(|x|) / divisor in a single pass. NaN is ignored and +-inf saturates to
+// FLT_MAX, matching `x.float().abs().nan_to_num().amax()`.
+void amax_scale_cuda(const torch::Tensor &x, torch::Tensor &out, double divisor);
+
+// D = alpha * (A @ B^T) + bias, with A (M,K) / B (N,K) NVFP4-packed uint8 and
+// 1x16 E4M3 block scales in cuBLAS tiled layout. `alpha` is a device fp32 scalar.
+torch::Tensor scaled_mm_nvfp4_cublaslt(const torch::Tensor &a, const torch::Tensor &b,
+ const torch::Tensor &block_scale_a, const torch::Tensor &block_scale_b,
+ const torch::Tensor &alpha, const std::optional<torch::Tensor> &bias,
+ torch::Tensor &out);
+
+// Diagnostic: which alpha delivery mode the cuBLASLt build supports.
+std::string gemm_alpha_mode();
+void set_gemm_alpha_on_device(bool on_device);
+void set_gemm_autotune(bool enabled);
+std::string probe_gemm_support(int64_t m, int64_t n, int64_t k, int64_t scale_ptr_value);
+
+} // namespace ltx_nvfp4
diff --git a/packages/ltx-kernels/csrc/nvfp4/quantize.cu b/packages/ltx-kernels/csrc/nvfp4/quantize.cu
new file mode 100644
index 0000000..79ab370
--- /dev/null
+++ b/packages/ltx-kernels/csrc/nvfp4/quantize.cu
@@ -0,0 +1,480 @@
+// Fused NVFP4 quantize / dequantize for Blackwell (SM >= 10.0).
+//
+// One thread owns `kBlocksPerThread` 16-element blocks: it reads them with 16-byte
+// vector loads, reduces the amax in registers, rounds the block scale to E4M3, converts
+// the payload with the hardware `cvt.rn.satfinite.e2m1x2.f32` path, and stores the scale
+// directly at its swizzled (cuBLAS 128x4 tiled) address -- no separate `to_blocked` pass.
+
+#include <ATen/cuda/CUDAContext.h>
+#include <c10/cuda/CUDAGuard.h>
+#include <cfloat>
+#include <cuda_bf16.h>
+#include <cuda_fp16.h>
+#include <cuda_fp4.h>
+#include <cuda_fp8.h>
+
+#include "nvfp4.h"
+
+namespace ltx_nvfp4 {
+namespace {
+
+constexpr int kBlocksPerThread = 2;
+constexpr int kThreads = 256;
+
+// Offset of scale element (row, col) in the cuBLAS 128x4 tiled layout.
+// padded_cols == roundup(K / 16, 4).
+__device__ __forceinline__ int64_t swizzled_offset(int row, int col, int padded_cols) {
+ const int n_col_blocks = padded_cols >> 2;
+ const int tile = (row >> 7) * n_col_blocks + (col >> 2);
+ const int r = row & 127;
+ return static_cast<int64_t>(tile) * 512 + (r & 31) * 16 + (r >> 5) * 4 + (col & 3);
+}
+
+__device__ __forceinline__ float half_bits_to_float(unsigned short bits) {
+ __half_raw hr;
+ hr.x = bits;
+ return __half2float(__half(hr));
+}
+
+__device__ __forceinline__ float e4m3_decode(__nv_fp8_storage_t s) {
+ return half_bits_to_float(__nv_cvt_fp8_to_halfraw(s, __NV_E4M3).x);
+}
+
+// E4M3 block scale for one 16-element block, given the block amax and the per-tensor
+// decode scale.
+//
+// The two divisions are deliberate. The layout contract is `(amax / 6) / per_tensor_scale`
+// as two correctly-rounded divides; folding them into `amax * (1/6) * __frcp_rn(pts)` is
+// 1 ulp off, which is invisible almost everywhere but tips the E4M3 rounding the other way
+// for block amaxes that land exactly on a boundary. At 2M blocks per tensor that happened
+// on roughly a third of random 8160x4096 draws and broke bit-exact golden / checkpoint
+// compatibility. Two divides per 16 loaded elements is free next to the loads.
+__device__ __forceinline__ __nv_fp8_storage_t block_scale_e4m3(float amax, float pts) {
+ const float scaled = pts > 0.0f ? fminf((amax / kE2M1Max) / pts, kE4M3Max) : 0.0f;
+ return __nv_cvt_float_to_fp8(scaled, __NV_SATFINITE, __NV_E4M3);
+}
+
+template <typename T> struct Vec16B; // 16 bytes worth of T
+
+template <> struct Vec16B<__nv_bfloat16> {
+ static constexpr int kElems = 8;
+ union U {
+ uint4 raw;
+ __nv_bfloat16 v[8];
+ };
+ __device__ static void unpack(const U &u, float *dst) {
+#pragma unroll
+ for (int i = 0; i < 8; ++i)
+ dst[i] = __bfloat162float(u.v[i]);
+ }
+};
+
+template <> struct Vec16B<__half> {
+ static constexpr int kElems = 8;
+ union U {
+ uint4 raw;
+ __half v[8];
+ };
+ __device__ static void unpack(const U &u, float *dst) {
+#pragma unroll
+ for (int i = 0; i < 8; ++i)
+ dst[i] = __half2float(u.v[i]);
+ }
+};
+
+template <> struct Vec16B<float> {
+ static constexpr int kElems = 4;
+ union U {
+ uint4 raw;
+ float v[4];
+ };
+ __device__ static void unpack(const U &u, float *dst) {
+#pragma unroll
+ for (int i = 0; i < 4; ++i)
+ dst[i] = u.v[i];
+ }
+};
+
+// Reads kBlockSize (16) values starting at `src` into `dst` using 16-byte loads.
+template <typename T> __device__ __forceinline__ void load_block(const T *__restrict__ src, float *dst) {
+ using V = Vec16B<T>;
+ constexpr int kLoads = kBlockSize / V::kElems;
+ const uint4 *p = reinterpret_cast<const uint4 *>(src);
+#pragma unroll
+ for (int l = 0; l < kLoads; ++l) {
+ typename V::U u;
+ u.raw = p[l];
+ V::unpack(u, dst + l * V::kElems);
+ }
+}
+
+template <typename T, bool kHiFirst>
+__global__ void quantize_kernel(const T *__restrict__ x, const float *__restrict__ per_tensor_scale,
+ uint8_t *__restrict__ out, uint8_t *__restrict__ scales, int rows, int blocks_per_row,
+ int padded_scale_cols) {
+ const float pts = *per_tensor_scale;
+
+ const int64_t total_blocks = static_cast<int64_t>(rows) * blocks_per_row;
+ int64_t blk = (static_cast<int64_t>(blockIdx.x) * kThreads + threadIdx.x) * kBlocksPerThread;
+ if (blk >= total_blocks)
+ return;
+
+#pragma unroll
+ for (int b = 0; b < kBlocksPerThread; ++b, ++blk) {
+ if (kBlocksPerThread > 1 && blk >= total_blocks)
+ return;
+ const int row = static_cast<int>(blk / blocks_per_row);
+ const int col = static_cast<int>(blk - static_cast<int64_t>(row) * blocks_per_row);
+
+ float v[kBlockSize];
+ load_block<T>(x + blk * kBlockSize, v);
+
+ float amax = 0.0f;
+#pragma unroll
+ for (int i = 0; i < kBlockSize; ++i)
+ amax = fmaxf(amax, fabsf(v[i]));
+
+ // Block scale in E4M3, expressed relative to the per-tensor decode scale.
+ const __nv_fp8_storage_t sf = block_scale_e4m3(amax, pts);
+ scales[swizzled_offset(row, col, padded_scale_cols)] = static_cast<uint8_t>(sf);
+
+ const float total = pts * e4m3_decode(sf);
+ const float inv = total > 0.0f ? __frcp_rn(total) : 0.0f;
+
+ // 16 values -> 8 packed bytes -> one 8-byte store.
+ uint32_t lo = 0, hi = 0;
+#pragma unroll
+ for (int j = 0; j < 8; ++j) {
+ const float a = v[2 * j] * inv;
+ const float c = v[2 * j + 1] * inv;
+ // hi_first: element 2j lands in the high nibble (Core42 PTQ order).
+ const float2 pair = kHiFirst ? make_float2(c, a) : make_float2(a, c);
+ const uint32_t byte = __nv_cvt_float2_to_fp4x2(pair, __NV_E2M1, cudaRoundNearest);
+ if (j < 4) {
+ lo |= byte << (8 * j);
+ } else {
+ hi |= byte << (8 * (j - 4));
+ }
+ }
+ reinterpret_cast<uint2 *>(out)[blk] = make_uint2(lo, hi);
+ }
+}
+
+// Tiled variant: one CTA owns a full 128x4 scale tile (128 rows x 64 elements), stages the
+// 512 scale bytes in shared memory and flushes them with 16-byte stores. The elementwise
+// variant above writes single scale bytes at 512-byte strides, which costs ~8x write
+// amplification on the scale array; staging removes it and also zero-fills the padded
+// rows/cols for free (no torch::zeros needed).
+constexpr int kTileRows = 128;
+constexpr int kTileCols = 4; // scale columns == 64 elements
+constexpr int kTileThreads = 256;
+constexpr int kColsPerThread = 2;
+
+template <typename T, bool kHiFirst>
+__global__ void quantize_tiled_kernel(const T *__restrict__ x, const float *__restrict__ per_tensor_scale,
+ uint8_t *__restrict__ out, uint8_t *__restrict__ scales, int rows,
+ int blocks_per_row, int padded_scale_cols) {
+ __shared__ uint8_t tile[kTileRows * kTileCols];
+
+ const float pts = *per_tensor_scale;
+
+ const int tile_col = blockIdx.x * kTileCols;
+ const int tile_row = blockIdx.y * kTileRows;
+ const int local_row = threadIdx.x / (kTileCols / kColsPerThread);
+ const int local_col = (threadIdx.x % (kTileCols / kColsPerThread)) * kColsPerThread;
+ const int row = tile_row + local_row;
+
+ // In-tile scale offsets for this thread's kColsPerThread adjacent columns.
+ const int tile_off = (local_row & 31) * 16 + (local_row >> 5) * 4 + local_col;
+
+ uint8_t sf_bytes[kColsPerThread] = {0, 0};
+ if (row < rows) {
+#pragma unroll
+ for (int c = 0; c < kColsPerThread; ++c) {
+ const int col = tile_col + local_col + c;
+ if (col >= blocks_per_row)
+ continue;
+ const int64_t blk = static_cast<int64_t>(row) * blocks_per_row + col;
+
+ float v[kBlockSize];
+ load_block<T>(x + blk * kBlockSize, v);
+
+ float amax = 0.0f;
+#pragma unroll
+ for (int i = 0; i < kBlockSize; ++i)
+ amax = fmaxf(amax, fabsf(v[i]));
+
+ const __nv_fp8_storage_t sf = block_scale_e4m3(amax, pts);
+ sf_bytes[c] = static_cast<uint8_t>(sf);
+
+ const float total = pts * e4m3_decode(sf);
+ const float inv = total > 0.0f ? __frcp_rn(total) : 0.0f;
+
+ uint32_t lo = 0, hi = 0;
+#pragma unroll
+ for (int j = 0; j < 8; ++j) {
+ const float a = v[2 * j] * inv;
+ const float b = v[2 * j + 1] * inv;
+ const float2 pair = kHiFirst ? make_float2(b, a) : make_float2(a, b);
+ const uint32_t byte = __nv_cvt_float2_to_fp4x2(pair, __NV_E2M1, cudaRoundNearest);
+ if (j < 4) {
+ lo |= byte << (8 * j);
+ } else {
+ hi |= byte << (8 * (j - 4));
+ }
+ }
+ reinterpret_cast<uint2 *>(out)[blk] = make_uint2(lo, hi);
+ }
+ }
+
+#pragma unroll
+ for (int c = 0; c < kColsPerThread; ++c)
+ tile[tile_off + c] = sf_bytes[c];
+ __syncthreads();
+
+ // 32 threads x 16 bytes == the whole 512-byte tile, fully coalesced.
+ if (threadIdx.x < 32) {
+ const int64_t tile_index = static_cast<int64_t>(blockIdx.y) * (padded_scale_cols / kTileCols) + blockIdx.x;
+ uint4 *dst = reinterpret_cast<uint4 *>(scales + tile_index * (kTileRows * kTileCols));
+ dst[threadIdx.x] = reinterpret_cast<const uint4 *>(tile)[threadIdx.x];
+ }
+}
+
+template <typename T, bool kHiFirst>
+__global__ void dequantize_kernel(const uint8_t *__restrict__ packed, const float *__restrict__ per_tensor_scale,
+ const uint8_t *__restrict__ scales, T *__restrict__ out, int rows, int blocks_per_row,
+ int padded_scale_cols) {
+ const float pts = *per_tensor_scale;
+ const int64_t total_blocks = static_cast<int64_t>(rows) * blocks_per_row;
+ const int64_t blk = static_cast<int64_t>(blockIdx.x) * kThreads + threadIdx.x;
+ if (blk >= total_blocks)
+ return;
+
+ const int row = static_cast<int>(blk / blocks_per_row);
+ const int col = static_cast<int>(blk - static_cast<int64_t>(row) * blocks_per_row);
+ const float scale = pts * e4m3_decode(scales[swizzled_offset(row, col, padded_scale_cols)]);
+
+ const uint2 bytes = reinterpret_cast<const uint2 *>(packed)[blk];
+#pragma unroll
+ for (int j = 0; j < 8; ++j) {
+ const uint32_t word = j < 4 ? bytes.x : bytes.y;
+ const uint8_t byte = static_cast<uint8_t>(word >> (8 * (j & 3)));
+ const __half2_raw h2 = __nv_cvt_fp4x2_to_halfraw2(byte, __NV_E2M1);
+ // halfraw2 lane .x is the low nibble.
+ const float lo = half_bits_to_float(h2.x);
+ const float hi = half_bits_to_float(h2.y);
+ const float first = kHiFirst ? hi : lo;
+ const float second = kHiFirst ? lo : hi;
+ T *dst = out + blk * kBlockSize + 2 * j;
+ dst[0] = static_cast<T>(first * scale);
+ dst[1] = static_cast<T>(second * scale);
+ }
+}
+
+__global__ void mul_scalars_kernel(const float *a, const float *b, float *out) { out[0] = a[0] * b[0]; }
+
+// ---------------------------------------------------------------------------
+// Fused |amax| / divisor -- the per-tensor decode scale in one pass.
+//
+// `x.float().abs().nan_to_num().amax() / divisor` in ATen is three passes over the
+// activation plus five scalar launches. This is one pass with 16-byte loads.
+//
+// NaN/inf handling matches `nan_to_num`: NaN contributes nothing (CUDA `fmaxf` returns
+// the non-NaN operand) and +-inf saturates to FLT_MAX. Dividing by a positive `divisor`
+// is monotonic on non-negative reals, so we can fold it in before the atomic and skip a
+// follow-up kernel.
+// ---------------------------------------------------------------------------
+constexpr int kAmaxThreads = 256;
+constexpr int kAmaxMaxBlocks = 1024;
+
+__device__ __forceinline__ float sanitize_abs(float v) {
+ const float a = fabsf(v);
+ // NaN fails both comparisons, so it survives here and is dropped by the fmaxf below.
+ return a > FLT_MAX ? FLT_MAX : a;
+}
+
+template <typename T>
+__global__ void amax_scale_kernel(const T *__restrict__ x, int64_t numel, float inv_divisor, float *__restrict__ out) {
+ using V = Vec16B<T>;
+ constexpr int kElems = V::kElems;
+
+ float amax = 0.0f;
+ const int64_t nvec = numel / kElems;
+ const int64_t stride = static_cast<int64_t>(gridDim.x) * blockDim.x;
+ const uint4 *p = reinterpret_cast<const uint4 *>(x);
+
+ for (int64_t i = static_cast<int64_t>(blockIdx.x) * blockDim.x + threadIdx.x; i < nvec; i += stride) {
+ typename V::U u;
+ u.raw = p[i];
+ float vals[kElems];
+ V::unpack(u, vals);
+#pragma unroll
+ for (int j = 0; j < kElems; ++j)
+ amax = fmaxf(amax, sanitize_abs(vals[j]));
+ }
+ // Ragged tail (numel is a multiple of 16 for quantizable inputs, but keep this general).
+ for (int64_t i = nvec * kElems + blockIdx.x * blockDim.x + threadIdx.x; i < numel; i += stride) {
+ amax = fmaxf(amax, sanitize_abs(static_cast<float>(x[i])));
+ }
+
+#pragma unroll
+ for (int off = 16; off > 0; off >>= 1) {
+ amax = fmaxf(amax, __shfl_down_sync(0xffffffffu, amax, off));
+ }
+
+ __shared__ float warp_max[kAmaxThreads / 32];
+ const int lane = threadIdx.x & 31;
+ const int warp = threadIdx.x >> 5;
+ if (lane == 0)
+ warp_max[warp] = amax;
+ __syncthreads();
+
+ if (threadIdx.x == 0) {
+ float block_max = 0.0f;
+#pragma unroll
+ for (int w = 0; w < kAmaxThreads / 32; ++w)
+ block_max = fmaxf(block_max, warp_max[w]);
+ const float scaled = block_max * inv_divisor;
+ // Monotonic bit trick: for non-negative floats, IEEE bit patterns order like the values.
+ atomicMax(reinterpret_cast<unsigned int *>(out), __float_as_uint(scaled));
+ }
+}
+
+int64_t ceil_div(int64_t a, int64_t b) { return (a + b - 1) / b; }
+
+} // namespace
+
+void quantize_nvfp4_cuda(const torch::Tensor &x, const torch::Tensor &per_tensor_scale, torch::Tensor &out_packed,
+ torch::Tensor &out_scales, bool hi_first, int64_t variant) {
+ TORCH_CHECK(x.is_cuda() && x.dim() == 2 && x.is_contiguous(), "x must be 2-D contiguous CUDA");
+ TORCH_CHECK(x.size(1) % kBlockSize == 0, "K must be a multiple of 16, got ", x.size(1));
+ TORCH_CHECK(per_tensor_scale.is_cuda() && per_tensor_scale.scalar_type() == torch::kFloat32,
+ "per_tensor_scale must be a CUDA fp32 scalar");
+ TORCH_CHECK(per_tensor_scale.numel() == 1, "per_tensor_scale must hold one element");
+
+ const int rows = static_cast<int>(x.size(0));
+ const int blocks_per_row = static_cast<int>(x.size(1) / kBlockSize);
+ const int padded_scale_cols = static_cast<int>(out_scales.size(1));
+ TORCH_CHECK(padded_scale_cols % 4 == 0, "scale columns must be padded to a multiple of 4");
+
+ const c10::cuda::CUDAGuard guard(x.device());
+ const int64_t total_blocks = static_cast<int64_t>(rows) * blocks_per_row;
+ const int64_t threads_needed = ceil_div(total_blocks, kBlocksPerThread);
+ const dim3 grid(static_cast<unsigned>(ceil_div(threads_needed, kThreads)));
+ const dim3 tiled_grid(static_cast<unsigned>(padded_scale_cols / kTileCols),
+ static_cast<unsigned>(ceil_div(rows, kTileRows)));
+ auto stream = at::cuda::getCurrentCUDAStream();
+
+ const float *pts = per_tensor_scale.data_ptr<float>();
+ uint8_t *out = out_packed.data_ptr<uint8_t>();
+ uint8_t *sc = out_scales.data_ptr<uint8_t>();
+
+#define LTX_LAUNCH_QUANT(T, HI) \
+ (variant == 1 \
+ ? quantize_kernel<T, HI><<<grid, kThreads, 0, stream>>>(reinterpret_cast<const T *>(x.data_ptr()), pts, out, \
+ sc, rows, blocks_per_row, padded_scale_cols) \
+ : quantize_tiled_kernel<T, HI><<<tiled_grid, kTileThreads, 0, stream>>>( \
+ reinterpret_cast<const T *>(x.data_ptr()), pts, out, sc, rows, blocks_per_row, padded_scale_cols))
+
+ switch (x.scalar_type()) {
+ case torch::kBFloat16:
+ hi_first ? LTX_LAUNCH_QUANT(__nv_bfloat16, true) : LTX_LAUNCH_QUANT(__nv_bfloat16, false);
+ break;
+ case torch::kHalf:
+ hi_first ? LTX_LAUNCH_QUANT(__half, true) : LTX_LAUNCH_QUANT(__half, false);
+ break;
+ case torch::kFloat32:
+ hi_first ? LTX_LAUNCH_QUANT(float, true) : LTX_LAUNCH_QUANT(float, false);
+ break;
+ default:
+ TORCH_CHECK(false, "quantize_nvfp4 supports bf16/fp16/fp32, got ", x.scalar_type());
+ }
+#undef LTX_LAUNCH_QUANT
+ C10_CUDA_KERNEL_LAUNCH_CHECK();
+}
+
+void dequantize_nvfp4_cuda(const torch::Tensor &packed, const torch::Tensor &per_tensor_scale,
+ const torch::Tensor &scales, torch::Tensor &out, bool hi_first) {
+ TORCH_CHECK(packed.is_cuda() && packed.dim() == 2 && packed.is_contiguous(), "packed must be 2-D contiguous CUDA");
+ const int rows = static_cast<int>(packed.size(0));
+ const int blocks_per_row = static_cast<int>(packed.size(1) * 2 / kBlockSize);
+ const int padded_scale_cols = static_cast<int>(scales.size(1));
+
+ const c10::cuda::CUDAGuard guard(packed.device());
+ const int64_t total_blocks = static_cast<int64_t>(rows) * blocks_per_row;
+ const dim3 grid(static_cast<unsigned>(ceil_div(total_blocks, kThreads)));
+ auto stream = at::cuda::getCurrentCUDAStream();
+
+#define LTX_LAUNCH_DEQUANT(T, HI) \
+ dequantize_kernel<T, HI><<<grid, kThreads, 0, stream>>>( \
+ packed.data_ptr<uint8_t>(), per_tensor_scale.data_ptr<float>(), scales.data_ptr<uint8_t>(), \
+ reinterpret_cast<T *>(out.data_ptr()), rows, blocks_per_row, padded_scale_cols)
+
+ switch (out.scalar_type()) {
+ case torch::kBFloat16:
+ hi_first ? LTX_LAUNCH_DEQUANT(__nv_bfloat16, true) : LTX_LAUNCH_DEQUANT(__nv_bfloat16, false);
+ break;
+ case torch::kFloat32:
+ hi_first ? LTX_LAUNCH_DEQUANT(float, true) : LTX_LAUNCH_DEQUANT(float, false);
+ break;
+ default:
+ TORCH_CHECK(false, "dequantize_nvfp4 supports bf16/fp32 out, got ", out.scalar_type());
+ }
+#undef LTX_LAUNCH_DEQUANT
+ C10_CUDA_KERNEL_LAUNCH_CHECK();
+}
+
+void amax_scale_cuda(const torch::Tensor &x, torch::Tensor &out, double divisor) {
+ TORCH_CHECK(x.is_cuda() && x.is_contiguous(), "amax input must be contiguous CUDA");
+ TORCH_CHECK(out.is_cuda() && out.scalar_type() == torch::kFloat32 && out.numel() == 1,
+ "amax out must be a CUDA fp32 scalar");
+ TORCH_CHECK(divisor > 0.0, "divisor must be positive, got ", divisor);
+
+ const c10::cuda::CUDAGuard guard(x.device());
+ auto stream = at::cuda::getCurrentCUDAStream();
+ float *out_ptr = out.data_ptr<float>();
+
+ // atomicMax accumulates, so the target must start at zero. memsetAsync is stream-ordered
+ // and graph-capturable, and beats a torch::zeros fill launch.
+ C10_CUDA_CHECK(cudaMemsetAsync(out_ptr, 0, sizeof(float), stream));
+
+ const int64_t numel = x.numel();
+ if (numel == 0)
+ return;
+
+ const float inv_divisor = static_cast<float>(1.0 / divisor);
+
+#define LTX_LAUNCH_AMAX(T) \
+ do { \
+ const int64_t nvec = numel / Vec16B<T>::kElems; \
+ const int64_t want = ceil_div(nvec > 0 ? nvec : 1, kAmaxThreads); \
+ const unsigned blocks = static_cast<unsigned>(want < kAmaxMaxBlocks ? (want > 0 ? want : 1) : kAmaxMaxBlocks); \
+ amax_scale_kernel<T> \
+ <<<blocks, kAmaxThreads, 0, stream>>>(reinterpret_cast<const T *>(x.data_ptr()), numel, inv_divisor, out_ptr); \
+ } while (0)
+
+ switch (x.scalar_type()) {
+ case torch::kBFloat16:
+ LTX_LAUNCH_AMAX(__nv_bfloat16);
+ break;
+ case torch::kHalf:
+ LTX_LAUNCH_AMAX(__half);
+ break;
+ case torch::kFloat32:
+ LTX_LAUNCH_AMAX(float);
+ break;
+ default:
+ TORCH_CHECK(false, "amax_scale supports bf16/fp16/fp32, got ", x.scalar_type());
+ }
+#undef LTX_LAUNCH_AMAX
+ C10_CUDA_KERNEL_LAUNCH_CHECK();
+}
+
+void mul_scalars_cuda(const torch::Tensor &a, const torch::Tensor &b, torch::Tensor &out) {
+ const c10::cuda::CUDAGuard guard(a.device());
+ mul_scalars_kernel<<<1, 1, 0, at::cuda::getCurrentCUDAStream()>>>(a.data_ptr<float>(), b.data_ptr<float>(),
+ out.data_ptr<float>());
+ C10_CUDA_KERNEL_LAUNCH_CHECK();
+}
+
+} // namespace ltx_nvfp4
diff --git a/packages/ltx-kernels/docs/NVFP4.md b/packages/ltx-kernels/docs/NVFP4.md
new file mode 100644
index 0000000..0c448aa
--- /dev/null
+++ b/packages/ltx-kernels/docs/NVFP4.md
@@ -0,0 +1,96 @@
+# NVFP4 in `ltx-kernels`
+
+In-house NVFP4 (FP4 E2M1 data + FP8 E4M3 per-16 block scales + FP32 per-tensor scale)
+quantization and GEMM for LTX-2 Linear layers on Blackwell (SM ≥ 10.0).
+
+Build: `TORCH_CUDA_ARCH_LIST=10.0 uv pip install -e packages/ltx-kernels --no-build-isolation`
+(or `uv sync --group kernels` on a CUDA host). The `nvfp4_cpp` extension is skipped on
+hosts without SM ≥ 10.
+
+Post-productization follow-ups (CuTe GEMM, RMSNorm↔quant fusion, serving/CI):
+[ENG-525](https://linear.app/lightricks/issue/ENG-525/nvfp4-ltx-kernels-follow-ups-post-productization).
+
+## Format / layout contract
+
+Per 2-D operand `x` of shape `(rows, K)`:
+
+| piece | value | storage |
+|---|---|---|
+| per-tensor scale `s_t` | *decode* scale `amax / (E4M3_MAX * E2M1_MAX)` = `amax / 2688` | fp32 scalar |
+| block scale `s_b[r, j]` | `e4m3_rne(clamp(blk_amax / 6 / s_t, max=448))` | `float8_e4m3fn`, cuBLAS 128×4 tiled |
+| data | `e2m1_rne(x / (s_t * s_b))`, saturating at ±6 | `uint8`, two values per byte |
+
+Reconstruction: `x ≈ data * s_b * s_t`.
+
+### Nibble order (`hi_first`)
+
+`hi_first=True` (default) puts element `2j` in the **high** nibble of byte `j`;
+`hi_first=False` puts it in the low nibble. Pre-quantized checkpoints used with
+`nvfp4-prequant` are expected in the default (`hi_first=True`) order.
+
+Measured fact (see `tests/test_nvfp4.py::test_nibble_order_is_gemm_invariant`): the block
+scale covers all 16 elements of a block, so swapping nibble order in **both** operands
+only permutes the terms of each dot product — the result is bit-identical. A nibble swap
+is only needed when *mixing* layouts.
+
+### Block-scale swizzle
+
+cuBLAS 1×16 block scaling wants the scale matrix `(rows, K/16)` zero-padded to
+`(roundup(rows,128), roundup(K/16,4))` and shuffled into 128×4 tiles
+([cuBLAS docs](https://docs.nvidia.com/cuda/cublas/index.html#d-block-scaling-factors-layout)).
+Our kernel writes the swizzled address directly:
+
+```
+tile = (row/128) * (padded_cols/4) + col/4
+offset = tile*512 + (row%32)*16 + ((row%128)/32)*4 + col%4
+```
+
+### Padding rules
+
+* `K % 32 == 0` is **required** (cuBLASLt FP4 constraint). LTX-2 DiT Linear `in_features`
+ are multiples of 64.
+* `N % 8 == 0` required for the GEMM (weight `out_features`).
+* `M` (token count) is **unconstrained**: we do not pad the data, we only zero-pad the
+ *scale* array up to 128 rows / 4 cols.
+
+## GEMM strategy
+
+**cuBLASLt FP4 block-scaled matmul.** `CUDA_R_4F_E2M1` operands, TN layout,
+`A/B_SCALE_MODE = CUBLASLT_MATMUL_MATRIX_SCALE_VEC16_UE4M3`, `CUBLAS_COMPUTE_32F`,
+bias fused via `CUBLASLT_EPILOGUE_BIAS`. Plan + heuristic are cached per
+`(M,N,K,bias,out_dtype)`, and the per-tensor product `alpha` is a **device** scalar
+(`CUBLASLT_POINTER_MODE_DEVICE`) so a dynamic activation scale never forces a `.item()`
+sync or a second elementwise pass over the output.
+
+## Compile / Dynamo
+
+`ltx_kernels.nvfp4` exposes plain functions plus `torch.library.custom_op` wrappers
+(`ltx_kernels_nvfp4::quantize` / `::scaled_mm` / `::amax_scale`) with `register_fake`
+shape functions, so Dynamo treats them as opaque and
+`CompilationConfig(seq_dim_dynamic=True, capture=True)` can CUDA-graph them.
+
+* no host syncs (hence device `alpha`), no `.item()`, no data-dependent shapes;
+* the cuBLASLt workspace is a per-device static tensor allocated on first use;
+* the plan cache is keyed on shapes only, so capture replays hit the cache.
+
+## Python API
+
+```python
+from ltx_kernels.nvfp4 import (
+ is_available,
+ linear_nvfp4,
+ per_tensor_decode_scale,
+ quantize_nvfp4,
+ scaled_mm_nvfp4,
+)
+
+assert is_available() # SM >= 10 and nvfp4_cpp built
+decode = per_tensor_decode_scale(weight_bf16)
+w_fp4, w_scale = quantize_nvfp4(weight_bf16, decode)
+out = linear_nvfp4(x_bf16, w_fp4, w_scale, decode, bias=bias, act_scale=None)
+```
+
+`act_scale=None` uses a fixed per-tensor scale of `1.0` (no activation amax).
+Pass a calibrated scalar (e.g. checkpoint `<layer>.input_scale`) for static
+per-tensor activation decode scale; per-16 E4M3 block scales are still computed
+each call. GEMM `alpha = act_scale * weight_scale`.
diff --git a/packages/ltx-kernels/pyproject.toml b/packages/ltx-kernels/pyproject.toml
index c5320ac..6d71784 100644
--- a/packages/ltx-kernels/pyproject.toml
+++ b/packages/ltx-kernels/pyproject.toml
@@ -8,8 +8,11 @@ build-backend = "setuptools.build_meta"
[project]
name = "ltx-kernels"
-version = "0.1.0"
-dependencies = ["torch"]
+version = "1.2.0"
+dependencies = [
+ "torch",
+ "nvidia-cutlass-dsl>=4.6.0.dev0,<5; sys_platform == 'linux'",
+]
[tool.setuptools]
package-dir = {"" = "src"}
diff --git a/packages/ltx-kernels/setup.py b/packages/ltx-kernels/setup.py
index a64ebb7..63cd86d 100644
--- a/packages/ltx-kernels/setup.py
+++ b/packages/ltx-kernels/setup.py
@@ -3,12 +3,108 @@ import re
import subprocess
from pathlib import Path
-import setuptools
+
+def _prefer_pip_cuda_home() -> None:
+ """Point CUDA_HOME at pip nvidia-cuda-nvcc when unset (match torch's CUDA)."""
+ if os.environ.get("CUDA_HOME") or os.environ.get("CUDA_PATH"):
+ return
+ try:
+ from importlib.metadata import PackageNotFoundError, distribution # noqa: PLC0415
+
+ root = Path(str(distribution("nvidia-cuda-nvcc").locate_file("")))
+ except PackageNotFoundError:
+ return
+ for candidate in (root / "nvidia" / "cu13", root / "nvidia" / "cuda_nvcc"):
+ if (candidate / "bin" / "nvcc").is_file():
+ os.environ["CUDA_HOME"] = str(candidate)
+ path = os.environ.get("PATH", "")
+ bin_dir = str(candidate / "bin")
+ if bin_dir not in path.split(os.pathsep):
+ os.environ["PATH"] = bin_dir + os.pathsep + path
+ return
+
+
+_prefer_pip_cuda_home()
+
+import setuptools # CUDA_HOME must be set before cpp_extension import
import torch
from torch.utils.cpp_extension import CUDA_HOME, BuildExtension, CUDAExtension
ROOT = Path(__file__).resolve().parent
+
+def _cuda_lib_dirs() -> list[Path]:
+ """Real lib dirs under CUDA_HOME (pip wheels use ``lib/``, system toolkits ``lib64/``)."""
+ if CUDA_HOME is None:
+ return []
+ home = Path(CUDA_HOME)
+ return [p for p in (home / "lib", home / "lib64", home / "lib64" / "stubs", home / "lib" / "stubs") if p.is_dir()]
+
+
+def _system_cuda_stub_dirs() -> list[Path]:
+ """Dirs that provide ``libcuda.so`` (driver stub). Pip CUDA wheels do not ship it."""
+ candidates = [
+ Path("/usr/local/cuda/lib64/stubs"),
+ Path("/usr/local/cuda/lib/stubs"),
+ Path("/usr/lib/x86_64-linux-gnu"),
+ Path("/usr/lib64"),
+ ]
+ # If CUDA_HOME is the pip tree, also probe a sibling system toolkit.
+ if CUDA_HOME is not None:
+ home = Path(CUDA_HOME)
+ candidates.extend([home / "lib64" / "stubs", home / "lib" / "stubs"])
+ return [p for p in candidates if (p / "libcuda.so").is_file() or (p / "libcuda.so.1").is_file()]
+
+
+def _pip_cuda_link_dirs() -> list[str]:
+ """Library dirs for ``-lcudart`` / ``-lnvrtc`` / ``-lcuda`` against pip CUDA wheels.
+ Pip nvidia wheels ship versioned sonames only (``libcudart.so.13``) without the
+ unversioned ``libcudart.so`` that ``-lcudart`` expects. Rather than mutate
+ site-packages, stage relative symlinks in a build-local dir and put that first
+ on the linker search path. System toolkits already have unversioned names, so
+ the staging dir stays empty of conflicts and later dirs still work.
+ ``libcuda`` (driver) is never in the pip wheels; append system stub dirs for
+ ``-lcuda`` (blockwise).
+ """
+ real_dirs = _cuda_lib_dirs()
+ stub_dirs = _system_cuda_stub_dirs()
+ if not real_dirs and not stub_dirs:
+ return []
+
+ stage = ROOT / "build" / "cuda_so_links"
+ stage.mkdir(parents=True, exist_ok=True)
+
+ # Prefer the longest soname (libfoo.so.13.2.75 over libfoo.so.13) when several exist.
+ by_stem: dict[str, Path] = {}
+ for lib_dir in real_dirs:
+ for versioned in lib_dir.glob("lib*.so.*"):
+ if versioned.name.endswith(".a"):
+ continue
+ stem = versioned.name.split(".so.", 1)[0] + ".so"
+ prev = by_stem.get(stem)
+ if prev is None or len(versioned.name) >= len(prev.name):
+ by_stem[stem] = versioned
+
+ for stem, versioned in by_stem.items():
+ link = stage / stem
+ if link.is_symlink() or link.exists():
+ if link.is_symlink() and link.resolve() == versioned.resolve():
+ continue
+ link.unlink()
+ # Relative target so the stage dir is relocatable within the build tree.
+ link.symlink_to(os.path.relpath(versioned, start=stage))
+
+ # Dedupe while preserving order: stage, pip libs, system stubs.
+ out: list[str] = [str(stage)]
+ seen = {str(stage)}
+ for p in [*real_dirs, *stub_dirs]:
+ s = str(p)
+ if s not in seen:
+ seen.add(s)
+ out.append(s)
+ return out
+
+
# cutlass headers for the blockwise GEMM kernels. Pinned to the upstream commit the
# build was validated against and fetched into a cache dir, rather than carried as a
# git submodule (keeps the public-repo sync clean and the clone CI-cacheable).
@@ -84,6 +180,27 @@ def _blockwise_gencode() -> tuple[list[str], bool]:
return flags, ("90a" in archs)
+# Arch codes the NVFP4 kernels support. The E2M1 pack/convert intrinsics and the cuBLASLt
+# block-scaled FP4 kernels are Blackwell-only (sm_100a datacenter, sm_120a consumer).
+_NVFP4_ARCHES = ["100a", "120a"]
+
+
+def _nvfp4_gencode() -> list[str]:
+ """Blackwell arches to build the NVFP4 extension for, or [] to skip it."""
+ supported = _nvcc_arch_nums()
+ base = [a for a in _NVFP4_ARCHES if a in supported or a.rstrip("a") in supported]
+ env = _arch_tokens()
+ if not env:
+ return base
+ sel = []
+ for tok in env:
+ if tok.startswith("10.0"):
+ sel.append("100a")
+ elif tok.startswith("12.0"):
+ sel.append("120a")
+ return [a for a in dict.fromkeys(sel) if a in base]
+
+
def _cutlass_include() -> str:
"""Return the cutlass include dir, fetching the pinned commit on first use.
Honors ``CUTLASS_DIR`` (a prebuilt cutlass checkout, e.g. a system copy) and
@@ -123,6 +240,7 @@ if __name__ == "__main__":
"CUDA_HOME set)."
)
+ cuda_link_dirs = _pip_cuda_link_dirs()
ext_modules = []
# all2all_cpp -- unchanged.
@@ -136,6 +254,7 @@ if __name__ == "__main__":
"csrc/all2all/cuda/all2all_heads.cu",
"csrc/all2all/cuda/allgather.cu",
],
+ library_dirs=cuda_link_dirs,
extra_compile_args={"cxx": all2all_args, "nvcc": ["-O3"]},
)
)
@@ -155,6 +274,7 @@ if __name__ == "__main__":
"csrc/ops/rms_norm_split_rope_cuda.cu",
],
include_dirs=[str(ROOT / "csrc/ops/include"), *_nvidia_include_dirs()],
+ library_dirs=cuda_link_dirs,
extra_compile_args={
"cxx": ["-O3", "-std=c++17"],
"nvcc": [
@@ -167,6 +287,7 @@ if __name__ == "__main__":
"--expt-relaxed-constexpr",
"--expt-extended-lambda",
"--use_fast_math",
+ "-DCCCL_DISABLE_CTK_COMPATIBILITY_CHECK",
],
},
)
@@ -197,6 +318,7 @@ if __name__ == "__main__":
"-U__CUDA_NO_HALF_CONVERSIONS__",
"-U__CUDA_NO_HALF2_OPERATORS__",
"-U__CUDA_NO_BFLOAT16_CONVERSIONS__",
+ "-DCCCL_DISABLE_CTK_COMPATIBILITY_CHECK",
*gencode,
]
if build_sm90:
@@ -217,11 +339,50 @@ if __name__ == "__main__":
*_nvidia_include_dirs(),
],
libraries=["cuda", "cudart", "nvrtc"],
- library_dirs=[f"{CUDA_HOME}/lib64", f"{CUDA_HOME}/lib64/stubs"],
+ library_dirs=cuda_link_dirs,
extra_compile_args={"cxx": blockwise_cxx, "nvcc": blockwise_nvcc},
)
)
+ # nvfp4_cpp -- in-house NVFP4 quantize (CUDA) + block-scaled GEMM (cuBLASLt).
+ # Blackwell-only: the E2M1/E4M3 conversion intrinsics and the cuBLASLt FP4 kernels
+ # both need SM >= 10.0, so this extension is built for the Blackwell targets among
+ # TORCH_CUDA_ARCH_LIST (defaulting to whatever this nvcc supports) and is skipped
+ # entirely when nvcc is too old to emit them.
+ nvfp4_archs = _nvfp4_gencode()
+ if nvfp4_archs:
+ ext_modules.append(
+ CUDAExtension(
+ name="nvfp4_cpp",
+ sources=[
+ "csrc/nvfp4/api.cpp",
+ "csrc/nvfp4/gemm.cpp",
+ "csrc/nvfp4/quantize.cu",
+ ],
+ include_dirs=[
+ str(ROOT / "csrc/nvfp4"),
+ f"{CUDA_HOME}/include",
+ *_nvidia_include_dirs(),
+ ],
+ libraries=["cublasLt"],
+ library_dirs=cuda_link_dirs,
+ extra_compile_args={
+ "cxx": ["-O3", "-std=c++17"],
+ "nvcc": [
+ "-O3",
+ "-std=c++17",
+ "--expt-relaxed-constexpr",
+ "--expt-extended-lambda",
+ "-U__CUDA_NO_HALF_OPERATORS__",
+ "-U__CUDA_NO_HALF_CONVERSIONS__",
+ "-U__CUDA_NO_BFLOAT16_CONVERSIONS__",
+ "-DCCCL_DISABLE_CTK_COMPATIBILITY_CHECK",
+ *[f"-gencode=arch=compute_{a},code=sm_{a}" for a in nvfp4_archs],
+ ],
+ },
+ )
+ )
+
setuptools.setup(
ext_modules=ext_modules,
cmdclass={"build_ext": BuildExtension},
diff --git a/packages/ltx-kernels/src/ltx_kernels/arch.py b/packages/ltx-kernels/src/ltx_kernels/arch.py
index fd7821a..301b378 100644
--- a/packages/ltx-kernels/src/ltx_kernels/arch.py
+++ b/packages/ltx-kernels/src/ltx_kernels/arch.py
@@ -1,15 +1,15 @@
"""GPU architecture detection for blockwise kernel dispatch."""
+from __future__ import annotations
+
+import functools
+
import torch
-def get_device_arch() -> str:
- """Return a coarse architecture name for the current CUDA device.
- Used to pick the FP8 GEMM kernel variant (SM89 vs SM90) at runtime.
- """
- if not torch.cuda.is_available():
- raise RuntimeError("CUDA is not available; blockwise kernels require a CUDA device.")
- major, minor = torch.cuda.get_device_capability(torch.cuda.current_device())
[email protected]_cache(maxsize=8)
+def _arch_for_device(device_index: int) -> str:
+ major, minor = torch.cuda.get_device_capability(device_index)
if major == 8 and (minor >= 0 and minor < 9):
return "ampere"
if major == 8 and minor == 9:
@@ -19,3 +19,13 @@ def get_device_arch() -> str:
if major in {10, 12}:
return "blackwell"
raise NotImplementedError(f"Unsupported GPU compute capability sm_{major}{minor}.")
+
+
+def get_device_arch() -> str:
+ """Return a coarse architecture name for the current CUDA device.
+ Used to pick the FP8 GEMM kernel variant (SM89 vs SM90) at runtime.
+ Cached per device index: capability does not change within a process.
+ """
+ if not torch.cuda.is_available():
+ raise RuntimeError("CUDA is not available; blockwise kernels require a CUDA device.")
+ return _arch_for_device(torch.cuda.current_device())
diff --git a/packages/ltx-kernels/src/ltx_kernels/blockwise/linear.py b/packages/ltx-kernels/src/ltx_kernels/blockwise/linear.py
index ecb927f..63987b9 100644
--- a/packages/ltx-kernels/src/ltx_kernels/blockwise/linear.py
+++ b/packages/ltx-kernels/src/ltx_kernels/blockwise/linear.py
@@ -95,7 +95,12 @@ class BlockwiseGemmLinearFunc(torch.autograd.Function):
b, n, h = a[0].shape
out_h, _ = w[0].shape
new_a = (a[0].view(-1, h), a[1])
- d = blockwise_fp8_gemm(new_a, w, bias, use_fast_accum=True)
+ # Fast accum sums raw (pre-dequant-scale) e4m3 products in a fp16 accumulator; on
+ # Blackwell those partial sums overflow fp16 range and the GEMM returns NaN, so fall
+ # back to the fp32 accumulator there. Verified on GB200 (sm_100a). Non-CUDA
+ # (meta / CPU fake) paths skip the capability query — get_device_arch requires CUDA.
+ use_fast_accum = (not a[0].is_cuda) or get_device_arch() != "blackwell"
+ d = blockwise_fp8_gemm(new_a, w, bias, use_fast_accum=use_fast_accum)
return d.view(b, n, out_h)
diff --git a/packages/ltx-kernels/src/ltx_kernels/nvfp4/__init__.py b/packages/ltx-kernels/src/ltx_kernels/nvfp4/__init__.py
new file mode 100644
index 0000000..2c47905
--- /dev/null
+++ b/packages/ltx-kernels/src/ltx_kernels/nvfp4/__init__.py
@@ -0,0 +1,36 @@
+"""In-house NVFP4 (FP4 E2M1 + FP8 E4M3 1x16 block scales) quantize + GEMM.
+Blackwell only (SM >= 10.0). Default nibble order is ``hi_first=True`` (element ``2j``
+in the high nibble). See ``docs/NVFP4.md``.
+"""
+
+from ltx_kernels.nvfp4.functional import (
+ E2M1_MAX,
+ E4M3_MAX,
+ GLOBAL_RANGE,
+ REBUILD_HINT,
+ dequantize_nvfp4,
+ fixed_scale_one,
+ is_available,
+ linear_nvfp4,
+ per_tensor_decode_scale,
+ quantize_nvfp4,
+ scale_shape,
+ scaled_mm_nvfp4,
+ unavailable_reason,
+)
+
+__all__ = [
+ "E2M1_MAX",
+ "E4M3_MAX",
+ "GLOBAL_RANGE",
+ "REBUILD_HINT",
+ "dequantize_nvfp4",
+ "fixed_scale_one",
+ "is_available",
+ "linear_nvfp4",
+ "per_tensor_decode_scale",
+ "quantize_nvfp4",
+ "scale_shape",
+ "scaled_mm_nvfp4",
+ "unavailable_reason",
+]
diff --git a/packages/ltx-kernels/src/ltx_kernels/nvfp4/functional.py b/packages/ltx-kernels/src/ltx_kernels/nvfp4/functional.py
new file mode 100644
index 0000000..b27dbae
--- /dev/null
+++ b/packages/ltx-kernels/src/ltx_kernels/nvfp4/functional.py
@@ -0,0 +1,326 @@
+"""NVFP4 quantize + block-scaled GEMM, wrapped as Dynamo-safe custom ops.
+The CUDA kernels live in the ``nvfp4_cpp`` extension. Layout contract, scale math and
+padding rules are documented in ``packages/ltx-kernels/docs/NVFP4.md``; the short version:
+* data: FP4 E2M1, two values per ``uint8``, element ``2j`` in the **high** nibble when
+ ``hi_first=True`` (default);
+* block scales: FP8 E4M3, one per 16 elements, in the cuBLAS 128x4 tiled layout, shape
+ ``(roundup(rows, 128), roundup(K // 16, 4))``;
+* per-tensor scale: fp32 *decode* scale ``amax / (448 * 6)``.
+"""
+
+from __future__ import annotations
+
+import functools
+from types import ModuleType
+from typing import Optional
+
+import torch
+
+E4M3_MAX = 448.0
+E2M1_MAX = 6.0
+GLOBAL_RANGE = E4M3_MAX * E2M1_MAX # 2688.0
+BLOCK_SIZE = 16
+
+# Shared install hint used by extension/SM errors and by ``unavailable_reason``.
+REBUILD_HINT = (
+ "TORCH_CUDA_ARCH_LIST='10.0' uv pip install -e packages/ltx-kernels --no-build-isolation "
+ "(or `uv sync --group kernels`)"
+)
+
+
+def _round_up(x: int, multiple: int) -> int:
+ return (x + multiple - 1) // multiple * multiple
+
+
+def scale_shape(rows: int, k: int) -> tuple[int, int]:
+ """Shape of the cuBLAS-tiled block-scale array for an ``(rows, k)`` operand."""
+ return _round_up(rows, 128), _round_up(k // BLOCK_SIZE, 4)
+
+
[email protected]_cache(maxsize=1)
+def _extension() -> ModuleType:
+ try:
+ import nvfp4_cpp # noqa: PLC0415
+ except ImportError as exc: # pragma: no cover - build-dependent
+ raise RuntimeError(
+ f"ltx_kernels.nvfp4 requires the 'nvfp4_cpp' extension. Rebuild on a Blackwell host: {REBUILD_HINT}."
+ ) from exc
+ return nvfp4_cpp
+
+
[email protected]_cache(maxsize=8)
+def _check_sm(device_index: int) -> None:
+ major, minor = torch.cuda.get_device_capability(device_index)
+ if major < 10:
+ raise RuntimeError(
+ f"ltx_kernels.nvfp4 needs a Blackwell GPU (SM >= 10.0) for FP4 tensor cores; "
+ f"this device is sm_{major}{minor}. Use the blockwise FP8 path instead."
+ )
+
+
+def unavailable_reason() -> str | None:
+ """``None`` if NVFP4 is usable; otherwise a human-readable failure reason."""
+ if not torch.cuda.is_available():
+ return f"ltx_kernels.nvfp4 requires a CUDA GPU (Blackwell, SM >= 10.0). Rebuild with {REBUILD_HINT}."
+ try:
+ _extension()
+ _check_sm(torch.cuda.current_device())
+ except RuntimeError as exc:
+ return str(exc)
+ return None
+
+
+def is_available() -> bool:
+ """True when the extension is built and the current device has FP4 tensor cores."""
+ return unavailable_reason() is None
+
+
+# --------------------------------------------------------------------------------------
+# custom ops
+# --------------------------------------------------------------------------------------
+
+
[email protected]_op("ltx_kernels_nvfp4::amax_scale", mutates_args=(), device_types="cuda")
+def _amax_scale_op(x: torch.Tensor, divisor: float) -> torch.Tensor:
+ _check_sm(x.device.index or 0)
+ return _extension().amax_scale(x, divisor)
+
+
+@_amax_scale_op.register_fake
+def _amax_scale_op_fake(x: torch.Tensor, divisor: float) -> torch.Tensor:
+ del divisor
+ return torch.empty((), device=x.device, dtype=torch.float32)
+
+
+def per_tensor_decode_scale(x: torch.Tensor) -> torch.Tensor:
+ """``amax / (E4M3_MAX * E2M1_MAX)`` as an fp32 scalar (the *decode* convention).
+ One fused pass over ``x`` on CUDA. The obvious ATen spelling,
+ ``x.float().abs().nan_to_num().amax() / GLOBAL_RANGE``, is three full-size passes plus
+ several scalar launches; ``aminmax`` fixes the passes but loses the true amax whenever
+ ``x`` contains a NaN (it propagates into both ends of the range). The kernel drops NaN
+ during the reduction, so it is both faster and matches the original semantics.
+ """
+ if not x.is_cuda:
+ return (x.detach().float().abs().nan_to_num().amax() / GLOBAL_RANGE).reshape(())
+ return torch.ops.ltx_kernels_nvfp4.amax_scale(x.detach().contiguous(), GLOBAL_RANGE)
+
+
[email protected]_op("ltx_kernels_nvfp4::quantize", mutates_args=(), device_types="cuda")
+def _quantize_op(
+ x: torch.Tensor, per_tensor_scale: torch.Tensor, hi_first: bool, variant: int
+) -> tuple[torch.Tensor, torch.Tensor]:
+ _check_sm(x.device.index or 0)
+ scale = per_tensor_scale.reshape(1).to(torch.float32)
+ return _extension().quantize_nvfp4(x.contiguous(), scale, hi_first, variant)
+
+
+@_quantize_op.register_fake
+def _quantize_op_fake(
+ x: torch.Tensor, per_tensor_scale: torch.Tensor, hi_first: bool, variant: int
+) -> tuple[torch.Tensor, torch.Tensor]:
+ del per_tensor_scale, hi_first, variant
+ rows, k = x.shape
+ packed = torch.empty((rows, k // 2), device=x.device, dtype=torch.uint8)
+ scales = torch.empty(scale_shape(rows, k), device=x.device, dtype=torch.uint8)
+ return packed, scales
+
+
[email protected]_op("ltx_kernels_nvfp4::scaled_mm", mutates_args=(), device_types="cuda")
+def _scaled_mm_op(
+ a: torch.Tensor,
+ b: torch.Tensor,
+ block_scale_a: torch.Tensor,
+ block_scale_b: torch.Tensor,
+ alpha: torch.Tensor,
+ bias: torch.Tensor,
+ has_bias: bool,
+ out_dtype: torch.dtype,
+) -> torch.Tensor:
+ _check_sm(a.device.index or 0)
+ return _extension().scaled_mm_nvfp4(
+ a,
+ b,
+ block_scale_a,
+ block_scale_b,
+ alpha.reshape(1),
+ bias if has_bias else None,
+ out_dtype,
+ )
+
+
+@_scaled_mm_op.register_fake
+def _scaled_mm_op_fake(
+ a: torch.Tensor,
+ b: torch.Tensor,
+ block_scale_a: torch.Tensor,
+ block_scale_b: torch.Tensor,
+ alpha: torch.Tensor,
+ bias: torch.Tensor,
+ has_bias: bool,
+ out_dtype: torch.dtype,
+) -> torch.Tensor:
+ del block_scale_a, block_scale_b, alpha, bias, has_bias
+ return torch.empty((a.shape[0], b.shape[0]), device=a.device, dtype=out_dtype)
+
+
+_EMPTY_BIAS: dict[tuple[torch.device, torch.dtype], torch.Tensor] = {}
+_ONES: dict[torch.device, torch.Tensor] = {}
+
+
+def _empty_bias(device: torch.device, dtype: torch.dtype) -> torch.Tensor:
+ """Placeholder tensor for the bias-less case (``custom_op`` needs a real Tensor)."""
+ key = (device, dtype)
+ tensor = _EMPTY_BIAS.get(key)
+ if tensor is None:
+ tensor = torch.empty(0, device=device, dtype=dtype)
+ _EMPTY_BIAS[key] = tensor
+ return tensor
+
+
+def fixed_scale_one(device: torch.device) -> torch.Tensor:
+ """Cached fp32 ``1.0`` on ``device`` (the ``act_scale="fixed_1"`` per-tensor scale).
+ Cached so the hot path neither allocates nor launches a fill kernel per call.
+ """
+ tensor = _ONES.get(device)
+ if tensor is None:
+ tensor = torch.ones((), device=device, dtype=torch.float32)
+ _ONES[device] = tensor
+ return tensor
+
+
+# --------------------------------------------------------------------------------------
+# public functional API
+# --------------------------------------------------------------------------------------
+
+
+QUANT_KERNEL_TILED = 2
+QUANT_KERNEL_ELEMENTWISE = 1
+
+
+def quantize_nvfp4(
+ x: torch.Tensor,
+ per_tensor_scale: torch.Tensor,
+ *,
+ pad_16x: bool = True,
+ hi_first: bool = True,
+ variant: int = QUANT_KERNEL_TILED,
+) -> tuple[torch.Tensor, torch.Tensor]:
+ """Quantize a 2-D tensor to NVFP4.
+ Args:
+ x: ``(rows, K)`` bf16/fp16/fp32 CUDA tensor. ``K % 16 == 0`` is required; ``K % 32 == 0``
+ is additionally required by the GEMM.
+ per_tensor_scale: fp32 *decode* scale (``amax / 2688``), read on device (no sync).
+ pad_16x: zero-pad ``K`` up to a multiple of 16 when needed. Row counts need no
+ padding; ragged ``M`` is accepted and the GEMM keeps it (no output slice).
+ hi_first: nibble order; ``True`` (default) puts element ``2j`` in the high nibble.
+ variant: quantize kernel to use -- 2 (default) stages the block scales in shared
+ memory per 128x4 tile, 1 writes them elementwise. Only differs in speed.
+ Returns:
+ ``(packed uint8 (rows, K // 2), block scales uint8 (roundup(rows,128), roundup(K//16,4)))``.
+ Block scales are E4M3 bit patterns stored as ``uint8`` (view them as
+ ``torch.float8_e4m3fn`` if you need the dtype tag).
+ """
+ if x.dim() != 2:
+ raise ValueError(f"quantize_nvfp4 expects a 2-D tensor, got shape {tuple(x.shape)}")
+ k = x.shape[1]
+ if k % BLOCK_SIZE != 0:
+ if not pad_16x:
+ raise ValueError(f"K must be a multiple of {BLOCK_SIZE} when pad_16x=False, got {k}")
+ x = torch.nn.functional.pad(x, (0, _round_up(k, BLOCK_SIZE) - k))
+ return torch.ops.ltx_kernels_nvfp4.quantize(x, per_tensor_scale, hi_first, variant)
+
+
+def scaled_mm_nvfp4(
+ a: torch.Tensor,
+ b: torch.Tensor,
+ scale_a: torch.Tensor,
+ scale_b: torch.Tensor,
+ block_a: torch.Tensor,
+ block_b: torch.Tensor,
+ *,
+ bias: Optional[torch.Tensor] = None,
+ out_dtype: torch.dtype = torch.bfloat16,
+ alpha: Optional[torch.Tensor] = None,
+) -> torch.Tensor:
+ """``alpha * (a @ b.T) + bias`` for NVFP4 operands, where ``alpha = scale_a * scale_b``.
+ Args:
+ a: packed activations ``(M, K // 2)`` uint8.
+ b: packed weights ``(N, K // 2)`` uint8 (row-major, i.e. already "transposed").
+ scale_a / scale_b: fp32 per-tensor decode scales.
+ block_a / block_b: cuBLAS-tiled E4M3 block scales (uint8 or float8_e4m3fn).
+ bias: optional ``(N,)`` tensor in ``out_dtype``, fused in the GEMM epilogue.
+ alpha: precomputed ``scale_a * scale_b`` (skips one tiny kernel when the caller
+ already has it, e.g. a fixed activation scale of 1.0).
+ """
+ if alpha is None:
+ alpha = (scale_a.reshape(()) * scale_b.reshape(())).to(torch.float32)
+ has_bias = bias is not None
+ return torch.ops.ltx_kernels_nvfp4.scaled_mm(
+ a,
+ b.contiguous(),
+ block_a.view(torch.uint8),
+ block_b.view(torch.uint8),
+ alpha,
+ bias if has_bias else _empty_bias(a.device, out_dtype),
+ has_bias,
+ out_dtype,
+ )
+
+
+def dequantize_nvfp4(
+ packed: torch.Tensor,
+ per_tensor_scale: torch.Tensor,
+ block_scales: torch.Tensor,
+ *,
+ out_dtype: torch.dtype = torch.bfloat16,
+ hi_first: bool = True,
+) -> torch.Tensor:
+ """Reference dequantize (tests / debugging); not a fast path."""
+ _check_sm(packed.device.index or 0)
+ return _extension().dequantize_nvfp4(
+ packed.contiguous(),
+ per_tensor_scale.reshape(1).to(torch.float32),
+ block_scales.view(torch.uint8),
+ out_dtype,
+ hi_first,
+ )
+
+
+def linear_nvfp4(
+ x: torch.Tensor,
+ weight: torch.Tensor,
+ weight_block_scale: torch.Tensor,
+ weight_scale: torch.Tensor,
+ *,
+ bias: Optional[torch.Tensor] = None,
+ act_scale: Optional[torch.Tensor] = None,
+ hi_first: bool = True,
+ out_dtype: torch.dtype = torch.bfloat16,
+) -> torch.Tensor:
+ """NVFP4 ``x @ weight.T + bias`` with on-the-fly activation quantization.
+ ``act_scale=None`` uses the fixed per-tensor scale 1.0, which keeps ``alpha`` equal to
+ the weight scale and avoids both an amax reduction over ``x`` and a scale multiply.
+ """
+ original_shape = x.shape
+ x_2d = x.reshape(-1, original_shape[-1])
+ if x_2d.dtype not in (torch.bfloat16, torch.float16, torch.float32):
+ x_2d = x_2d.to(torch.bfloat16)
+
+ if act_scale is None:
+ act_scale = fixed_scale_one(x_2d.device)
+ alpha = weight_scale # scale_a == 1, so alpha is the weight scale as-is
+ else:
+ alpha = None
+ x_fp4, x_block = quantize_nvfp4(x_2d, act_scale, hi_first=hi_first)
+ out = scaled_mm_nvfp4(
+ x_fp4,
+ weight,
+ act_scale,
+ weight_scale,
+ x_block,
+ weight_block_scale,
+ bias=bias,
+ out_dtype=out_dtype,
+ alpha=alpha,
+ )
+ return out.view(*original_shape[:-1], weight.shape[0])
diff --git a/packages/ltx-kernels/src/ltx_kernels/vae/__init__.py b/packages/ltx-kernels/src/ltx_kernels/vae/__init__.py
new file mode 100644
index 0000000..cffe8b3
--- /dev/null
+++ b/packages/ltx-kernels/src/ltx_kernels/vae/__init__.py
@@ -0,0 +1,39 @@
+"""CuTe DSL kernels for the DiffVAE decoder.
+Two kernels sharing one attention half (``fna_attn_core.attention_tile``):
+- :func:`~ltx_kernels.vae.block_fna_dsl.run_block_fna_dsl` -- the whole stage-5
+ ``DiffusionNABlock`` in one launch, with no full-volume Q/K/V.
+- :func:`~ltx_kernels.vae.na_attn_dsl.run_na_attention` -- standalone 3D neighborhood
+ attention for the deterministic stages, a drop-in for ``natten.na3d``.
+Both need datacenter Blackwell (sm_100 / sm_103): they are built on ``tcgen05`` UMMA
+and Tensor Memory, which consumer Blackwell, Hopper and Ada do not have. Each launcher
+enforces that itself; ``block_fna_available`` / ``na_attn_available`` let a caller ask
+first and pick another path.
+"""
+
+from ltx_kernels.vae.block_fna_dsl import (
+ OUT_SLACK_ROWS,
+ block_fna_available,
+ fna_supported,
+ pack_fused_ctx_weights,
+ run_block_fna_dsl,
+)
+from ltx_kernels.vae.na_attn_dsl import (
+ na_attn_available,
+ na_supported,
+ run_na_attention,
+ run_na_attention_bound,
+)
+from ltx_kernels.vae.softmax_bound import softmax_row_bound
+
+__all__ = [
+ "OUT_SLACK_ROWS",
+ "block_fna_available",
+ "fna_supported",
+ "na_attn_available",
+ "na_supported",
+ "pack_fused_ctx_weights",
+ "run_block_fna_dsl",
+ "run_na_attention",
+ "run_na_attention_bound",
+ "softmax_row_bound",
+]
diff --git a/packages/ltx-kernels/src/ltx_kernels/vae/availability.py b/packages/ltx-kernels/src/ltx_kernels/vae/availability.py
new file mode 100644
index 0000000..0fc7da8
--- /dev/null
+++ b/packages/ltx-kernels/src/ltx_kernels/vae/availability.py
@@ -0,0 +1,46 @@
+"""Shared capability probe for the CuTe DSL VAE kernels.
+Private: each kernel module wraps this in its own named predicate
+(``block_fna_available`` / ``na_attn_available``) and enforces it in its launcher.
+"""
+
+from __future__ import annotations
+
+import functools
+
+import torch
+
+# The kernels need two separate Blackwell features, and one implies neither the other
+# nor the architecture family:
+# * ``tcgen05`` MMA, with the operands coming from SMEM.
+# * **Tensor Memory**, where every accumulator lives -- the per-head attention output
+# for the whole KV loop plus the two Q@K accumulators, all 512 columns.
+# Consumer Blackwell (sm_120/sm_121, e.g. RTX 5090) has tcgen05 MMA but no TMEM, so a
+# tcgen05 test alone would pass there and then fail inside the JIT. Hopper and Ada have
+# neither: they are not a slower fallback, the instructions are not in the ISA.
+_TCGEN05_CAPS = frozenset({(10, 0), (10, 1), (10, 3), (12, 0), (12, 1)})
+_TMEM_CAPS = frozenset({(10, 0), (10, 1), (10, 3)})
+
+UNSUPPORTED_MESSAGE = (
+ "the CuTe DSL VAE kernels need a GPU with both tcgen05 MMA and Tensor Memory "
+ "(sm_100/sm_101/sm_103, e.g. B200 or GB200) and nvidia-cutlass-dsl installed; "
+ "consumer Blackwell has tcgen05 but no TMEM, and these kernels hold all 512 "
+ "TMEM columns"
+)
+
+
[email protected]_cache(maxsize=8)
+def gpu_supports_dsl_kernels(device_index: int = 0) -> bool:
+ """Whether CUDA, ``nvidia-cutlass-dsl``, tcgen05 MMA and TMEM are all present.
+ Cached: the import probe and the device query are both too slow to repeat per
+ forward, and neither answer can change within a process.
+ """
+ if not torch.cuda.is_available():
+ return False
+ cap = torch.cuda.get_device_capability(device_index)
+ if cap not in _TCGEN05_CAPS or cap not in _TMEM_CAPS:
+ return False
+ try:
+ import cutlass.cute # noqa: F401, PLC0415
+ except ImportError:
+ return False
+ return True
diff --git a/packages/ltx-kernels/src/ltx_kernels/vae/block_fna_dsl.py b/packages/ltx-kernels/src/ltx_kernels/vae/block_fna_dsl.py
new file mode 100644
index 0000000..5b52276
--- /dev/null
+++ b/packages/ltx-kernels/src/ltx_kernels/vae/block_fna_dsl.py
@@ -0,0 +1,1977 @@
+"""The whole DiffVAE ``DiffusionNABlock`` in one CuTe DSL launch.
+The stage-4 hop, context projection, residual, AdaLN, 3D neighborhood attention, SwiGLU
+and the closing residual, with **no durable full-volume Q/K/V**: the workspace is the
+output, a K/V cache sized by the slab the call picks, and a two-int barrier. The compiled
+NATTEN path materialises Q/K/V for the whole volume instead, which is what forces
+spatial tiling at 4K and above -- and tiling recomputes most of the volume.
+Structure, in the order the kernel runs it:
+* **A deferred stage-4 context.** The input is stage-4 itself, at half the output
+ resolution per axis, and the pixel-shuffle upsample that would have produced a
+ full-resolution context is folded into ``context_proj`` at load time
+ (:func:`pack_fused_ctx_weights`) -- one Linear per subpixel. So the context volume is
+ never materialised, at any resolution, by anyone.
+* **3D query tiles.** One CTA owns a ``(TT, TH, TW)`` box of exactly ``M`` query
+ tokens, so every UMMA runs at full ``M``. The NA halo panel is that box grown by
+ the kernel radius.
+* **Thread ``i`` owns accumulator row ``i``; warpgroup ``g`` owns a slice of its
+ columns.** A tcgen05 accumulator hands thread ``i`` the whole of row ``i``, which
+ makes RMSNorm, RoPE, bias and the softmax register-local; splitting the *columns*
+ keeps that while giving the CTA ``4 * NUM_WARPGROUPS`` warps to hide latency behind.
+* **A grid-shared K/V slab.** Panel tokens are shared by neighbouring query tiles, so
+ :func:`_fill_slab_kv_cache` projects a whole slab's halo box into a fixed K/V cache
+ once, a device-wide barrier follows, and :func:`_run_query_tile` gathers from it.
+ Per-query redundancy drops from ~27x (at an 11^3 window) to ~1.4x.
+* **The attention half is not here.** The window mask, the pipelined KV loop and the
+ softmax are :func:`ltx_kernels.vae.fna_attn_core.attention_tile`, shared verbatim
+ with the standalone NA kernel.
+The box vocabulary the comments use -- volume, slab core, slab box, query tile, halo
+panel, NA window -- is defined once in :mod:`ltx_kernels.vae.fna_geometry`, which also
+holds the coordinate arithmetic both kernels share.
+``T``/``H``/``W`` stay dynamic, and so does the slab extent. Channel count, hidden
+width, head count, kernel size, tile shape and the slab *bounds* are compile-time.
+Datacenter Blackwell only -- see :mod:`ltx_kernels.vae.availability` for exactly which
+parts and why.
+"""
+
+# NOTE: no `from __future__ import annotations` -- cute.struct needs real types.
+
+import dataclasses
+import functools
+import os
+from typing import Any
+
+import cutlass
+import cutlass.cute as cute
+import cutlass.utils.blackwell_helpers as sm100_utils
+import torch
+from cutlass.cute.nvgpu import cpasync, tcgen05
+from cutlass.utils import SmemAllocator
+
+from ltx_kernels.vae.availability import UNSUPPORTED_MESSAGE, gpu_supports_dsl_kernels
+from ltx_kernels.vae.fna_attn_core import (
+ _as_rows,
+ _dyn,
+ _dyn_act,
+ _dyn_w,
+ apply_rope,
+ attention_tile,
+ attn_epilogue,
+ attn_zero_accumulators,
+ cta_count,
+ default_tile_thw,
+ fill_rope_axis,
+ grid_barrier,
+ head_sum2,
+ row_sum,
+)
+from ltx_kernels.vae.fna_gemm import (
+ UmmaSharedStorage,
+ _mma_op,
+ _reg_shape,
+ _tmem_load,
+ acquire_tmem,
+ gemm_tma,
+ release_tmem,
+)
+from ltx_kernels.vae.fna_geometry import (
+ at_least,
+ at_most,
+ clamp_window_start,
+ flatten_3d,
+ halo_panel_origin,
+ query_row_indices,
+ query_slot_in_tile,
+ unflatten_3d,
+ window_origin_in_panel,
+)
+from ltx_kernels.vae.fna_smem import (
+ _alias,
+ _fill_a_chunk,
+ _fill_a_gather,
+ _read_a_chunk,
+ _scatter_a,
+ _store_head_row,
+ cooperative_copy_slot,
+)
+from ltx_kernels.vae.fna_types import (
+ ACC,
+ ACC_COLS,
+ EPS,
+ HD,
+ HEAD_COLS,
+ HEADS_PER_TILE,
+ IO,
+ LOG2E,
+ NUM_WARPGROUPS,
+ THREADS,
+ TILE_K,
+ TILE_N,
+ TILER_N64,
+ TILER_N128,
+ WARPGROUPS_PER_HEAD,
+ M,
+)
+
+_COMPILED: "dict[tuple, Any]" = {}
+
+# Channel counts the kernel is compiled and validated for. The shipped DiffVAE only
+# ever asks for 256 (stage 5); 128 is kept because it is the cheap shape to validate
+# a pipeline change against -- it compiles in a third of the time.
+SUPPORTED_CHANNELS = (128, 256)
+
+# Slab bounds. The slab's *extent* in query tiles is chosen per call by
+# :func:`_choose_slab` from the volume, the tile and the grid, so T/H/W stay dynamic;
+# only these bounds are compile-time.
+# Raising them is worth a lot, because what they cap is the cache fill's redundancy:
+# the slab box is the core grown by the NA radius, so a slab one tile wider amortises
+# the same halo over more output. Geometric mean over the DiffVAE's stage-5 shapes, in
+# tokens projected per token of output: 1.83 at (42,58,58), 1.33 at (80,80,80), 1.23
+# at (96,96,96), 1.12 at (128,128,128). A symmetric bound is deliberate -- one fitted
+# to a single production shape scored worse on average, because it starves whichever
+# axis the next shape happens to be long in.
+# What the bounds cost directly is SMEM for the rope tables, ``4 * 2 * sum_i B_i *
+# rope_dim_i / 2`` bytes -- 32 KiB here. They do *not* size the cache, whose per-head stride
+# is a runtime argument set to the box the call actually chose, and at every shape the
+# shipped decoder asks for ``_choose_slab`` lands inside these bounds: what binds is its
+# cost model, not the cap.
+MAXP_TOKENS = 2097152
+SLAB_BOX_MAX = (128, 128, 128)
+
+#: Rows an output buffer must carry past the volume, to absorb the stores of
+#: out-of-range lanes in partial tiles. Public so a caller passing ``out`` to
+#: :func:`run_block_fna_dsl` can size the buffer without importing ``M``.
+OUT_SLACK_ROWS = M
+
+
+def _check_out(out: torch.Tensor, rows: int, channels: int, x_: torch.Tensor) -> torch.Tensor:
+ """Validate a caller-supplied output buffer for :func:`run_block_fna_dsl`."""
+ if tuple(out.shape) != (rows, channels):
+ raise ValueError(
+ f"out must be {(rows, channels)} -- the volume plus {OUT_SLACK_ROWS} lane-slack "
+ f"rows -- got {tuple(out.shape)}"
+ )
+ if out.dtype != torch.bfloat16 or not out.is_contiguous():
+ raise ValueError(f"out must be contiguous bfloat16, got {out.dtype}, contiguous={out.is_contiguous()}")
+ if out.device != x_.device:
+ raise ValueError(f"out is on {out.device}, x on {x_.device}")
+ if out.data_ptr() == x_.data_ptr():
+ raise ValueError("out must not alias x: the kernel reads neighborhoods of x while writing out")
+ return out
+
+
+#: Bytes in one N=128 B-operand stage, which is what ``gemm_tma``'s TMA transaction
+#: count has to match.
+_B_STAGE_BYTES = TILE_N * TILE_K * 2
+
+
+# --------------------------------------------------------------------------
+# Data passed between the host, the kernel and its helpers
+# --------------------------------------------------------------------------
+
+
[email protected](frozen=True)
+class _SlabPlan:
+ """How one call cuts its query-tile grid into slabs.
+ Attributes:
+ core: the slab core, ``(t, h, w)`` query tiles.
+ box: the halo box those tiles imply, ``(t, h, w)`` tokens. Bounds the cache
+ and the rope tables; the kernel shrinks it per slab at the volume edge.
+ grid: how many slabs the volume is cut into, ``(t, h, w)``.
+ """
+
+ core: "tuple[int, int, int]"
+ box: "tuple[int, int, int]"
+ grid: "tuple[int, int, int]"
+
+ @property
+ def count(self) -> int:
+ """Total slabs, which is also how many cache-fill/barrier rounds the kernel runs."""
+ return self.grid[0] * self.grid[1] * self.grid[2]
+
+ @property
+ def cache_row_stride(self) -> int:
+ """Rows between consecutive heads in the K/V cache: one whole slab box."""
+ return self.box[0] * self.box[1] * self.box[2]
+
+
[email protected](frozen=True)
+class _BlockShape:
+ """The block's compile-time shape. Every field is a Python value at trace time."""
+
+ channels: int
+ ctx_channels: int # stage-4's width, a multiple of ``channels``
+ stride: "tuple[int, int, int]" # the stage-4 pixel-shuffle stride, ``(1,1,1)`` if none
+ hidden: int # SwiGLU hidden width
+ n_heads: int # n_heads * HD == channels
+ kernel: "tuple[int, int, int]" # NA window extents
+ tile: "tuple[int, int, int]" # query tile; its product is M
+ panel: "tuple[int, int, int]" # halo panel: the tile grown by the radius
+ rope_dims: "tuple[int, int, int]" # RoPE dims per axis; they sum to HD
+ n_kv_tiles: int # KV tiles spanning one panel
+
+ @property
+ def radius(self) -> "tuple[int, int, int]":
+ """The NA window's half-extents."""
+ return ((self.kernel[0] - 1) // 2, (self.kernel[1] - 1) // 2, (self.kernel[2] - 1) // 2)
+
+ @property
+ def n_chunks(self) -> int:
+ """N-tiles of a C-wide output, which is also K-chunks of a C-wide input."""
+ return self.channels // TILE_N
+
+ @property
+ def n_k_tiles(self) -> int:
+ """K-tiles spanning one C-wide reduction."""
+ return self.channels // TILE_K
+
+ @property
+ def n_subpixels(self) -> int:
+ """``P``: pixel-shuffle subpixels per stage-4 cell, one fused weight slice each."""
+ return self.stride[0] * self.stride[1] * self.stride[2]
+
+ @property
+ def ctx_groups(self) -> int:
+ """C-wide operands a stage-4 row spans: ``s_a``, and ``s_q`` when it is 2C wide."""
+ return self.ctx_channels // self.channels
+
+ @property
+ def param(self) -> "dict[str, int]":
+ """Offsets into the packed per-channel constants."""
+ return _channel_param_offsets(self.channels, HD, self.n_subpixels)
+
+
[email protected](frozen=True)
+class _ThreadIds:
+ """This thread's place in the CTA and in the grid."""
+
+ tidx: Any # thread index within the CTA
+ lane: Any # the accumulator row it owns, ``tidx % M``
+ wg: Any # its warpgroup: which slice of that row's columns it holds
+ warp: Any # warp-uniform warp index, for the elect-one paths
+ cta: Any # block index -- this CTA's slot in the persistent grid
+
+
[email protected](frozen=True)
+class _Workspace:
+ """Everything the device helpers need that is fixed for the whole launch.
+ The compile-time :class:`_BlockShape` deliberately does *not* live here: the DSL
+ stages a dataclass argument's numeric fields into runtime values, so anything that
+ has to reach ``range_constexpr`` or a statically aligned SMEM slice travels
+ separately as a ``cutlass.Constexpr`` parameter.
+ """
+
+ ids: _ThreadIds
+
+ # ---- global tensors ----
+ x: cute.Tensor
+ stage4: cute.Tensor # (T_lo*H_lo*W_lo, Ctx) -- the context before its upsample
+ y: cute.Tensor # the output, and the residual accumulator between passes
+ kv_cache: cute.Tensor # the slab's K/V, K's heads then V's
+ norm_cache: cute.Tensor # the slab's per-token RMSNorm factor for ``post``
+ barrier: cute.Tensor
+
+ # ---- SMEM operands, all aliased onto one pool; see the map in _fna_kernel ----
+ s_a: cute.Tensor # the activation / A operand
+ s_b: cute.Tensor # the streamed weight tile / B operand
+ s_q: cute.Tensor # queries, then the MLP's hidden chunks
+ s_k: cute.Tensor
+ s_v: cute.Tensor
+ s_p: cute.Tensor
+ storage: Any # barrier storage for the pipelines gemm_tma stands up
+
+ # ---- MMA operand fragments over those buffers ----
+ fr_a: Any
+ fr_q: Any
+ fr_k: Any
+ fr_p: Any
+ fr_v: Any
+
+ # ---- weights, each as its ``(tma_atom, tensor)`` pair ----
+ w_ctx: tuple
+ w_q: tuple
+ w_kv: tuple # packed K|V, interleaved per head by _pack_kv
+ w_o: tuple
+ w_gate: tuple
+ w_up: tuple
+ w_down: tuple
+
+ # ---- TMEM accumulators; see the TMEM map in _fna_kernel ----
+ acc_main: list
+ acc_qk: list
+ acc_scratch: Any
+ acc_o: list
+ acc_down: list
+
+ # ---- register scratch ----
+ areg: Any
+ breg: Any
+ oreg: Any
+ kvfrag: Any
+
+ # ---- SMEM scratch ----
+ rowix: cute.Tensor # in-bounds source row per lane; feeds every gather
+ rowix_lo: cute.Tensor # the stage-4 cell row per lane, for the fused-context gather
+ rowix_w: cute.Tensor # destination row per lane; scratch when out of range
+ copy_slot: tuple # this thread's slot in the cooperative copies
+ red_c: cute.Tensor # row reduction across all warpgroups
+ red_head: cute.Tensor # row reduction across the warpgroups sharing a head
+ m_sm: cute.Tensor # fixed softmax offset per (row, head)
+ l_sm: cute.Tensor # softmax denominator per (row, warpgroup, head)
+ qkbar: cute.Tensor # Q@K completion barriers, one per accumulator
+ pvbar: cute.Tensor # P@V completion barrier
+ rope: tuple # (cos_t, sin_t, cos_h, sin_h, cos_w, sin_w) over the slab box
+ rope_inv: tuple # per-axis inverse RoPE frequencies, the tables' source
+ params: cute.Tensor # the packed per-channel constants, staged in SMEM
+ query_slot: tuple # this lane's (dt, dh, dw) within whatever query tile it runs
+
+ # ---- runtime scalars, fixed for the launch ----
+ volume: tuple # (T, H, W)
+ ctx_volume: tuple # (T_lo, H_lo, W_lo), the stage-4 grid the volume shuffles out of
+ drop_leading: Any # 1 when the caller dropped the shuffle's duplicate leading frame
+ n_ctas: Any
+ slab_count: Any
+ slab_grid_hw: Any # strides for unflattening a slab index
+ slab_grid_w: Any
+ slab_tiles: tuple # query tiles per slab, per axis
+ max_box: tuple # the largest halo box this call chose
+ cache_row_stride: Any # rows between heads in kv_cache; one whole max box
+
+ @property
+ def n_volume_tokens(self):
+ """Rows of the output that are real; anything at or past this is scratch."""
+ return self.volume[0] * self.volume[1] * self.volume[2]
+
+
[email protected](frozen=True)
+class _Slab:
+ """The slab in flight: the output it owns, and the box its K/V cache covers."""
+
+ core_origin: tuple # first token of the core, per axis
+ core_end: tuple # one past its last, clamped into the volume
+ box_origin: tuple # first token of the halo box
+ box_shape: tuple # the box's extents
+ box_hw: Any # box_shape[1] * box_shape[2], hoisted
+ n_box_tokens: Any # tokens in the box -- what the cache fill walks
+
+
+# --------------------------------------------------------------------------
+# The kernel
+# --------------------------------------------------------------------------
+
+
+def _fna_kernel(
+ # ---- tensors ----
+ x: cute.Tensor, # (T*H*W, C) bf16, the block's input
+ stage4: cute.Tensor, # (T_lo*H_lo*W_lo, Ctx) bf16, the context before its upsample
+ y: cute.Tensor, # (T*H*W + M, C) bf16, output; also the residual accumulator
+ kv_cache: cute.Tensor, # (2*NH*cache_row_stride, HD) bf16, K's heads then V's
+ norm_cache: cute.Tensor, # (cache_row_stride + M,) f32, post's RMSNorm factor
+ barrier: cute.Tensor, # (2,) int32 device-wide barrier: arrivals, then sense
+ # ---- weights, each as its TMA atom and the tensor it reads ----
+ a_ctx, # fused upsample x context projection, (P*C, Ctx)
+ m_ctx,
+ a_q, # query projection
+ m_q,
+ a_kv, # packed K|V projection, interleaved per head by _pack_kv
+ m_kv,
+ a_o, # attention out-projection
+ m_o,
+ a_gate, # SwiGLU gate
+ m_gate,
+ a_up, # SwiGLU up
+ m_up,
+ a_down, # SwiGLU down
+ m_down,
+ # ---- constant tables ----
+ channel_params: cute.Tensor, # f32, laid out by _CHANNEL_PARAM_RUNS
+ inv_t: cute.Tensor, # f32 inverse RoPE frequencies, per axis
+ inv_h: cute.Tensor,
+ inv_w: cute.Tensor,
+ # ---- runtime volume ----
+ T,
+ H,
+ W,
+ T_lo, # the stage-4 grid this volume pixel-shuffles out of
+ H_lo,
+ W_lo,
+ drop_leading, # 1 when the caller dropped the shuffle's duplicate leading frame
+ # ---- runtime schedule ----
+ n_ctas, # persistent grid width; every CTA must be resident for the barrier
+ slab_count, # slabs the volume is cut into
+ slab_grid_hw, # strides for unflattening a slab index: grid_h * grid_w ...
+ slab_grid_w, # ... and grid_w
+ slab_tiles_t, # query tiles per slab, per axis
+ slab_tiles_h,
+ slab_tiles_w,
+ # ---- runtime slab geometry ----
+ max_box_t, # the largest halo box this call chose; caps each slab's own box
+ max_box_h,
+ max_box_w,
+ cache_row_stride, # rows between heads in kv_cache == max_box_t*h*w
+ # ---- compile-time block shape ----
+ C: cutlass.Constexpr, # channels
+ Ctx: cutlass.Constexpr, # stage-4 channels; a multiple of C
+ SP_T: cutlass.Constexpr, # the stage-4 pixel-shuffle stride
+ SP_H: cutlass.Constexpr,
+ SP_W: cutlass.Constexpr,
+ Hidd: cutlass.Constexpr, # SwiGLU hidden width
+ NH: cutlass.Constexpr, # heads; NH * HD == C
+ ROPE_T: cutlass.Constexpr, # RoPE dims per axis; they sum to HD
+ ROPE_H: cutlass.Constexpr,
+ ROPE_W: cutlass.Constexpr,
+ KT: cutlass.Constexpr, # NA window extents
+ KH: cutlass.Constexpr,
+ KW: cutlass.Constexpr,
+ # ---- compile-time tile geometry ----
+ TT: cutlass.Constexpr, # query tile; TT*TH*TW == M
+ TH: cutlass.Constexpr,
+ TW: cutlass.Constexpr,
+ PT: cutlass.Constexpr, # halo panel; PT == TT + KT - 1, and so on
+ PH: cutlass.Constexpr,
+ PW: cutlass.Constexpr,
+ NKV: cutlass.Constexpr, # KV tiles spanning one panel
+ BT: cutlass.Constexpr, # SLAB_BOX_MAX; sizes the rope tables only
+ BH: cutlass.Constexpr,
+ BW: cutlass.Constexpr,
+ # ---- compile-time layouts ----
+ mma128: cute.TiledMma,
+ mma64: cute.TiledMma,
+ a_layout: cute.ComposedLayout,
+ b_layout: cute.ComposedLayout,
+ p_layout: cute.ComposedLayout,
+ q_layout: cute.ComposedLayout,
+ k_layout: cute.ComposedLayout,
+ v_layout: cute.ComposedLayout,
+):
+ tidx, _, _ = cute.arch.thread_idx()
+ cta_index, _, _ = cute.arch.block_idx()
+ # ``lane`` is the accumulator row this thread owns; ``wg`` picks which slice of
+ # that row's columns. Every per-row SMEM map is indexed by lane, and every
+ # epilogue chunk index is ``wg``.
+ ids = _ThreadIds(
+ tidx=tidx,
+ lane=tidx % M,
+ wg=tidx // M,
+ warp=cute.arch.make_warp_uniform(cute.arch.warp_idx()),
+ cta=cta_index,
+ )
+ shape = _BlockShape(
+ channels=C,
+ ctx_channels=Ctx,
+ stride=(SP_T, SP_H, SP_W),
+ hidden=Hidd,
+ n_heads=NH,
+ kernel=(KT, KH, KW),
+ tile=(TT, TH, TW),
+ panel=(PT, PH, PW),
+ rope_dims=(ROPE_T, ROPE_H, ROPE_W),
+ n_kv_tiles=NKV,
+ )
+ param = shape.param
+
+ smem = SmemAllocator()
+ storage = smem.allocate(UmmaSharedStorage)
+ # One 96 KiB operand pool, because the two halves of the block never need their
+ # operands at the same time. Outside the KV loop it is the activation (``s_a``)
+ # plus one weight tile (``s_b``); inside it, the attention operands -- ``s_p`` and
+ # ``s_k``/``s_v`` double-buffered, which is what lets a step's cache read and both
+ # of its MMAs overlap the *previous* step's softmax. ``s_a`` is dead from the Q
+ # projection, which consumes it, until the out-projection refills it; ``s_b`` is
+ # dead between those same two GEMMs. So the pipeline costs no SMEM at all.
+ pool_elems = 6 * M * TILE_K # s_a | (s_p, s_k) ; s_b | s_v
+ pool = smem.allocate_tensor(IO, cute.make_layout((pool_elems,)), byte_alignment=128)
+ s_a = _alias(pool, a_layout)
+ s_p = _alias(pool, p_layout)
+ s_k = _alias(pool, k_layout, 2 * M * TILE_K)
+ s_b = _alias(pool, b_layout, 4 * M * TILE_K)
+ s_v = _alias(pool, v_layout, 4 * M * TILE_K)
+ s_q = smem.allocate_tensor(IO, q_layout.outer, byte_alignment=128, swizzle=q_layout.inner)
+ # Completion barriers: one per Q@K accumulator plus one the P@V chain signals.
+ # ``attention_tile`` re-initialises them per query tile so the wait phases stay
+ # compile-time constants.
+ qkbar = smem.allocate_tensor(cutlass.Int64, cute.make_layout((2,)), byte_alignment=16)
+ pvbar = smem.allocate_tensor(cutlass.Int64, cute.make_layout((1,)), byte_alignment=16)
+ rowix = smem.allocate_tensor(cutlass.Int32, cute.make_layout((M,)), byte_alignment=16)
+ rowix_lo = smem.allocate_tensor(cutlass.Int32, cute.make_layout((M,)), byte_alignment=16)
+ rowix_w = smem.allocate_tensor(cutlass.Int32, cute.make_layout((M,)), byte_alignment=16)
+ m_sm = smem.allocate_tensor(ACC, cute.make_layout((M, NH)), byte_alignment=16)
+ l_sm = smem.allocate_tensor(ACC, cute.make_layout((M, NUM_WARPGROUPS, NH)), byte_alignment=16)
+ red_c = smem.allocate_tensor(ACC, cute.make_layout((M, NUM_WARPGROUPS)), byte_alignment=16)
+ red_head = smem.allocate_tensor(ACC, cute.make_layout((M, NUM_WARPGROUPS, 2)), byte_alignment=16)
+ # The rope tables are sized by the compile-time slab bound, and filled per slab
+ # over the extent that slab's box actually has.
+ rope = tuple(
+ smem.allocate_tensor(ACC, cute.make_layout((extent, dim // 2)), byte_alignment=16)
+ for extent, dim in ((BT, ROPE_T), (BT, ROPE_T), (BH, ROPE_H), (BH, ROPE_H), (BW, ROPE_W), (BW, ROPE_W))
+ )
+ params = smem.allocate_tensor(ACC, cute.make_layout((param["total"],)), byte_alignment=16)
+ i = tidx
+ while i < param["total"]:
+ params[i] = channel_params[i]
+ i += THREADS
+ cute.arch.sync_threads()
+
+ tmem, tmem_ptr = acquire_tmem(storage)
+
+ lay_main = mma128.make_fragment_C(mma128.partition_shape_C(TILER_N128[:2])).layout
+ lay_n64 = mma64.make_fragment_C(mma64.partition_shape_C(TILER_N64[:2])).layout
+
+ # TMEM map (512 columns). ``acc_o`` holds the flash-attention accumulator for every
+ # head and is live for the whole KV loop; everything else is scratch that only
+ # exists between two syncs, so it all shares the region above it.
+ # acc_o [0, NH*HD) per-head attention accumulator
+ # acc_main [NH*HD, +n_chunks*TILE_N) one per N-tile of a C-wide output
+ # acc_qk aliases acc_main[0..1] two Q@K accumulators, so step s's softmax
+ # reads one while step s+1's MMA fills the
+ # other (acc_main is dead in the KV loop)
+ # acc_scratch aliases acc_main[1] the K|V, Q and SwiGLU-up projections, which
+ # lets SiLU read gate and up from TMEM
+ # acc_down aliases acc_o (acc_o is dead once the MLP starts)
+ scr = NH * HD
+ n_chunks = shape.n_chunks
+ acc_o = [cute.make_tensor(tmem_ptr + h * HD, lay_n64) for h in range(NH)]
+ acc_main = [cute.make_tensor(tmem_ptr + scr + n * TILE_N, lay_main) for n in range(n_chunks)]
+ acc_qk = [cute.make_tensor(tmem_ptr + scr + b * TILE_N, lay_main) for b in range(2)]
+ acc_scratch = cute.make_tensor(tmem_ptr + scr + TILE_N, lay_main)
+ acc_down = [cute.make_tensor(tmem_ptr + n * TILE_N, lay_main) for n in range(n_chunks)]
+ rshape = _reg_shape(mma128, acc_main[0], ids.lane, TILE_N)
+ rshape_o = _reg_shape(mma64, acc_o[0], ids.lane, HD, HEAD_COLS)
+
+ ws = _Workspace(
+ ids=ids,
+ x=x,
+ stage4=stage4,
+ y=y,
+ kv_cache=kv_cache,
+ norm_cache=norm_cache,
+ barrier=barrier,
+ s_a=s_a,
+ s_b=s_b,
+ s_q=s_q,
+ s_k=s_k,
+ s_v=s_v,
+ s_p=s_p,
+ storage=storage,
+ fr_a=mma128.make_fragment_A(s_a),
+ fr_q=mma128.make_fragment_A(s_q),
+ fr_k=mma128.make_fragment_B(s_k),
+ fr_p=mma64.make_fragment_A(s_p),
+ fr_v=mma64.make_fragment_B(s_v),
+ w_ctx=(a_ctx, m_ctx),
+ w_q=(a_q, m_q),
+ w_kv=(a_kv, m_kv),
+ w_o=(a_o, m_o),
+ w_gate=(a_gate, m_gate),
+ w_up=(a_up, m_up),
+ w_down=(a_down, m_down),
+ acc_main=acc_main,
+ acc_qk=acc_qk,
+ acc_scratch=acc_scratch,
+ acc_o=acc_o,
+ acc_down=acc_down,
+ areg=cute.make_rmem_tensor(rshape, ACC),
+ breg=cute.make_rmem_tensor(rshape, ACC),
+ oreg=cute.make_rmem_tensor(rshape_o, ACC),
+ kvfrag=cute.make_rmem_tensor(cute.make_layout(HD), IO),
+ rowix=rowix,
+ rowix_lo=rowix_lo,
+ rowix_w=rowix_w,
+ copy_slot=cooperative_copy_slot(tidx),
+ red_c=red_c,
+ red_head=red_head,
+ m_sm=m_sm,
+ l_sm=l_sm,
+ qkbar=qkbar,
+ pvbar=pvbar,
+ rope=rope,
+ rope_inv=(inv_t, inv_h, inv_w),
+ params=params,
+ query_slot=query_slot_in_tile(ids.lane, TH, TW),
+ volume=(T, H, W),
+ ctx_volume=(T_lo, H_lo, W_lo),
+ drop_leading=drop_leading,
+ n_ctas=n_ctas,
+ slab_count=slab_count,
+ slab_grid_hw=slab_grid_hw,
+ slab_grid_w=slab_grid_w,
+ slab_tiles=(slab_tiles_t, slab_tiles_h, slab_tiles_w),
+ max_box=(max_box_t, max_box_h, max_box_w),
+ cache_row_stride=cache_row_stride,
+ )
+
+ slab_index = 0
+ while slab_index < slab_count:
+ slab = _slab_geometry(ws, shape, slab_index)
+ _build_rope_tables(ws, shape, slab)
+ _fill_slab_kv_cache(ws, shape, slab)
+ # Every CTA must see the whole cache before any of them reads it.
+ grid_barrier(barrier, tidx, n_ctas, 2 * slab_index)
+
+ n_tiles, tile_plane, tile_row = _core_tile_grid(ws, shape, slab)
+ tile_id = ids.cta
+ while tile_id < n_tiles:
+ local = unflatten_3d(tile_id, tile_plane, tile_row)
+ _run_query_tile(
+ ws,
+ shape,
+ slab,
+ tuple(slab.core_origin[i] + local[i] * shape.tile[i] for i in range(3)),
+ )
+ tile_id += n_ctas
+ # ... and no CTA may start the next slab's cache fill until they all have.
+ grid_barrier(barrier, tidx, n_ctas, 2 * slab_index + 1)
+ slab_index += 1
+
+ release_tmem(tmem, tmem_ptr)
+
+
+# --------------------------------------------------------------------------
+# Slab geometry
+# --------------------------------------------------------------------------
+
+
+def _slab_geometry(ws: _Workspace, shape: _BlockShape, slab_index) -> _Slab:
+ """Locate one slab: the core it owns, and the halo box its K/V cache covers.
+ Cores partition the volume, so nothing outside this one is written while it runs.
+ The box is that core grown by the NA radius and clamped into the volume; every
+ halo panel of every query tile in the core lies inside it, which is what lets one
+ cache fill serve them all.
+ """
+ volume = ws.volume
+ core_shape = (
+ ws.slab_tiles[0] * shape.tile[0],
+ ws.slab_tiles[1] * shape.tile[1],
+ ws.slab_tiles[2] * shape.tile[2],
+ )
+ slab_t, slab_h, slab_w = unflatten_3d(slab_index, ws.slab_grid_hw, ws.slab_grid_w)
+ core_origin = (slab_t * core_shape[0], slab_h * core_shape[1], slab_w * core_shape[2])
+ core_end = tuple(at_most(core_origin[i] + core_shape[i], volume[i]) for i in range(3))
+ box_shape = tuple(
+ _slab_box_extent(core_origin[i], ws.slab_tiles[i], shape.tile[i], shape.kernel[i], volume[i], ws.max_box[i])
+ for i in range(3)
+ )
+ box_origin = tuple(clamp_window_start(core_origin[i] - shape.radius[i], box_shape[i], volume[i]) for i in range(3))
+ box_hw = box_shape[1] * box_shape[2]
+ return _Slab(
+ core_origin=core_origin,
+ core_end=core_end,
+ box_origin=box_origin,
+ box_shape=box_shape,
+ box_hw=box_hw,
+ n_box_tokens=box_shape[0] * box_hw,
+ )
+
+
+def _slab_box_extent(core_origin, core_tiles, tile, kernel, volume, max_box):
+ """One axis of a slab's halo-box extent.
+ The box grows from this slab's *own* core, not from the largest slab's, so a slab
+ cut short by the volume edge projects fewer tokens -- and since the cache fill
+ re-runs the box once per slab, that difference is real work. It never drops below
+ one query tile's halo panel, which is the box :func:`panel_key_row` indexes into.
+ """
+ core_extent = at_most(core_tiles * tile, volume - core_origin)
+ core_extent = at_least(core_extent, cutlass.Int32(tile))
+ return at_most(core_extent + (kernel - 1), max_box)
+
+
+def _core_tile_grid(ws: _Workspace, shape: _BlockShape, slab: _Slab):
+ """How many query tiles this slab's core actually holds.
+ Returns ``(count, plane_stride, row_stride)`` -- the total, and the two strides
+ :func:`unflatten_3d` needs to turn a tile index back into a position in the core.
+ A slab at the far edge of the volume is cut short, and the tiles it does not have
+ must not be scheduled: a CTA taking one would write outside the volume.
+ """
+ n = tuple(
+ at_most(
+ (ws.volume[i] - slab.core_origin[i] + shape.tile[i] - 1) // shape.tile[i],
+ ws.slab_tiles[i],
+ )
+ for i in range(3)
+ )
+ return n[0] * (n[1] * n[2]), n[1] * n[2], n[2]
+
+
+def _build_rope_tables(ws: _Workspace, shape: _BlockShape, slab: _Slab) -> None:
+ """Tabulate cos/sin over the slab box, once per slab.
+ RoPE is keyed to the box rather than to each query tile's panel: the cache fill
+ rotates K here, and the query projection reads the same tables with a box-local
+ index, so the two cannot disagree about a token's position.
+ """
+ cos_t, sin_t, cos_h, sin_h, cos_w, sin_w = ws.rope
+ inv_t, inv_h, inv_w = ws.rope_inv
+ half = tuple(d // 2 for d in shape.rope_dims)
+ cute.arch.sync_threads()
+ fill_rope_axis(cos_t, sin_t, ws.ids.tidx, slab.box_origin[0], slab.box_shape[0], half[0], inv_t)
+ fill_rope_axis(cos_h, sin_h, ws.ids.tidx, slab.box_origin[1], slab.box_shape[1], half[1], inv_h)
+ fill_rope_axis(cos_w, sin_w, ws.ids.tidx, slab.box_origin[2], slab.box_shape[2], half[2], inv_w)
+ cute.arch.sync_threads()
+
+
+# --------------------------------------------------------------------------
+# Filling the slab's K/V cache
+# --------------------------------------------------------------------------
+
+
+def _fill_slab_kv_cache(ws, shape: cutlass.Constexpr, slab):
+ """Project the whole slab box into the K/V cache, ``M`` tokens per CTA per step.
+ Every token of the box gets the block's front half run over it exactly once:
+ ``post = x + fused_ctx(stage4)``, its RMSNorm factor, AdaLN, then the K and V
+ projections. K and V land in the cache; ``post`` and its factor land in the output
+ and in ``norm_cache``, because every query tile in this slab's core needs the same
+ two values and rebuilding them per tile would cost a context gather, the context
+ GEMM, an x gather and the residual add.
+ ``fused_ctx`` is the stage-4 upsample composed with ``context_proj``: one Linear per
+ pixel-shuffle subpixel, packed as ``P`` stacked N-tiles of one ``(C, Ctx)`` weight.
+ So a token's context is the row of ``stage4`` at its parent cell projected by *its*
+ subpixel's slice -- which is why the box is walked by stage-4 cell and then by
+ subpixel (:func:`_subpixel_step`) rather than row-major: one pass's ``M`` tokens then
+ share a subpixel, and with it the one B operand an ``M``-row UMMA can take.
+ The subpixel is minor across CTAs rather than inside one, so the ``P`` CTAs that share a
+ cell run are resident together and share its stage-4 rows in L2. It has to be: a
+ subpixel loop *inside* the CTA is only worth its extra reuse as a compile-time loop, and
+ that unrolls the whole fill body ``P`` times, tripling its register frame.
+ Publishing ``post`` into the output is safe here: cores partition the volume and
+ slab ``s+1``'s fill runs after slab ``s``'s tile loop, so these rows belong to no
+ finished slab.
+ """
+ lane, wg = ws.ids.lane, ws.ids.wg
+ param, channels = shape.param, shape.channels
+ _, vol_h, vol_w = ws.volume
+ _, lo_h, lo_w = ws.ctx_volume
+ stride = shape.stride
+ cells = tuple((slab.box_shape[i] + stride[i] - 1) // stride[i] for i in range(3))
+ n_cells = cells[0] * cells[1] * cells[2]
+ n_steps = shape.n_subpixels * ((n_cells + M - 1) // M)
+
+ step = ws.ids.cta
+ while step < n_steps:
+ subpixel, box_offset, in_box = _subpixel_step(ws, shape, slab, step, cells, n_cells)
+ pos = tuple(slab.box_origin[i] + box_offset[i] for i in range(3))
+ row = flatten_3d(pos[0], pos[1], pos[2], vol_h, vol_w)
+ # The cache and the norm cache are indexed by the box's own row-major order, not
+ # by the order the fill walks it: that is the order the query tiles read back.
+ token = flatten_3d(box_offset[0], box_offset[1], box_offset[2], slab.box_shape[1], slab.box_shape[2])
+ # A lane past the end of the box parks its norm factor on a scratch entry: its
+ # clamped coordinates would otherwise target a real token, whose factor a
+ # legitimate lane is already writing.
+ norm_row = token if in_box else slab.n_box_tokens + lane
+ ws.rowix[lane] = row
+ ws.rowix_lo[lane] = flatten_3d(
+ (pos[0] + ws.drop_leading) // stride[0], pos[1] // stride[1], pos[2] // stride[2], lo_h, lo_w
+ )
+ # ``post`` is published only for the rows this slab owns. A halo row belongs to
+ # another slab's core, and a lane past the end of the box has clamped
+ # coordinates that would otherwise look in-core; both go to the scratch rows
+ # past the end of the output.
+ owned = in_box and pos[0] >= slab.core_origin[0] and pos[0] < slab.core_end[0]
+ owned = owned and pos[1] >= slab.core_origin[1] and pos[1] < slab.core_end[1]
+ owned = owned and pos[2] >= slab.core_origin[2] and pos[2] < slab.core_end[2]
+ ws.rowix_w[lane] = row if owned else ws.n_volume_tokens + lane
+
+ cute.arch.sync_threads()
+ # A ``Ctx``-wide stage-4 row does not fit one C-wide operand, so it lands in two:
+ # ``s_a``, and ``s_q``, which is dead until the query projection. Both gathers are
+ # issued before the barrier and the reduction stays one GEMM call spanning them --
+ # the barriers and the GEMM's own pipeline stand-up cost far more at these shapes
+ # than the extra K-tiles do, so this is the whole difference between the deferred
+ # context and a full-resolution one.
+ _fill_a_gather(ws.s_a, ws.stage4, ws.rowix_lo, ws.copy_slot, channels)
+ if cutlass.const_expr(shape.ctx_groups > 1):
+ _fill_a_gather(ws.s_q, ws.stage4, ws.rowix_lo, ws.copy_slot, channels, channels)
+ cute.arch.sync_threads()
+ for n in cutlass.range_constexpr(shape.n_chunks):
+ _project(
+ ws,
+ shape,
+ ws.w_ctx,
+ ws.acc_main[n],
+ subpixel * shape.n_chunks + n,
+ n_k_tiles=shape.ctx_groups * shape.n_k_tiles,
+ frag2=ws.fr_q,
+ a_split=shape.n_k_tiles if shape.ctx_groups > 1 else 0,
+ )
+ cute.arch.sync_threads()
+ _fill_a_gather(ws.s_a, ws.x, ws.rowix, ws.copy_slot, channels)
+ cute.arch.sync_threads()
+
+ post_sq = _add_residual(ws, shape, ws.acc_main, param["ctx_bias"], subpixel * channels)
+ rms_inv = cute.rsqrt(row_sum(ws.red_c, lane, wg, post_sq) / ACC(channels) + ACC(EPS))
+ # Publish the factor with ``post``; both warpgroups hold the reduced value, so
+ # one writes it. One f32 a token, a 256th of what caching the normed row costs.
+ if wg == 0:
+ ws.norm_cache[norm_row] = rms_inv
+ _scatter_a(ws.s_a, ws.y, ws.rowix_w, ws.copy_slot, channels)
+ # A cooperative copy spans the whole operand -- every thread touches rows and
+ # channels outside its own warpgroup's slice -- so it has to finish before the
+ # per-warpgroup norm below rewrites s_a. Without this the two overlap whenever
+ # the warpgroups fall out of lockstep, and the scatter writes normed values
+ # where it meant to write the residual.
+ cute.arch.sync_threads()
+ _apply_adaln(ws, shape, rms_inv, param["msa_weight"], param["msa_shift"])
+ cute.arch.sync_threads()
+
+ for head in cutlass.range_constexpr(shape.n_heads):
+ _project_head_kv(ws, shape, head, token, box_offset)
+ step += ws.n_ctas
+
+
+def _subpixel_step(ws, shape: cutlass.Constexpr, slab, step, cells, n_cells):
+ """Where fill step ``step`` sits: its subpixel, this lane's box offset, and validity.
+ The box is walked as ``P`` passes over the stage-4 cells it spans, subpixel-minor so
+ that consecutive CTAs take the ``P`` subpixels of the *same* cells and share their
+ stage-4 rows in L2. Within a pass, lane ``l`` takes one cell and the box offset is
+ that cell's position for this subpixel::
+ offset = first + stride * cell
+ where ``first`` is the smallest box offset whose absolute position has this
+ subpixel. ``cells`` is rounded up per axis, so a pass can overrun the box by up to
+ one cell per axis; those lanes report ``in_box=False`` and are clamped back onto a
+ real position of the same subpixel, which makes their duplicate K/V store harmless
+ (it recomputes what the owning lane writes) exactly as a row-major overrun does.
+ """
+ lane, stride = ws.ids.lane, shape.stride
+ sub = step % shape.n_subpixels
+ cell = (step // shape.n_subpixels) * M + lane
+ cell_offset = unflatten_3d(at_most(cell, n_cells - 1), cells[1] * cells[2], cells[2])
+ # Per-axis subpixel, from the ``(c, p_t, p_h, p_w)`` channel layout the pack folded.
+ sub_thw = (sub // (stride[1] * stride[2]), (sub // stride[2]) % stride[1], sub % stride[2])
+ # The dropped duplicate leading frame shifts the whole temporal axis by one.
+ shift = (ws.drop_leading, cutlass.Int32(0), cutlass.Int32(0))
+ # ``+ 2 * stride`` keeps the dividend positive: integer ``%`` here is C's, not
+ # Python's, so a negative one would return a negative offset.
+ first = tuple(
+ (sub_thw[i] + 2 * stride[i] - shift[i] - slab.box_origin[i] % stride[i]) % stride[i] for i in range(3)
+ )
+ # ``&`` rather than ``and``: this helper touches no runtime branch, so it traces
+ # inline like the rest of the geometry instead of costing a device call frame.
+ fits = (cell < n_cells) & (first[0] + stride[0] * cell_offset[0] < slab.box_shape[0])
+ fits = fits & (first[1] + stride[1] * cell_offset[1] < slab.box_shape[1])
+ fits = fits & (first[2] + stride[2] * cell_offset[2] < slab.box_shape[2])
+ # ``first < stride <= box_shape`` (a tile holds a whole cell), so the clamp target is
+ # always a real offset of this subpixel.
+ box_offset = tuple(
+ first[i] + stride[i] * at_most(cell_offset[i], (slab.box_shape[i] - 1 - first[i]) // stride[i])
+ for i in range(3)
+ )
+ return sub, box_offset, fits
+
+
+def _project_head_kv(ws, shape: cutlass.Constexpr, head: cutlass.Constexpr, cache_row, box_offset):
+ """Project one head's K and V out of the normed row and store both to the cache.
+ The packed K|V weight puts K in the accumulator's first ``HD`` columns and V in
+ the second, which lines the warpgroup split up with the two paths: the first
+ ``WARPGROUPS_PER_HEAD`` warpgroups take K (bias, RMSNorm, RoPE), the rest take V (bias only).
+ """
+ lane, wg = ws.ids.lane, ws.ids.wg
+ areg, params, param = ws.areg, ws.params, shape.param
+ n_heads, rope_dims = shape.n_heads, shape.rope_dims
+ acc = ws.acc_scratch
+
+ _project(ws, shape, ws.w_kv, acc, head)
+ k_sq = ACC(0.0)
+ for g in cutlass.range_constexpr(NUM_WARPGROUPS):
+ if wg == g:
+ c0 = (g % WARPGROUPS_PER_HEAD) * ACC_COLS
+ _tmem_load(acc, lane, areg, g)
+ if cutlass.const_expr(g < WARPGROUPS_PER_HEAD):
+ s = ACC(0.0)
+ for d in cutlass.range(ACC_COLS, unroll_full=True):
+ z = areg[d] + params[param["k_bias"] + head * HD + c0 + d]
+ areg[d] = z
+ s += z * z
+ k_sq = s
+ else:
+ for d in cutlass.range(ACC_COLS, unroll_full=True):
+ areg[d] = areg[d] + params[param["v_bias"] + head * HD + c0 + d]
+ k_rms, _unused = head_sum2(ws.red_head, lane, wg, k_sq, ACC(0.0))
+ k_rms = cute.rsqrt(k_rms / ACC(HD) + ACC(EPS))
+ for g in cutlass.range_constexpr(NUM_WARPGROUPS):
+ if wg == g:
+ c0 = (g % WARPGROUPS_PER_HEAD) * ACC_COLS
+ if cutlass.const_expr(g < WARPGROUPS_PER_HEAD):
+ for d in cutlass.range(ACC_COLS, unroll_full=True):
+ areg[d] = areg[d] * k_rms * params[param["k_norm"] + c0 + d]
+ apply_rope(areg, *rope_dims, ws.rope, *box_offset, c0, ACC_COLS)
+ _store_head_row(ws.kv_cache, head * ws.cache_row_stride + cache_row, areg, ACC_COLS, c0)
+ else:
+ row = (n_heads + head) * ws.cache_row_stride + cache_row
+ _store_head_row(ws.kv_cache, row, areg, ACC_COLS, c0)
+
+
+# --------------------------------------------------------------------------
+# One query tile
+# --------------------------------------------------------------------------
+
+
+def _run_query_tile(ws, shape: cutlass.Constexpr, slab, tile_origin):
+ """The whole back half of the block for one ``M``-query tile.
+ Reads ``post`` and its RMSNorm factor back out of the slab's caches, projects Q,
+ runs windowed NA against the slab's K/V cache, then the out-projection, its
+ residual and AdaLN, the SwiGLU MLP and the closing residual. Every intermediate
+ lives in ``s_a`` or in TMEM; the only global traffic is the output row, read and
+ rewritten as each residual needs it.
+ """
+ ids, param = ws.ids, shape.param
+ lane, channels = ids.lane, shape.channels
+
+ # Tiles partition the volume: edge tiles are partial and their out-of-range lanes
+ # write to scratch, so no output row is touched by two CTAs. (The MMA still runs at
+ # full M; the extra rows are garbage.)
+ panel_origin = halo_panel_origin(tile_origin, shape.radius, shape.panel, ws.volume)
+ cute.arch.sync_threads()
+ query_pos, read_row, write_row = query_row_indices(
+ tuple(tile_origin[i] + ws.query_slot[i] for i in range(3)),
+ ws.volume,
+ lane,
+ ws.n_volume_tokens,
+ )
+ window = window_origin_in_panel(query_pos, panel_origin, shape.radius, shape.kernel, ws.volume)
+ # Where this query sits inside the slab box: the index for both the rope tables,
+ # which were built over the box, and the cached RMSNorm factor.
+ box_pos = tuple(query_pos[i] - slab.box_origin[i] for i in range(3))
+
+ # ---------------- residual, AdaLN, Q ---------------------------------
+ ws.rowix[lane] = read_row
+ ws.rowix_w[lane] = write_row
+ # The cache fill already built ``post = x + ctx_proj(context)`` for every row this
+ # slab owns and left it in the output, so read it back instead of rebuilding it per
+ # tile -- and its RMSNorm factor with it, sparing this tile a pass over the whole
+ # row and the CTA-wide reduction that pass feeds.
+ cute.arch.sync_threads()
+ _fill_a_gather(ws.s_a, ws.y, ws.rowix, ws.copy_slot, channels)
+ cute.arch.sync_threads()
+ rms_inv = ws.norm_cache[flatten_3d(box_pos[0], box_pos[1], box_pos[2], slab.box_shape[1], slab.box_shape[2])]
+ _apply_adaln(ws, shape, rms_inv, param["msa_weight"], param["msa_shift"])
+ cute.arch.sync_threads()
+
+ _project_queries(ws, shape, box_pos)
+ attn_zero_accumulators(ws.acc_o, ws.l_sm, ws.oreg, lane, ids.wg, shape.n_heads)
+
+ # ---------------- windowed neighborhood attention --------------------
+ # The K/V source is this slab's fused cache, so both halves are ``kv_cache`` --
+ # K's heads first, then V's -- the head stride is the halo box this call chose, and
+ # one panel row is one cache row.
+ attention_tile(
+ (ws.fr_q, ws.fr_k, ws.fr_p, ws.fr_v),
+ (ws.s_k, ws.s_v, ws.s_p),
+ ws.acc_qk,
+ ws.acc_o,
+ (ws.qkbar, ws.pvbar),
+ ws.m_sm,
+ ws.l_sm,
+ ws.areg,
+ ws.kvfrag,
+ (ws.kv_cache, ws.kv_cache),
+ (cutlass.Int32(0), shape.n_heads * ws.cache_row_stride),
+ ws.cache_row_stride,
+ (*panel_origin, *slab.box_origin, slab.box_shape[1], slab.box_shape[2]),
+ window,
+ (ids.tidx, lane, ids.wg, ids.warp),
+ shape.n_heads,
+ 1,
+ *shape.panel,
+ *shape.kernel,
+ shape.n_kv_tiles,
+ )
+
+ # ---------------- out projection, residual, AdaLN --------------------
+ cute.arch.sync_threads()
+ attn_epilogue(ws.acc_o, ws.l_sm, ws.oreg, ws.s_a, lane, ids.wg, shape.n_heads)
+ cute.arch.sync_threads()
+ for n in cutlass.range_constexpr(shape.n_chunks):
+ _project(ws, shape, ws.w_o, ws.acc_main[n], n)
+ # s_a is free once the out-projection has consumed it, so ``post`` comes back
+ # through it coalesced rather than one cache line per lane.
+ cute.arch.sync_threads()
+ _fill_a_gather(ws.s_a, ws.y, ws.rowix, ws.copy_slot, channels)
+ cute.arch.sync_threads()
+ resid_sq = _add_residual(ws, shape, ws.acc_main, param["out_bias"])
+ rms_inv = cute.rsqrt(row_sum(ws.red_c, lane, ids.wg, resid_sq) / ACC(channels) + ACC(EPS))
+ cute.arch.sync_threads()
+ _scatter_a(ws.s_a, ws.y, ws.rowix_w, ws.copy_slot, channels)
+ # A cooperative copy spans the whole operand -- every thread touches rows and
+ # channels outside its own warpgroup's slice -- so it has to finish before the
+ # per-warpgroup norm below rewrites s_a. Without this the two overlap whenever the
+ # warpgroups fall out of lockstep, and the scatter writes normed values where it
+ # meant to write the residual.
+ cute.arch.sync_threads()
+ _apply_adaln(ws, shape, rms_inv, param["mlp_weight"], param["mlp_shift"])
+ cute.arch.sync_threads()
+
+ # ---------------- SwiGLU MLP and the closing residual ----------------
+ _swiglu_mlp(ws, shape)
+ # s_a is free again after the last gate/up, so the final residual add reloads and
+ # stores through it, coalesced.
+ cute.arch.sync_threads()
+ _fill_a_gather(ws.s_a, ws.y, ws.rowix, ws.copy_slot, channels)
+ cute.arch.sync_threads()
+ _add_accumulator(ws, shape, ws.acc_down)
+ cute.arch.sync_threads()
+ _scatter_a(ws.s_a, ws.y, ws.rowix_w, ws.copy_slot, channels)
+
+
+def _project_queries(ws, shape: cutlass.Constexpr, rope_pos):
+ """Project, normalise and rotate this tile's queries into ``s_q``.
+ ``HEADS_PER_TILE`` heads at a time: an N=128 tile of ``w_q`` is already
+ ``[head 2n | head 2n+1]``, so with one warpgroup per head the RMSNorm and RoPE stay
+ inside a warpgroup -- no reduction, and half the GEMM calls of the per-head N=64
+ projection it replaces.
+ Also fills ``m_sm``, the fixed softmax offset the KV loop subtracts in place of an
+ online row max.
+ """
+ lane, wg = ws.ids.lane, ws.ids.wg
+ areg, params, param = ws.areg, ws.params, shape.param
+ acc = ws.acc_scratch
+
+ for hp in cutlass.range_constexpr(shape.n_heads // HEADS_PER_TILE):
+ _project(ws, shape, ws.w_q, acc, hp)
+ # Pass one: bias, and the two row sums the normalisation needs. ``sum z^2``
+ # gives the RMSNorm scale; ``sum (z * q_norm_w)^2`` gives ``||q||`` after it,
+ # since the scale factors out. Both come off one pass and one barrier -- as two
+ # dependent passes the allocator kept ``areg``'s floats live across the
+ # reduction and spilled.
+ q_sq = ACC(0.0)
+ q_weighted_sq = ACC(0.0)
+ for g in cutlass.range_constexpr(NUM_WARPGROUPS):
+ if wg == g:
+ c0 = (g % WARPGROUPS_PER_HEAD) * ACC_COLS
+ head = hp * HEADS_PER_TILE + g // WARPGROUPS_PER_HEAD
+ _tmem_load(acc, lane, areg, g)
+ s = ACC(0.0)
+ t = ACC(0.0)
+ for d in cutlass.range(ACC_COLS, unroll_full=True):
+ z = areg[d] + params[param["q_bias"] + head * HD + c0 + d]
+ areg[d] = z
+ s += z * z
+ zw = z * params[param["q_norm"] + c0 + d]
+ t += zw * zw
+ q_sq = s
+ q_weighted_sq = t
+ q_sum, q_norm_sq = head_sum2(ws.red_head, lane, wg, q_sq, q_weighted_sq)
+ q_rms = cute.rsqrt(q_sum / ACC(HD) + ACC(EPS))
+ for g in cutlass.range_constexpr(NUM_WARPGROUPS):
+ if wg == g:
+ c0 = (g % WARPGROUPS_PER_HEAD) * ACC_COLS
+ head = hp * HEADS_PER_TILE + g // WARPGROUPS_PER_HEAD
+ # This row and head's fixed softmax offset, ``||q||`` times the ``||k||``
+ # bound -- see :mod:`ltx_kernels.vae.softmax_bound`. ``||q||`` is the
+ # reduced sum scaled after the fact, since the RMSNorm factor is uniform
+ # over the head and so comes out of the square root. The ``q_norm`` run
+ # already carries the attention scale and the base change, folded in by
+ # :func:`_pack_channel_params`.
+ if cutlass.const_expr(g % WARPGROUPS_PER_HEAD == 0):
+ ws.m_sm[lane, head] = cute.sqrt(q_norm_sq) * q_rms * params[param["k_bound"]] * LOG2E
+ for d in cutlass.range(ACC_COLS, unroll_full=True):
+ areg[d] = areg[d] * q_rms * params[param["q_norm"] + c0 + d]
+ apply_rope(areg, *shape.rope_dims, ws.rope, *rope_pos, c0, ACC_COLS)
+ _fill_a_chunk(ws.s_q, lane, areg, head * HD + c0, ACC_COLS)
+
+
+def _swiglu_mlp(ws, shape: cutlass.Constexpr):
+ """SwiGLU: N-tiled gate/up, then a K-accumulated down projection into ``acc_down``.
+ Tiles along N (hidden channels), not fewer M-token rows: the CTA already owns a
+ full ``M``-token tile from attention (lane ``i`` = row ``i``), and the same UMMA /
+ ``gemm_tma`` shape serves every C-wide linear. N-tiling reuses that path and lets
+ SiLU read gate/up from TMEM; token-chunking would fight lane ownership and force a
+ second tiling scheme just for the MLP.
+ ``s_q`` is reused as the hidden-chunk staging buffer -- it is dead from the moment
+ the query projection's last GEMM consumed it.
+ """
+ lane, wg = ws.ids.lane, ws.ids.wg
+ areg, breg = ws.areg, ws.breg
+ for nt in cutlass.range_constexpr(shape.hidden // TILE_N):
+ # gate and up land in separate accumulators, so SiLU reads both straight from
+ # TMEM instead of parking M gate values in registers.
+ _project(ws, shape, ws.w_gate, ws.acc_main[0], nt)
+ _project(ws, shape, ws.w_up, ws.acc_scratch, nt)
+ for g in cutlass.range_constexpr(NUM_WARPGROUPS):
+ if wg == g:
+ _tmem_load(ws.acc_main[0], lane, areg, g)
+ _tmem_load(ws.acc_scratch, lane, breg, g)
+ for e in cutlass.range(ACC_COLS, unroll_full=True):
+ gate = areg[e]
+ # Two MUFU per element (ex2 and rcp.approx). The one-MUFU identity
+ # ``silu(x) = x/2 (1 + tanh(x/2))`` is tempting and does not hold up:
+ # ``tanh.approx.f32`` carries 2^-11 *absolute* error and the down
+ # projection sums ``hidden`` of them, which cost 20 dB of PSNR
+ # against torch.
+ breg[e] = gate * cute.arch.rcp_approx(ACC(1.0) + cute.exp(-gate)) * breg[e]
+ _fill_a_chunk(ws.s_q, lane, breg, g * ACC_COLS, ACC_COLS)
+ cute.arch.sync_threads()
+ # Down projection: A is this hidden chunk, B is w_down's matching K-slice,
+ # accumulated across chunks into one accumulator per N-tile. It reads ``s_q``,
+ # so it takes ``fr_q`` rather than the ``fr_a`` every other projection uses.
+ atom, tensor = ws.w_down
+ for n in cutlass.range_constexpr(shape.n_chunks):
+ gemm_tma(
+ "n128",
+ ws.storage,
+ atom,
+ tensor,
+ ws.s_b,
+ ws.fr_q,
+ ws.acc_down[n],
+ n,
+ nt * 2,
+ 2,
+ 0,
+ nt != 0,
+ _B_STAGE_BYTES,
+ )
+
+
+# --------------------------------------------------------------------------
+# Per-row channel passes
+# --------------------------------------------------------------------------
+
+
+def _add_residual(ws, shape: cutlass.Constexpr, acc, bias_off: cutlass.Constexpr, bias_row=0):
+ """``s_a += acc + bias`` in place, returning the new row's sum of squares.
+ ``acc`` is one TMEM accumulator per N-tile of the C-wide projection that just ran.
+ The sum of squares comes off the same pass because the RMSNorm that follows needs
+ it and a second pass would re-read the whole row.
+ ``bias_row`` picks a C-wide run out of a multi-run bias, which is how the fused
+ context's per-subpixel bias is reached; it is a runtime value and folds away at 0.
+ """
+ lane, wg = ws.ids.lane, ws.ids.wg
+ s_a, areg, breg, params = ws.s_a, ws.areg, ws.breg, ws.params
+ total = ACC(0.0)
+ for g in cutlass.range_constexpr(NUM_WARPGROUPS):
+ if wg == g:
+ s = ACC(0.0)
+ for n in cutlass.range_constexpr(shape.n_chunks):
+ _tmem_load(acc[n], lane, breg, g)
+ _read_a_chunk(s_a, lane, areg, n * TILE_N + g * ACC_COLS, ACC_COLS)
+ for e in cutlass.range(ACC_COLS, unroll_full=True):
+ v = areg[e] + breg[e] + params[bias_off + bias_row + n * TILE_N + g * ACC_COLS + e]
+ s += v * v
+ areg[e] = v
+ _fill_a_chunk(s_a, lane, areg, n * TILE_N + g * ACC_COLS, ACC_COLS)
+ total = s
+ return total
+
+
+def _apply_adaln(ws, shape: cutlass.Constexpr, rms_inv, weight_off: cutlass.Constexpr, shift_off: cutlass.Constexpr):
+ """AdaLN in place on ``s_a``: ``value * rms_inv * weight + shift``, per channel.
+ One multiply and one FFMA, because :func:`_pack_channel_params` already folded
+ ``norm_w * (1 + scale)`` into the weight run.
+ """
+ lane, wg = ws.ids.lane, ws.ids.wg
+ s_a, areg, params = ws.s_a, ws.areg, ws.params
+ for g in cutlass.range_constexpr(NUM_WARPGROUPS):
+ if wg == g:
+ for n in cutlass.range_constexpr(shape.n_chunks):
+ _read_a_chunk(s_a, lane, areg, n * TILE_N + g * ACC_COLS, ACC_COLS)
+ for e in cutlass.range(ACC_COLS, unroll_full=True):
+ c = n * TILE_N + g * ACC_COLS + e
+ areg[e] = areg[e] * rms_inv * params[weight_off + c] + params[shift_off + c]
+ _fill_a_chunk(s_a, lane, areg, n * TILE_N + g * ACC_COLS, ACC_COLS)
+
+
+def _add_accumulator(ws, shape: cutlass.Constexpr, acc):
+ """``s_a += acc`` in place -- the MLP's closing residual, no bias and no norm."""
+ lane, wg = ws.ids.lane, ws.ids.wg
+ s_a, areg, breg = ws.s_a, ws.areg, ws.breg
+ for g in cutlass.range_constexpr(NUM_WARPGROUPS):
+ if wg == g:
+ for n in cutlass.range_constexpr(shape.n_chunks):
+ _tmem_load(acc[n], lane, areg, g)
+ _read_a_chunk(s_a, lane, breg, n * TILE_N + g * ACC_COLS, ACC_COLS)
+ for e in cutlass.range(ACC_COLS, unroll_full=True):
+ areg[e] = breg[e] + areg[e]
+ _fill_a_chunk(s_a, lane, areg, n * TILE_N + g * ACC_COLS, ACC_COLS)
+
+
+def _project(ws, shape, weight, acc, n_idx, accumulate: bool = False, n_k_tiles=None, frag2=None, a_split=0):
+ """One ``M``-row GEMM of the activation in ``s_a`` against a streamed weight.
+ Thin wrapper over :func:`gemm_tma` that unpacks the ``(atom, tensor)`` pair and
+ fills in the operands every projection in this kernel shares. ``frag2`` continues the
+ reduction in a second operand past K-tile ``a_split``, which is how the fused
+ context's ``Ctx``-wide row -- too wide for one operand -- stays a single call.
+ """
+ atom, tensor = weight
+ gemm_tma(
+ "n128",
+ ws.storage,
+ atom,
+ tensor,
+ ws.s_b,
+ ws.fr_a,
+ acc,
+ n_idx,
+ 0,
+ shape.n_k_tiles if n_k_tiles is None else n_k_tiles,
+ 0,
+ accumulate,
+ _B_STAGE_BYTES,
+ frag2,
+ a_split,
+ )
+
+
+# --------------------------------------------------------------------------
+# Packed per-channel constants
+# --------------------------------------------------------------------------
+
+
+#: Runs of the packed constant vector, in layout order, each with its length unit:
+#: ``"C"`` for one value per channel, ``"PC"`` for one per channel per pixel-shuffle
+#: subpixel, ``"HD"`` for one per head channel, ``"1"`` for a scalar.
+_CHANNEL_PARAM_RUNS: "tuple[tuple[str, str], ...]" = (
+ ("msa_weight", "C"), # norm1_w * (1 + scale_msa) -- the AdaLN before attention
+ ("msa_shift", "C"), # shift_msa
+ ("mlp_weight", "C"), # norm2_w * (1 + scale_mlp) -- the AdaLN before the MLP
+ ("mlp_shift", "C"), # shift_mlp
+ ("ctx_bias", "PC"), # fused upsample x context_proj, one C-run per subpixel
+ ("out_bias", "C"), # attention out-projection
+ ("q_bias", "C"),
+ ("k_bias", "C"),
+ ("v_bias", "C"),
+ ("q_norm", "HD"), # q_norm_w, carrying the attention scale
+ ("k_norm", "HD"),
+ ("k_bound", "1"), # sqrt(HD) * max|k_norm_w| -- the ||k|| bound
+)
+
+
+def _channel_param_offsets(c: int, hd: int, n_subpixels: int) -> "dict[str, int]":
+ """Start offset of every run in the packed vector, plus its ``total`` length."""
+ unit = {"C": c, "PC": c * n_subpixels, "HD": hd, "1": 1}
+ offsets, pos = {}, 0
+ for name, length in _CHANNEL_PARAM_RUNS:
+ offsets[name] = pos
+ pos += unit[length]
+ offsets["total"] = pos
+ return offsets
+
+
+def _pack_channel_params(
+ norm1_w: torch.Tensor,
+ norm2_w: torch.Tensor,
+ q_norm_w: torch.Tensor,
+ k_norm_w: torch.Tensor,
+ scale_msa: torch.Tensor,
+ shift_msa: torch.Tensor,
+ scale_mlp: torch.Tensor,
+ shift_mlp: torch.Tensor,
+ b_ctx: torch.Tensor,
+ b_o: torch.Tensor,
+ b_q: torch.Tensor,
+ b_k: torch.Tensor,
+ b_v: torch.Tensor,
+ softmax_bound: torch.Tensor,
+ c: int,
+ hd: int,
+ n_subpixels: int,
+ attn_scale: float,
+ device: torch.device,
+) -> torch.Tensor:
+ """Build the packed constant vector in :data:`_CHANNEL_PARAM_RUNS` order.
+ ``norm * (1 + scale)`` is folded here, so AdaLN is one multiply and one FFMA per
+ channel against two loads instead of three loads and five ops.
+ """
+
+ def flat(t: torch.Tensor) -> torch.Tensor:
+ return t.detach().contiguous().float().to(device=device).view(-1)
+
+ runs = {
+ "msa_weight": flat(norm1_w) * (1.0 + flat(scale_msa)),
+ "msa_shift": flat(shift_msa),
+ "mlp_weight": flat(norm2_w) * (1.0 + flat(scale_mlp)),
+ "mlp_shift": flat(shift_mlp),
+ "ctx_bias": flat(b_ctx),
+ "out_bias": flat(b_o),
+ "q_bias": flat(b_q),
+ "k_bias": flat(b_k),
+ "v_bias": flat(b_v),
+ # The kernel builds Q itself, so the attention scale folds in here rather than
+ # costing a multiply per element per forward. The base change to 2 does not: it
+ # rides on the softmax's row-offset subtraction (``fna_attn_core.LOG2E``).
+ "q_norm": flat(q_norm_w) * attn_scale,
+ "k_norm": flat(k_norm_w),
+ "k_bound": softmax_bound.detach().to(device=device, dtype=torch.float32).reshape(1),
+ }
+ packed = torch.cat([runs[name] for name, _ in _CHANNEL_PARAM_RUNS])
+ want = _channel_param_offsets(c, hd, n_subpixels)["total"]
+ assert packed.numel() == want, f"packed {packed.numel()} != {want}"
+ return packed
+
+
+# --------------------------------------------------------------------------
+# Host entry point
+# --------------------------------------------------------------------------
+
+
+def pack_fused_ctx_weights(
+ w_upsample: torch.Tensor,
+ b_upsample: torch.Tensor,
+ w_ctx: torch.Tensor,
+ b_ctx: torch.Tensor,
+) -> "tuple[torch.Tensor, torch.Tensor]":
+ """Compose ``context_proj(pixel_shuffle(upsample(.)))`` into one Linear per subpixel.
+ The pixel-shuffle only *permutes* the upsample's output channels, so the whole
+ stage-4 hop is ``P`` independent ``(C, Ctx)`` Linears -- one per subpixel -- over the
+ same low-resolution row. Fusing them at load time is what lets the kernel read
+ stage-4 directly and never see a full-resolution context.
+ ``LinearPixelShuffleUpsample`` / einops lay the Linear's out channels as
+ ``(c, p1, p2, p3)`` (``c`` slowest among those four). Flattening the three
+ subpixel axes to ``P = p1*p2*p3``, row ``c * P + s`` of the upsample is channel
+ ``c`` of subpixel ``s``. Equivalently ``w_up.view(C, P, Ctx).transpose(0, 1)[s]``
+ is the ``(C, Ctx)`` slice for that subpixel, and
+ ``W[s] = W_ctx @ that slice``, ``b[s] = W_ctx @ b_up_slice + b_ctx``. Returned
+ stacked along N in subpixel order: ``(P*C, Ctx)`` and ``(P*C,)``, matching the
+ kernel's N-tile / ``ctx_bias`` walk -- in ``context_proj``'s dtype and on its
+ device, since a streaming load reaches this with a pre-read upsample still on
+ the host.
+ Requires square ``context_proj`` (``C_out == C_in``): shipped DiffVAE configs keep
+ ``stage5_channels == stage_channels[-1]``. A checkpoint with ``c5 != c_ctx`` cannot
+ use this pack (the deferred eager path still can).
+ """
+ channels, ctx_channels = int(w_ctx.shape[0]), int(w_upsample.shape[1])
+ expanded = int(w_upsample.shape[0])
+ if int(w_ctx.shape[1]) != channels:
+ raise ValueError(
+ f"context_proj must be square (C, C) to fuse into the DSL stage-4 hop; got "
+ f"{tuple(w_ctx.shape)}. BLACKWELL_DSL needs stage5_channels == "
+ f"stage_channels[-1]; use CHUNKED / COMBINED for non-square configs"
+ )
+ if expanded % channels != 0:
+ raise ValueError(f"upsample out_features {expanded} is not a multiple of C={channels}")
+ subpixels = expanded // channels
+ device = w_ctx.device
+ w_up = w_upsample.detach().to(device=device, dtype=torch.float32)
+ b_up = b_upsample.detach().to(device=device, dtype=torch.float32).view(-1)
+ w_c = w_ctx.detach().float()
+ b_c = b_ctx.detach().to(device=device, dtype=torch.float32).view(-1)
+ # (P, C, Ctx) and (P, C): batched GEMM over view(C, P, Ctx) then transpose to P-major.
+ w_fused = w_c @ w_up.view(channels, subpixels, ctx_channels).transpose(0, 1)
+ b_fused = b_up.view(channels, subpixels).t() @ w_c.t() + b_c
+ return (
+ w_fused.reshape(subpixels * channels, ctx_channels).to(dtype=w_ctx.dtype),
+ b_fused.reshape(subpixels * channels).to(dtype=b_ctx.dtype),
+ )
+
+
+def run_block_fna_dsl(
+ x: torch.Tensor,
+ stage4: torch.Tensor,
+ *,
+ norm1_weight: torch.Tensor,
+ norm2_weight: torch.Tensor,
+ q_norm_weight: torch.Tensor,
+ k_norm_weight: torch.Tensor,
+ softmax_bound: torch.Tensor,
+ scale_msa: torch.Tensor,
+ shift_msa: torch.Tensor,
+ scale_mlp: torch.Tensor,
+ shift_mlp: torch.Tensor,
+ w_ctx: torch.Tensor,
+ b_ctx: torch.Tensor,
+ upsample_stride: "tuple[int, int, int]" = (1, 1, 1),
+ drop_leading_frame: bool = False,
+ w_q: torch.Tensor,
+ w_k: torch.Tensor,
+ w_v: torch.Tensor,
+ w_o: torch.Tensor,
+ b_q: torch.Tensor,
+ b_k: torch.Tensor,
+ b_v: torch.Tensor,
+ b_o: torch.Tensor,
+ w_gate: torch.Tensor,
+ w_up: torch.Tensor,
+ w_down: torch.Tensor,
+ inv_t: torch.Tensor,
+ inv_h: torch.Tensor,
+ inv_w: torch.Tensor,
+ num_heads: int,
+ attn_scale: float,
+ rope_dim_split: "tuple[int, int, int]",
+ kernel_size: "tuple[int, int, int]",
+ tile_thw: "tuple[int, int, int] | None" = None,
+ out: torch.Tensor | None = None,
+) -> torch.Tensor:
+ """Run one fused ``DiffusionNABlock``. ``x`` is ``(1, T, H, W, C)``.
+ ``stage4`` is the context *before* its pixel-shuffle upsample,
+ ``(1, T/p_t, H/p_h, W/p_w, Ctx)``, and ``w_ctx`` / ``b_ctx`` are that upsample fused
+ with ``context_proj`` by :func:`pack_fused_ctx_weights` -- ``(P*C, Ctx)`` and
+ ``(P*C,)``, one Linear per subpixel. The kernel projects each token straight off its
+ stage-4 parent row, so the full-resolution context is never materialised. Pass
+ ``upsample_stride=(1,1,1)`` with a plain ``(C, C)`` / ``(C,)`` ``context_proj`` to
+ feed a context that is already at full resolution.
+ ``drop_leading_frame`` must match the flag the caller would have passed to
+ ``LinearPixelShuffleUpsample``: with ``p_t == 2`` it drops the shuffle's duplicate
+ leading frame, so ``T == T_lo * 2 - 1`` and the temporal axis is offset by one.
+ ``attn_scale`` is the caller's own attention scale; it is folded into the packed
+ ``q_norm`` constants rather than applied to Q per element. ``softmax_bound`` is
+ :func:`ltx_kernels.vae.softmax_row_bound` of ``k_norm_weight``, hoisted so it is
+ derived once per weight rather than once per call.
+ ``out`` supplies the output buffer instead of allocating one, so a chain of blocks
+ can alternate between two buffers rather than allocating a whole volume per block.
+ It must be ``(T*H*W + OUT_SLACK_ROWS, C)`` contiguous bf16: the kernel stores
+ out-of-range lanes of partial tiles past the volume. It must not alias ``x`` --
+ the kernel reads neighborhoods of ``x`` while writing, so in-place is not safe.
+ """
+ if not block_fna_available(x.device.index or 0):
+ raise RuntimeError(UNSUPPORTED_MESSAGE)
+ if x.shape[0] != 1 or stage4.shape[0] != 1:
+ raise ValueError("B=1 only")
+ x_ = x[0].detach().to(dtype=torch.bfloat16)
+ ctx_ = stage4[0].detach().to(dtype=torch.bfloat16)
+ T, H, W, C = map(int, x_.shape)
+ T_lo, H_lo, W_lo, Ctx = map(int, ctx_.shape)
+ Hidd = int(w_gate.shape[0])
+ tile = tile_thw or default_tile_thw(kernel_size)
+ subpixels = upsample_stride[0] * upsample_stride[1] * upsample_stride[2]
+ drop = 1 if (drop_leading_frame and upsample_stride[0] == 2) else 0
+ if (T + drop, H, W) != tuple(lo * p for lo, p in zip((T_lo, H_lo, W_lo), upsample_stride, strict=True)):
+ raise ValueError(
+ f"stage4 {(T_lo, H_lo, W_lo)} at stride {upsample_stride} does not shuffle out to "
+ f"x {(T, H, W)} (drop_leading_frame={drop_leading_frame})"
+ )
+ if tuple(w_ctx.shape) != (subpixels * C, Ctx) or int(b_ctx.numel()) != subpixels * C:
+ raise ValueError(
+ f"fused context weights must be {(subpixels * C, Ctx)} / {(subpixels * C,)} -- see "
+ f"pack_fused_ctx_weights -- got {tuple(w_ctx.shape)} / {tuple(b_ctx.shape)}"
+ )
+ if not fna_supported(
+ C=C,
+ Ctx=Ctx,
+ Hidd=Hidd,
+ num_heads=num_heads,
+ kernel_size=kernel_size,
+ T=T,
+ H=H,
+ W=W,
+ tile_thw=tile,
+ upsample_stride=upsample_stride,
+ ):
+ raise ValueError(f"fused NA block unsupported: C={C} Ctx={Ctx} Hidd={Hidd} shape={(T, H, W)}")
+
+ grid = tuple(-(-v // t) for v, t in zip((T, H, W), tile, strict=True))
+ n_ctas = cta_count(grid[0] * grid[1] * grid[2], x_.device)
+ plan = _choose_slab(grid, tile, kernel_size, (T, H, W), n_ctas)
+
+ # M extra rows absorb the stores of out-of-range lanes in partial tiles -- which is
+ # why a caller-supplied ``out`` has to carry the same slack.
+ y_rows = T * H * W + OUT_SLACK_ROWS
+ y_buf = (
+ torch.empty((y_rows, C), device=x_.device, dtype=torch.bfloat16)
+ if out is None
+ else _check_out(out, y_rows, C, x_)
+ )
+ hd = C // num_heads
+ # One cache buffer, K's heads then V's. The per-head stride is the slab box this
+ # call actually chose, not ``MAXP_TOKENS``, so the workspace scales with the volume
+ # rather than with the compile-time bound.
+ kv_cache = torch.empty((2 * num_heads * plan.cache_row_stride, hd), device=x_.device, dtype=torch.bfloat16)
+ # The cache fill's RMSNorm factor per box token; M extra entries absorb
+ # out-of-range lanes.
+ norm_cache = torch.empty(plan.cache_row_stride + M, device=x_.device, dtype=torch.float32)
+ barrier = torch.zeros(2, device=x_.device, dtype=torch.int32)
+
+ def f32(t: torch.Tensor):
+ return _dyn(t.detach().contiguous().float().to(device=x_.device).view(-1))
+
+ def bf(t: torch.Tensor):
+ return _dyn_w(t.detach().contiguous().to(device=x_.device, dtype=torch.bfloat16))
+
+ channel_params = _pack_channel_params(
+ norm1_weight,
+ norm2_weight,
+ q_norm_weight,
+ k_norm_weight,
+ scale_msa,
+ shift_msa,
+ scale_mlp,
+ shift_mlp,
+ b_ctx,
+ b_o,
+ b_q,
+ b_k,
+ b_v,
+ softmax_bound,
+ C,
+ hd,
+ subpixels,
+ attn_scale,
+ x_.device,
+ )
+
+ compiled = _compile(
+ C=C,
+ Ctx=Ctx,
+ upsample_stride=tuple(upsample_stride),
+ Hidd=Hidd,
+ num_heads=num_heads,
+ rope_dim_split=rope_dim_split,
+ kernel_size=kernel_size,
+ tile_thw=tile,
+ )
+ compiled(
+ _dyn_act(_as_rows(x_)),
+ _dyn_act(_as_rows(ctx_)),
+ _dyn_act(y_buf),
+ _dyn_act(kv_cache),
+ _dyn(norm_cache),
+ _dyn(barrier),
+ bf(w_ctx),
+ bf(w_q),
+ bf(_pack_kv(w_k, w_v, num_heads)),
+ bf(w_o),
+ bf(w_gate),
+ bf(w_up),
+ bf(w_down),
+ _dyn(channel_params),
+ f32(inv_t),
+ f32(inv_h),
+ f32(inv_w),
+ *_runtime_scalars(volume=(T, H, W), ctx_volume=(T_lo, H_lo, W_lo), drop_leading=drop, n_ctas=n_ctas, plan=plan),
+ )
+ return y_buf[: T * H * W].view(T, H, W, C).unsqueeze(0).to(dtype=x.dtype)
+
+
+def block_fna_available(device_index: int = 0) -> bool:
+ """Whether this GPU can run the fused block at all (datacenter Blackwell)."""
+ return gpu_supports_dsl_kernels(device_index)
+
+
+def fna_supported(
+ *,
+ C: int,
+ Ctx: int,
+ Hidd: int,
+ num_heads: int,
+ kernel_size: "tuple[int, int, int]",
+ T: int,
+ H: int,
+ W: int,
+ tile_thw: "tuple[int, int, int] | None" = None,
+ upsample_stride: "tuple[int, int, int]" = (1, 1, 1),
+) -> bool:
+ """Whether this block shape and volume are served by the fused kernel."""
+ if C not in SUPPORTED_CHANNELS or C % TILE_N != 0 or Hidd % TILE_N != 0:
+ return False
+ # The fused-context reduction splits a stage-4 row across ``s_a`` and ``s_q``, one
+ # C-wide group each, so stage-4 may be one or two C-wide groups and no more.
+ if Ctx not in (C, 2 * C):
+ return False
+ if num_heads * HD != C:
+ return False
+ tt, th, tw = tile_thw or default_tile_thw(kernel_size)
+ # A slab box is at least one query tile, and the fill walks it one stage-4 cell per
+ # lane -- so a tile has to hold at least one whole cell on every axis.
+ if any(t % p for t, p in zip((tt, th, tw), upsample_stride, strict=True)):
+ return False
+ kt, kh, kw = kernel_size
+ return tt + kt - 1 <= T and th + kh - 1 <= H and tw + kw - 1 <= W
+
+
+# --------------------------------------------------------------------------
+# Launch and compile
+# --------------------------------------------------------------------------
+
+
+def _launch(
+ x,
+ stage4,
+ y,
+ kv_cache,
+ norm_cache,
+ barrier,
+ w_ctx,
+ w_q,
+ w_kv,
+ w_o,
+ w_gate,
+ w_up,
+ w_down,
+ channel_params,
+ inv_t,
+ inv_h,
+ inv_w,
+ T,
+ H,
+ W,
+ T_lo,
+ H_lo,
+ W_lo,
+ drop_leading,
+ n_ctas,
+ slab_count,
+ slab_grid_hw,
+ slab_grid_w,
+ slab_tiles_t,
+ slab_tiles_h,
+ slab_tiles_w,
+ max_box_t,
+ max_box_h,
+ max_box_w,
+ cache_row_stride,
+ C: cutlass.Constexpr,
+ Ctx: cutlass.Constexpr,
+ SP_T: cutlass.Constexpr,
+ SP_H: cutlass.Constexpr,
+ SP_W: cutlass.Constexpr,
+ Hidd: cutlass.Constexpr,
+ NH: cutlass.Constexpr,
+ ROPE_T: cutlass.Constexpr,
+ ROPE_H: cutlass.Constexpr,
+ ROPE_W: cutlass.Constexpr,
+ KT: cutlass.Constexpr,
+ KH: cutlass.Constexpr,
+ KW: cutlass.Constexpr,
+ TT: cutlass.Constexpr,
+ TH: cutlass.Constexpr,
+ TW: cutlass.Constexpr,
+ PT: cutlass.Constexpr,
+ PH: cutlass.Constexpr,
+ PW: cutlass.Constexpr,
+ NKV: cutlass.Constexpr,
+ BT: cutlass.Constexpr,
+ BH: cutlass.Constexpr,
+ BW: cutlass.Constexpr,
+):
+ mma128 = cute.make_tiled_mma(_mma_op("n128"))
+ mma64 = cute.make_tiled_mma(_mma_op("pv"))
+ # sA spans the full C-wide activation (2 K-stages per M channels); every weight
+ # and probability operand is one 128-wide slice, so SMEM is flat in C.
+ a_layout = sm100_utils.make_smem_layout_a(mma128, TILER_N128, IO, C // TILE_K)
+ b_layout = sm100_utils.make_smem_layout_b(mma128, TILER_N128, IO, 2)
+ # K and V are double-buffered inside the attention pipeline: 2 buffers of one
+ # 128-key K stage and of two 64-key V stages. P stays single-buffered -- the step
+ # waits for the previous P@V before overwriting it, and that wait is needed anyway
+ # to free the V buffer.
+ p_layout = sm100_utils.make_smem_layout_a(mma64, TILER_N64, IO, 2)
+ q_layout = sm100_utils.make_smem_layout_a(mma128, TILER_N128, IO, NH)
+ k_layout = sm100_utils.make_smem_layout_b(mma128, TILER_N128, IO, 2)
+ v_layout = sm100_utils.make_smem_layout_b(mma64, TILER_N64, IO, 4)
+
+ # One TMA atom per weight; ``local_tile`` inside ``gemm_tma`` picks the N-tile and
+ # K-tile, so one atom serves every call site for that weight.
+ tma_op = cpasync.CopyBulkTensorTileG2SOp(tcgen05.CtaGroup.ONE)
+ b1 = cute.select(b_layout, mode=[0, 1, 2])
+
+ def _atom128(w):
+ return cute.nvgpu.make_tiled_tma_atom_B(tma_op, w, b1, TILER_N128, mma128)
+
+ a_ctx, m_ctx = _atom128(w_ctx)
+ a_o, m_o = _atom128(w_o)
+ a_gate, m_gate = _atom128(w_gate)
+ a_up, m_up = _atom128(w_up)
+ a_down, m_down = _atom128(w_down)
+ a_q, m_q = _atom128(w_q)
+ a_kv, m_kv = _atom128(w_kv)
+
+ _fna_kernel(
+ x,
+ stage4,
+ y,
+ kv_cache,
+ norm_cache,
+ barrier,
+ a_ctx,
+ m_ctx,
+ a_q,
+ m_q,
+ a_kv,
+ m_kv,
+ a_o,
+ m_o,
+ a_gate,
+ m_gate,
+ a_up,
+ m_up,
+ a_down,
+ m_down,
+ channel_params,
+ inv_t,
+ inv_h,
+ inv_w,
+ T,
+ H,
+ W,
+ T_lo,
+ H_lo,
+ W_lo,
+ drop_leading,
+ n_ctas,
+ slab_count,
+ slab_grid_hw,
+ slab_grid_w,
+ slab_tiles_t,
+ slab_tiles_h,
+ slab_tiles_w,
+ max_box_t,
+ max_box_h,
+ max_box_w,
+ cache_row_stride,
+ C,
+ Ctx,
+ SP_T,
+ SP_H,
+ SP_W,
+ Hidd,
+ NH,
+ ROPE_T,
+ ROPE_H,
+ ROPE_W,
+ KT,
+ KH,
+ KW,
+ TT,
+ TH,
+ TW,
+ PT,
+ PH,
+ PW,
+ NKV,
+ BT,
+ BH,
+ BW,
+ mma128,
+ mma64,
+ a_layout,
+ b_layout,
+ p_layout,
+ q_layout,
+ k_layout,
+ v_layout,
+ ).launch(grid=[n_ctas, 1, 1], block=[THREADS, 1, 1])
+
+
+def _compile(
+ *,
+ C: int,
+ Hidd: int,
+ num_heads: int,
+ rope_dim_split: "tuple[int, int, int]",
+ kernel_size: "tuple[int, int, int]",
+ tile_thw: "tuple[int, int, int]",
+ Ctx: int | None = None,
+ upsample_stride: "tuple[int, int, int]" = (1, 1, 1),
+):
+ Ctx = C if Ctx is None else Ctx
+ key = (C, Ctx, upsample_stride, Hidd, num_heads, rope_dim_split, tile_thw, kernel_size, MAXP_TOKENS, SLAB_BOX_MAX)
+ if key in _COMPILED:
+ return _COMPILED[key]
+ kt, kh, kw = kernel_size
+ tt, th, tw = tile_thw
+ panel = (tt + kt - 1, th + kh - 1, tw + kw - 1)
+ # The per-KV-tile window mask packs each key's panel-local (dt, dh, dw) into 5-bit
+ # fields of one int32, so the panel may not exceed 32 along any axis.
+ if max(panel) > 32:
+ raise ValueError(f"halo panel {panel} exceeds the packed-offset limit of 32")
+ # Halo-box bounds are compile-time, so the rope tables are fixed-size; the box's
+ # actual extents come from ``_choose_slab`` at runtime, which is what keeps T/H/W
+ # dynamic. A one-tile slab is the floor, so the panel itself has to fit.
+ if any(p > b for p, b in zip(panel, SLAB_BOX_MAX, strict=True)) or panel[0] * panel[1] * panel[2] > MAXP_TOKENS:
+ raise ValueError(f"halo panel {panel} exceeds the slab box bound {SLAB_BOX_MAX}")
+ hd = C // num_heads
+ subpixels = upsample_stride[0] * upsample_stride[1] * upsample_stride[2]
+ dev = torch.device("cuda")
+
+ def act(a: int, b: int):
+ return _dyn_act(torch.zeros(a, b, device=dev, dtype=torch.bfloat16))
+
+ def weight(a: int, b: int):
+ return _dyn_w(torch.zeros(a, b, device=dev, dtype=torch.bfloat16))
+
+ def vec(n: int):
+ return _dyn(torch.zeros(n, device=dev, dtype=torch.float32))
+
+ # Shapes here only have to be *typed* right: every extent the kernel reads is a
+ # runtime argument, so the stand-ins can be as small as their layouts allow.
+ trace_plan = _SlabPlan(core=(1, 1, 1), box=(1, 1, 1), grid=(1, 1, 1))
+
+ # Pass-through for CuTe DSL compiler flags, e.g. --keep-sass / --ptxas-options=-v.
+ opts = os.environ.get("CUTE_DSL_OPTS")
+ _COMPILED[key] = cute.compile(
+ _launch,
+ act(M, C), # x
+ act(M, Ctx), # stage4
+ act(M, C), # y
+ act(2 * num_heads * M, hd), # kv_cache -- its head stride is a runtime argument
+ vec(2 * M), # norm_cache
+ _dyn(torch.zeros(2, device=dev, dtype=torch.int32)), # barrier
+ weight(subpixels * C, Ctx), # w_ctx -- the fused upsample x context_proj
+ weight(C, C), # w_q
+ weight(2 * C, C), # w_kv
+ weight(C, C), # w_o
+ weight(Hidd, C), # w_gate
+ weight(Hidd, C), # w_up
+ weight(C, Hidd), # w_down
+ vec(_channel_param_offsets(C, hd, subpixels)["total"]), # channel_params
+ vec(max(rope_dim_split[0] // 2, 1)), # inv_t
+ vec(max(rope_dim_split[1] // 2, 1)), # inv_h
+ vec(max(rope_dim_split[2] // 2, 1)), # inv_w
+ *_runtime_scalars(volume=(4, 4, 4), ctx_volume=(4, 4, 4), drop_leading=0, n_ctas=1, plan=trace_plan),
+ *_static_shape(
+ C=C,
+ Ctx=Ctx,
+ upsample_stride=upsample_stride,
+ Hidd=Hidd,
+ num_heads=num_heads,
+ rope_dim_split=rope_dim_split,
+ kernel_size=kernel_size,
+ tile_thw=tile_thw,
+ ),
+ **({"options": opts} if opts else {}),
+ )
+ return _COMPILED[key]
+
+
+def _runtime_scalars(
+ *,
+ volume: "tuple[int, int, int]",
+ ctx_volume: "tuple[int, int, int]",
+ drop_leading: int,
+ n_ctas: int,
+ plan: _SlabPlan,
+) -> tuple:
+ """The kernel's runtime scalar arguments, in signature order.
+ Both :func:`_compile`'s trace call and the real call site build their argument
+ list from here, so the order is written once.
+ """
+ return (
+ *volume,
+ *ctx_volume,
+ drop_leading,
+ n_ctas,
+ plan.count,
+ plan.grid[1] * plan.grid[2],
+ plan.grid[2],
+ *plan.core,
+ *plan.box,
+ plan.cache_row_stride,
+ )
+
+
+def _static_shape(
+ *,
+ C: int,
+ Ctx: int,
+ upsample_stride: "tuple[int, int, int]",
+ Hidd: int,
+ num_heads: int,
+ rope_dim_split: "tuple[int, int, int]",
+ kernel_size: "tuple[int, int, int]",
+ tile_thw: "tuple[int, int, int]",
+) -> tuple:
+ """The kernel's compile-time arguments, in signature order."""
+ kt, kh, kw = kernel_size
+ tt, th, tw = tile_thw
+ panel = (tt + kt - 1, th + kh - 1, tw + kw - 1)
+ n_kv = (panel[0] * panel[1] * panel[2] + TILE_N - 1) // TILE_N
+ return (
+ C,
+ Ctx,
+ *upsample_stride,
+ Hidd,
+ num_heads,
+ *rope_dim_split,
+ kt,
+ kh,
+ kw,
+ tt,
+ th,
+ tw,
+ *panel,
+ n_kv,
+ *SLAB_BOX_MAX,
+ )
+
+
+def _pack_kv(w_k: torch.Tensor, w_v: torch.Tensor, num_heads: int) -> torch.Tensor:
+ """Interleave the K and V projections head by head into one ``(2C, C)`` weight.
+ N-tile ``h`` of the result is ``[k_head_h | v_head_h]``, so a single N=128 GEMM
+ yields both of a head's operands from one pass over the activation -- half the
+ weight-streaming GEMM calls of the two N=64 projections it replaces.
+ """
+ c = w_k.shape[1]
+ kv = torch.stack([w_k.view(num_heads, -1, c), w_v.view(num_heads, -1, c)], dim=1)
+ return kv.reshape(2 * w_k.shape[0], c)
+
+
+# --------------------------------------------------------------------------
+# Choosing the slab
+# --------------------------------------------------------------------------
+
+
[email protected]_cache(maxsize=256)
+def _choose_slab(
+ grid: "tuple[int, int, int]",
+ tile: "tuple[int, int, int]",
+ kernel: "tuple[int, int, int]",
+ vol: "tuple[int, int, int]",
+ n_ctas: int,
+) -> _SlabPlan:
+ """Pick the slab extent that minimises total time for this volume and grid.
+ The tile loop costs ``sum_slabs ceil(tiles_in_slab / n_ctas)`` waves -- every CTA a
+ slab cannot fill sits at the grid barrier for a whole tile -- and the cache fill
+ re-projects the halo box once per slab. Both are exact counts, so this is a search
+ rather than a heuristic; the only fitted number is their relative weight, and a
+ cache-fill M-tile wave measures ~3% of a query-tile wave.
+ """
+ fill_weight = 0.03
+ best, best_cost = None, float("inf")
+ for st in range(1, grid[0] + 1):
+ box_t = min(vol[0], st * tile[0] + kernel[0] - 1)
+ if box_t > SLAB_BOX_MAX[0]:
+ continue
+ for sh in range(1, grid[1] + 1):
+ box_h = min(vol[1], sh * tile[1] + kernel[1] - 1)
+ if box_h > SLAB_BOX_MAX[1]:
+ continue
+ for sw in range(1, grid[2] + 1):
+ box_w = min(vol[2], sw * tile[2] + kernel[2] - 1)
+ if box_w > SLAB_BOX_MAX[2] or box_t * box_h * box_w > MAXP_TOKENS:
+ continue
+ waves = 0
+ for a, na in _axis_slabs(grid[0], st):
+ for b, nb in _axis_slabs(grid[1], sh):
+ for c, nc in _axis_slabs(grid[2], sw):
+ waves += na * nb * nc * -(-(a * b * c) // n_ctas)
+ fill_waves = 0
+ for xa in _axis_boxes(grid[0], st, tile[0], kernel[0], vol[0]):
+ for xb in _axis_boxes(grid[1], sh, tile[1], kernel[1], vol[1]):
+ for xc in _axis_boxes(grid[2], sw, tile[2], kernel[2], vol[2]):
+ fill_waves += -(-(xa * xb * xc) // (M * n_ctas))
+ cost = waves + fill_weight * fill_waves
+ if cost < best_cost:
+ best_cost, best = cost, ((st, sh, sw), (box_t, box_h, box_w))
+ assert best is not None, f"no slab fits MAXP={MAXP_TOKENS} for grid={grid} tile={tile}"
+ (st, sh, sw), box = best
+ return _SlabPlan(
+ core=(st, sh, sw),
+ box=box,
+ grid=(-(-grid[0] // st), -(-grid[1] // sh), -(-grid[2] // sw)),
+ )
+
+
+def _axis_slabs(grid: int, s: int) -> "tuple[tuple[int, int], ...]":
+ """``(tiles_in_slab, how_many_slabs)`` when ``grid`` tiles are cut into runs of ``s``."""
+ full, rem = divmod(grid, s)
+ out = ((s, full),) if full else ()
+ return out + (((rem, 1),) if rem else ())
+
+
+def _axis_boxes(grid: int, s: int, tile: int, k: int, vol: int) -> "list[int]":
+ """Halo extent of each slab along one axis.
+ The kernel grows each slab's *own* core by the NA radius rather than using the
+ largest slab's box, so a slab cut short by the volume edge projects less. The
+ cache fill's cost is the sum of these, which is what the search below minimises.
+ """
+ out, pos = [], 0
+ for i in range(-(-grid // s)):
+ ext = min(min(s, grid - i * s) * tile, vol - pos)
+ out.append(min(vol, max(ext, tile) + k - 1))
+ pos += s * tile
+ return out
diff --git a/packages/ltx-kernels/src/ltx_kernels/vae/fna_attn_core.py b/packages/ltx-kernels/src/ltx_kernels/vae/fna_attn_core.py
new file mode 100644
index 0000000..e016194
--- /dev/null
+++ b/packages/ltx-kernels/src/ltx_kernels/vae/fna_attn_core.py
@@ -0,0 +1,531 @@
+"""Primitives shared by the DiffVAE CuTe DSL kernels, plus the attention half itself.
+``block_fna_dsl`` (the fused ``DiffusionNABlock``) and ``na_attn_dsl`` (standalone
+neighborhood attention) are separate kernels -- their prologues and epilogues have
+nothing in common -- but they share every operand fill, the TMEM plumbing, the MMA
+wrappers, the RoPE tables and, in :func:`attention_tile`, the windowed-NA loop. One
+copy of the mask, the software pipeline and the softmax, so the two cannot drift.
+This module holds host helpers, RoPE, CTA barriers, and the attention half
+(:func:`attention_tile`). Constants: :mod:`ltx_kernels.vae.fna_types`. SMEM operand
+fills: :mod:`ltx_kernels.vae.fna_smem`. TMEM / TMA-UMMA GEMM:
+:mod:`ltx_kernels.vae.fna_gemm`. The coordinate arithmetic both kernels share is
+:mod:`ltx_kernels.vae.fna_geometry`, which this imports and which imports nothing from
+here -- worth reading first, since it defines the box vocabulary (volume / slab core /
+slab box / query tile / halo panel / NA window) the comments below use.
+Datacenter Blackwell only: everything here is built on ``tcgen05`` UMMA and Tensor
+Memory. Several DSL constraints shape the code in non-obvious ways; each is noted at
+the helper it constrains.
+"""
+
+# NOTE: no `from __future__ import annotations` -- cute.struct needs real types.
+
+import cutlass
+import cutlass.cute as cute
+import torch
+from cutlass.cute.nvgpu import tcgen05
+from cutlass.cute.runtime import from_dlpack
+
+from ltx_kernels.vae.fna_gemm import _mma_issue, _tmem_load, _tmem_store
+from ltx_kernels.vae.fna_geometry import at_most, flatten_3d, unflatten_3d
+from ltx_kernels.vae.fna_smem import (
+ _fill_a_chunk,
+ _load_head_row,
+ _publish_smem,
+ _store_k_row,
+ _store_v_row,
+)
+from ltx_kernels.vae.fna_types import (
+ ACC,
+ ACC_COLS,
+ HD,
+ HEAD_COLS,
+ LOG2E,
+ NUM_WARPGROUPS,
+ THREADS,
+ WARPGROUPS_PER_HEAD,
+ M,
+)
+
+
+def default_tile_thw(kernel_size: "tuple[int, int, int]") -> "tuple[int, int, int]":
+ """Pick the ``M``-token query box minimising halo-panel tokens per query."""
+ kt, kh, kw = kernel_size
+ best, best_panel = (2, 8, 8), 1 << 60
+ for tt in (1, 2, 4, 8, 16):
+ for th in (2, 4, 8, 16, 32):
+ if M % (tt * th) != 0:
+ continue
+ tw = M // (tt * th)
+ if tw < 1 or tw > 32:
+ continue
+ panel = (tt + kt - 1) * (th + kh - 1) * (tw + kw - 1)
+ if panel < best_panel:
+ best, best_panel = (tt, th, tw), panel
+ return best
+
+
+def cta_count(n_tiles: int, device: torch.device) -> int:
+ """Persistent grid size: one CTA per SM, capped by the work available.
+ ``block_fna_dsl``'s device-wide barrier requires every CTA to be resident, so the
+ grid may never exceed the SM count.
+ """
+ sm = torch.cuda.get_device_properties(device).multi_processor_count
+ return int(max(1, min(n_tiles, sm)))
+
+
+def _dyn(t: torch.Tensor):
+ return from_dlpack(t).mark_layout_dynamic()
+
+
+def _dyn_act(t: torch.Tensor):
+ """An activation tensor whose rows the cooperative copies read 16B at a time."""
+ return from_dlpack(t, assumed_align=16).mark_layout_dynamic()
+
+
+def _dyn_w(t: torch.Tensor):
+ """Mark a weight matrix for TMA: contiguous K axis with known divisibility."""
+ return (
+ from_dlpack(t, assumed_align=32)
+ .mark_layout_dynamic(leading_dim=1)
+ .mark_compact_shape_dynamic(mode=1, divisibility=int(t.shape[1]))
+ )
+
+
+def _as_rows(t: torch.Tensor) -> torch.Tensor:
+ """``(T, H, W, C)`` -> ``(T*H*W, C)``, without copying where possible.
+ Only the channel axis has to be contiguous -- the kernel reads rows through the
+ layout's dynamic stride -- plus the 16B alignment the cooperative copies assume.
+ Forcing full contiguity would copy the whole volume.
+ """
+ if t.stride(-1) != 1:
+ t = t.contiguous()
+ t = t.flatten(0, 2)
+ if t.data_ptr() % 16 != 0 or (t.stride(0) * t.element_size()) % 16 != 0:
+ t = t.contiguous()
+ return t
+
+
+def panel_key_row(
+ kv_tile,
+ lane,
+ panel,
+ n_panel_keys: cutlass.Constexpr,
+ panel_hw: cutlass.Constexpr,
+ panel_w: cutlass.Constexpr,
+):
+ """K/V-source row of the key lane ``lane`` owns in KV tile ``kv_tile``.
+ A panel's keys are walked row-major, ``M`` per KV tile, so this lane's key sits at
+ flat panel offset ``kv_tile * M + lane``. Turning that into a source row takes two
+ steps: unflatten it to a panel-local ``(dt, dh, dw)``, then re-flatten the
+ *absolute* position against the extents of the box the source was filled over.
+ ``panel`` is ``(panel_t0, panel_h0, panel_w0, box_t0, box_h0, box_w0, box_h,
+ box_w)``: the halo panel's origin in the volume, plus the origin and the H/W
+ extents of that source box. The fused kernel's box is the slab box, so those are
+ its own; the standalone NA kernel reads the caller's whole-volume K/V, so its box
+ origin is zero and its extents are H and W. Same arithmetic either way.
+ Hoisted out of the KV loop because the head pipeline needs the *next* tile's row
+ one head early. A lane past the end of the panel reads a clamped row; the mask
+ discards its score.
+ """
+ panel_t0, panel_h0, panel_w0, box_t0, box_h0, box_w0, box_h, box_w = panel
+ key = at_most(kv_tile * M + lane, n_panel_keys - 1)
+ d_t, d_h, d_w = unflatten_3d(key, panel_hw, panel_w)
+ return flatten_3d(
+ panel_t0 - box_t0 + d_t,
+ panel_h0 - box_h0 + d_h,
+ panel_w0 - box_w0 + d_w,
+ box_h,
+ box_w,
+ )
+
+
+def grid_barrier(bar, tidx, n_ctas, phase):
+ """Sense-reversing device-wide barrier; every CTA must be resident.
+ ``bar[0]`` counts arrivals, ``bar[1]`` is the sense. The grid is capped at the SM
+ count (see :func:`cta_count`) so no CTA can wait for one that was never
+ scheduled.
+ """
+ cute.arch.fence_acq_rel_gpu()
+ cute.arch.sync_threads()
+ if tidx == 0:
+ old = cute.arch.atomic_add(bar.iterator, cutlass.Int32(1), sem="acq_rel", scope="gpu")
+ if old == n_ctas - 1:
+ cute.arch.atomic_exch(bar.iterator, cutlass.Int32(0), sem="release", scope="gpu")
+ cute.arch.atomic_exch(bar.iterator + 1, phase + 1, sem="release", scope="gpu")
+ else:
+ while cute.arch.atomic_add(bar.iterator + 1, cutlass.Int32(0), sem="acquire", scope="gpu") == phase:
+ pass
+ cute.arch.sync_threads()
+ cute.arch.fence_acq_rel_gpu()
+
+
+# Row reductions across the warpgroups sharing a row. Each holds a different slice of
+# the row's columns, so the RMSNorm sums have to be combined. The barrier inside means
+# these must be called by the *whole* CTA -- never from inside a ``wg == g`` arm. The
+# softmax needs no such reduction; see :func:`attention_tile`.
+
+
+def row_sum(buf, lane, wg, v):
+ """Sum ``v`` across all ``NUM_WARPGROUPS`` warpgroups holding row ``lane``."""
+ buf[lane, wg] = v
+ cute.arch.sync_threads()
+ r = buf[lane, 0]
+ for g in range(1, NUM_WARPGROUPS):
+ r = r + buf[lane, g]
+ return r
+
+
+def head_sum2(buf, lane, wg, v0, v1):
+ """Two row sums, reduced over just the ``WARPGROUPS_PER_HEAD`` warpgroups sharing a head.
+ Needed once ``NUM_WARPGROUPS > HEADS_PER_TILE``: a head's ``HD`` channels are then split across more
+ than one warpgroup, so its RMSNorm sum -- and the ``||q||`` the fixed softmax
+ offset is built from -- stop being warpgroup-local. Both sums ride one barrier.
+ At ``WARPGROUPS_PER_HEAD == 1`` this is the identity plus a barrier, and the barrier is
+ load-bearing even there: it splits a live range that otherwise spills.
+ """
+ buf[lane, wg, 0] = v0
+ buf[lane, wg, 1] = v1
+ cute.arch.sync_threads()
+ base = (wg // WARPGROUPS_PER_HEAD) * WARPGROUPS_PER_HEAD
+ r0 = buf[lane, base, 0]
+ r1 = buf[lane, base, 1]
+ for j in range(1, WARPGROUPS_PER_HEAD):
+ r0 = r0 + buf[lane, base + j, 0]
+ r1 = r1 + buf[lane, base + j, 1]
+ return r0, r1
+
+
+def apply_rope(reg, d_t, d_h, d_w, tbl, li_t, li_h, li_w, c0: int = 0, n: int = HD):
+ """In-place absolute 3D RoPE on ``reg``, from the SMEM tables.
+ ``li_*`` are positions relative to the origin the tables were built at.
+ ``reg[e]`` holds head channel ``c0 + e``, so a warpgroup owning only part of a
+ head rotates only the pairs landing in its range -- legal because ``c0``, every
+ axis base and every range are even, so no ``(2rp, 2rp+1)`` pair straddles the
+ boundary.
+ """
+ (ct, st_, ch, sh, cw, sw) = tbl
+ for base, dim, cos_t, sin_t, li in (
+ (0, d_t, ct, st_, li_t),
+ (d_t, d_h, ch, sh, li_h),
+ (d_t + d_h, d_w, cw, sw, li_w),
+ ):
+ for rp in range(dim // 2):
+ c = base + 2 * rp
+ if c < c0 or c + 1 >= c0 + n:
+ continue
+ ca = cos_t[li, rp]
+ sa = sin_t[li, rp]
+ e = reg[c - c0]
+ o = reg[c - c0 + 1]
+ reg[c - c0] = e * ca - o * sa
+ reg[c - c0 + 1] = e * sa + o * ca
+
+
+def fill_rope_axis(cos_t, sin_t, tidx, origin, span, half: cutlass.Constexpr, inv):
+ """Cooperatively tabulate cos/sin for one axis over ``span`` positions."""
+ i = tidx
+ while i < span * half:
+ pos = i // half
+ rp = i - pos * half
+ ang = ACC(origin + pos) * inv[rp]
+ cos_t[pos, rp] = cute.cos(ang)
+ sin_t[pos, rp] = cute.sin(ang)
+ i += THREADS
+
+
+# --------------------------------------------------------------------------
+# The attention half. Both kernels call exactly this code, so there is one place
+# where the window mask, the software pipeline and the softmax live.
+# They differ only in where K and V come from:
+# fused the cache fill projects the slab box into one fused K|V cache, so both
+# sources are that cache, the head stride is the box and a panel row is one
+# cache row (``KVRM = 1``).
+# NA K and V are the caller's own ``(T*H*W*NH, HD)`` tensors, so the sources
+# are two tensors, consecutive heads are one row apart and a panel row is
+# ``NH`` rows (``KVRM = NH``).
+# Both are the same affine map, ``base + nh * hstride + panel_row * KVRM``, in units
+# of ``HD``-wide rows. ``KVRM`` is compile-time so the fused path's ``* 1`` folds away
+# and its addressing is unchanged.
+# --------------------------------------------------------------------------
+
+
+def attention_tile(
+ frags,
+ smem,
+ acc_qk,
+ acc_o,
+ bars,
+ m_sm,
+ l_sm,
+ areg,
+ kvfrag,
+ kv_src,
+ kv_base,
+ kv_hstride,
+ panel,
+ window,
+ ids,
+ NHG: cutlass.Constexpr,
+ KVRM: cutlass.Constexpr,
+ PT: cutlass.Constexpr,
+ PH: cutlass.Constexpr,
+ PW: cutlass.Constexpr,
+ kt: cutlass.Constexpr,
+ kh: cutlass.Constexpr,
+ kw: cutlass.Constexpr,
+ NKV: cutlass.Constexpr,
+):
+ """Windowed NA over one query tile's halo panel, for ``NHG`` heads.
+ Args:
+ frags: ``(frQ, frK, frP, frV)`` -- the four MMA operand fragments.
+ smem: ``(sK, sV, sP)`` -- K and V double-buffered, P single.
+ acc_qk: two TMEM Q@K accumulators; the pipeline alternates between them.
+ acc_o: ``NHG`` TMEM attention-output accumulators, live for the whole loop.
+ bars: ``(qkbar, pvbar)`` MMA completion barriers, re-initialised per tile.
+ m_sm: ``[lane, nh]`` fixed softmax offsets, from the caller's ``||q||`` pass.
+ l_sm: ``[lane, wg, nh]`` softmax denominators, accumulated per warpgroup.
+ areg: register scratch for one warpgroup's score row.
+ kvfrag: register scratch for one K or V row.
+ kv_src: ``(k_src, v_src)``; the fused kernel passes its cache twice.
+ kv_base: ``(k_base, v_base)`` -- head 0's first row in each source.
+ kv_hstride: rows between consecutive heads, in ``HD``-wide rows.
+ panel: ``(t_s, h_s, w_s, pt0, ph0, pw0, bh2, bw2)`` -- the tile's halo panel
+ origin, the source box's origin, and that box's H and W extents.
+ window: ``(lt0, lh0, lw0)`` -- this query's clamped NA window, panel-relative.
+ ids: ``(tidx, lane, wg, warp_i)``.
+ NHG: heads processed per call; must be even (the pipeline's buffer parity).
+ KVRM: rows between consecutive panel positions in the K/V source.
+ PT, PH, PW: halo panel extents.
+ kt, kh, kw: NA window extents.
+ NKV: KV tiles spanning the panel, ``ceil(PT*PH*PW / M)``.
+ On return ``acc_o[nh]`` holds the unnormalised attention output and
+ ``l_sm[lane, wg, nh]`` this warpgroup's share of the denominator;
+ :func:`attn_epilogue` divides them.
+ A two-deep software pipeline over the ``NKV * NHG`` steps. Step ``s`` waits only
+ for *its own* Q@K, issued a whole step earlier, and before returning it issues
+ P@V(s) and Q@K(s+1) and stages step s+1's K/V row into the other SMEM buffer. So
+ a step's source read, its P@V and the next step's Q@K all run underneath the
+ current softmax, and only the softmax is on the critical path. Both buffer
+ indices are ``nh % 2``, compile-time because ``NHG`` is even, which keeps every
+ SMEM slice statically aligned and every barrier phase constant.
+ K and V are staged by warpgroups 0 and 1 respectively -- two arms of the same
+ ``wg`` test, which costs nothing (the arms already diverge at the store, K being
+ K-major and V MN-major) and lets the NA caller pass its own two tensors. A
+ *device-value* ``if`` cannot select a tensor: ``v if wg == 1 else k`` fails in the
+ NVVM backend, not the frontend.
+ """
+ frQ, frK, frP, frV = frags
+ sK, sV, sP = smem
+ qkbar, pvbar = bars
+ k_src, v_src = kv_src
+ k_base, v_base = kv_base
+ lt0, lh0, lw0 = window
+ _tidx, lane, wg, warp_i = ids
+
+ N_KEYS = PT * PH * PW # keys in the halo panel
+ PANEL_HW = PH * PW
+ NBW = ACC_COLS // 32 # mask words covering one warpgroup's score columns
+ RPW = 31 // PW + 2 # panel dw-rows a 32-key mask word can touch
+
+ # Re-initialised per query tile: each barrier then sees exactly ``2 * NKV`` waits
+ # in the loop (plus one after it for barrier 0, which retires the pipeline's
+ # trailing Q@K), so the phase a given ``nh`` waits on never depends on ``kv``.
+ if warp_i == 0:
+ with cute.arch.elect_one():
+ cute.arch.mbarrier_init(qkbar.iterator, 1)
+ cute.arch.mbarrier_init(qkbar.iterator + 1, 1)
+ cute.arch.mbarrier_init(pvbar.iterator, 1)
+ cute.arch.mbarrier_init_fence()
+ cute.arch.sync_threads()
+
+ key_row = panel_key_row(0, lane, panel, N_KEYS, PANEL_HW, PW)
+ # Prologue: fill buffer 0 with step (0, 0), leave step (0, 1) in registers, and
+ # put Q@K(0, 0) in flight.
+ if wg == 0:
+ _load_head_row(k_src, k_base + key_row * KVRM, kvfrag)
+ _store_k_row(kvfrag, sK, lane, 0)
+ _load_head_row(k_src, k_base + kv_hstride + key_row * KVRM, kvfrag)
+ elif wg == 1:
+ _load_head_row(v_src, v_base + key_row * KVRM, kvfrag)
+ _store_v_row(kvfrag, sV, lane, 0)
+ _load_head_row(v_src, v_base + kv_hstride + key_row * KVRM, kvfrag)
+ _publish_smem()
+ _mma_issue("n128", frQ, frK, acc_qk[0], 1, 0, 0, False, qkbar.iterator)
+ # Prime the P@V barrier: step 0's V store has nothing to wait for, but it still
+ # consumes a phase, so the pipeline owes it an arrival.
+ if warp_i == 0:
+ with cute.arch.elect_one():
+ tcgen05.commit(pvbar.iterator)
+
+ kv = 0
+ while kv < NKV:
+ # Mask for this KV tile: one bit per key, shared by all heads, built per panel
+ # *row* rather than per key. The tile's ``M`` keys are a contiguous run of the
+ # panel's flattened (dt, dh, dw), so each 32-bit word spans at most ``RPW``
+ # dw-rows; every row contributes the same ``kw``-wide run of bits, shifted to
+ # wherever that row starts in the word, and only when its (dt, dh) is inside
+ # this query's window. Three rows per word against 32 keys per word. Only the
+ # words covering this warpgroup's score columns are built.
+ wrun = cutlass.Int32((1 << kw) - 1) << lw0
+ mask = [cutlass.Int32(0) for _ in range(NBW)]
+ for bb in cutlass.range_constexpr(NBW):
+ b = wg * NBW + bb
+ j0 = kv * M + b * 32
+ r0 = j0 // PW
+ bits = cutlass.Int32(0)
+ for u in cutlass.range_constexpr(RPW):
+ r = r0 + u
+ rdt = r // PH
+ rdh = r - rdt * PH
+ if r < PT * PH and rdt >= lt0 and rdt < lt0 + kt and rdh >= lh0 and rdh < lh0 + kh:
+ # Where this row's dw=0 sits in the word. Negative for a row that
+ # started in the previous word; past 31 for one spilling into the
+ # next. Both shifts are guarded -- a shift wider than the type is
+ # poison in the DSL's IR, not a defined zero.
+ off = r * PW - j0
+ if off >= 0:
+ if off < 32:
+ bits = bits | (wrun << off)
+ elif off > -32:
+ bits = bits | (wrun >> (0 - off))
+ mask[bb] = bits
+
+ # Whatever filled the K/V source wrote every panel token exactly once, so this
+ # is a straight gather -- no per-query projection, norm or RoPE.
+ next_key_row = panel_key_row(kv + 1, lane, panel, N_KEYS, PANEL_HW, PW)
+ for nh in cutlass.range_constexpr(NHG):
+ # Buffer this step owns, and the one the next step will own. ``kv`` is a
+ # runtime value -- the KV loop is a real device loop -- so the buffer
+ # index has to come from ``nh`` alone, which is what keeps every SMEM
+ # slice statically aligned. ``NHG`` is even, so ``nh % 2`` is the flat
+ # step's parity.
+ bf = nh % 2
+ nf = 1 - bf
+ # Wait phases. ``pvbar`` is waited once per step, so its phase is the step
+ # parity. ``qkbar[bf]`` is waited every second step, so its phase advances
+ # by ``NHG / 2`` per KV tile: a constant when that is even, one runtime
+ # AND when it is not.
+ qk_ph = (cutlass.Int32(kv) * (NHG // 2) + nh // 2) % 2
+ # Stage the *next* step's K, start the fetch two steps out, then issue the
+ # next step's Q@K -- all before touching this step's scores. That ordering
+ # is the point: Q@K(s+1) enters the MMA queue one full softmax before step
+ # s+1 waits on it, and the global load has a full step to land. Issuing it
+ # after the softmax measures within noise of no pipeline at all.
+ # sK[nf] currently holds K(s-1), whose Q@K was waited on last step, so it
+ # is free; sV[nf] is not, which is why V is staged further down, behind
+ # its own P@V barrier.
+ if wg == 0:
+ _store_k_row(kvfrag, sK, lane, nf)
+ if cutlass.const_expr(nh + 2 < NHG):
+ _load_head_row(k_src, k_base + (nh + 2) * kv_hstride + key_row * KVRM, kvfrag)
+ else:
+ _load_head_row(k_src, k_base + (nh + 2 - NHG) * kv_hstride + next_key_row * KVRM, kvfrag)
+ _publish_smem()
+ _mma_issue("n128", frQ, frK, acc_qk[nf], 1, (nh + 1) % NHG, nf, False, qkbar.iterator + nf)
+ # Now wait for *this* step's Q@K, issued one step ago.
+ cute.arch.mbarrier_wait(qkbar.iterator + bf, qk_ph)
+ # P@V(s-1) has drained, which frees both sP and the V buffer this step is
+ # about to stage into. The wait sits here rather than after the
+ # exponentials, where it would have more slack: moving it down measures
+ # worse, because the V store has to follow it and the global load that
+ # follows the store then loses a whole exp loop of latency hiding.
+ cute.arch.mbarrier_wait(pvbar.iterator, bf)
+ if wg == 1:
+ _store_v_row(kvfrag, sV, lane, 2 * nf)
+ if cutlass.const_expr(nh + 2 < NHG):
+ _load_head_row(v_src, v_base + (nh + 2) * kv_hstride + key_row * KVRM, kvfrag)
+ else:
+ _load_head_row(v_src, v_base + (nh + 2 - NHG) * kv_hstride + next_key_row * KVRM, kvfrag)
+ # Softmax over this warpgroup's ``ACC_COLS`` score columns against a *fixed*
+ # row offset (the caller put ``||q|| * max||k||`` in ``m_sm``). Nothing
+ # here crosses the warpgroup boundary: no max, no max reduction, no
+ # rescale of the O accumulator, no denominator reduction. That deletes two
+ # CTA-wide barriers and a TMEM read-modify-write from every one of the
+ # ``NKV * NHG`` steps.
+ m_new = m_sm[lane, nh]
+ # One TMEM read. The chunk index may be a runtime value here because a
+ # TMEM address is a register either way; only SMEM slices need constexpr.
+ _tmem_load(acc_qk[bf], lane, areg, wg)
+ cute.arch.fence_view_async_tmem_load()
+ # sP still has to be written for a fully masked group (P@V reads all ``M``
+ # columns), but zeroing is far cheaper than 32 exps.
+ # The group is 32 keys because **only a warp-uniform skip pays**: a warp
+ # shares ``qt``, so a group whose panel rows all sit outside the query's dt
+ # window is skipped by the whole warp. Finer groups skip more often on
+ # paper, but ``lw0`` varies across a warp's lanes, so both arms issue and
+ # only the extra tests are real -- measured 9% slower per nibble.
+ sm4 = [ACC(0.0) for _ in range(4)]
+ for hb in cutlass.range_constexpr(NBW):
+ bw = mask[hb]
+ if bw != 0:
+ for e in cutlass.range_constexpr(32):
+ # Masking the *score* rather than the exponential keeps the ex2
+ # and the running sum unconditional, so the sum splits across
+ # four accumulators too. ex2 of -1e30 underflows to +0, which
+ # is the point.
+ v = areg[hb * 32 + e] * LOG2E - m_new
+ if (bw >> e) & 1 == 0:
+ v = ACC(-1.0e30)
+ p = cute.math.exp2(v, fastmath=True)
+ areg[hb * 32 + e] = p
+ sm4[e % 4] = sm4[e % 4] + p
+ else:
+ for e in cutlass.range_constexpr(32):
+ areg[hb * 32 + e] = ACC(0.0)
+ l_sm[lane, wg, nh] = l_sm[lane, wg, nh] + ((sm4[0] + sm4[1]) + (sm4[2] + sm4[3]))
+ for g in cutlass.range_constexpr(NUM_WARPGROUPS):
+ if wg == g:
+ _fill_a_chunk(sP, lane, areg, g * ACC_COLS, ACC_COLS)
+ # Publishes sP for the P@V below and the V buffer for the next step's.
+ _publish_smem()
+ _mma_issue("pv", frP, frV, acc_o[nh], 2, 0, 2 * bf, True, pvbar.iterator)
+ key_row = next_key_row
+ kv += 1
+
+ # Retire the pipeline. P@V is the last MMA of the last step, so its barrier proves
+ # every accumulator is final -- and, being issued after it, that the trailing
+ # Q@K's commit has landed too, which is what makes re-initialising the barriers
+ # next tile safe.
+ cute.arch.mbarrier_wait(pvbar.iterator, (NKV * NHG) % 2)
+
+
+def attn_epilogue(acc_o, l_sm, oreg, sO, lane, wg, NHG: cutlass.Constexpr):
+ """Divide the attention accumulators by the denominator, into ``sO``.
+ ``sO`` is an A-operand-shaped SMEM buffer whose channel ``nh * HD + d`` is head
+ ``nh``'s output: the fused kernel hands it ``sA`` and feeds the out-projection
+ straight from it, the NA kernel hands it a buffer it then scatters to global.
+ """
+ for nh in cutlass.range_constexpr(NHG):
+ # Each warpgroup summed its own slice of every score row.
+ lden = l_sm[lane, 0, nh]
+ for g in cutlass.range_constexpr(1, NUM_WARPGROUPS):
+ lden = lden + l_sm[lane, g, nh]
+ linv = ACC(0.0)
+ if lden > ACC(0.0):
+ linv = cute.arch.rcp_approx(lden)
+ for g in cutlass.range_constexpr(NUM_WARPGROUPS):
+ if wg == g:
+ _tmem_load(acc_o[nh], lane, oreg, g, HEAD_COLS)
+ for d in cutlass.range_constexpr(HEAD_COLS):
+ oreg[d] = oreg[d] * linv
+ _fill_a_chunk(sO, lane, oreg, nh * HD + g * HEAD_COLS, HEAD_COLS)
+
+
+def attn_zero_accumulators(acc_o, l_sm, oreg, lane, wg, NHG: cutlass.Constexpr):
+ """Clear the flash-attention accumulators (they live in TMEM all loop)."""
+ for d in cutlass.range_constexpr(HEAD_COLS):
+ oreg[d] = ACC(0.0)
+ for nh in cutlass.range_constexpr(NHG):
+ for g in cutlass.range_constexpr(NUM_WARPGROUPS):
+ if wg == g:
+ _tmem_store(acc_o[nh], lane, oreg, g, HEAD_COLS)
+ l_sm[lane, wg, nh] = ACC(0.0)
+ cute.arch.fence_view_async_tmem_store()
+ cute.arch.sync_threads()
diff --git a/packages/ltx-kernels/src/ltx_kernels/vae/fna_gemm.py b/packages/ltx-kernels/src/ltx_kernels/vae/fna_gemm.py
new file mode 100644
index 0000000..bc1bdc8
--- /dev/null
+++ b/packages/ltx-kernels/src/ltx_kernels/vae/fna_gemm.py
@@ -0,0 +1,256 @@
+"""TMEM plumbing and TMA/UMMA GEMM helpers for the DiffVAE CuTe DSL kernels.
+Extracted from :mod:`ltx_kernels.vae.fna_attn_core`. Constants:
+:mod:`ltx_kernels.vae.fna_types`.
+"""
+
+# NOTE: no `from __future__ import annotations` -- cute.struct needs real types.
+
+import cutlass
+import cutlass.cute as cute
+import cutlass.pipeline as pipeline
+import cutlass.utils as cutlass_utils
+from cutlass.cute.nvgpu import cpasync, tcgen05
+
+from ltx_kernels.vae.fna_types import (
+ ACC,
+ ACC_COLS,
+ INST_N64,
+ INST_N128,
+ IO,
+ THREADS,
+ TILER_N64,
+ TILER_N128,
+ M,
+)
+
+
+class UmmaSharedStorage:
+ """Barrier storage for the TMA/UMMA pipelines :func:`gemm_tma` stands up."""
+
+ ab_mbar_ptr: cute.struct.MemRange[cutlass.Int64, 8] # ab_stages * 2
+ acc_mbar_ptr: cute.struct.MemRange[cutlass.Int64, 2] # acc_stage * 2
+ tmem_holding_buf: cutlass.Int32
+
+
+# MMA variants, by name:
+# "n128" wide linears and Q@K (N=128, B K-major)
+# "pv" P@V (N=64, B MN-major)
+_MMA_KINDS = ("n128", "pv")
+
+
+def _mma_op(kind: str):
+ """The tcgen05 MMA op for one of ``_MMA_KINDS``."""
+ inst = INST_N128 if kind == "n128" else INST_N64
+ b_major = cute.nvgpu.OperandMajorMode.MN if kind == "pv" else cute.nvgpu.OperandMajorMode.K
+ return tcgen05.MmaF16BF16Op(
+ IO,
+ ACC,
+ inst,
+ tcgen05.CtaGroup.ONE,
+ tcgen05.OperandSource.SMEM,
+ cute.nvgpu.OperandMajorMode.K,
+ b_major,
+ )
+
+
+def _mma_tiler(kind: str):
+ return TILER_N128 if kind == "n128" else TILER_N64
+
+
+def acquire_tmem(storage):
+ """Take all 512 TMEM columns; returns ``(allocator, base_pointer)``.
+ Both kernels hold the entire allocation for their whole lifetime, which is what
+ pins them to one CTA per SM and forces the multi-warpgroup split described at
+ :data:`NUM_WARPGROUPS`.
+ """
+ tmem = cutlass_utils.TmemAllocator(
+ storage.tmem_holding_buf.ptr,
+ barrier_for_retrieve=pipeline.NamedBarrier(barrier_id=2, num_threads=THREADS),
+ )
+ tmem.allocate(512)
+ tmem.wait_for_alloc()
+ return tmem, tmem.retrieve_ptr(ACC)
+
+
+def release_tmem(tmem, tmem_ptr):
+ """Hand the TMEM allocation back. The last thing either kernel does."""
+ tmem.relinquish_alloc_permit()
+ pipeline.sync(barrier_id=2)
+ tmem.free(tmem_ptr)
+
+
+def _tmem_copies(acc, lane, w=ACC_COLS):
+ """``(load, load_src, store, store_dst)`` for one TMEM accumulator.
+ ``w`` is the chunk width: a 128-wide accumulator is cut into ``NUM_WARPGROUPS`` chunks of
+ ``ACC_COLS`` and a per-head one into ``NUM_WARPGROUPS`` of ``HEAD_COLS``, so warpgroup ``g`` takes chunk
+ ``g`` of either. ``lane`` is ``tidx % M`` -- the row -- because the copy's thread
+ layout is one warpgroup wide.
+ Rebuilt at each use: this is pure layout algebra with no runtime cost, and a
+ long-lived object here would be classified as ``while``-loop state, which the DSL
+ cannot stage.
+ """
+ epi = ((cute.size(acc, mode=[0, 0]), w),)
+ tacc = cute.zipped_divide(acc, epi)
+ ld_atom = cute.make_copy_atom(tcgen05.Ld32x32bOp(tcgen05.Repetition(w)), ACC)
+ st_atom = cute.make_copy_atom(tcgen05.St32x32bOp(tcgen05.Repetition(w)), ACC)
+ ld = tcgen05.make_tmem_copy(ld_atom, tacc[None, 0])
+ st = tcgen05.make_tmem_copy(st_atom, tacc[None, 0])
+ return ld, ld.get_slice(lane).partition_S(tacc), st, st.get_slice(lane).partition_D(tacc)
+
+
+def _tmem_load(acc, lane, regs, i=0, w=ACC_COLS):
+ ld, src, _, _ = _tmem_copies(acc, lane, w)
+ cute.copy(ld, src[None, None, i], regs)
+
+
+def _tmem_store(acc, lane, regs, i=0, w=ACC_COLS):
+ """Write registers back into TMEM.
+ This is what lets the flash-attention output accumulator live in TMEM rather than
+ costing ``NH * HD`` registers per thread.
+ """
+ _, _, st, dst = _tmem_copies(acc, lane, w)
+ cute.copy(st, regs, dst[None, None, i])
+
+
+def _reg_shape(tiled_mma, acc, lane, n_cols, w=ACC_COLS):
+ """Shape every register array must use: the TMEM copy's ``partition_D``.
+ An identity tensor stands in for the destination -- it carries the layout without
+ needing real storage. A plain ``make_rmem_tensor(64, f32)`` used as a
+ ``cute.copy`` destination miscompiles instead of erroring.
+ """
+ epi = ((cute.size(acc, mode=[0, 0]), w),)
+ tacc = cute.zipped_divide(acc, epi)
+ gC = cute.zipped_divide(tiled_mma.get_slice(0).partition_C(cute.make_identity_tensor((M, n_cols))), epi)
+ atom = cute.make_copy_atom(tcgen05.Ld32x32bOp(tcgen05.Repetition(w)), ACC)
+ tcp = tcgen05.make_tmem_copy(atom, tacc[None, 0])
+ return tcp.get_slice(lane).partition_D(gC)[None, None, 0].shape
+
+
+def _mma_issue(
+ kind: cutlass.Constexpr,
+ tCrA,
+ tCrB,
+ acc,
+ n_stage: cutlass.Constexpr,
+ a_st,
+ b_st,
+ accumulate: cutlass.Constexpr,
+ mbar=None,
+):
+ """Issue one UMMA and return immediately -- the caller decides when to wait.
+ The MMA signals ``mbar`` on completion (``tcgen05.commit`` covers *every* MMA the
+ warp issued before it, so a chain needs only the last one to carry a barrier) and
+ the consumer waits a whole loop step later. Waiting inline instead pins the
+ attention loop: the CTA sits on a ~370-cycle MMA with nothing else in flight.
+ Operand correctness comes from program order: the issuing warp is an ordinary
+ warp, so a ``sync_threads`` between an SMEM fill and this call publishes the
+ operand, and a barrier *after* a wait on a later MMA proves every earlier one has
+ drained.
+ """
+ tiled_mma = cute.make_tiled_mma(_mma_op(kind))
+ tiled_mma.set(tcgen05.Field.ACCUMULATE, accumulate)
+ warp_idx = cute.arch.make_warp_uniform(cute.arch.warp_idx())
+ if warp_idx == 0:
+ for st in cutlass.range_constexpr(n_stage):
+ for kb in cutlass.range_constexpr(cute.size(tCrA, mode=[2])):
+ cute.gemm(
+ tiled_mma,
+ acc,
+ tCrA[None, None, kb, a_st + st],
+ tCrB[None, None, kb, b_st + st],
+ acc,
+ )
+ tiled_mma.set(tcgen05.Field.ACCUMULATE, True)
+ if cutlass.const_expr(mbar is not None):
+ with cute.arch.elect_one():
+ tcgen05.commit(mbar)
+
+
+def gemm_tma(
+ kind: cutlass.Constexpr,
+ storage,
+ tma_atom,
+ mB,
+ sB,
+ frA,
+ acc,
+ n_idx,
+ kt0: cutlass.Constexpr,
+ n_kt: cutlass.Constexpr,
+ a_st: cutlass.Constexpr,
+ accumulate: cutlass.Constexpr,
+ stage_bytes: cutlass.Constexpr,
+ frA2=None,
+ a_split: cutlass.Constexpr = 0,
+):
+ """One ``M=128`` GEMM with the B operand streamed in by TMA.
+ A is already in SMEM (the kernel computes it); only B is fetched. The
+ ``PipelineTmaUmma`` cycles ``sB``'s two stages, so one call covers every K-tile of
+ a C-wide (or Hidd-wide) reduction with the next tile's copy in flight during the
+ current tile's MMA.
+ ``frA2`` continues the reduction in a second A operand from K-tile ``a_split`` on, for a
+ reduction wider than one operand can hold. It is not a convenience: standing up the two
+ pipelines and waiting out the accumulator costs more than the K-tiles themselves at
+ these shapes, and two *calls* would pay that fixed cost twice. ``kt`` is compile-time,
+ so the choice folds away.
+ """
+ tiled_mma = cute.make_tiled_mma(_mma_op(kind))
+ tiler = _mma_tiler(kind)
+ warp_idx = cute.arch.make_warp_uniform(cute.arch.warp_idx())
+ if warp_idx == 0:
+ cpasync.prefetch_descriptor(tma_atom)
+
+ ab_prod, ab_cons = pipeline.PipelineTmaUmma.create(
+ num_stages=2,
+ producer_group=pipeline.CooperativeGroup(pipeline.Agent.Thread),
+ consumer_group=pipeline.CooperativeGroup(pipeline.Agent.Thread),
+ tx_count=stage_bytes,
+ barrier_storage=storage.ab_mbar_ptr.data_ptr(),
+ ).make_participants()
+ acc_prod, acc_cons = pipeline.PipelineUmmaAsync.create(
+ num_stages=1,
+ producer_group=pipeline.CooperativeGroup(pipeline.Agent.Thread),
+ consumer_group=pipeline.CooperativeGroup(pipeline.Agent.Thread, THREADS),
+ barrier_storage=storage.acc_mbar_ptr.data_ptr(),
+ ).make_participants()
+
+ gB = cute.local_tile(mB, tiler, (0, n_idx, None), proj=(None, 1, 1))
+ tCgB = tiled_mma.get_slice(0).partition_B(gB)
+ tBsB, tBgB = cpasync.tma_partition(
+ tma_atom,
+ 0,
+ cute.make_layout(1),
+ cute.group_modes(sB, 0, 3),
+ cute.group_modes(tCgB, 0, 3),
+ )
+ frB = tiled_mma.make_fragment_B(sB)
+ n_kblk = cute.size(frA, mode=[2])
+
+ tiled_mma.set(tcgen05.Field.ACCUMULATE, accumulate)
+ if warp_idx == 0:
+ acc_empty = acc_prod.acquire_and_advance()
+ # One-deep prefetch: K-tile k+1's copy is issued before the wait on k, so
+ # sB's two stages actually overlap TMA with MMA.
+ e = ab_prod.acquire_and_advance()
+ cute.copy(tma_atom, tBgB[(None, kt0)], tBsB[(None, e.index)], tma_bar_ptr=e.barrier)
+ for kt in cutlass.range_constexpr(n_kt):
+ if kt + 1 < n_kt:
+ nxt = ab_prod.acquire_and_advance()
+ cute.copy(
+ tma_atom,
+ tBgB[(None, kt0 + kt + 1)],
+ tBsB[(None, nxt.index)],
+ tma_bar_ptr=nxt.barrier,
+ )
+ f = ab_cons.wait_and_advance()
+ src = frA if cutlass.const_expr(a_split == 0 or kt < a_split) else frA2
+ a_kt = a_st + kt if cutlass.const_expr(a_split == 0 or kt < a_split) else kt - a_split
+ for kb in cutlass.range_constexpr(n_kblk):
+ cute.gemm(tiled_mma, acc, src[None, None, kb, a_kt], frB[None, None, kb, f.index], acc)
+ tiled_mma.set(tcgen05.Field.ACCUMULATE, True)
+ f.release()
+ acc_empty.commit()
+ acc_cons.wait_and_advance().release()
diff --git a/packages/ltx-kernels/src/ltx_kernels/vae/fna_geometry.py b/packages/ltx-kernels/src/ltx_kernels/vae/fna_geometry.py
new file mode 100644
index 0000000..ed87bc6
--- /dev/null
+++ b/packages/ltx-kernels/src/ltx_kernels/vae/fna_geometry.py
@@ -0,0 +1,182 @@
+"""Coordinate arithmetic shared by the two DiffVAE CuTe DSL kernels.
+Pure geometry -- flat index to 3D position and back, window clamping, and the maps
+from a query tile to the rows its operands come from. No MMA, no TMEM, no SMEM; those
+live in :mod:`ltx_kernels.vae.fna_attn_core`. Both kernels derive the *same* per-tile
+geometry from different sources, so it lives here once and neither can drift from the
+other.
+Both kernels are built out of nested 3D boxes, and telling them apart is most of what
+reading either one takes:
+``volume``
+ The whole ``(T, H, W)`` token grid.
+``query tile``
+ The ``(TT, TH, TW)`` box of exactly ``M`` output tokens one CTA owns. Lanes tile
+ it row-major, one query per lane.
+``halo panel``
+ A query tile grown by the NA radius to ``(PT, PH, PW)``: every key any query in
+ the tile can see. Clamped inward at the volume edge, never truncated.
+``NA window``
+ One individual query's ``(kt, kh, kw)`` box, clamped the same way. It sits inside
+ the tile's halo panel, and the offset between the two is what the per-key mask
+ tests.
+The fused block kernel adds two more boxes between the tile and the volume, because
+it fills a K/V cache once for a run of tiles rather than once per tile:
+``slab core``
+ The run of query tiles sharing one cache fill -- the output region a slab owns.
+``slab box``
+ That core grown by the NA radius: what the cache is filled over. Every halo panel
+ of every tile in the core lies inside it, which is what makes the cache reusable.
+A note on the ``@cute.jit`` decorators below. The DSL lowers ``if`` on a *runtime*
+value by rewriting the function's AST, which only happens for a function it owns, so
+anything branching on a device value has to be decorated. Helpers that touch only
+compile-time values are left undecorated and trace straight inline.
+"""
+
+# NOTE: no `from __future__ import annotations` -- cute.struct needs real types.
+
+import cutlass
+import cutlass.cute as cute
+
+# --------------------------------------------------------------------------
+# Flat index <-> 3D position
+# --------------------------------------------------------------------------
+
+
+def unflatten_3d(index, plane_stride, row_stride):
+ """Row-major flat ``index`` -> ``(i0, i1, i2)`` within a ``(_, d1, d2)`` box.
+ ``plane_stride`` is ``d1 * d2`` and ``row_stride`` is ``d2``. Both are passed in
+ rather than derived from extents because every call site already has the product
+ hoisted out of the loop it sits in.
+ Each remainder is spelled ``x - q * d`` rather than ``x % d`` so that it reuses
+ the quotient the division just above it produced.
+ """
+ i0 = index // plane_stride
+ rest = index - i0 * plane_stride
+ i1 = rest // row_stride
+ i2 = rest - i1 * row_stride
+ return i0, i1, i2
+
+
+def flatten_3d(i0, i1, i2, extent_1, extent_2):
+ """``(i0, i1, i2)`` -> its row-major flat index in a ``(_, extent_1, extent_2)`` box."""
+ return (i0 * extent_1 + i1) * extent_2 + i2
+
+
+# --------------------------------------------------------------------------
+# Clamping
+# Spelled as predicated assignment rather than ``cutlass.min`` / ``cutlass.max``:
+# the DSL lowers this form to a single select, and it is the form that composes with
+# the mixed Int32 / compile-time operands these call sites hand it.
+# --------------------------------------------------------------------------
+
+
+def at_most(value, limit):
+ """``min(value, limit)``."""
+ if value > limit:
+ value = limit
+ return value
+
+
+def at_least(value, limit):
+ """``max(value, limit)``."""
+ if value < limit:
+ value = limit
+ return value
+
+
+def clamp_window_start(start, window_extent, volume_extent):
+ """Slide a window of ``window_extent`` so it lies inside ``[0, volume_extent)``.
+ This is NATTEN's inward shift: a window hanging off the low edge is pushed to 0
+ and one hanging off the high edge is pulled back to
+ ``volume_extent - window_extent``, rather than truncated or masked. It is the
+ single rule behind both the halo panel and the per-query NA window.
+ The low clamp runs first. The two disagree only if the volume is shorter than the
+ window, which ``fna_supported`` / ``na_supported`` rule out up front.
+ """
+ if start < 0:
+ start = cutlass.Int32(0)
+ if start > volume_extent - window_extent:
+ start = volume_extent - window_extent
+ return start
+
+
+# --------------------------------------------------------------------------
+# Query tile geometry
+# --------------------------------------------------------------------------
+
+
+def query_slot_in_tile(query_idx, tile_h, tile_w):
+ """Position ``(dt, dh, dw)`` of query ``query_idx`` within its query tile.
+ A tile holds exactly ``M`` queries and its threads walk them row-major, one each,
+ so a thread's accumulator row *is* its query index -- which is what keeps the
+ softmax, the norms and RoPE register-local.
+ """
+ return unflatten_3d(query_idx, tile_h * tile_w, tile_w)
+
+
+def halo_panel_origin(tile_origin, radius, panel_shape, volume):
+ """Origin of the halo panel a whole query tile reads, clamped into the volume.
+ Args:
+ tile_origin: ``(t0, h0, w0)`` of the query tile within the volume.
+ radius: ``(rt, rh, rw)``, the NA kernel's half-extents.
+ panel_shape: ``(PT, PH, PW)``, compile-time.
+ volume: ``(T, H, W)``.
+ """
+ t0, h0, w0 = tile_origin
+ radius_t, radius_h, radius_w = radius
+ panel_t, panel_h, panel_w = panel_shape
+ vol_t, vol_h, vol_w = volume
+ return (
+ clamp_window_start(t0 - radius_t, panel_t, vol_t),
+ clamp_window_start(h0 - radius_h, panel_h, vol_h),
+ clamp_window_start(w0 - radius_w, panel_w, vol_w),
+ )
+
+
+def query_row_indices(query_pos, volume, lane, scratch_row_base):
+ """The global rows a lane reads its query from and writes its result to.
+ Returns ``(clamped_pos, read_row, write_row)``.
+ A partial tile at the volume edge has lanes whose query falls outside the volume.
+ They still run every MMA -- the tile is always a full ``M`` rows, and the extra
+ rows are simply garbage -- so each needs a row that is safe to *read* (any
+ in-bounds one; the value is discarded) and a row that is safe to *write*. The
+ write goes to a scratch row past the end of the output, which is why callers
+ allocate ``M`` extra rows there.
+ ``clamped_pos`` is the in-volume position the read row came from; downstream
+ geometry (the NA window, the RoPE index, the cached-norm lookup) uses it so that
+ an out-of-range lane still computes something well-defined.
+ """
+ q_t, q_h, q_w = query_pos
+ vol_t, vol_h, vol_w = volume
+ in_volume = q_t < vol_t and q_h < vol_h and q_w < vol_w
+ r_t = q_t if q_t < vol_t else vol_t - 1
+ r_h = q_h if q_h < vol_h else vol_h - 1
+ r_w = q_w if q_w < vol_w else vol_w - 1
+ read_row = flatten_3d(r_t, r_h, r_w, vol_h, vol_w)
+ write_row = read_row
+ if not in_volume:
+ write_row = scratch_row_base + lane
+ return (r_t, r_h, r_w), read_row, write_row
+
+
+def window_origin_in_panel(query_pos, panel_origin, radius, kernel_shape, volume):
+ """One query's clamped NA window, as an offset inside its tile's halo panel.
+ The panel bounds every query in the tile; this is the ``(kt, kh, kw)`` box *this*
+ query attends to. Returned panel-relative because that is the form the per-key
+ mask consumes.
+ """
+ q_t, q_h, q_w = query_pos
+ panel_t0, panel_h0, panel_w0 = panel_origin
+ radius_t, radius_h, radius_w = radius
+ kernel_t, kernel_h, kernel_w = kernel_shape
+ vol_t, vol_h, vol_w = volume
+ return (
+ clamp_window_start(q_t - radius_t, kernel_t, vol_t) - panel_t0,
+ clamp_window_start(q_h - radius_h, kernel_h, vol_h) - panel_h0,
+ clamp_window_start(q_w - radius_w, kernel_w, vol_w) - panel_w0,
+ )
diff --git a/packages/ltx-kernels/src/ltx_kernels/vae/fna_smem.py b/packages/ltx-kernels/src/ltx_kernels/vae/fna_smem.py
new file mode 100644
index 0000000..3613a9a
--- /dev/null
+++ b/packages/ltx-kernels/src/ltx_kernels/vae/fna_smem.py
@@ -0,0 +1,197 @@
+"""SMEM operand fills and views shared by the DiffVAE CuTe DSL kernels.
+Extracted from :mod:`ltx_kernels.vae.fna_attn_core` so the attention half and the
+TMA/UMMA helpers can stay focused. Constants: :mod:`ltx_kernels.vae.fna_types`.
+"""
+
+# NOTE: no `from __future__ import annotations` -- cute.struct needs real types.
+
+import cutlass
+import cutlass.cute as cute
+
+from ltx_kernels.vae.fna_types import ACC, HD, IO, VEC, VEC_ROWS, M
+
+# --------------------------------------------------------------------------
+# SMEM operand fills. A/B UMMA layouts are ``((MN, 16), 1, K_TILE/16, stages)``
+# with the K coordinate split as ``k = st*64 + kb*16 + ki``. These are plain
+# Python (no device branch), so they trace inline with ordinary ``range``.
+# --------------------------------------------------------------------------
+
+# A whole ``ki`` run is one contiguous 32B group of the swizzled operand, so slicing
+# it out and handing that to ``autovec_copy`` gives 16B stores while keeping the
+# swizzle attached. Element-wise access instead costs 64 ``STS.U16`` per stage.
+# Slicing a *sub*-run does not work: it lands mid-granule and corrupts the operand.
+_KRUN = 16
+
+
+def _fill_a_chunk(sA, row, vals, c0, n):
+ """Write ``vals`` into channels ``[c0, c0+n)`` of A-operand row ``row``.
+ ``c0`` and ``n`` must be compile-time and multiples of ``_KRUN``: a dynamic
+ coordinate loses the slice's static alignment and ``autovec_copy`` falls back to
+ scalar stores. That is why callers spell the warpgroup split as a constexpr loop
+ over ``g`` guarded by ``wg == g`` rather than as an arithmetic offset.
+ """
+ frag = cute.make_rmem_tensor(cute.make_layout(_KRUN), IO)
+ for k in range(n // _KRUN):
+ c = c0 + k * _KRUN
+ for ki in range(_KRUN):
+ frag[ki] = IO(vals[k * _KRUN + ki])
+ cute.autovec_copy(frag, sA[((row, None), 0, (c % 64) // 16, c // 64)])
+
+
+def _read_a_chunk(sA, row, vals, c0, n):
+ """Read channels ``[c0, c0+n)`` of A-operand row ``row`` back into registers."""
+ frag = cute.make_rmem_tensor(cute.make_layout(_KRUN), IO)
+ for k in range(n // _KRUN):
+ c = c0 + k * _KRUN
+ cute.autovec_copy(sA[((row, None), 0, (c % 64) // 16, c // 64)], frag)
+ for ki in range(_KRUN):
+ vals[k * _KRUN + ki] = ACC(frag[ki])
+
+
+def _vec_ptr(t, coord):
+ """A ``VEC``-wide, 16B-aligned pointer at ``(row, col)`` of a row-major 2D tensor.
+ Adding a dynamic offset to a pointer drops its alignment to one element, and
+ ``autovec_copy`` then picks its vector width from that -- 16 scalar ``LDG.E.U16``
+ instead of one ``LDG.E.128``. Every offset reached here is a multiple of ``VEC``,
+ so re-asserting the alignment is sound.
+ The linear offset is built in 64-bit rather than via ``crd2idx``, whose int32
+ arithmetic wraps once the tensor passes 2**31 elements: a DiffVAE stage-4
+ activation at 4K is ``(4879680, 512)`` = 2.5e9 elements, and the wrapped
+ (negative) offset reads or writes unmapped memory -- decoding 3840x2176 faulted
+ with CUDA_ERROR_ILLEGAL_ADDRESS here.
+ """
+ row, col = coord
+ row_stride, col_stride = t.layout.stride
+ off = cutlass.Int64(row) * cutlass.Int64(row_stride) + cutlass.Int64(col) * cutlass.Int64(col_stride)
+ return (t.iterator + off).align(16)
+
+
+def _row_vec_ptr(t, row, col, n: cutlass.Constexpr):
+ """16B-aligned pointer at ``(row, col)`` of a row-major ``(rows, n)`` tensor.
+ 64-bit offset for the same reason as :func:`_vec_ptr`: K/V here are
+ ``(tokens*NH, HD)``, which is 2.5e9 elements at a 4K stage-4 tile.
+ """
+ return (t.iterator + (cutlass.Int64(row) * cutlass.Int64(n) + cutlass.Int64(col))).align(16)
+
+
+def _fill_a_gather(sA, src, rowix, vlane, c_len, c_off=0):
+ """Fill all ``c_len`` channels of the A operand from a global ``(row, col)`` tensor.
+ ``rowix[t]`` is the global row feeding A-row ``t``. Each thread takes ``VEC``
+ consecutive columns of ``VEC_ROWS`` rows at a time, so a load is 16B per thread
+ and contiguous across the threads covering a row -- and the same run is
+ contiguous in the swizzled SMEM layout. The ``M`` threads span ``M`` columns, so
+ a wider activation needs one pass per ``M``-channel group.
+ ``c_off`` shifts the *source* window without moving the destination, which lets
+ the NA kernel fill a four-head operand from head group ``hg`` of a much wider Q
+ tensor. It may be a runtime value (every offset reaching it is a multiple of
+ ``VEC``) and folds away at the default 0.
+ """
+ c0, r0 = vlane
+ frag = cute.make_rmem_tensor(cute.make_layout(VEC), IO)
+ for kc in range(c_len // M):
+ for nb in range(M // VEC_ROWS):
+ t = nb * VEC_ROWS + r0
+ row = rowix[t]
+ c = kc * M + c0
+ cute.autovec_copy(
+ cute.make_tensor(_vec_ptr(src, (row, c + c_off)), cute.make_layout(VEC)),
+ frag,
+ )
+ cute.autovec_copy(frag, sA[((t, None), 0, (c % 64) // 16, c // 64)])
+
+
+def _scatter_a(sA, dst, rowix, vlane, c_len, c_off=0):
+ """Write the A operand back out to a global ``(row, col)`` tensor, coalesced.
+ Mirror of :func:`_fill_a_gather`, ``c_off`` included. The per-thread-row
+ alternative touches a different cache line per lane.
+ """
+ c0, r0 = vlane
+ frag = cute.make_rmem_tensor(cute.make_layout(VEC), IO)
+ for kc in range(c_len // M):
+ for nb in range(M // VEC_ROWS):
+ t = nb * VEC_ROWS + r0
+ row = rowix[t]
+ c = kc * M + c0
+ cute.autovec_copy(sA[((t, None), 0, (c % 64) // 16, c // 64)], frag)
+ cute.autovec_copy(
+ frag,
+ cute.make_tensor(_vec_ptr(dst, (row, c + c_off)), cute.make_layout(VEC)),
+ )
+
+
+def _load_head_row(src, row, frag):
+ """One head's K or V row into registers, ``VEC`` bf16 per load.
+ Split from the SMEM store so the head loop can be software-pipelined: head
+ ``nh+1``'s row is fetched right after head ``nh``'s is published, which puts its
+ latency behind head ``nh``'s MMAs and softmax instead of in front of them.
+ """
+ fz = cute.zipped_divide(frag, cute.make_layout(VEC))
+ for k in range(HD // VEC):
+ cute.autovec_copy(
+ cute.make_tensor(_row_vec_ptr(src, row, k * VEC, HD), cute.make_layout(VEC)),
+ fz[None, k],
+ )
+
+
+def _store_k_row(frag, sK, n, st_off):
+ """Registers -> K-major B operand row ``n``. One ``_KRUN`` per swizzle granule."""
+ fz = cute.zipped_divide(frag, cute.make_layout(_KRUN))
+ for k in range(HD // _KRUN):
+ cute.autovec_copy(fz[None, k], sK[((n, None), 0, k, st_off)])
+
+
+def _store_v_row(frag, sV, key, st_off):
+ """Registers -> MN-major B operand key ``key``.
+ MN-major puts the 64 channels contiguous, so the whole row is a single slice of
+ the operand rather than the 64 ``STS.U16`` a per-channel loop emits.
+ """
+ cute.autovec_copy(frag, sV[((None, key % 64 % 16), 0, key % 64 // 16, st_off + key // 64)])
+
+
+def _store_head_row(dst, row, vals, n=HD, c0: int = 0):
+ """Write ``n`` accumulator values to ``dst[row, c0:c0+n]``, vectorised.
+ ``dst`` rows are always ``HD`` wide; ``c0``/``n`` let a warpgroup that owns only
+ part of a head write just its slice.
+ """
+ frag = cute.make_rmem_tensor(cute.make_layout(VEC), IO)
+ for k in range(n // VEC):
+ for u in range(VEC):
+ frag[u] = IO(vals[k * VEC + u])
+ cute.autovec_copy(
+ frag,
+ cute.make_tensor(_row_vec_ptr(dst, row, c0 + k * VEC, HD), cute.make_layout(VEC)),
+ )
+
+
+def _alias(buf, layout, off: int = 0):
+ """A UMMA-operand view over ``buf``'s storage, ``off`` elements in.
+ tcgen05 wants the swizzle on the pointer rather than folded into the layout, so
+ the composed layout is split apart here the way ``SmemAllocator.allocate_tensor``
+ would have done it. Re-asserting the alignment matters: adding an offset drops a
+ pointer's static alignment and a swizzled operand needs its 128 bytes back.
+ """
+ ptr = buf.iterator if off == 0 else (buf.iterator + off).align(128)
+ return cute.make_tensor(cute.recast_ptr(ptr, layout.inner, dtype=IO), layout.outer)
+
+
+def cooperative_copy_slot(tidx):
+ """This thread's ``(first_column, row_in_step)`` slot in the operand copies.
+ :func:`_fill_a_gather` and :func:`_scatter_a` move ``VEC`` consecutive columns of
+ ``VEC_ROWS`` rows per step; this is the column range and the within-step row that
+ thread ``tidx`` handles in either.
+ """
+ return VEC * (tidx % (M // VEC)), tidx // (M // VEC)
+
+
+def _publish_smem():
+ """Make this CTA's SMEM stores visible to the async (tcgen05/TMA) proxy.
+ ``bar.sync`` orders thread against thread; it says nothing about the async proxy
+ the UMMA reads its operands through, so an operand written by ordinary stores
+ needs ``fence.proxy.async.shared::cta`` before the barrier that publishes it.
+ Without it the kernel is silently *non-deterministic* -- output stops being
+ bit-identical run to run and PSNR drifts a couple of dB, which no correctness
+ tolerance catches. The ``test_is_deterministic`` case in each kernel's test
+ module does.
+ """
+ cute.arch.fence_proxy("async.shared", space="cta")
+ cute.arch.sync_threads()
diff --git a/packages/ltx-kernels/src/ltx_kernels/vae/fna_types.py b/packages/ltx-kernels/src/ltx_kernels/vae/fna_types.py
new file mode 100644
index 0000000..53b398e
--- /dev/null
+++ b/packages/ltx-kernels/src/ltx_kernels/vae/fna_types.py
@@ -0,0 +1,61 @@
+"""Shared compile-time constants for the DiffVAE CuTe DSL kernels.
+Imported by :mod:`ltx_kernels.vae.fna_smem`, :mod:`ltx_kernels.vae.fna_gemm`, and
+:mod:`ltx_kernels.vae.fna_attn_core` so those modules do not import each other for
+constants. Re-exported from ``fna_attn_core`` for existing call sites.
+"""
+
+# NOTE: no `from __future__ import annotations` -- cute.struct needs real types.
+
+import cutlass
+
+IO = cutlass.BFloat16
+ACC = cutlass.Float32
+M = 128
+INST_N128 = (128, 128, 16)
+TILER_N128 = (128, 128, 64)
+INST_N64 = (128, 64, 16)
+TILER_N64 = (128, 64, 64)
+# The wide MMA's N and K tile widths. ``TILE_N`` is numerically ``M``, but it is a
+# different axis: ``M`` counts rows -- tokens, one per lane -- while ``N`` counts an
+# accumulator's columns, which are channels for a projection, keys for Q@K and hidden
+# units for gate/up. Anything sized by an accumulator's width takes ``TILE_N``,
+# anything sized by the reduction depth takes ``TILE_K``, and ``M`` keeps only its
+# row/token/lane meaning.
+TILE_N = TILER_N128[1]
+TILE_K = TILER_N128[2]
+# The two axes do have to agree numerically: the KV loop hands lane ``i`` key ``i`` of
+# an N-wide key tile, so a wider N would leave keys no lane owns.
+assert TILE_N == M, "attention_tile indexes an N=TILE_N key tile by lane (0..M-1)"
+EPS = 1e-6
+HD = 64 # head_dim; fixed by the DiffVAE attention
+
+# Warpgroups per CTA -- 128 threads, four warps, the tcgen05 scheduling unit. Both
+# kernels hold all 512 TMEM columns, so they are pinned to one CTA per SM and the only
+# way to get more than one warp per scheduler is more warps inside the CTA. Thread
+# ``i`` still owns accumulator row ``i``; warpgroup ``g`` owns a different slice of
+# that row's columns.
+NUM_WARPGROUPS = 2
+THREADS = M * NUM_WARPGROUPS
+# How many columns of an accumulator row one thread owns, for the two accumulator
+# widths the kernels use: 128 for anything C-wide or a Q@K score row, 64 for a
+# per-head attention output.
+ACC_COLS = TILE_N // NUM_WARPGROUPS
+HEAD_COLS = HD // NUM_WARPGROUPS
+HEADS_PER_TILE = TILE_N // HD # heads in one N=128 projection tile
+# Warpgroups sharing a head. Two warpgroups gives one, so the Q/K RMSNorms and RoPE
+# stay register-local; four gives two, and they then need a partial reduction over the
+# pair (``head_sum2``) and a channel-ranged RoPE. Both are written generically, so the
+# two-warpgroup build is the ``WARPGROUPS_PER_HEAD == 1`` special case of the same code.
+WARPGROUPS_PER_HEAD = NUM_WARPGROUPS // HEADS_PER_TILE
+assert HEADS_PER_TILE * WARPGROUPS_PER_HEAD == NUM_WARPGROUPS, "NUM_WARPGROUPS must be a multiple of TILE_N // HD"
+# One cooperative-copy step moves a whole ``_KRUN`` run per thread, so both ends of
+# the copy vectorise: 32B from global (2x LDG.E.128) and one swizzled-slice store.
+VEC = 16 # bf16 elements per thread per cooperative-copy step
+VEC_ROWS = THREADS // (M // VEC) # rows of the operand in flight at once
+
+# The softmax exponentiates with ``ex2``, so scores have to reach it in base 2. That
+# rides on the subtraction of the row offset -- ``fma(score, LOG2E, -offset)`` instead
+# of ``score - offset``, one instruction either way -- so callers hand over ordinary
+# base-e scores and nothing outside this file knows about the base. Folding it into Q
+# host-side instead measures the same to within noise at every DiffVAE shape.
+LOG2E = 1.4426950408889634
diff --git a/packages/ltx-kernels/src/ltx_kernels/vae/na_attn_dsl.py b/packages/ltx-kernels/src/ltx_kernels/vae/na_attn_dsl.py
new file mode 100644
index 0000000..a6d500b
--- /dev/null
+++ b/packages/ltx-kernels/src/ltx_kernels/vae/na_attn_dsl.py
@@ -0,0 +1,482 @@
+"""Standalone 3D neighborhood attention -- a drop-in for ``natten.na3d``.
+Attention only: Q/K/V arrive already projected, RMS-normed and RoPE'd, so nothing
+here scales with the channel count. It runs ``HG`` heads at a time and loops over
+head groups, which keeps TMEM and SMEM independent of the head count while still
+reading each (KV tile, head) row exactly once. Used for the DiffVAE's deterministic
+stages, whose 32/16/8/8 heads the fused stage-5 kernel's TMEM map cannot hold.
+The window mask, the two-deep pipeline and the softmax are not reimplemented here --
+they are :func:`ltx_kernels.vae.fna_attn_core.attention_tile`, the same trace the
+fused kernel runs.
+Q must arrive carrying the attention scale, exactly as ``natten.na3d`` expects it.
+The one extra thing this kernel needs is the ``k_norm`` weight, from which it builds a
+fixed softmax offset in place of an online row max -- see
+:mod:`ltx_kernels.vae.softmax_bound`, which is worth reading before calling this.
+Compile keys are ``(kernel_size, tile_thw)`` and nothing else -- head count, T, H and
+W are all runtime -- so the four deterministic stages share two binaries.
+"""
+
+# NOTE: no `from __future__ import annotations` -- cute.struct needs real types.
+
+import os
+from typing import Any
+
+import cutlass
+import cutlass.cute as cute
+import cutlass.utils.blackwell_helpers as sm100_utils
+import torch
+from cutlass.utils import SmemAllocator
+
+from ltx_kernels.vae.availability import UNSUPPORTED_MESSAGE, gpu_supports_dsl_kernels
+from ltx_kernels.vae.fna_attn_core import (
+ _as_rows,
+ _dyn,
+ _dyn_act,
+ attention_tile,
+ attn_epilogue,
+ attn_zero_accumulators,
+ cta_count,
+ default_tile_thw,
+)
+from ltx_kernels.vae.fna_gemm import UmmaSharedStorage, _mma_op, _reg_shape, acquire_tmem, release_tmem
+from ltx_kernels.vae.fna_geometry import (
+ halo_panel_origin,
+ query_row_indices,
+ query_slot_in_tile,
+ unflatten_3d,
+ window_origin_in_panel,
+)
+from ltx_kernels.vae.fna_smem import (
+ _alias,
+ _fill_a_gather,
+ _read_a_chunk,
+ _scatter_a,
+ cooperative_copy_slot,
+)
+from ltx_kernels.vae.fna_types import (
+ ACC,
+ HD,
+ HEAD_COLS,
+ IO,
+ LOG2E,
+ NUM_WARPGROUPS,
+ THREADS,
+ TILE_K,
+ TILE_N,
+ TILER_N64,
+ TILER_N128,
+ M,
+)
+from ltx_kernels.vae.softmax_bound import softmax_row_bound
+
+_COMPILED: "dict[tuple, Any]" = {}
+
+# Heads per group. ``HG * HD`` TMEM columns for the attention accumulators plus 256
+# for the two Q@K accumulators must fit in 512, so 4 is the ceiling; it also has to
+# be even (the pipeline's buffer parity is ``nh % 2``) and to divide ``NUM_WARPGROUPS`` evenly
+# for the ``||q||`` pass below. Every DiffVAE stage's head count is a multiple of 4,
+# so one value serves all of them and the head count stays a runtime argument.
+HG = 4
+
+
+def _na_kernel(
+ q: cute.Tensor, # (T*H*W, NH*HD) bf16, RMS-normed, scaled and RoPE'd
+ k: cute.Tensor, # (T*H*W*NH, HD) bf16, RMS-normed and RoPE'd
+ v: cute.Tensor, # (T*H*W*NH, HD) bf16
+ y: cute.Tensor, # (T*H*W + M, NH*HD) bf16
+ k_bound_t: cute.Tensor, # (1,) f32, see ltx_kernels.vae.softmax_bound
+ T,
+ H,
+ W,
+ NH,
+ n_hg,
+ n_tiles,
+ n_ctas,
+ grid_hw,
+ grid_w_,
+ kt: cutlass.Constexpr,
+ kh: cutlass.Constexpr,
+ kw: cutlass.Constexpr,
+ TT: cutlass.Constexpr,
+ TH: cutlass.Constexpr,
+ TW: cutlass.Constexpr,
+ PT: cutlass.Constexpr,
+ PH: cutlass.Constexpr,
+ PW: cutlass.Constexpr,
+ NKV: cutlass.Constexpr,
+ mma128: cute.TiledMma,
+ mma64: cute.TiledMma,
+ p_layout: cute.ComposedLayout,
+ q_layout: cute.ComposedLayout,
+ k_layout: cute.ComposedLayout,
+ v_layout: cute.ComposedLayout,
+ o_layout: cute.ComposedLayout,
+):
+ tidx, _, _ = cute.arch.thread_idx()
+ cta_index, _, _ = cute.arch.block_idx()
+ lane = tidx % M
+ wg = tidx // M
+ warp_i = cute.arch.make_warp_uniform(cute.arch.warp_idx())
+
+ volume = (T, H, W)
+ radius = ((kt - 1) // 2, (kh - 1) // 2, (kw - 1) // 2)
+ panel_shape = (PT, PH, PW)
+ kernel_shape = (kt, kh, kw)
+ HPG = HG // NUM_WARPGROUPS # heads whose ||q|| one warpgroup computes
+
+ smem = SmemAllocator()
+ storage = smem.allocate(UmmaSharedStorage)
+ # One 96 KiB pool: ``sO`` (the epilogue's staging buffer) is dead for the whole
+ # KV loop and ``sP``/``sK``/``sV`` are dead outside it, so they alias.
+ pool_elems = 6 * M * TILE_K
+ pool = smem.allocate_tensor(IO, cute.make_layout((pool_elems,)), byte_alignment=128)
+ sO = _alias(pool, o_layout)
+ sP = _alias(pool, p_layout)
+ sK = _alias(pool, k_layout, 2 * M * TILE_K)
+ sV = _alias(pool, v_layout, 4 * M * TILE_K)
+ sQ = smem.allocate_tensor(IO, q_layout.outer, byte_alignment=128, swizzle=q_layout.inner)
+ qkbar = smem.allocate_tensor(cutlass.Int64, cute.make_layout((2,)), byte_alignment=16)
+ pvbar = smem.allocate_tensor(cutlass.Int64, cute.make_layout((1,)), byte_alignment=16)
+ # ``rowix`` is always an in-bounds row and feeds the gather; ``rowix_w`` is where
+ # a lane's result goes, which for an out-of-range lane of a partial tile is a
+ # scratch row past the end of the output.
+ rowix = smem.allocate_tensor(cutlass.Int32, cute.make_layout((M,)), byte_alignment=16)
+ rowix_w = smem.allocate_tensor(cutlass.Int32, cute.make_layout((M,)), byte_alignment=16)
+ m_sm = smem.allocate_tensor(ACC, cute.make_layout((M, HG)), byte_alignment=16)
+ l_sm = smem.allocate_tensor(ACC, cute.make_layout((M, NUM_WARPGROUPS, HG)), byte_alignment=16)
+ cute.arch.sync_threads()
+
+ tmem, tmem_ptr = acquire_tmem(storage)
+
+ lay_main = mma128.make_fragment_C(mma128.partition_shape_C(TILER_N128[:2])).layout
+ lay_n64 = mma64.make_fragment_C(mma64.partition_shape_C(TILER_N64[:2])).layout
+ # Same TMEM map as the fused kernel, with ``HG`` standing in for its head count:
+ # the per-head attention accumulators low, the two Q@K accumulators above.
+ scr = HG * HD
+ acc_o = [cute.make_tensor(tmem_ptr + h * HD, lay_n64) for h in range(HG)]
+ acc_qk = [cute.make_tensor(tmem_ptr + scr + b * TILE_N, lay_main) for b in range(2)]
+ rshape = _reg_shape(mma128, acc_qk[0], lane, TILE_N)
+ rshape_o = _reg_shape(mma64, acc_o[0], lane, HD, HEAD_COLS)
+
+ frQ = mma128.make_fragment_A(sQ)
+ frK = mma128.make_fragment_B(sK)
+ frP = mma64.make_fragment_A(sP)
+ frV = mma64.make_fragment_B(sV)
+
+ areg = cute.make_rmem_tensor(rshape, ACC)
+ oreg = cute.make_rmem_tensor(rshape_o, ACC)
+ kvfrag = cute.make_rmem_tensor(cute.make_layout(HD), IO)
+
+ copy_slot = cooperative_copy_slot(tidx)
+ slot_t, slot_h, slot_w = query_slot_in_tile(lane, TH, TW)
+
+ tile_id = cta_index
+ while tile_id < n_tiles:
+ tile_i, tile_j, tile_k = unflatten_3d(tile_id, grid_hw, grid_w_)
+ tile_origin = (tile_i * TT, tile_j * TH, tile_k * TW)
+
+ panel_origin = halo_panel_origin(tile_origin, radius, panel_shape, volume)
+ query_pos, read_row, write_row = query_row_indices(
+ (tile_origin[0] + slot_t, tile_origin[1] + slot_h, tile_origin[2] + slot_w),
+ volume,
+ lane,
+ T * H * W,
+ )
+ window = window_origin_in_panel(query_pos, panel_origin, radius, kernel_shape, volume)
+ # ``panel_key_row`` indexes the caller's K/V directly, so the box it walks is
+ # the whole volume: origin zero, extents H and W.
+ panel = (*panel_origin, cutlass.Int32(0), cutlass.Int32(0), cutlass.Int32(0), H, W)
+
+ cute.arch.sync_threads()
+ rowix[lane] = read_row
+ rowix_w[lane] = write_row
+ cute.arch.sync_threads()
+
+ hg = 0
+ while hg < n_hg:
+ c_off = hg * (HG * HD)
+ # This group's queries: one coalesced gather straight into the swizzled
+ # operand. The channel window moves with the group; the operand does not.
+ _fill_a_gather(sQ, q, rowix, copy_slot, HG * HD, c_off)
+ cute.arch.sync_threads()
+ # ``||q||`` per (row, head) -- the fixed softmax offset. Each lane owns its
+ # own row, so a head's channels are register-local and this needs no
+ # reduction at all; the warpgroups split the heads.
+ for h_loc in cutlass.range_constexpr(HPG):
+ for g in cutlass.range_constexpr(NUM_WARPGROUPS):
+ if wg == g:
+ nh = g * HPG + h_loc
+ _read_a_chunk(sQ, lane, areg, nh * HD, HD)
+ s = ACC(0.0)
+ for d in cutlass.range(HD, unroll_full=True):
+ s += areg[d] * areg[d]
+ # Read at the point of use rather than hoisted: this runs
+ # once per head group, and a hoisted value would hold a
+ # register live across the KV loop.
+ m_sm[lane, nh] = cute.sqrt(s) * k_bound_t[0] * LOG2E
+ # Ends on a barrier, which is also what publishes ``m_sm``.
+ attn_zero_accumulators(acc_o, l_sm, oreg, lane, wg, HG)
+
+ # K and V are the caller's own tensors: consecutive heads are one
+ # ``HD``-row apart and one panel row is ``NH`` of them.
+ attention_tile(
+ (frQ, frK, frP, frV),
+ (sK, sV, sP),
+ acc_qk,
+ acc_o,
+ (qkbar, pvbar),
+ m_sm,
+ l_sm,
+ areg,
+ kvfrag,
+ (k, v),
+ (hg * HG, hg * HG),
+ cutlass.Int32(1),
+ panel,
+ window,
+ (tidx, lane, wg, warp_i),
+ HG,
+ NH,
+ PT,
+ PH,
+ PW,
+ kt,
+ kh,
+ kw,
+ NKV,
+ )
+
+ cute.arch.sync_threads()
+ attn_epilogue(acc_o, l_sm, oreg, sO, lane, wg, HG)
+ cute.arch.sync_threads()
+ _scatter_a(sO, y, rowix_w, copy_slot, HG * HD, c_off)
+ cute.arch.sync_threads()
+ hg += 1
+
+ tile_id += n_ctas
+
+ release_tmem(tmem, tmem_ptr)
+
+
+def _launch(
+ q,
+ k,
+ v,
+ y,
+ k_bound_t,
+ T,
+ H,
+ W,
+ NH,
+ n_hg,
+ n_tiles,
+ n_ctas,
+ grid_hw,
+ grid_w_,
+ kt: cutlass.Constexpr,
+ kh: cutlass.Constexpr,
+ kw: cutlass.Constexpr,
+ TT: cutlass.Constexpr,
+ TH: cutlass.Constexpr,
+ TW: cutlass.Constexpr,
+ PT: cutlass.Constexpr,
+ PH: cutlass.Constexpr,
+ PW: cutlass.Constexpr,
+ NKV: cutlass.Constexpr,
+):
+ mma128 = cute.make_tiled_mma(_mma_op("n128"))
+ mma64 = cute.make_tiled_mma(_mma_op("pv"))
+ p_layout = sm100_utils.make_smem_layout_a(mma64, TILER_N64, IO, 2)
+ q_layout = sm100_utils.make_smem_layout_a(mma128, TILER_N128, IO, HG)
+ k_layout = sm100_utils.make_smem_layout_b(mma128, TILER_N128, IO, 2)
+ v_layout = sm100_utils.make_smem_layout_b(mma64, TILER_N64, IO, 4)
+ # ``sO`` is an A-operand only so the epilogue can reach it with the same
+ # ``_fill_a_chunk`` the fused kernel uses; nothing multiplies by it.
+ o_layout = sm100_utils.make_smem_layout_a(mma128, TILER_N128, IO, HG * HD // 64)
+
+ _na_kernel(
+ q,
+ k,
+ v,
+ y,
+ k_bound_t,
+ T,
+ H,
+ W,
+ NH,
+ n_hg,
+ n_tiles,
+ n_ctas,
+ grid_hw,
+ grid_w_,
+ kt,
+ kh,
+ kw,
+ TT,
+ TH,
+ TW,
+ PT,
+ PH,
+ PW,
+ NKV,
+ mma128,
+ mma64,
+ p_layout,
+ q_layout,
+ k_layout,
+ v_layout,
+ o_layout,
+ ).launch(grid=[n_ctas, 1, 1], block=[THREADS, 1, 1])
+
+
+def na_attn_available(device_index: int = 0) -> bool:
+ """Whether this GPU can run the NA kernel at all (datacenter Blackwell)."""
+ return gpu_supports_dsl_kernels(device_index)
+
+
+def na_supported(
+ *,
+ num_heads: int,
+ head_dim: int,
+ kernel_size: "tuple[int, int, int]",
+ T: int,
+ H: int,
+ W: int,
+ tile_thw: "tuple[int, int, int] | None" = None,
+) -> bool:
+ """Whether this shape is served by the standalone NA kernel."""
+ if head_dim != HD or num_heads % HG != 0:
+ return False
+ tt, th, tw = tile_thw or default_tile_thw(kernel_size)
+ kt, kh, kw = kernel_size
+ pt, ph, pw = tt + kt - 1, th + kh - 1, tw + kw - 1
+ if max(pt, ph, pw) > 32:
+ return False
+ return pt <= T and ph <= H and pw <= W
+
+
+def _compile(*, kernel_size: "tuple[int, int, int]", tile_thw: "tuple[int, int, int]"):
+ key = (kernel_size, tile_thw)
+ if key in _COMPILED:
+ return _COMPILED[key]
+ kt, kh, kw = kernel_size
+ tt, th, tw = tile_thw
+ pt, ph, pw = tt + kt - 1, th + kh - 1, tw + kw - 1
+ # The mask packs each key's panel-local offset into 5-bit fields.
+ if max(pt, ph, pw) > 32:
+ raise ValueError(f"halo panel {(pt, ph, pw)} exceeds the packed-offset limit of 32")
+ nkv = (pt * ph * pw + TILE_N - 1) // TILE_N
+ dev = torch.device("cuda")
+
+ def za(a: int, b: int):
+ return _dyn_act(torch.zeros(a, b, device=dev, dtype=torch.bfloat16))
+
+ # Pass-through for CuTe DSL compiler flags, e.g. --keep-sass / --ptxas-options=-v.
+ opts = os.environ.get("CUTE_DSL_OPTS")
+ _COMPILED[key] = cute.compile(
+ _launch,
+ za(M, HG * HD),
+ za(M, HD),
+ za(M, HD),
+ za(M, HG * HD),
+ _dyn(torch.zeros(1, device=dev, dtype=torch.float32)),
+ 4,
+ 4,
+ 4,
+ HG,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ kt,
+ kh,
+ kw,
+ tt,
+ th,
+ tw,
+ pt,
+ ph,
+ pw,
+ nkv,
+ **({"options": opts} if opts else {}),
+ )
+ return _COMPILED[key]
+
+
+def run_na_attention(
+ q: torch.Tensor,
+ k: torch.Tensor,
+ v: torch.Tensor,
+ *,
+ kernel_size: "tuple[int, int, int]",
+ k_norm_weight: torch.Tensor,
+ tile_thw: "tuple[int, int, int] | None" = None,
+) -> torch.Tensor:
+ """Windowed 3D neighborhood attention over ``(1, T, H, W, NH, HD)`` Q/K/V.
+ ``q`` must already carry the attention scale, and ``k`` must be the output of an
+ RMSNorm with ``k_norm_weight``. Returns ``(1, T, H, W, NH * HD)``.
+ Derives the softmax bound from ``k_norm_weight`` on every call, which is a small
+ reduction per call; a caller in a hot loop should hoist it and use
+ :func:`run_na_attention_bound`.
+ """
+ k_bound = softmax_row_bound(k_norm_weight)
+ return run_na_attention_bound(q, k, v, kernel_size=kernel_size, k_bound=k_bound, tile_thw=tile_thw)
+
+
+def run_na_attention_bound(
+ q: torch.Tensor,
+ k: torch.Tensor,
+ v: torch.Tensor,
+ *,
+ kernel_size: "tuple[int, int, int]",
+ k_bound: torch.Tensor,
+ tile_thw: "tuple[int, int, int] | None" = None,
+) -> torch.Tensor:
+ """:func:`run_na_attention` with the softmax bound already computed.
+ ``k_bound`` is the 0-d tensor :func:`ltx_kernels.vae.softmax_row_bound` returns; it
+ is read by the kernel as an operand, so it never leaves the device.
+ """
+ if not na_attn_available(q.device.index or 0):
+ raise RuntimeError(UNSUPPORTED_MESSAGE)
+ if q.shape[0] != 1:
+ raise ValueError("B=1 only")
+ if not (q.shape == k.shape == v.shape):
+ raise ValueError(f"q/k/v shapes differ: {q.shape} {k.shape} {v.shape}")
+ _, T, H, W, NH, hd = (int(s) for s in q.shape)
+ tt, th, tw = tile_thw or default_tile_thw(kernel_size)
+ if not na_supported(num_heads=NH, head_dim=hd, kernel_size=kernel_size, T=T, H=H, W=W, tile_thw=(tt, th, tw)):
+ raise ValueError(f"na kernel unsupported: NH={NH} hd={hd} shape={(T, H, W)} k={kernel_size}")
+
+ q_ = _as_rows(q[0].reshape(T, H, W, NH * hd).to(dtype=torch.bfloat16))
+ # K and V are addressed one head-row at a time, so they are ``(tokens*NH, HD)``.
+ k_ = k[0].reshape(T, H, W, NH * hd).to(dtype=torch.bfloat16).contiguous().view(-1, hd)
+ v_ = v[0].reshape(T, H, W, NH * hd).to(dtype=torch.bfloat16).contiguous().view(-1, hd)
+
+ grid_t = (T + tt - 1) // tt
+ grid_h = (H + th - 1) // th
+ grid_w = (W + tw - 1) // tw
+ n_tiles = grid_t * grid_h * grid_w
+ n_ctas = cta_count(n_tiles, q_.device)
+ # M extra rows absorb the stores of out-of-range lanes in partial tiles.
+ y_buf = torch.empty((T * H * W + M, NH * hd), device=q_.device, dtype=torch.bfloat16)
+
+ compiled = _compile(kernel_size=kernel_size, tile_thw=(tt, th, tw))
+ compiled(
+ _dyn_act(q_),
+ _dyn_act(k_),
+ _dyn_act(v_),
+ _dyn_act(y_buf),
+ _dyn(k_bound.detach().reshape(1).float().to(device=q_.device)),
+ T,
+ H,
+ W,
+ NH,
+ NH // HG,
+ n_tiles,
+ n_ctas,
+ grid_h * grid_w,
+ grid_w,
+ )
+ return y_buf[: T * H * W].view(1, T, H, W, NH * hd).to(dtype=q.dtype)
diff --git a/packages/ltx-kernels/src/ltx_kernels/vae/softmax_bound.py b/packages/ltx-kernels/src/ltx_kernels/vae/softmax_bound.py
new file mode 100644
index 0000000..6a6d3e9
--- /dev/null
+++ b/packages/ltx-kernels/src/ltx_kernels/vae/softmax_bound.py
@@ -0,0 +1,27 @@
+"""The one thing the kernels' softmax needs from the caller's weights.
+Both kernels replace ``exp(s - rowmax)`` with ``exp2(s - bound)``. The base change is
+internal (see ``fna_attn_core.LOG2E``); the *bound* is not, because it comes from a
+weight only the caller has.
+Using a fixed per-row bound instead of an online row max deletes the max pass, its
+cross-warpgroup reduction and a read-modify-write of the output accumulator from every
+step of the KV loop. It is legal because every score is a dot product of two
+RMS-normed, RoPE'd vectors: Cauchy-Schwarz gives ``q . k <= ||q|| ||k||`` and RMSNorm
+caps ``||k|| <= sqrt(head_dim) * max|k_norm_weight|``, which RoPE preserves.
+Subtracting ``||q||`` times that is still *exactly* softmax -- one offset per row
+divides out of the numerator and the denominator alike.
+It is not a tolerance. Feed a kernel a K that was not RMS-normed with that weight, and
+``exp2`` of a positive argument overflows.
+"""
+
+from __future__ import annotations
+
+import torch
+
+
+def softmax_row_bound(k_norm_weight: torch.Tensor) -> torch.Tensor:
+ """``sqrt(head_dim) * max|k_norm_weight|`` -- the ``||k||`` bound, as a 0-d tensor.
+ Left on the weight's own device: the kernels read it as an operand, so nothing here
+ needs its value and no device-to-host sync happens.
+ """
+ head_dim = int(k_norm_weight.shape[-1])
+ return k_norm_weight.detach().float().abs().amax() * head_dim**0.5
diff --git a/packages/ltx-pipelines/CLAUDE.md b/packages/ltx-pipelines/CLAUDE.md
index 6b415b8..aa74c39 100644
--- a/packages/ltx-pipelines/CLAUDE.md
+++ b/packages/ltx-pipelines/CLAUDE.md
@@ -22,7 +22,8 @@ Inference pipelines for LTX-2 audio-video generation. Depends on `ltx-core` for
| `TI2VidTwoStagesHQPipeline` | `ti2vid_two_stages_hq.py` | 2 | Full + distilled LoRA (both stages) | Res2s | Highest quality, fewer steps |
| `A2VidPipelineTwoStage` | `a2vid_two_stage.py` | 2 | Full + distilled LoRA | Euler | Audio-conditioned video |
| `KeyframeInterpolationPipeline` | `keyframe_interpolation.py` | 2 | Full + distilled LoRA | Euler | Keyframe interpolation |
-| `DistilledPipeline` | `distilled.py` | 2 | Distilled only | Euler | Fastest inference |
+| `DFRPipeline` | `dfr_pipeline.py` | 2 (+ optional tiled temporal) | Keyframe-slot SFT + distilled LoRA (+ detailing IC-LoRA stage 2) | Euler | Keyframe slots → spatial detailing → optional tiled temporal x2 |
+| `DistilledPipeline` | `distilled.py` | 2 | Distilled only | Euler (stage 1: ancestral on 2.5+) | Fastest inference |
| `ICLoraPipeline` | `ic_lora.py` | 2 | Distilled only | Euler | Video-to-video with IC-LoRA control |
| `DubItPipeline` | `dubit.py` | 2 | Distilled only | Euler | Dub-It with IC-LoRA + audio ref conditioning |
| `RetakePipeline` | `retake.py` | 1 | Full or distilled | Euler | Video region regeneration |
@@ -45,15 +46,18 @@ Inference pipelines for LTX-2 audio-video generation. Depends on `ltx-core` for
- No default LoRAs. `loras` param defaults to empty list/tuple. `DEFAULT_LORA_STRENGTH = 1.0`.
- Two-stage non-distilled pipelines require `distilled_lora` (applied to stage 2 only in TI2Vid/A2Vid/Keyframe).
-- HQ is unique: applies distilled LoRA to **both** stages with separate `distilled_lora_strength_stage_1` / `_stage_2` params.
+- HQ applies distilled LoRA to **both** stages with separate `distilled_lora_strength_stage_1` / `_stage_2` params.
+- DFR also applies distilled LoRA to **both** stages (shared stage object for stage 1 /
+ temporal rounds; stage 2 may add a detailing IC-LoRA via `with_loras`).
## Shared building blocks (`utils/blocks.py`)
- `DiffusionStage` -- owns transformer lifecycle; builds model on call, frees on exit via `gpu_model()` context manager (moves params to meta device to release GPU/CPU memory). Accepts optional `stepper` and `loop` overrides. `__init__` takes a pre-built transformer builder; pipelines construct it via the `DiffusionStage.from_checkpoint(checkpoint_path, ..., loras=...)` classmethod, which builds the standard (and, when offloading, streaming) builders. `with_builder` / `with_loras` return a new stage with a swapped builder / LoRA set without re-specifying config.
- `PromptEncoder` -- Gemma text encoder + embeddings processor (video 4096-dim, audio 2048-dim).
-- `ImageConditioner` / `AudioConditioner` -- temporary encoder scope; builds encoder, passes to callable, frees.
+- `ImageConditioner` / `AudioConditioner` -- temporary encoder scope; builds encoder, passes to callable, frees. `ImageConditioner` is additionally the single owner of the image-conditioning CRF: `resolve_crf(images)` (called near the top of every pipeline's `__call__`) fills in the H.264 CRF of any `ImageConditioningInput` that left it unset, reading it from the checkpoint's `model_version` (`detect_params`, lazily and cached). So omitting `crf` means "use what matches this model" (33 through LTX-2.3, 18 from 2.4), while an explicit `crf` -- including `0` for no re-compression -- is always honoured.
- `VideoUpsampler` -- 2x spatial upsampling via encoder + upsampler.
-- `VideoDecoder` / `AudioDecoder` -- latent-to-pixel decoding (iterator for video, `Audio` for audio).
+- `VideoDecoder` / `AudioDecoder` -- latent-to-pixel decoding (iterator for video, `Audio` for audio). `VideoDecoder` takes a single decoder `checkpoint_path` and `diffvae_optimization` (`DiffVAEMode`, default `CHUNKED_EAGER`); pipelines pass `model_paths.video_vae()`, the same file `ImageConditioner` and `VideoUpsampler` build their encoder from -- a video VAE checkpoint carries encoder and decoder together. Decoder kind (conv vs diffusion) is chosen from checkpoint metadata (`is_diffusion_video_vae`); distilled DiffVAE uses fixed 2 Euler steps. CLI: `--video-vae-path` is the video VAE slot in both monolith (optional override; defaults via `ModelPaths.from_monolith`) and split modes; `--diffvae-optimization` (see `docs/optimization.md#diffusion-vae-decoder` for mode meanings and relative compile/runtime/VRAM factors). Multi-GPU pipelines (`*_mgpu.py`) accept the same flags and wrap the loaded decoder in `DistributedVideoDecoder`.
+- `DurationPredictor` -- predicts a frame count from `PromptEncoder`'s connector token outputs via `DurationHead` (`ltx_core.duration_head`), snapped to the VAE's temporal grid. Unlike other blocks, it holds the built model directly (`__init__` takes a `DurationHead`, not a builder) since the checkpoint is only a few MB -- no build-on-call/free-on-exit needed. Pipelines construct it via `DurationPredictor.from_checkpoint(checkpoint_path, dtype, device)`, which returns `None` instead of a predictor if the checkpoint has no `duration_head.*` weights (checkpoints predating LTX-2.5 / gemma4). Called with `(video_encoding, audio_encoding, frame_rate=...)` -- either may be `None` but not both. Wired into `TI2VidOneStagePipeline`, `TI2VidTwoStagesPipeline`, `TI2VidTwoStagesHQPipeline`, `DistilledPipeline`, `DFRPipeline`, and `T2AOneStagePipeline` (audio-only: `video_encoding=None`), plus their MGPU runners: when `num_frames` is omitted (`None`), `require_num_frames_source` (called at the top of `__call__`, before any work) raises immediately if no `DurationPredictor` is available, otherwise it's auto-predicted from the caption. The two-stage pipelines (`TI2VidTwoStagesPipeline`, `TI2VidTwoStagesHQPipeline`, `DistilledPipeline`, `DFRPipeline`) and their MGPU runners return the resolved `num_frames` as a third tuple element from `__call__`, so callers can compute `get_video_chunks_number` for the progress bar without duplicating the auto-duration fallback logic.
### Memory management
@@ -76,14 +80,83 @@ Guided denoisers batch all guidance passes into a **single transformer call**: s
## Per-pipeline unique features
- **HQ**: Res2s second-order sampler for **both** stages, latent-dependent sigma schedule, distilled LoRA on both stages with separate strengths.
-- **A2Vid**: Audio frozen in both stages (`frozen=True, noise_scale=0.0`). Returns original audio (not VAE-decoded); no `AudioDecoder`.
+- **A2Vid**: Audio frozen in both stages (`frozen=True, noise_scale=0.0`). That zeros `denoise_mask` and forces audio `Modality.sigma=0` (prompt AdaLN / a2v gate). Returns original audio (not VAE-decoded); no `AudioDecoder`.
- **IC-LoRA**: `VideoConditionByReferenceLatent`, `reference_downscale_factor` from LoRA metadata, `skip_stage_2`, attention mask downsampling. Stage 2 is LoRA-free and uses `combined_image_conditionings` (no IC-LoRA conditioning).
- **Dub-It**: Standalone pipeline; IC reference **video** helpers in `iclora_utils.py`, Dub-It-only **audio** patchify/negative positions in `dubit.py`. Appends frozen audio-reference tokens via `AudioConditionByReferenceLatent` (ltx-core), matching video token order (`[target | ref]`) while keeping reference RoPE positions negative (training-compatible). Single IC-LoRA on both stages; full IC-LoRA video conditioning at stage 1 and 2; stage-2 audio is frozen with S1 latent as initial state and uses S1-derived ref. Final audio decoded from stage 1 latent. The Dub-It CLI does not expose `--conditioning-attention-mask`; use `ic_lora.py` if you need spatial IC attention masking.
- **Keyframe**: Uses `image_conditionings_by_adding_guiding_latent` in both stages (all frames as keyframe guidance, no replacement) -- unlike TI2Vid which uses `combined_image_conditionings` (frame_idx=0 replaces, others guide).
- **Retake**: `TemporalRegionMask` for selective time-window regeneration. `regenerate_video`/`regenerate_audio` flags. Conditional distilled/full behavior.
-- **Distilled**: Single `self.stage` reused for both stages (not `stage_1`/`stage_2`).
+- **Distilled**: Single `self.stage` reused for both stages (not `stage_1`/`stage_2`). Stage 1's sampler is resolved in `__init__` from the checkpoint generation -- `should_use_ancestral_sampler(path)` (`detect_model_version(...) >= (2, 5)`) sets `self.use_ancestral_sampler`, so LTX-2.5+ uses `EulerAncestralDiffusionStep(eta=1.0, s_noise=1.0)` (the reference sampler's own defaults) + `euler_ancestral_denoising_loop` and older checkpoints keep plain Euler. There is no per-call override; assign the attribute before calling to pin a sampler (e.g. to A/B both on one checkpoint). `distilled_mgpu.py` detects per rank from the same checkpoint, so ranks stay symmetric. Stage 2 is always plain Euler -- its 3-step schedule is too short to remove freshly injected noise. The loop's noise seed is offset (`ANCESTRAL_NOISE_SEED_OFFSET`) so its first draw is not bit-identical to the initial `GaussianNoiser` noise.
+- **DFR** (Diffusion Fidelity Rendering, `dfr_pipeline.py` + its `dfr_layout.py` sidecar):
+ distilled-schedule pipeline on a keyframe-slot-capable **SFT** base with a **distilled LoRA**
+ (strength 1.0). Stage 1 (half-res) generates video + keyframe slots on an **x8-border segment
+ grid**: pad ``(num_frames-1)`` up to a multiple of S (prefer S=32 unless S=24 pads strictly less);
+ positions ``S, 2S, …, N'-1``. Half-res video is reserved for IC-LoRA; video and slot keyframes are
+ spatially latent-upsampled. Stage 2 jointly denoises with distilled LoRA and an optional x2
+ detailing IC-LoRA (no default -- pass ``--detailing-lora`` to enable it; ``VideoConditionByReferenceLatent`` on the
+ reserved half-res stage-1 video, ``STAGE_2_DISTILLED_SIGMAS``). Shipped audio is **stage 1's**:
+ stage 2 still runs an audio pass (video needs the cross-modal attention) but re-noises audio under
+ the detailing LoRA, and the temporal rounds pass ``audio=None``, so nothing refines it afterwards.
+ Optional ``temporal_upsample_rounds`` (0–2): each round temporally x2-upsamples, partitions into
+ ``2**round`` keyframe-seam tiles with a one-segment lead-in on non-first tiles, invents
+ mid-segment slots per tile, and densifies with ancestral Euler (η=0.5).
+ Three invariants worth knowing before touching the temporal rounds:
+ - **Stitch handover is exactly at the shared keyframe.** A tile's local latent 0 is an *image*
+ latent (1 pixel frame) and local latent 1 was denoised against it; neither may be spliced into
+ the mid-canvas stream. The earlier tile keeps through its trailing seam latent and the later tile
+ resumes strictly after the KF (``drop_latent_prefix`` covers lead-in + shared seam). Handing over
+ *before* the KF loses the synchronization point and shows as a jump just before the seam.
+ - **Conditioning fps is capped at 60** (``_MAX_CONDITIONING_FPS``), independently of playback fps.
+ RoPE time is ``pixel_frame / fps``, so a 120 fps time base halves every token's temporal span
+ versus the trained distribution and the model can no longer lay out the 8 pixel frames inside a
+ latent -- it decodes as a motion spike at each 8-frame latent border followed by a stall. Only
+ decode/encode use playback fps.
+ - **Image conditioning is tile-local.** ``frame_idx=0`` means the *tile's* first frame, so
+ re-applying the opening image on a non-first tile pins the wrong frame onto the seam; only images
+ that fall inside the window are re-attached, remapped to local indices.
+
+ The canvas may pad the tail up to a whole segment, but the caller always gets
+ ``(requested_frames - 1) * 2**rounds + 1`` frames: the excess is trimmed before decode (always on
+ a latent boundary, since ``requested - 1`` is a multiple of the VAE temporal scale), and audio is
+ cut to the video's duration. CLI: ``--detailing-lora``, ``--temporal-upsampler-path``,
+ ``--temporal-upsample-rounds``.
+ No ``--num-generated-keyframes``.
## Image conditioning helpers (`utils/helpers.py`)
- `combined_image_conditionings()` -- images with `frame_idx==0` replace latent (`VideoConditionByLatentIndex`), others guide (`VideoConditionByKeyframeIndex`).
- `image_conditionings_by_adding_guiding_latent()` -- all images become keyframe guidance regardless of `frame_idx`.
+- `evenly_spaced_keyframe_positions()` -- evenly spaced **interior** positions (both endpoints excluded).
+
+## Generated keyframes
+
+Optional, off by default on most pipelines, and requires a checkpoint whose transformer config sets
+`use_keyframes_abs_pos_embedding`. Appends empty, fully-denoised single-pixel-frame token slots at
+interior frame positions so the model generates extra frames there, relaxing the effective temporal
+compression at those positions. Slots may optionally carry ``initial_keyframes`` latent seeds
+(written into the appended ``latent`` tokens; ``denoise_mask=1`` still applies).
+
+- **Where**: first stage only, on `TI2VidOneStagePipeline`, `TI2VidTwoStagesPipeline`,
+ `TI2VidTwoStagesHQPipeline`, `DistilledPipeline`, `DFRPipeline`, and the three
+ `*_mgpu` runners. Stage 2 never gets *slots* on TI2Vid/Distilled (effect is baked into the
+ stage-1 latent). `DFRPipeline` is the exception: stage 2 re-attaches **seeded** slots
+ (spatially upsampled stage-1 KF latents) and optional tiled temporal rounds attach
+ mid-segment slots per tile.
+- **API**: `generated_keyframes: int | Sequence[int] = 0` on `__call__` for TI2Vid/Distilled
+ (an `int` requests evenly spaced **interior** keyframes; a sequence gives explicit indices).
+ CLI: `--num-generated-keyframes` via `add_generated_keyframes_arg`. `DFRPipeline` always uses
+ the x8-border segment grid from `dfr_layout.resolve_canvas` and does **not** expose that arg;
+ it adds `--detailing-lora` (optional, no default),
+ `--temporal-upsampler-path`, `--temporal-upsample-rounds`.
+- **Validation**: `DiffusionStage.supports_generated_keyframes` reads the checkpoint config, and
+ `__call__` raises if slots are requested without it -- each keyframe costs a full latent frame of
+ tokens, so silently degrading would waste 16-31% of the token budget.
+- **Cost**: one latent frame of tokens per keyframe, yielding 1 pixel frame instead of 8. At
+ 512x768/241f, 5 keyframes is +16% tokens (~1.35x attention); at 1088x1920/121f it is +31% (~1.72x).
+- **Reading the keyframes back**: `LatentState.generated_keyframes` (`(B, C, K, H, W)`), extracted by
+ `clear_conditioning` using the `generated_keyframe_layout` recorded on the state -- exact, not
+ positional slicing. From outside a pipeline, substitute `RecordingDiffusionStage` for
+ `pipeline.stage`. Decode each keyframe as a standalone one-frame clip; a K-frame causal decode
+ would blend slots that were never adjacent. See `internal/scripts/generated_keyframe_diagnostics.py`.
+- **Invariants**: slots are *appended* (which preserves target noise across a same-seed
+ keyframes/no-keyframes A/B at B=1) and pass `attention_mask=None` (a dense `(B, T, T)` mask would
+ be ~1.8 GB at 30k tokens and would disable FA3/FA4).
diff --git a/packages/ltx-pipelines/README.md b/packages/ltx-pipelines/README.md
index 33ab49a..b8b0494 100644
--- a/packages/ltx-pipelines/README.md
+++ b/packages/ltx-pipelines/README.md
@@ -6,7 +6,8 @@ Pipelines are built using building blocks from [`ltx-core`](../ltx-core/) (sched
**Key Features:**
-- 🎬 **Multiple Pipeline Types**: Text-to-video, image-to-video, video-to-video, audio-to-video, keyframe interpolation, and retake
+- 🎬 **Multiple Pipeline Types**: Text-to-video, image-to-video, video-to-video, audio-to-video, keyframe interpolation, detail-fidelity rendering, and retake
+- 🎥 **HDR / EXR**: Native `--hdr` EXR conditioning with EXR + BT.2020/HLG output, plus dedicated HDR IC-LoRA
- ⚡ **Optimized Performance**: Support for FP8 transformers, gradient estimation, and memory optimization
- 🎯 **Production Ready**: Two-stage pipelines for best quality output
- 🔧 **LoRA Support**: Easy integration with trained LoRA adapters
@@ -39,6 +40,7 @@ See [Installation & Usage](docs/installation.md) for full setup, CLI modules, an
| [Pipeline Selection Guide](docs/pipeline-selection.md) | Decision tree + feature comparison to pick the right pipeline |
| [Available Pipelines](docs/pipelines.md) | Full reference for all 11 pipelines |
| [Conditioning Types](docs/conditioning.md) | Image and video conditioning methods |
+| [HDR Support](docs/hdr.md) | Native EXR/`--hdr` colour spaces, I/O, and examples |
| [Multimodal Guidance](docs/multimodal-guidance.md) | CFG / STG / modality guidance parameters and tuning |
| [Optimization Tips](docs/optimization.md) | FP8 quantization, `torch.compile`, gradient estimation |
| [Multi-GPU Inference](docs/multigpu/README.md) | Run a single generation across GPUs for latency (SP, TDP, distributed VAE, distributed Gemma) |
diff --git a/packages/ltx-pipelines/docs/conditioning.md b/packages/ltx-pipelines/docs/conditioning.md
index 17b62ce..7b63d0a 100644
--- a/packages/ltx-pipelines/docs/conditioning.md
+++ b/packages/ltx-pipelines/docs/conditioning.md
@@ -20,3 +20,42 @@ All pipelines support image conditioning, but with different methods:
- Conditions on entire reference videos
- Useful for video-to-video transformations
- Uses `VideoConditionByKeyframeIndex` from [`ltx-core`](../../ltx-core/)
+
+## HDR / EXR Conditioning
+
+Standard pipelines accept OpenEXR stills (`.exr`) and EXR-frame folders as image / video conditioning when you pass `--hdr {SRGB_LINEAR,ACESCG,ACESCCT}` to declare the source colour space. HDR runs decode to half-float EXR frames plus a BT.2020/HLG master.
+
+See [HDR Support](hdr.md) for colour-space semantics, CLI constraints (no EXR/SDR mix, retake `--frame-rate` rules), and examples.
+## Generated Keyframe Slots
+
+Generated keyframes are extra frames the model produces *in addition* to the regular frame grid, at
+interior positions you choose. Each slot is an empty, fully-denoised token slot appended to the
+sequence; because a slot carries a single pixel frame rather than the eight a normal latent frame
+carries, it relaxes the effective temporal compression at that position — useful where motion is too
+fast for the base temporal resolution.
+
+Uses `VideoGeneratedKeyframeSlots` from [`ltx-core`](../../ltx-core/).
+
+**Requirements.** The checkpoint's transformer config must set `use_keyframes_abs_pos_embedding`.
+LTX-2.5 checkpoints support this; on an older checkpoint the pipeline raises rather than silently
+ignoring the request, since each slot costs a meaningful share of the token budget.
+
+**Cost.** One latent frame of tokens per keyframe, yielding one pixel frame instead of eight. At
+512x768 / 241 frames, 5 keyframes is about +16% tokens (~1.35x attention cost); at 1088x1920 / 121
+frames it is about +31% (~1.72x). Budget for this before raising the count.
+
+**Where it applies.** First stage only, on `TI2VidOneStagePipeline`, `TI2VidTwoStagesPipeline`,
+`TI2VidTwoStagesHQPipeline`, `DistilledPipeline` and their multi-GPU runners. The second stage does
+not need slots — the effect is already baked into the stage-1 latent.
+[`DFRPipeline`](pipelines.md#12-dfrpipeline) is the exception: it re-attaches seeded slots in stage 2
+and invents new ones per tile during temporal rounds.
+
+**Usage.** Pass `generated_keyframes` to `__call__`: an `int` requests that many evenly spaced
+interior keyframes (both endpoints excluded), a sequence gives explicit frame indices. On the CLI the
+flag is `--num-generated-keyframes N` (default `0`, off). It is opt-in per pipeline rather than a
+shared flag, so only the CLIs listed above advertise it — `DFRPipeline` derives its own slot
+positions and does not accept it.
+
+**Reading the keyframes back.** Generated keyframes land in `LatentState.generated_keyframes` with
+shape `(B, C, K, H, W)`. Decode each one as a standalone single-frame clip: a K-frame causal decode
+would blend slots that were never temporally adjacent.
diff --git a/packages/ltx-pipelines/docs/hdr.md b/packages/ltx-pipelines/docs/hdr.md
new file mode 100644
index 0000000..810ffc8
--- /dev/null
+++ b/packages/ltx-pipelines/docs/hdr.md
@@ -0,0 +1,96 @@
+# HDR Support
+
+Native **`--hdr`** support: pass EXR stills / EXR-frame folders into the standard generation and editing pipelines. Decode writes half-float EXR frames plus a BT.2020/HLG master.
+
+For the separate video-to-video HDR IC-LoRA path (LogC3 inverse decode), see [HDRICLoraPipeline](pipelines.md#9-hdriclorapipeline).
+
+## Native HDR (`--hdr`)
+
+### Colour spaces
+
+CLI flag: `--hdr {SRGB_LINEAR,ACESCG,ACESCCT}` (enum [`HDRColorSpace`](../src/ltx_pipelines/utils/media_io/color_config.py)).
+
+| Value | Source meaning | Load behaviour |
+| ----- | -------------- | -------------- |
+| `SRGB_LINEAR` | Scene-linear Rec.709 / sRGB-tagged EXR | Compress to ACEScct for the VAE |
+| `ACESCG` | Scene-linear ACEScg EXR | Compress to ACEScct for the VAE |
+| `ACESCCT` | Already ACEScct log codes | Pass through (no load-time transfer) |
+
+`None` (omitting `--hdr`) means SDR: ordinary image/video inputs and H.264 output.
+
+### Inputs
+
+- EXR **still**: `--image path/to/plate.exr … --hdr SRGB_LINEAR` (same image-conditioning syntax as SDR; path ends in `.exr`).
+- EXR **sequence**: a directory of `*.exr` frames for `--video-conditioning` / `--video-path` (retake). Frames are sorted lexicographically.
+- Retake EXR folders require `--frame-rate` (EXR dirs have no container fps). Video-file retake forbids `--frame-rate`.
+- Any EXR still or folder **requires** `--hdr`. Mixing EXR and non-EXR among `--image` / `--video-conditioning` is rejected.
+- **Dub-It has no `--hdr` flag** — SDR video reference only. EXR folders / `.exr` files are rejected for `--reference-video` (fps and audio come from the container).
+
+### Outputs
+
+When `--hdr` is set, `encode_video` writes:
+
+- **EXR**: half-float frames under `<output_stem>_exr/frame_XXXXX.exr`, tagged to match the chosen colour space (linear or ACEScct log).
+- **HLG master**: 10-bit BT.2020/HLG HEVC (`libx265`) at the `--output-path` (Rec.709 scene-linear → HLG).
+
+VAE decode runs in **float32** for HDR (SDR stays bf16).
+
+### Example — distilled I2V from an EXR still
+
+Uses the LTX-2.5 split layout (same paths as the public README quick start). The diffusion video VAE needs the `natten` extra (`uv sync --extra natten`).
+
+```bash
+uv run python -m ltx_pipelines.distilled \
+ --transformer-path models/ltx-2.5/diffusion_models/ltx-2.5-22b-distilled-transformer-bf16.safetensors \
+ --text-encoder-path models/ltx-2.5/text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors \
+ --video-vae-path models/ltx-2.5/vae/ltx-2.5-video-vae-bf16.safetensors \
+ --audio-vae-path models/ltx-2.5/vae/ltx-2.5-audio-vae-bf16.safetensors \
+ --spatial-upsampler-path models/ltx-2.5/latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors \
+ --num-frames 121 \
+ --prompt "Rain starts falling on the cow in the pasture" \
+ --image path/to/cow_pasture.exr 0 1.0 \
+ --hdr SRGB_LINEAR \
+ --output-path output/cow_rain.mp4
+```
+
+Produces `output/cow_rain.mp4` (HLG HEVC) and `output/cow_rain_exr/*.exr`.
+
+### Example — retake from an EXR sequence
+
+Retake is single-stage (no spatial upsampler). Same LTX-2.5 split components otherwise:
+
+```bash
+uv run python -m ltx_pipelines.retake \
+ --transformer-path models/ltx-2.5/diffusion_models/ltx-2.5-22b-distilled-transformer-bf16.safetensors \
+ --text-encoder-path models/ltx-2.5/text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors \
+ --video-vae-path models/ltx-2.5/vae/ltx-2.5-video-vae-bf16.safetensors \
+ --audio-vae-path models/ltx-2.5/vae/ltx-2.5-audio-vae-bf16.safetensors \
+ --video-path path/to/source_exr_frames/ \
+ --frame-rate 24 \
+ --start-time 0.67 --end-time 5.0 \
+ --prompt "The cow morphs into a moose" \
+ --hdr SRGB_LINEAR \
+ --output-path output/retake.mp4
+```
+
+### Python API
+
+```python
+from ltx_pipelines.utils.media_io import HDRColorSpace, encode_video, resolve_hdr_color_space, vae_dtype_for_hdr
+
+hdr = resolve_hdr_color_space(images=images, video_paths=[], hdr=HDRColorSpace.SRGB_LINEAR)
+vae_dtype = vae_dtype_for_hdr(hdr, default=torch.bfloat16)
+
+# After pipeline decode (iterator of [F,H,W,C] chunks):
+encode_video(video_chunks, fps, audio, output_path, num_chunks, color_space=hdr)
+```
+
+Pipelines that accept image / video conditioning expose an optional `color_space: HDRColorSpace | None` on `__call__` (wired from CLI `--hdr`).
+
+## Constraints (summary)
+
+- EXR input ⇒ `--hdr` required.
+- All conditioning media for a run must be all-EXR or all-SDR (no mix).
+- Retake: `--frame-rate` required for EXR folders, forbidden for video files.
+- Dub-It: no `--hdr`; reference must be an SDR video file (not EXR).
+- DiffVAE / NATTEN: HDR decode still uses the configured VAE; install the `natten` extra when using a diffusion video VAE (same as SDR).
diff --git a/packages/ltx-pipelines/docs/installation.md b/packages/ltx-pipelines/docs/installation.md
index 232b00e..d8c08c7 100644
--- a/packages/ltx-pipelines/docs/installation.md
+++ b/packages/ltx-pipelines/docs/installation.md
@@ -35,13 +35,42 @@ python -m ltx_pipelines.ti2vid_two_stages \
python -m ltx_pipelines.ti2vid_two_stages --help
```
+### Checkpoint layouts: monolith vs split
+
+Every pipeline CLI accepts one of two mutually exclusive path sets.
+
+**Monolith** (legacy) -- one fat `.safetensors` plus a HuggingFace Gemma directory:
+
+```bash
+--checkpoint-path path/to/checkpoint.safetensors --gemma-root path/to/gemma
+```
+
+**Split** (Comfy-aligned) -- one file per component. Pass the subset this pipeline needs
+(unused flags may be omitted; the pipeline validates required slots on `ModelPaths`):
+
+```bash
+python -m ltx_pipelines.distilled \
+ --transformer-path path/to/diffusion_models/ltx-2.5-22b-distilled-transformer-bf16.safetensors \
+ --text-encoder-path path/to/text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors \
+ --video-vae-path path/to/vae/ltx-2.5-video-vae-bf16.safetensors \
+ --audio-vae-path path/to/vae/ltx-2.5-audio-vae-bf16.safetensors \
+ --duration-head-path path/to/duration_head/ltx-2.5-duration-head-bf16.safetensors \
+ ...
+```
+
+Mixing the two sets is an error. In split mode `--text-encoder-path` is a single file -- the
+HuggingFace sidecars (config, tokenizer, processor) are embedded in it and loaded in memory,
+so no `--gemma-root` is needed. Both layouts resolve to the same `ModelPaths` object, which is
+what pipeline constructors take.
+
### Available pipeline modules
-- `ltx_pipelines.ti2vid_two_stages` - Two-stage text/image-to-video (recommended). ([docs](pipelines.md#1-ti2vidtwostagespipeline), [source](../src/ltx_pipelines/ti2vid_two_stages.py))
+- `ltx_pipelines.distilled` - Fast text/image-to-video pipeline using only the distilled model (recommended). ([docs](pipelines.md#4-distilledpipeline), [source](../src/ltx_pipelines/distilled.py))
+- `ltx_pipelines.dfr_pipeline` - Detail-fidelity rendering: generated keyframes, spatial detailing, optional temporal 2x/4x. ([docs](pipelines.md#12-dfrpipeline), [source](../src/ltx_pipelines/dfr_pipeline.py))
+- `ltx_pipelines.ti2vid_two_stages` - Two-stage text/image-to-video. ([docs](pipelines.md#1-ti2vidtwostagespipeline), [source](../src/ltx_pipelines/ti2vid_two_stages.py))
- `ltx_pipelines.ti2vid_two_stages_hq` - Two-stage text/image-to-video (different sampler, better quality). ([docs](pipelines.md#2-ti2vidtwostageshqpipeline), [source](../src/ltx_pipelines/ti2vid_two_stages_hq.py))
- `ltx_pipelines.ti2vid_one_stage` - Single-stage text/image-to-video. ([docs](pipelines.md#3-ti2vidonestagepipeline), [source](../src/ltx_pipelines/ti2vid_one_stage.py))
- `ltx_pipelines.t2a_one_stage` - Single-stage text-to-audio (audio-only output). ([docs](pipelines.md#11-t2aonestagepipeline), [source](../src/ltx_pipelines/t2a_one_stage.py))
-- `ltx_pipelines.distilled` - Fast text/image-to-video pipeline using only the distilled model. ([docs](pipelines.md#4-distilledpipeline), [source](../src/ltx_pipelines/distilled.py))
- `ltx_pipelines.ic_lora` - Video-to-video with IC-LoRA. ([docs](pipelines.md#5-iclorapipeline), [source](../src/ltx_pipelines/ic_lora.py))
- `ltx_pipelines.keyframe_interpolation` - Keyframe interpolation. ([docs](pipelines.md#6-keyframeinterpolationpipeline), [source](../src/ltx_pipelines/keyframe_interpolation.py))
- `ltx_pipelines.a2vid_two_stage` - Audio-to-video generation conditioned on an input audio. ([docs](pipelines.md#7-a2vidpipelinetwostage), [source](../src/ltx_pipelines/a2vid_two_stage.py))
@@ -51,6 +80,8 @@ python -m ltx_pipelines.ti2vid_two_stages --help
Use `--help` with any pipeline module to see all available options and parameters.
+For native EXR conditioning and HDR encode on the standard pipelines, see [HDR Support](hdr.md).
+
## Common CLI flags
These flags are shared across the pipeline CLIs (they come from a common base parser); run a module with `--help` for its full set.
@@ -62,3 +93,6 @@ These flags are shared across the pipeline CLIs (they come from a common base pa
- `--compile [key=value ...]` - enable `torch.compile`, optionally overriding the compilation config.
- `--lora <path> [strength]` - apply a LoRA (repeatable; default strength 1.0).
- `--enhance-prompt` - rewrite the prompt with the built-in enhancer before generation.
+- `--hdr {SRGB_LINEAR,ACESCG,ACESCCT}` - on pipelines that accept image / video conditioning (not Dub-It, HDR IC-LoRA, or T2A): declare the source colour space for EXR stills / EXR-frame folders. Required whenever any EXR input is passed; omit for SDR. With `--hdr` set, encode writes half EXR frames plus a BT.2020/HLG master. See [HDR Support](hdr.md).
+- `--video-vae-path <path>` - video VAE `.safetensors` (encoder + decoder). Split: the `vae/` component. Monolith: optional override of the VAE bundled in `--checkpoint-path`/`--distilled-checkpoint-path`. When it is a diffusion VAE, decoding builds a `DiffusionVideoDecoder`, which for best performance requires the `natten` extra. See [Optimization Tips](optimization.md#diffusion-vae-decoder).
+- `--diffvae-optimization {chunked_eager,chunked_compile,combined_compile}` - DiffVAE decode preset (ignored for convolutional VAEs).
diff --git a/packages/ltx-pipelines/docs/multigpu/README.md b/packages/ltx-pipelines/docs/multigpu/README.md
index dd008ab..d42f0ae 100644
--- a/packages/ltx-pipelines/docs/multigpu/README.md
+++ b/packages/ltx-pipelines/docs/multigpu/README.md
@@ -50,15 +50,20 @@ The [`MGPUController`](controller.md) spawns one worker process per GPU and runs
user-defined **runner** (a subclass of `MGPURunner`) in SPMD lockstep. A runner's
`setup()` builds a standard pipeline, then **swaps** each block's builder for an MGPU
builder (SP / TDP / distributed decoder / distributed Gemma). All builders share one
-`StateDictRegistry` so the checkpoint loads from disk once per process.
+`ModelRegistry` so the checkpoint loads from disk once per process.
Two runners are provided, each with a CLI:
- [`ltx_pipelines.ti2vid_two_stages_mgpu`](../../src/ltx_pipelines/ti2vid_two_stages_mgpu.py) — SP stage 1 + TDP stage 2 + Accelerate Gemma + distributed VAE.
- [`ltx_pipelines.distilled_mgpu`](../../src/ltx_pipelines/distilled_mgpu.py) — SP (shared stage) + Accelerate Gemma + distributed VAE.
+Checkpoint paths follow the same monolith **XOR** split contract as single-GPU CLIs:
+the parser builds a `ModelPaths` object and runners read only that (see
+[installation](../installation.md#checkpoint-layouts-monolith-vs-split)). Pass either a fat checkpoint +
+Gemma directory, or the split component flags — not both.
+
```bash
-# Two-stage on all visible GPUs
+# Two-stage on all visible GPUs (monolith layout)
python -m ltx_pipelines.ti2vid_two_stages_mgpu \
--checkpoint-path path/to/checkpoint.safetensors \
--distilled-lora path/to/distilled_lora.safetensors 1.0 \
@@ -66,6 +71,18 @@ python -m ltx_pipelines.ti2vid_two_stages_mgpu \
--gemma-root path/to/gemma \
--prompt "A beautiful sunset over the ocean" \
--output-path output.mp4
+
+# Same entrypoint with a Comfy-aligned split pack (subset of flags as needed)
+python -m ltx_pipelines.ti2vid_two_stages_mgpu \
+ --transformer-path path/to/diffusion_models/ltx-….safetensors \
+ --text-encoder-path path/to/text_encoders/gemma-….safetensors \
+ --video-vae-path path/to/vae/ltx-…-video-vae.safetensors \
+ --audio-vae-path path/to/vae/ltx-…-audio-vae.safetensors \
+ --duration-head-path path/to/duration_head/ltx-….safetensors \
+ --distilled-lora path/to/distilled_lora.safetensors 1.0 \
+ --spatial-upsampler-path path/to/upsampler.safetensors \
+ --prompt "A beautiful sunset over the ocean" \
+ --output-path output.mp4
```
## Pages
diff --git a/packages/ltx-pipelines/docs/multigpu/controller.md b/packages/ltx-pipelines/docs/multigpu/controller.md
index 3258ba0..1d0d0fe 100644
--- a/packages/ltx-pipelines/docs/multigpu/controller.md
+++ b/packages/ltx-pipelines/docs/multigpu/controller.md
@@ -62,7 +62,7 @@ class MyRunner(MGPURunner):
from ltx_pipelines.multigpu import MGPUController
controller = MGPUController(MyRunner, num_gpus=8)
-controller.start(checkpoint_path="...", gemma_root="...") # setup kwargs
+controller.start(model_paths=ModelPaths.from_monolith("...", "...")) # setup kwargs
stream = controller.stream(prompt="a cat", seed=42)
try:
for item in stream: # one element per yield, as it arrives (NOT gathered across ranks)
diff --git a/packages/ltx-pipelines/docs/multigpu/distributed-decoder.md b/packages/ltx-pipelines/docs/multigpu/distributed-decoder.md
index 11c3ab9..056c6d7 100644
--- a/packages/ltx-pipelines/docs/multigpu/distributed-decoder.md
+++ b/packages/ltx-pipelines/docs/multigpu/distributed-decoder.md
@@ -12,6 +12,13 @@ Workers ship their decoded tiles to the **driver rank** over an `mp.Queue` (CUDA
IPC — zero-copy handle sharing); the driver blends overlaps and yields the assembled
frames as temporal batches spread across the GPUs.
+`DistributedVideoDecoder` wraps any `VideoDecoder` — both the conv
+`ConvVideoDecoder` and the diffusion `DiffusionVideoDecoder` — by calling the
+public `decode_video` API per MGPU tile (already `[F, H, W, C]` in `[0, 1]`).
+It does **not** apply a second `[-1, 1] → [0, 1]` map. Full-video assembly is
+`gather_frames` on the driver; any `torch.cat` of decode yields is only for
+stitching that tile’s optional SGPU temporal chunks.
+
## Inter-GPU tiling vs intra-GPU tiling
Two independent tilings, commonly conflated:
@@ -22,9 +29,13 @@ Two independent tilings, commonly conflated:
| **Intra-GPU** (SGPU) | Chunking *within* a rank's tile to bound **VRAM** | `tiling_config: TilingConfig` (per call) | the pipeline's usual tiling kwarg |
They compose — a rank can further chunk its assigned tile for VRAM — with one
-guard: **multi-GPU temporal tiling and single-GPU temporal tiling cannot both be
-on.** If `vae_tiling.frames.num_tiles > 1` and `tiling_config.temporal_config` is
-set, `decode_video` raises, because two causal temporal splits would conflict.
+guard: **multi-GPU temporal tiling and single-GPU temporal tiling cannot both
+actually split the temporal axis.** If `vae_tiling.frames.num_tiles > 1` and
+SGPU `tiling_config.video_chunks_number(tile_frames) > 1` for a rank's tile
+(i.e. SGPU would produce more than one temporal chunk on that extent),
+`decode_video` raises, because two causal temporal splits would conflict. A
+size-based SGPU config such as `frames=80/24` on a short tile is fine when it
+still yields a single chunk.
## API
diff --git a/packages/ltx-pipelines/docs/multigpu/gemma.md b/packages/ltx-pipelines/docs/multigpu/gemma.md
index 8e701c2..ac022bb 100644
--- a/packages/ltx-pipelines/docs/multigpu/gemma.md
+++ b/packages/ltx-pipelines/docs/multigpu/gemma.md
@@ -14,15 +14,17 @@ lightweight `AccelerateGemmaWrapper` stub that receives the encoded embeddings o
NCCL. The source rank fuses all prompts into one Gemma call, then broadcasts each
output.
-The first `build()` loads via HuggingFace `from_pretrained` and caches the full
-state dict (including non-persistent buffers) in the registry; later builds recreate
-the model from cache and reinstall the dispatch hooks — no disk I/O.
+The first `build()` loads Gemma via `load_gemma_with_device_map` (directory
+`from_pretrained(device_map="auto")`, or single-file TE with the same balanced
+placement) and caches the full state dict (including non-persistent buffers) in
+the registry; later builds recreate the model from cache and reinstall the
+dispatch hooks — no disk I/O.
```python
from ltx_pipelines.multigpu.gemma_builders import AccelerateGemmaBuilder
AccelerateGemmaBuilder(
- gemma_root_path: str,
+ gemma_root_path: str, # HF gemma dir OR split TE .safetensors
gemma_group: dist.ProcessGroup | None, # self.groups.gemma_group
broadcast_group: dist.ProcessGroup | None, # self.groups.transformer_group
registry: Registry,
@@ -34,18 +36,44 @@ AccelerateGemmaBuilder(
Usage (in `runner.setup()`):
+Shipped runners take a resolved `ModelPaths` and pass
+`model_paths.text_encoder()` as `gemma_root_path` — that is either the monolith
+`--gemma-root` directory or the split `--text-encoder-path` single-file TE. A
+separate enhancer still comes from `--prompt-enhancer-gemma-root` when set (may
+be `None` when enhance shares the encode checkpoint).
+
```python
-pipeline.prompt_encoder._text_encoder_builder = AccelerateGemmaBuilder(
- gemma_root_path=gemma_root,
+from ltx_pipelines.multigpu.gemma_builders import AccelerateGemmaBuilder
+
+pe = pipeline.prompt_encoder
+# Shared enhance aliases the encode builder; capture that before replacing encode.
+separate_enhancer = pe._enhancer_text_encoder_builder is not pe._text_encoder_builder
+pe._text_encoder_builder = AccelerateGemmaBuilder(
+ gemma_root_path=model_paths.text_encoder(),
gemma_group=self.groups.gemma_group,
broadcast_group=self.groups.transformer_group,
registry=registry,
src_rank=0,
dtype=pipeline.dtype,
)
+if separate_enhancer:
+ pe._enhancer_text_encoder_builder = AccelerateGemmaBuilder(
+ gemma_root_path=prompt_enhancer_gemma_root,
+ gemma_group=self.groups.gemma_group,
+ broadcast_group=self.groups.transformer_group,
+ registry=registry,
+ src_rank=0,
+ dtype=pipeline.dtype,
+ )
+else:
+ pe._enhancer_text_encoder_builder = pe._text_encoder_builder
```
-The shipped runners (`ti2vid_two_stages_mgpu`, `ti2vid_two_stages_hq_mgpu`, `distilled_mgpu`) use this builder.
+When a separate enhancer is configured (`--prompt-enhancer-gemma-root` different
+from the encode root), patch a second `AccelerateGemmaBuilder` onto
+`_enhancer_text_encoder_builder`. Otherwise re-alias it to the encode builder so
+shared enhance stays one residency. Enhance goes through `AccelerateGemmaWrapper`
+(src generate + string broadcast), same as encode.
## `BatchParallelGemmaBuilder` (replicated — data-parallel over prompts)
@@ -60,7 +88,7 @@ concurrently on different GPUs. Non-deterministic prompt enhancement
from ltx_pipelines.multigpu.bp_gemma_builder import BatchParallelGemmaBuilder
BatchParallelGemmaBuilder(
- gemma_root_path: str,
+ gemma_root_path: str, # HF gemma dir OR split TE .safetensors (same as Accelerate path)
broadcast_group: dist.ProcessGroup | None,
registry: Registry,
*,
diff --git a/packages/ltx-pipelines/docs/multigpu/pipeline-setup.md b/packages/ltx-pipelines/docs/multigpu/pipeline-setup.md
index 88d732e..afebb9a 100644
--- a/packages/ltx-pipelines/docs/multigpu/pipeline-setup.md
+++ b/packages/ltx-pipelines/docs/multigpu/pipeline-setup.md
@@ -12,7 +12,7 @@ This is performed inside a runner's `setup()` (which runs on every rank — see
[Controller](controller.md)).
```python
-from ltx_core.loader.registry import StateDictRegistry
+from ltx_core.loader.registry import ModelRegistry
from ltx_pipelines.ti2vid_two_stages import TI2VidTwoStagesPipeline
from ltx_pipelines.multigpu.sp_builder import SequenceParallelBuilder
from ltx_pipelines.multigpu.tdp_builder import TiledDataParallelBuilder
@@ -22,12 +22,12 @@ from ltx_pipelines.multigpu.weight_tracker import TransformerWeightTracker
from ltx_core.multigpu.transformer.attention import AttentionManager
# 1. ONE shared registry for every builder in this process.
-registry = StateDictRegistry()
+registry = ModelRegistry()
# 2. Build the normal pipeline, handing it the registry.
pipeline = TI2VidTwoStagesPipeline(
- checkpoint_path=..., distilled_lora=..., spatial_upsampler_path=...,
- gemma_root=..., loras=[], registry=registry, quantization=...,
+ model_paths=..., distilled_lora=..., spatial_upsampler_path=...,
+ loras=[], registry=registry, quantization=...,
)
# 3. One weight tracker per transformer process group (shared by the stages).
@@ -56,15 +56,24 @@ constructor.
> runners assign `stage._transformer_builder = ...` directly because they mutate the
> pipeline once, in place, during `setup()`. Both reach the same builder slot.
-## The shared weights registry
+## The shared model registry
-`StateDictRegistry` is an in-process cache of loaded state dicts, keyed by
-`(resolved paths, sd_ops name)`. Passing **one** registry to every builder means:
+`ModelRegistry` is an in-process cache with two independent stores, toggled via
+`cache_weights` / `cache_models` on construction (both default `True`):
-- The transformer checkpoint is read from disk **once per process**, even though
- stage 1 (SP) and stage 2 (TDP) are separate builders on the same file.
-- Gemma and the VAE cache their weights the same way (rebuild the module tree from
- the cached tensors, skip disk I/O).
+- **Weights** — state dicts keyed by `(resolved paths, sd_ops name)`. Passing
+ **one** registry to every builder means the transformer checkpoint is read from
+ disk **once per process**, even though stage 1 (SP) and stage 2 (TDP) are
+ separate builders on the same file. Gemma and the VAE cache their weights the
+ same way.
+- **Module shells** — `nn.Module` instances keyed by `module_registry_key`
+ (configurator + init config + module ops). A hit reuses the shell; callers
+ always reassign weights onto it. Non-persistent buffers installed by module ops
+ stay on the shell across `dispose` and are not stored in the weight map.
+
+Retained weights are treated as immutable clean cache: LoRA fusion allocates a
+fresh destination SD when `registry.get(...)` hits, so in-place fuse never
+corrupts the registry.
The registry is **per process** — it is not shared across ranks. Each worker loads
its own copy, so the full checkpoint is resident on every GPU (see the
diff --git a/packages/ltx-pipelines/docs/optimization.md b/packages/ltx-pipelines/docs/optimization.md
index af97df6..f02190d 100644
--- a/packages/ltx-pipelines/docs/optimization.md
+++ b/packages/ltx-pipelines/docs/optimization.md
@@ -6,12 +6,14 @@
For smaller GPU memory footprint, use the `--quantization` flag and set `PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True`.
-Two quantization policies are available:
+Quantization policies available via `--quantization`:
| Policy | CLI Flag | Description |
| ------ | -------- | ----------- |
| **FP8 Cast** | `--quantization fp8-cast` | Downcasts transformer linear weights to FP8 during loading; upcasts on the fly during inference. No extra dependencies. |
| **FP8 Scaled MM** | `--quantization fp8-scaled-mm` | Uses FP8 scaled matrix multiplication via PyTorch's `torch._scaled_mm`. Best performance on Hopper+ GPUs with native FP8 support. |
+| **NVFP4 Cast** | `--quantization nvfp4-cast` | Online BF16→NVFP4 for allowlisted DiT Linears via `ltx_kernels.nvfp4`. Requires Blackwell (SM ≥ 10) and `nvfp4_cpp` (`uv sync --group kernels` / `TORCH_CUDA_ARCH_LIST=10.0`). |
+| **NVFP4 prequant** | `--quantization nvfp4-prequant` | Load a pre-quantized NVFP4 checkpoint (packed uint8 weights + block scales + weight `weight_scale_2` + calibrated `input_scale`). Uses static activation per-tensor scale from the checkpoint (no runtime amax); per-16 E4M3 block scales are still computed each forward. Pair with a BF16 VAE. Same SM / `ltx-kernels` requirements as cast. Every discovered NVFP4 Linear is hosted as `NVFP4Linear`, including layers whose `weight_scale` rows are cuBLAS-padded above `out_features` (no BF16 dequant fallback). |
**CLI:**
@@ -23,6 +25,12 @@ PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True python -m ltx_pipelines.ti2vid_
# FP8 Scaled MM (no extra deps, best on Hopper+ GPUs)
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True python -m ltx_pipelines.ti2vid_two_stages \
--quantization fp8-scaled-mm --checkpoint-path=...
+
+# NVFP4 from a pre-quantized DiT checkpoint (BF16 VAE)
+PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True python -m ltx_pipelines.distilled \
+ --quantization nvfp4-prequant \
+ --distilled-checkpoint-path=/path/to/nvfp4.safetensors \
+ --vae-checkpoint-path=/path/to/bf16.safetensors
```
**Programmatically:**
@@ -31,14 +39,14 @@ When authoring custom scripts, pass a `QuantizationPolicy` to pipeline classes:
```python
from ltx_core.quantization.fp8_cast import build_policy as build_fp8_cast_policy
-# Alternative:
+# Alternatives:
# from ltx_core.quantization.fp8_scaled_mm import build_policy as build_fp8_scaled_mm_policy
+# from ltx_core.quantization.nvfp4 import build_nvfp4_cast_policy, build_nvfp4_prequant_policy
pipeline = TI2VidTwoStagesPipeline(
- checkpoint_path=ltx_model_path,
+ model_paths=ModelPaths.from_monolith(ltx_model_path, gemma_root_path),
distilled_lora=distilled_lora,
spatial_upsampler_path=upsampler_path,
- gemma_root=gemma_root_path,
loras=[],
quantization=build_fp8_cast_policy(ltx_model_path),
)
@@ -63,9 +71,9 @@ By default, pipelines clean GPU memory (especially transformer weights) between
## Compilation (`torch.compile`)
-Compiling the transformer blocks with `torch.compile` speeds up inference. It is **opt-in and off by default**. The blocks are compiled shape-polymorphically (the sequence dimension is marked dynamic), so one compiled artifact serves any token count without recompiling.
+Compiling the transformer blocks with `torch.compile` speeds up inference. It is **opt-in and off by default**. The blocks are compiled shape-polymorphically (the sequence dimension is marked dynamic by default; see `seq_dim_dynamic`), so one compiled artifact serves any token count without recompiling.
-**CLI** — the `--compile` flag maps directly to `CompilationConfig`:
+**CLI** - the `--compile` flag maps directly to `CompilationConfig`:
| Form | Result |
| ---- | ------ |
@@ -77,26 +85,31 @@ Compiling the transformer blocks with `torch.compile` speeds up inference. It is
# Defaults
python -m ltx_pipelines.ti2vid_two_stages --compile --checkpoint-path=...
-# reduce-overhead captures CUDA graphs -- the main latency lever for the denoising loop.
-# Off by default because graph capture reserves static memory pools (extra VRAM), so it
-# trades memory for speed; enable it when you have headroom.
+# reduce-overhead / max-autotune / capture all need GPU-resident weights
+# (keeps_gpu_resident_weights -- SP/TDP + weight tracker, or streaming).
python -m ltx_pipelines.ti2vid_two_stages --compile mode=reduce-overhead --checkpoint-path=...
# Several overrides at once
python -m ltx_pipelines.ti2vid_two_stages \
--compile mode=max-autotune fullgraph=true dynamic=true --checkpoint-path=...
+
+# Self-managed block-loop CUDA-graph capture
+python -m ltx_pipelines.ti2vid_two_stages --compile capture=true --checkpoint-path=...
```
| Field | Values | Default | Notes |
| ----- | ------ | ------- | ----- |
-| `mode` | `none`, `reduce-overhead`, `max-autotune`, … | `none` | `reduce-overhead`/`max-autotune` enable CUDA graphs |
+| `mode` | `none`, `reduce-overhead`, `max-autotune`, … | `none` | `reduce-overhead`/`max-autotune` enable CUDA graphs; require `keeps_gpu_resident_weights=True` or the stage raises |
| `backend` | `inductor`, `eager`, … | `inductor` | |
| `fullgraph` | `true`/`false` | `false` | |
-| `dynamic` | `auto`/`true`/`false` | `auto` | the seq dim is marked dynamic regardless |
+| `dynamic` | `auto`/`true`/`false` | `auto` | the seq dim is marked dynamic separately (see `seq_dim_dynamic`) |
| `inductor_config` | JSON object or path to a `.json` | `{}` | `torch._inductor.config` overrides |
| `dynamo_config` | JSON object or path to a `.json` | `{"inline_inbuilt_nn_modules": true, "cache_size_limit": 256}` | `torch._dynamo.config` overrides |
+| `seq_dim_dynamic` | `true`/`false` | `true` | mark the block's sequence dim dynamic so one artifact serves any token count; `false` recompiles per token count |
+| `recompile_perturbed_block` | `true`/`false` | `true` | `true` recompiles a separate block graph for the STG-perturbed pass; `false` attaches unconditional runtime masks so the block traces once (single graph) |
+| `capture` | `true`/`false` | `false` | per-block compile + one CUDA graph over the block loop (keyed by shape / perturbation signature). Requires `keeps_gpu_resident_weights=True`. Faster cold-start and smaller new-shape penalty than `mode=reduce-overhead` |
-**Controlling inductor / dynamo configs.** `inductor_config` and `dynamo_config` take either an inline JSON object or a path to a `.json` file, applied via `torch._inductor.config.patch(...)` / `torch._dynamo.config.patch(...)` around the compiled forward. They **replace the defaults wholesale — they do not merge**, so when overriding `dynamo_config` re-include any defaults you want to keep:
+**Controlling inductor / dynamo configs.** `inductor_config` and `dynamo_config` take either an inline JSON object or a path to a `.json` file, applied via `torch._inductor.config.patch(...)` / `torch._dynamo.config.patch(...)` around the compiled forward. They **replace the defaults wholesale - they do not merge**, so when overriding `dynamo_config` re-include any defaults you want to keep:
```bash
python -m ltx_pipelines.ti2vid_two_stages \
@@ -116,7 +129,7 @@ pipeline = TI2VidTwoStagesPipeline(
)
```
-**Faster cache loads: `unsafe_skip_cache_dynamic_shape_guards` (unsafe, opt-in).** Inductor's FX-graph cache re-checks the dynamic-shape guards stored with each entry on every lookup. Setting this flag skips that re-check (every entry is treated as a guard hit), which speeds up warm and cross-process cache loads. It is **not enabled by default** because it is a correctness hazard: a kernel first compiled at a small sequence length keeps int32 address arithmetic, and reusing it at a larger sequence length (roughly **>58k tokens/rank**) overflows int32 and reads out of bounds — surfacing as a CUDA illegal memory access or silently corrupted output. Only enable it when your token counts stay within the range the cached kernels were compiled for:
+**Faster cache loads: `unsafe_skip_cache_dynamic_shape_guards` (unsafe, opt-in).** Inductor's FX-graph cache re-checks the dynamic-shape guards stored with each entry on every lookup. Setting this flag skips that re-check (every entry is treated as a guard hit), which speeds up warm and cross-process cache loads. It is **not enabled by default** because it is a correctness hazard: a kernel first compiled at a small sequence length keeps int32 address arithmetic, and reusing it at a larger sequence length (roughly **>58k tokens/rank**) overflows int32 and reads out of bounds - surfacing as a CUDA illegal memory access or silently corrupted output. Only enable it when your token counts stay within the range the cached kernels were compiled for:
```bash
python -m ltx_pipelines.ti2vid_two_stages \
@@ -124,6 +137,115 @@ python -m ltx_pipelines.ti2vid_two_stages \
--checkpoint-path=...
```
+## Diffusion VAE Decoder
+
+By default, the video VAE comes from `--checkpoint-path`/`--distilled-checkpoint-path` (monolith) or `--video-vae-path` (split). You can point `--video-vae-path` at a **separate** `.safetensors` (e.g. a distilled DiffVAE) without changing the main transformer checkpoint. Decoder kind (conv `ConvVideoDecoder` vs NATTEN `DiffusionVideoDecoder`) is selected from that file's metadata, not from whether the override flag was passed.
+
+> The path supplies the **whole** video VAE, not just the decoder: image conditioning (`ImageConditioner`) and the stage-2 `VideoUpsampler` build their encoder from the same file. Released VAE checkpoints bundle encoder and decoder together.
+
+**Neighborhood attention backends** (selected at DiffVAEMode apply-time):
+
+| Backend | When | Notes |
+| ------- | ---- | ----- |
+| **CuTe DSL** (`blackwell_dsl`) | Datacenter Blackwell (B200) with `ltx-kernels` / `nvidia-cutlass-dsl` | Fastest on B200; fused stage-5 context projection. Not used on consumer Blackwell (sm_120). |
+| **NATTEN** | `natten` extra installed | Fastest production path on non-B200 GPUs (Hopper/Ampere/Ada). |
+| **Triton** `na3d` | CUDA + working Triton (incl. [triton-windows](https://github.com/triton-lang/triton-windows)); natten missing | Compatibility fallback. |
+| **eager** tiled SDPA | Always | Slowest; last resort when Triton is unavailable. |
+
+```bash
+# Recommended for DiffVAE production decode on non-B200 GPUs
+uv sync --package ltx-core --extra natten
+
+# B200 / datacenter Blackwell CuTe DSL path
+uv sync --group kernels
+```
+
+That `natten` extra pins `natten==0.21.7+torch2130cu132` with `torch==2.13.0` (cu132). If DiffVAE decode hits a CUDA illegal memory access, upgrade CUDA / PyTorch / natten to those pins - the failure usually comes from outdated NVIDIA libs bundled with older PyTorch, not from tiling config.
+
+**Mode × backend rules:**
+
+- `blackwell_dsl` uses CuTe DSL NA + fused stage-5 (requires datacenter Blackwell + `uv sync --group kernels`). Independent of natten.
+- `combined_compile` **requires natten** (full-volume NA + `torch.compile`). Without it, apply raises.
+- `chunked_eager` / `chunked_compile` remapped to Triton/eager when natten is missing (compile is disabled on the fallback path). Triton/eager are for compatibility only.
+
+Pipeline `AUTO_TILING` resolves via `tiling_config_for_vae`: for a **Conv VAE** that is aspect-coupled long-side `768/64` spatial tiles plus temporal `80/24` (`TileSizeConfig.from_long_side`). For **DiffVAE**, recommended decode tiling enumerates legal per-axis tile **sizes** on the VAE grid (via the same `split_by_size` path decode uses) and emits a `TileSizeConfig` with independent `frames` / `height` / `width` `DimensionSizeConfig` values. Tile sizes are floored at ``2xOverlap`` so blend masks stay complementary. Stage-5 VRAM coef for `chunked_compile` is **7** with natten; with Triton/eager fallback it uses the `chunked_eager` coef (**5**).
+
+**CLI:**
+
+| Flag | Effect |
+| ---- | ------ |
+| `--video-vae-path <path>` | Video VAE `.safetensors` path (encoder + decoder). Split: the `vae/` component. Monolith: optional override; defaults to `--checkpoint-path` / `--distilled-checkpoint-path` when omitted. |
+| `--diffvae-optimization` | DiffVAE preset: `chunked_eager` (default), `chunked_compile`, `combined_compile`, `blackwell_dsl`. Ignored for convolutional VAEs. |
+
+**Modes** (default `chunked_eager`):
+
+| Mode | Behavior |
+| ---- | -------- |
+| `chunked_eager` | Deferred stage-4 inject (sequential upsample then `context_proj`), W-chunks=4, cutlass-fna (or Triton/eager fallback), no `torch.compile`. Lowest compile cost; lower peak VRAM. |
+| `chunked_compile` | Same deferred/chunked pathway + `torch.compile` on attn+mlp only when natten is present (det stages stay eager). Without natten: same as `chunked_eager` fallback path. |
+| `combined_compile` | Combined `context_and_x` buffer, full-volume attention, compile blocks + det stages. **Requires natten.** Fastest warm decode on non-B200; highest VRAM. |
+| `blackwell_dsl` | Deferred stage-4 + CuTe DSL NA / fused stage-5. Fastest on datacenter Blackwell (B200). Needs `uv sync --group kernels`. |
+
+**Relative performance** (order-of-magnitude; hardware varies - no absolute timings or VRAM figures):
+
+- **Compile:** `chunked_compile` roughly **~2x faster to compile** than `combined_compile` (det stages not compiled).
+- **Warm runtime (non-B200):** relative to `combined_compile` (fastest with natten): `chunked_compile` roughly **~1.4x slower**, `chunked_eager` roughly **~2-2.5x slower**.
+- **Warm runtime (B200):** `blackwell_dsl` is the preferred / fastest path; NATTEN modes remain available but are not the B200 default.
+- **Peak VRAM:** `chunked_*` roughly **~½** of `combined_compile`.
+
+Checkpoint notes:
+
+- **Bundled DiffVAE** (full model with `vae.decoder.*` fine path): `coarse_*` preview-head weights are ignored at load; decode is **1-step from noise** via `DiffusionVideoDecoder.forward` (no Euler loop) when `default_num_inference_steps == 1`.
+- **Standalone distilled DiffVAE**: legacy `gate_msa` / `gate_mlp` (and optional `gate_ctx`) are folded into `attn.proj` / `mlp.w_down` / `context_proj` on load, then dropped. Default schedule is **2 Euler steps**.
+
+```bash
+python -m ltx_pipelines.ti2vid_two_stages \
+ --checkpoint-path path/to/checkpoint.safetensors \
+ --video-vae-path path/to/diffusion_vae.safetensors \
+ --diffvae-optimization combined_compile \
+ ...
+```
+
+**Programmatically**, pipelines take a single `model_paths: ModelPaths`; its `video_vae_path` feeds the `VideoDecoder`, `ImageConditioner` and `VideoUpsampler` blocks. `ModelPaths.from_monolith` accepts the same optional override the CLI exposes:
+
+```python
+from ltx_core.model.video_vae.transformer import DiffVAEMode
+
+pipeline = TI2VidTwoStagesPipeline(
+ ...,
+ model_paths=ModelPaths.from_monolith(
+ checkpoint_path,
+ gemma_root,
+ video_vae_path="path/to/diffusion_vae.safetensors",
+ ),
+ diffvae_optimization=DiffVAEMode.COMBINED_COMPILE,
+)
+```
+
+Also supported on the multi-GPU pipelines (`*_mgpu.py`): the same flags flow into the underlying pipeline, and `DistributedVideoDecoder` wraps the loaded decoder when applicable. DiffVAE ModuleOps stay on the inner builder so they apply before the distributed wrap.
+
+### Tile size vs compile latency (int32 address threshold)
+
+Inductor's default address arithmetic stays in **int32** while the decoded tile volume stays under ~2.1e9 elements x channels. Crossing that threshold forces int64 addressing and roughly **~2.5x colder compile**:
+
+```
+Threshold: T x (H_px/4) x (W_px/4) x 512 ≤ 2,147,483,647
+ ⇔ T x (H_px/4) x (W_px/4) ≤ 4,194,303
+```
+
+Examples (latent shape after /4 spatial downsample; product is T·H·W·512):
+
+| Tile / clip | Latent (T,H,W) | T·H·W·512 | int32? | Cold compile (approx.) |
+| ----------- | -------------- | --------- | ------ | ---------------------- |
+| 512x512x48f tile | (48,128,128) | 0.40e9 | ≤int32 | ~30-35s |
+| 768x768x80f tile | (80,192,192) | 1.51e9 | ≤int32 | - |
+| 736x1024x120f (1024px on 736x1280) | (120,184,256) | 2.89e9 | OVER (int64) | ~70s+ |
+| 1024x1024x120f square | (120,256,256) | 4.03e9 | OVER | - |
+| 544x960x121 full non-tiled | (121,136,240) | 2.02e9 | ≤int32 (barely) | - |
+| 736x1280x241 full non-tiled | (241,184,320) | 7.27e9 | OVER | - |
+
+**Tradeoff:** bigger tiles → fewer tiles / less overlap waste, but crossing int32 costs ~2.5x cold compile. Prefer **≤768@80f** or **512@48f** when compile latency matters; use **1024@120f** when decode throughput wins.
+
## Denoising Loop Optimization
**Gradient Estimation Denoising Loop:**
diff --git a/packages/ltx-pipelines/docs/pipeline-selection.md b/packages/ltx-pipelines/docs/pipeline-selection.md
index d6edefd..5e09fea 100644
--- a/packages/ltx-pipelines/docs/pipeline-selection.md
+++ b/packages/ltx-pipelines/docs/pipeline-selection.md
@@ -9,8 +9,11 @@ Do you have an existing video to modify?
Do you have an audio file to drive generation?
├─ YES → Use A2VidPipelineTwoStage (audio-to-video)
│
-Do you need HDR output (linear float frames for EXR / tonemapping)?
-├─ YES → Use HDRICLoraPipeline (video-to-video with LogC3 inverse decode)
+Do you need HDR / EXR I/O?
+├─ YES → Do you have EXR stills or EXR-frame folders for a standard pipeline?
+│ ├─ YES → Use Distilled / TI2V / Retake / IC-LoRA with `--hdr {SRGB_LINEAR,ACESCG,ACESCCT}`
+│ │ (see [HDR Support](hdr.md); EXR + BT.2020/HLG output)
+│ └─ NO → Use HDRICLoraPipeline (video-to-video with HDR IC-LoRA / LogC3 decode)
│
Do you need to condition on existing images/videos?
├─ YES → Do you have reference videos for video-to-video?
@@ -21,10 +24,13 @@ Do you need to condition on existing images/videos?
│
└─ NO → Text-to-video only
├─ Do you need best quality?
- │ └─ YES → Use TI2VidTwoStagesPipeline (recommended for production)
+ │ └─ YES → Use TI2VidTwoStagesPipeline (highest quality, guided two-stage)
+ │
+ ├─ Do you need maximum detail, or a higher frame rate than the base model?
+ │ └─ YES → Use DFRPipeline (detailing pass + optional temporal 2x/4x)
│
└─ Do you need fastest inference?
- └─ YES → Use DistilledPipeline (with 8 predefined sigmas)
+ └─ YES → Use DistilledPipeline (recommended; 8 predefined sigmas)
```
> **Note:** [`TI2VidOneStagePipeline`](../src/ltx_pipelines/ti2vid_one_stage.py) is primarily for educational purposes. For best quality, use two-stage pipelines ([`TI2VidTwoStagesPipeline`](../src/ltx_pipelines/ti2vid_two_stages.py), [`TI2VidTwoStagesHQPipeline`](../src/ltx_pipelines/ti2vid_two_stages_hq.py), [`ICLoraPipeline`](../src/ltx_pipelines/ic_lora.py), [`KeyframeInterpolationPipeline`](../src/ltx_pipelines/keyframe_interpolation.py), [`A2VidPipelineTwoStage`](../src/ltx_pipelines/a2vid_two_stage.py), or [`DistilledPipeline`](../src/ltx_pipelines/distilled.py)). For editing existing videos, use [`RetakePipeline`](../src/ltx_pipelines/retake.py).
@@ -33,15 +39,16 @@ Do you need to condition on existing images/videos?
| Pipeline | Stages | [Multimodal Guidance](multimodal-guidance.md) | Upsampling | Conditioning | Best For |
| -------- | ------ | --- | ---------- | ------------- | -------- |
-| [**TI2VidTwoStagesPipeline**](pipelines.md#1-ti2vidtwostagespipeline) | 2 | ✅ | ✅ | Image | **Production quality** (recommended) |
+| [**DistilledPipeline**](pipelines.md#4-distilledpipeline) | 2 | ❌ | ✅ | Image | **Recommended**; fastest inference (8 sigmas) |
+| [**DFRPipeline**](pipelines.md#12-dfrpipeline) | 2 (+ optional temporal rounds) | ❌ | ✅ spatial + optional temporal 2x | Image + [generated keyframes](conditioning.md#generated-keyframe-slots) | Maximum detail fidelity, higher effective frame rate |
+| [**TI2VidTwoStagesPipeline**](pipelines.md#1-ti2vidtwostagespipeline) | 2 | ✅ | ✅ | Image | Production quality |
| [**TI2VidTwoStagesHQPipeline**](pipelines.md#2-ti2vidtwostageshqpipeline) | 2 | ✅ | ✅ | Image | Same as above, res_2s sampler (higher quality) |
| [**TI2VidOneStagePipeline**](pipelines.md#3-ti2vidonestagepipeline) | 1 | ✅ | ❌ | Image | Educational, prototyping |
-| [**DistilledPipeline**](pipelines.md#4-distilledpipeline) | 2 | ❌ | ✅ | Image | Fastest inference (8 sigmas) |
| [**ICLoraPipeline**](pipelines.md#5-iclorapipeline) | 2 | ✅ | ✅ | Image + Video | Video-to-video transformations |
| [**KeyframeInterpolationPipeline**](pipelines.md#6-keyframeinterpolationpipeline) | 2 | ✅ | ✅ | Keyframes | Animation, interpolation |
| [**A2VidPipelineTwoStage**](pipelines.md#7-a2vidpipelinetwostage) | 2 | ✅ | ✅ | Audio + Image | Audio-driven video generation |
| [**RetakePipeline**](pipelines.md#8-retakepipeline) | 1 | ✅ | ❌ | Source Video | Regenerating a time region of a video |
-| [**HDRICLoraPipeline**](pipelines.md#9-hdriclorapipeline) | 2 | ❌ | ✅ | Video | HDR video-to-video (linear float output for EXR) |
+| [**HDRICLoraPipeline**](pipelines.md#9-hdriclorapipeline) | 2 | ❌ | ✅ | Video | HDR IC-LoRA video-to-video (linear float / EXR); see also native [`--hdr`](hdr.md) |
| [**DubItPipeline**](pipelines.md#10-dubitpipeline) | 2 | ✅ | ✅ | Video + Audio | Dub-It with audio ref conditioning |
| [**T2AOneStagePipeline**](pipelines.md#11-t2aonestagepipeline) | 1 | Audio only | ❌ | None (text) | Text-to-audio (audio-only output, no video) |
diff --git a/packages/ltx-pipelines/docs/pipelines.md b/packages/ltx-pipelines/docs/pipelines.md
index d9882bf..bea419b 100644
--- a/packages/ltx-pipelines/docs/pipelines.md
+++ b/packages/ltx-pipelines/docs/pipelines.md
@@ -6,7 +6,7 @@ Full reference for each pipeline. See the [Pipeline Selection Guide](pipeline-se
## 1. TI2VidTwoStagesPipeline
-**Best for:** High-quality text/image-to-video generation with upsampling. **Recommended for production use.**
+**Best for:** High-quality text/image-to-video generation with upsampling.
**Source**: [`src/ltx_pipelines/ti2vid_two_stages.py`](../src/ltx_pipelines/ti2vid_two_stages.py)
@@ -44,7 +44,7 @@ Single-stage generation (no upsampling) with [multimodal guidance](multimodal-gu
## 4. DistilledPipeline
-**Best for:** Fastest inference with good quality using a distilled model with predefined sigma schedule.
+**Best for:** Fastest inference with good quality using a distilled model with predefined sigma schedule. **Recommended default.**
**Source**: [`src/ltx_pipelines/distilled.py`](../src/ltx_pipelines/distilled.py)
@@ -116,7 +116,9 @@ Single-stage generation that encodes the source video and audio into latents, ap
**Source**: [`src/ltx_pipelines/hdr_ic_lora.py`](../src/ltx_pipelines/hdr_ic_lora.py)
-Two-stage video-to-video on the distilled model with an HDR IC-LoRA. Decoded latents pass through an HDR inverse transform (ARRI LogC3, auto-detected from LoRA metadata) to produce a **linear HDR float** tensor `[f, h, w, c]`. Video-only (audio skipped). Text embeddings are pre-computed externally and loaded from a `.safetensors` file. Tonemapping and EXR saving are the caller's responsibility. LoRA and embeddings: [`Lightricks/LTX-2.3-22b-IC-LoRA-HDR`](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-HDR).
+Two-stage video-to-video on the distilled model with an HDR IC-LoRA. Decoded latents pass through an HDR inverse transform (ARRI LogC3) to produce a **linear HDR float** tensor `[f, h, w, c]`. Video-only (audio skipped). Text embeddings are pre-computed externally and loaded from a `.safetensors` file. Tonemapping and EXR saving are the caller's responsibility. LoRA and embeddings: [`Lightricks/LTX-2.3-22b-IC-LoRA-HDR`](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-HDR).
+
+This path is separate from native EXR/`--hdr` support on the other pipelines (see [HDR Support](hdr.md)). Prefer `--hdr` + distilled / retake / TI2V when you already have EXR plates and want first-class EXR+HLG I/O without an HDR IC-LoRA.
**Extra CLI arguments:** `--input` (mp4 or directory, required), `--output-dir` (required), `--hdr-lora` (required), `--text-embeddings` (pre-computed `.safetensors`, required), `--num-frames`, `--spatial-tile` (tiled VAE decode tile size; reduce on lower-VRAM GPUs), `--skip-mp4` (EXR only, no H.264 preview), `--exr-half` (float16 EXR), `--high-quality` (generates 2x frames internally for smoother output, ~2x slower), `--offload {none,cpu,disk}` (weight offloading; disables FP8 quantization when not `none`).
@@ -149,3 +151,33 @@ Single-stage, **audio-only** generation: the video branch is absent (`video=None
**Extra CLI arguments (all optional, with sensible defaults):** `--num-frames`, `--frame-rate`, `--negative-prompt`, `--audio-cfg-guidance-scale`, `--audio-stg-guidance-scale`, `--audio-stg-blocks`, `--audio-rescale-scale`, `--audio-skip-step`. No `--height/--width/--image` (audio has no spatial dimensions).
**Use when:** You need speech/audio from text alone, or to evaluate an audio-only LoRA (accent, voice style) without generating video.
+
+---
+
+## 12. DFRPipeline
+
+**Best for:** Maximum detail fidelity — generating at half resolution with extra generated keyframes, then re-rendering at full resolution with a spatial detailing LoRA, optionally densifying time by 2x or 4x.
+
+**Source**: [`src/ltx_pipelines/dfr_pipeline.py`](../src/ltx_pipelines/dfr_pipeline.py)
+
+Diffusion Fidelity Rendering runs the distilled sigma schedule on a full checkpoint with a distilled LoRA. Stage 1 generates video **and [generated keyframe slots](conditioning.md#generated-keyframe-slots)** at half resolution, placing slots on an 8-frame-border segment grid; the half-resolution result is kept as a reference while video and keyframes are upsampled in latent space. Stage 2 re-denoises at full resolution with the distilled LoRA plus an optional 2x spatial detailing IC-LoRA, conditioned on the stage-1 reference.
+
+Audio comes from **stage 1**. Stage 2 still runs an audio pass, because the video branch needs the cross-modal attention, but nothing refines audio after stage 1.
+
+**Temporal refinement (optional).** `--temporal-upsample-rounds {0,1,2}` adds rounds that each double the frame rate: the canvas is upsampled temporally, split into `2**round` tiles that meet at shared keyframes, given fresh mid-segment slots, and densified with ancestral Euler. Whatever padding the canvas needs internally, you always get `(num_frames - 1) * 2**rounds + 1` frames back.
+
+**Extra CLI arguments:** `--detailing-lora PATH [STRENGTH]` (optional, off by default), `--temporal-upsampler-path` (required when rounds > 0), `--temporal-upsample-rounds {0,1,2}`. Unlike the other keyframe-capable pipelines, DFR does **not** take `--num-generated-keyframes` — it derives slot positions from its own segment grid.
+
+```bash
+uv run python -m ltx_pipelines.dfr_pipeline \
+ --checkpoint-path models/ltx-2.5/diffusion_models/ltx-2.5-22b-dev-transformer-bf16.safetensors \
+ --distilled-lora models/ltx-2.5/loras/ltx-2.5-22b-distilled-lora-450-bf16.safetensors \
+ --spatial-upsampler-path models/ltx-2.5/latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors \
+ --temporal-upsampler-path models/ltx-2.5/latent_upscale_models/ltx-2.5-latent-temporal-upscaler-x2-bf16-1.0.safetensors \
+ --temporal-upsample-rounds 1 \
+ --num-frames 121 --output-path output.mp4 --prompt "..."
+```
+
+**Note:** Requires a checkpoint that supports generated keyframe slots (LTX-2.5 and later) and a distilled LoRA.
+
+**Use when:** Detail fidelity matters more than wall-clock time, or you want a higher effective frame rate than the base model produces.
diff --git a/packages/ltx-pipelines/pyproject.toml b/packages/ltx-pipelines/pyproject.toml
index d90d1d9..59f2c99 100644
--- a/packages/ltx-pipelines/pyproject.toml
+++ b/packages/ltx-pipelines/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "ltx-pipelines"
-version = "1.1.7"
+version = "1.2.0"
description = "Pipelines implementation for Lightricks' LTX-2 model"
readme = "README.md"
requires-python = ">=3.10"
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/__init__.py b/packages/ltx-pipelines/src/ltx_pipelines/__init__.py
index 993237c..23eb542 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/__init__.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/__init__.py
@@ -8,6 +8,7 @@ This package provides ready-to-use pipelines for video generation:
- DubItPipeline: Dub-It with IC-LoRA and audio conditioning
- ICLoraPipeline: Image/video conditioning with distilled LoRA
- KeyframeInterpolationPipeline: Keyframe-based video interpolation
+- DFRPipeline: keyframe slots → spatial detailing → optional tiled temporal x2 (Diffusion Fidelity Rendering)
- RetakePipeline: Regenerate a time region (retake) of an existing video
For more detailed components and utilities, import from specific submodules
like `ltx_pipelines.utils.media_io` or `ltx_pipelines.utils.constants`.
@@ -22,6 +23,7 @@ from typing import TYPE_CHECKING
if TYPE_CHECKING:
from ltx_pipelines.a2vid_two_stage import A2VidPipelineTwoStage
+ from ltx_pipelines.dfr_pipeline import DFRPipeline
from ltx_pipelines.distilled import DistilledPipeline
from ltx_pipelines.dubit import DubItPipeline
from ltx_pipelines.ic_lora import ICLoraPipeline
@@ -34,6 +36,7 @@ if TYPE_CHECKING:
# Public name -> module that defines it. Used for lazy resolution in __getattr__.
_EXPORTS = {
"A2VidPipelineTwoStage": "ltx_pipelines.a2vid_two_stage",
+ "DFRPipeline": "ltx_pipelines.dfr_pipeline",
"DistilledPipeline": "ltx_pipelines.distilled",
"DubItPipeline": "ltx_pipelines.dubit",
"ICLoraPipeline": "ltx_pipelines.ic_lora",
@@ -46,6 +49,7 @@ _EXPORTS = {
__all__ = [
"A2VidPipelineTwoStage",
+ "DFRPipeline",
"DistilledPipeline",
"DubItPipeline",
"ICLoraPipeline",
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/a2vid_two_stage.py b/packages/ltx-pipelines/src/ltx_pipelines/a2vid_two_stage.py
index 330c17b..5d65208 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/a2vid_two_stage.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/a2vid_two_stage.py
@@ -3,6 +3,7 @@ from collections.abc import Iterator
import torch
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_core.components.guiders import MultiModalGuider, MultiModalGuiderParams
from ltx_core.components.noisers import GaussianNoiser
from ltx_core.components.schedulers import LTX2Scheduler
@@ -10,11 +11,15 @@ from ltx_core.loader import LoraPathStrengthAndSDOps
from ltx_core.loader.registry import Registry
from ltx_core.model.audio_vae import encode_audio as vae_encode_audio
from ltx_core.model.transformer.compiling import CompilationConfig
-from ltx_core.model.video_vae import TilingConfig, get_video_chunks_number
+from ltx_core.model.video_vae import AUTO_TILING, AutoTiling, TilingConfig, get_video_chunks_number
+from ltx_core.model.video_vae.transformer import DiffVAEMode
from ltx_core.quantization import QuantizationPolicy
from ltx_core.types import Audio, AudioLatentShape, VideoPixelShape
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
-from ltx_pipelines.utils.args import default_2_stage_arg_parser
+from ltx_pipelines.utils.args import (
+ ImageConditioningInput,
+ default_2_stage_arg_parser,
+ resolve_cli_params,
+)
from ltx_pipelines.utils.blocks import (
AudioConditioner,
DiffusionStage,
@@ -30,9 +35,18 @@ from ltx_pipelines.utils.denoisers import GuidedDenoiser, SimpleDenoiser
from ltx_pipelines.utils.helpers import (
assert_resolution,
combined_image_conditionings,
+ ensure_tiling_config,
get_device,
+ tiling_scale_factors_for_vae,
+)
+from ltx_pipelines.utils.media_io import (
+ HDRColorSpace,
+ decode_audio_from_file,
+ encode_video,
+ resolve_hdr_color_space,
+ vae_dtype_for_hdr,
)
-from ltx_pipelines.utils.media_io import decode_audio_from_file, encode_video
+from ltx_pipelines.utils.model_paths import ModelPaths
from ltx_pipelines.utils.types import ModalitySpec, OffloadMode
@@ -46,10 +60,9 @@ class A2VidPipelineTwoStage:
def __init__( # noqa: PLR0913
self,
- checkpoint_path: str,
+ model_paths: ModelPaths,
distilled_lora: list[LoraPathStrengthAndSDOps],
spatial_upsampler_path: str,
- gemma_root: str,
loras: list[LoraPathStrengthAndSDOps],
device: torch.device | None = None,
quantization: QuantizationPolicy | None = None,
@@ -57,28 +70,38 @@ class A2VidPipelineTwoStage:
compilation_config: CompilationConfig | None = None,
offload_mode: OffloadMode = OffloadMode.NONE,
alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
+ prompt_enhancer_gemma_root: str | None = None,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
):
self.device = device or get_device()
self.dtype = torch.bfloat16
self._scheduler = LTX2Scheduler()
self.prompt_encoder = PromptEncoder(
- checkpoint_path,
- gemma_root,
+ model_paths,
self.dtype,
self.device,
registry=registry,
offload_mode=offload_mode,
alloc_trim_strategy=alloc_trim_strategy,
+ prompt_enhancer_gemma_root=prompt_enhancer_gemma_root,
)
self.image_conditioner = ImageConditioner(
- checkpoint_path, self.dtype, self.device, registry=registry, alloc_trim_strategy=alloc_trim_strategy
+ model_paths.video_vae(),
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
)
self.audio_conditioner = AudioConditioner(
- checkpoint_path, self.dtype, self.device, registry=registry, alloc_trim_strategy=alloc_trim_strategy
+ model_paths.audio_vae(),
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
)
self.stage_1 = DiffusionStage.from_checkpoint(
- checkpoint_path,
+ model_paths.transformer(),
self.dtype,
self.device,
loras=tuple(loras),
@@ -90,7 +113,7 @@ class A2VidPipelineTwoStage:
)
stage_2_loras = (*tuple(loras), *tuple(distilled_lora))
self.stage_2 = DiffusionStage.from_checkpoint(
- checkpoint_path,
+ model_paths.transformer(),
self.dtype,
self.device,
loras=stage_2_loras,
@@ -101,7 +124,7 @@ class A2VidPipelineTwoStage:
alloc_trim_strategy=alloc_trim_strategy,
)
self.upsampler = VideoUpsampler(
- checkpoint_path,
+ model_paths.video_vae(),
spatial_upsampler_path,
self.dtype,
self.device,
@@ -109,7 +132,12 @@ class A2VidPipelineTwoStage:
alloc_trim_strategy=alloc_trim_strategy,
)
self.video_decoder = VideoDecoder(
- checkpoint_path, self.dtype, self.device, registry=registry, alloc_trim_strategy=alloc_trim_strategy
+ model_paths.video_vae(),
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
+ diffvae_optimization=diffvae_optimization,
)
def __call__( # noqa: PLR0913
@@ -123,30 +151,47 @@ class A2VidPipelineTwoStage:
frame_rate: float,
num_inference_steps: int,
video_guider_params: MultiModalGuiderParams,
- images: list[tuple[str, int, float]],
+ images: list[ImageConditioningInput],
audio_path: str,
audio_start_time: float = 0.0,
audio_max_duration: float | None = None,
- tiling_config: TilingConfig | None = None,
+ vae_dtype: torch.dtype | None = None,
+ tiling_config: TilingConfig | AutoTiling | None = AUTO_TILING,
enhance_prompt: bool = False,
+ enhance_static_cache: bool = False,
max_batch_size: int = 1,
stage_1_sigmas: torch.Tensor | None = None,
stage_2_sigmas: torch.Tensor = STAGE_2_DISTILLED_SIGMAS,
- ) -> tuple[Iterator[torch.Tensor], Audio]:
+ color_space: HDRColorSpace | None = None,
+ ) -> tuple[Iterator[torch.Tensor], Audio, TilingConfig | None]:
+ images = self.image_conditioner.resolve_crf(images)
assert_resolution(height=height, width=width, is_two_stage=True)
generator = torch.Generator(device=self.device).manual_seed(seed)
noiser = GaussianNoiser(generator=generator)
dtype = torch.bfloat16
+ if vae_dtype is None:
+ vae_dtype = dtype
ctx_p, ctx_n = self.prompt_encoder(
[prompt, negative_prompt],
enhance_first_prompt=enhance_prompt,
+ enhance_static_cache=enhance_static_cache,
enhance_prompt_image=images[0][0] if len(images) > 0 else None,
)
v_context_p, a_context_p = ctx_p.video_encoding, ctx_p.audio_encoding
v_context_n, _ = ctx_n.video_encoding, ctx_n.audio_encoding
+ scale_factors = tiling_scale_factors_for_vae(self.video_decoder.checkpoint_path)
+ tiling_config = ensure_tiling_config(
+ tiling_config,
+ scale_factors=scale_factors,
+ vae_checkpoint_path=self.video_decoder.checkpoint_path,
+ video_shape=VideoPixelShape(batch=1, frames=num_frames, height=height, width=width, fps=frame_rate),
+ diffvae_optimization=self.video_decoder.diffvae_optimization,
+ device=self.device,
+ )
+
# Encode audio.
decoded_audio = decode_audio_from_file(audio_path, self.device, audio_start_time, audio_max_duration)
if decoded_audio is None:
@@ -173,6 +218,7 @@ class A2VidPipelineTwoStage:
video_encoder=enc,
dtype=dtype,
device=self.device,
+ color_space=color_space,
)
)
@@ -224,6 +270,7 @@ class A2VidPipelineTwoStage:
video_encoder=enc,
dtype=dtype,
device=self.device,
+ color_space=color_space,
)
)
@@ -249,19 +296,19 @@ class A2VidPipelineTwoStage:
),
)
- decoded_video = self.video_decoder(video_state.latent, tiling_config, generator)
+ decoded_video = self.video_decoder(video_state.latent, tiling_config, generator, dtype=vae_dtype)
# Return the original input audio instead of VAE-decoded audio to preserve fidelity.
# decode_audio_from_file already returns normalised [-1, 1] float values.
original_audio = Audio(waveform=decoded_audio.waveform.squeeze(0), sampling_rate=decoded_audio.sampling_rate)
- return decoded_video, original_audio
+ return decoded_video, original_audio, tiling_config
@torch.inference_mode()
def main() -> None:
logging.basicConfig(level=logging.INFO)
- parser = default_2_stage_arg_parser()
+ parser = default_2_stage_arg_parser(params=resolve_cli_params())
parser.add_argument(
"--audio-path",
type=str,
@@ -282,18 +329,19 @@ def main() -> None:
)
args = parser.parse_args()
pipeline = A2VidPipelineTwoStage(
- checkpoint_path=args.checkpoint_path,
+ model_paths=args.model_paths,
distilled_lora=args.distilled_lora,
spatial_upsampler_path=args.spatial_upsampler_path,
- gemma_root=args.gemma_root,
loras=tuple(args.lora) if args.lora else (),
quantization=args.quantization,
compilation_config=args.compile,
offload_mode=args.offload_mode,
+ prompt_enhancer_gemma_root=args.prompt_enhancer_gemma_root,
+ diffvae_optimization=args.diffvae_optimization,
)
- tiling_config = TilingConfig.default()
- video_chunks_number = get_video_chunks_number(args.num_frames, tiling_config)
- video, audio = pipeline(
+ hdr = resolve_hdr_color_space(images=args.images, hdr=args.hdr)
+ vae_dtype = vae_dtype_for_hdr(hdr, torch.bfloat16)
+ video, audio, tiling_config = pipeline(
prompt=args.prompt,
negative_prompt=args.negative_prompt,
seed=args.seed,
@@ -311,8 +359,11 @@ def main() -> None:
stg_blocks=args.video_stg_blocks,
),
images=args.images,
- tiling_config=tiling_config,
+ vae_dtype=vae_dtype,
+ color_space=hdr,
+ tiling_config=AUTO_TILING,
enhance_prompt=args.enhance_prompt,
+ enhance_static_cache=args.enhance_static_cache,
audio_path=args.audio_path,
audio_start_time=args.audio_start_time,
audio_max_duration=args.audio_max_duration
@@ -320,6 +371,7 @@ def main() -> None:
else args.num_frames / args.frame_rate,
max_batch_size=args.max_batch_size,
)
+ video_chunks_number = get_video_chunks_number(args.num_frames, tiling_config)
encode_video(
video=video,
@@ -327,6 +379,7 @@ def main() -> None:
audio=audio,
output_path=args.output_path,
video_chunks_number=video_chunks_number,
+ color_space=hdr,
)
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/dfr_layout.py b/packages/ltx-pipelines/src/ltx_pipelines/dfr_layout.py
new file mode 100644
index 0000000..4b5006b
--- /dev/null
+++ b/packages/ltx-pipelines/src/ltx_pipelines/dfr_layout.py
@@ -0,0 +1,213 @@
+"""DFR canvas layout: keyframe segment grid, temporal tile ranges, and the latent stitch."""
+
+from __future__ import annotations
+
+from collections.abc import Sequence
+from typing import NamedTuple
+
+import torch
+
+from ltx_core.types import VIDEO_SCALE_FACTORS
+
+SEGMENT_CANDIDATES = (24, 32)
+
+# Lead-in for non-first tiles, in canvas segments. A tile's local latent 0 is an *image* latent (one
+# pixel frame) and its local latent 1 was denoised against that image; neither may be spliced into the
+# mid-canvas stream. One segment of lead-in puts both inside the discarded prefix while keeping the
+# window start on a keyframe anchor, which the KeyFrame@0 lock requires.
+TILE_LEAD_SEGMENTS = 1
+
+
+class TileRange(NamedTuple):
+ """One temporal denoise tile in global pixel / latent coordinates.
+ ``pixel_start`` / ``pixel_end`` are inclusive, ``latent_end_exclusive`` is half-open. Non-first
+ tiles start ``TILE_LEAD_SEGMENTS`` segments before the region they own, so the seam shared with the
+ previous tile falls inside the window. ``anchor_kf_global`` are the seam keyframes in the window,
+ which includes ``pixel_start`` on every tile but the first -- frame 0 is not a keyframe, so the
+ first tile's window start contributes no anchor. ``slot_kf_global`` are the mid-segment positions
+ this window invents.
+ """
+
+ pixel_start: int
+ pixel_end: int
+ latent_start: int
+ latent_end_exclusive: int
+ anchor_kf_global: tuple[int, ...]
+ slot_kf_global: tuple[int, ...]
+ drop_latent_prefix: int
+
+
+def choose_segment_length(content_frames: int) -> int:
+ """Pick the keyframe segment length from ``SEGMENT_CANDIDATES``, preferring whichever pads least.
+ ``content_frames`` is ``num_frames - 1``. Ties keep the larger segment.
+ """
+ if content_frames < 1:
+ raise ValueError(f"content_frames must be >= 1, got {content_frames}")
+
+ def _pad(segment: int) -> int:
+ return (segment - content_frames % segment) % segment
+
+ best = int(SEGMENT_CANDIDATES[0])
+ best_pad = _pad(best)
+ for candidate in SEGMENT_CANDIDATES[1:]:
+ segment = int(candidate)
+ pad = _pad(segment)
+ if pad < best_pad or (pad == best_pad and segment > best):
+ best, best_pad = segment, pad
+ return best
+
+
+def resolve_canvas(
+ num_frames: int,
+ *,
+ temporal_scale: int = VIDEO_SCALE_FACTORS.time,
+) -> tuple[int, int, list[int]]:
+ """Pad ``(num_frames - 1)`` up to a multiple of the segment length, returning ``(N', S, positions)``.
+ Positions are ``[S, 2S, ..., N' - 1]``: frame 0 is excluded (already a single-pixel-frame token
+ under causal encoding) and the terminal frame is included.
+ """
+ if num_frames < 1:
+ raise ValueError(f"num_frames must be >= 1, got {num_frames}")
+ if (num_frames - 1) % temporal_scale != 0:
+ raise ValueError(f"num_frames must satisfy (num_frames - 1) % {temporal_scale} == 0 (got {num_frames})")
+
+ content = num_frames - 1
+ if content == 0:
+ raise ValueError("The canvas needs at least 2 pixel frames")
+
+ segment = choose_segment_length(content)
+ content_padded = content + (segment - content % segment) % segment
+ positions = [segment * index for index in range(1, content_padded // segment + 1)]
+ return content_padded + 1, segment, positions
+
+
+def pixel_to_latent_index(pixel_frame: int, temporal_scale: int = VIDEO_SCALE_FACTORS.time) -> int:
+ """Map an x8-border pixel frame to its latent index."""
+ if pixel_frame < 0:
+ raise ValueError(f"pixel_frame must be >= 0, got {pixel_frame}")
+ if pixel_frame != 0 and pixel_frame % temporal_scale != 0:
+ raise ValueError(f"pixel_frame {pixel_frame} is not on the x{temporal_scale} latent border")
+ return pixel_frame // temporal_scale
+
+
+def _owned_segment_counts(n_segments: int, num_tiles: int) -> list[int]:
+ """Split ``n_segments`` into ``num_tiles`` contiguous owned runs, largest first."""
+ if n_segments < 1:
+ raise ValueError(f"n_segments must be >= 1, got {n_segments}")
+ if num_tiles < 1:
+ raise ValueError(f"num_tiles must be >= 1, got {num_tiles}")
+ base, remainder = divmod(n_segments, num_tiles)
+ return [base + (1 if index < remainder else 0) for index in range(num_tiles)]
+
+
+def _build_tile(
+ boundaries: Sequence[int],
+ own_lo: int,
+ own_hi: int,
+ *,
+ lead_segments: int,
+ temporal_scale: int,
+) -> TileRange:
+ """One window owning segments ``[own_lo, own_hi)``, preceded by ``lead_segments`` of lead-in."""
+ window_lo = max(0, own_lo - lead_segments)
+ pixel_start = int(boundaries[window_lo])
+ pixel_end = int(boundaries[own_hi])
+ latent_start = pixel_to_latent_index(pixel_start, temporal_scale)
+
+ # Handover is exactly at the shared keyframe: the previous tile keeps the seam latent (the 8-frame
+ # token ending on the KF mark) and this tile resumes strictly after it, so the prefix drops the
+ # lead-in plus that seam latent.
+ drop_latent_prefix = pixel_to_latent_index(int(boundaries[own_lo]), temporal_scale) - latent_start
+ if own_lo > 0:
+ drop_latent_prefix += 1
+
+ return TileRange(
+ pixel_start=pixel_start,
+ pixel_end=pixel_end,
+ latent_start=latent_start,
+ latent_end_exclusive=pixel_to_latent_index(pixel_end, temporal_scale) + 1,
+ anchor_kf_global=tuple(int(boundaries[index]) for index in range(window_lo, own_hi + 1) if boundaries[index]),
+ slot_kf_global=tuple(
+ (int(boundaries[index]) + int(boundaries[index + 1])) // 2 for index in range(window_lo, own_hi)
+ ),
+ drop_latent_prefix=drop_latent_prefix,
+ )
+
+
+def tile_ranges(
+ seam_positions: Sequence[int],
+ num_frames: int,
+ num_tiles: int,
+ *,
+ temporal_scale: int = VIDEO_SCALE_FACTORS.time,
+ lead_segments: int = TILE_LEAD_SEGMENTS,
+) -> list[TileRange]:
+ """Partition the canvas into ``num_tiles`` keyframe-seam tiles, gapless, with a lead-in.
+ Owned segment runs are contiguous; each non-first window additionally reaches ``lead_segments``
+ back so it denoises through the shared seam keyframe. ``num_tiles`` is clamped to the segment count.
+ """
+ if num_frames < 2:
+ raise ValueError(f"num_frames must be >= 2, got {num_frames}")
+ if not seam_positions:
+ raise ValueError("seam_positions must be non-empty")
+ if int(seam_positions[-1]) != num_frames - 1:
+ raise ValueError(f"Last seam must be the terminal frame {num_frames - 1}, got {seam_positions[-1]}")
+ if lead_segments < 1:
+ raise ValueError(f"lead_segments must be >= 1, got {lead_segments}")
+
+ boundaries = [0, *[int(position) for position in seam_positions]]
+ for index in range(1, len(boundaries)):
+ span = boundaries[index] - boundaries[index - 1]
+ if span <= 0:
+ raise ValueError(f"seam_positions must be strictly increasing, got {list(seam_positions)}")
+ if span % temporal_scale != 0:
+ raise ValueError(f"Segment span {span} is not a multiple of temporal scale {temporal_scale}")
+ if span // temporal_scale < 2:
+ raise ValueError(f"Segment span {span} is under 2 latent frames, too short to carry a tile lead-in")
+
+ n_segments = len(boundaries) - 1
+ tiles: list[TileRange] = []
+ own_lo = 0
+ for index, count in enumerate(_owned_segment_counts(n_segments, min(num_tiles, n_segments))):
+ tiles.append(
+ _build_tile(
+ boundaries,
+ own_lo,
+ own_lo + count,
+ lead_segments=lead_segments if index > 0 else 0,
+ temporal_scale=temporal_scale,
+ )
+ )
+ own_lo += count
+ return tiles
+
+
+def stitch_tile_latents(
+ tile_latents: Sequence[torch.Tensor],
+ ranges: Sequence[TileRange],
+) -> torch.Tensor:
+ """Concatenate tile video latents along T, each tile contributing ``latent[drop_latent_prefix:]``."""
+ if len(tile_latents) != len(ranges):
+ raise ValueError(f"Expected {len(ranges)} tile latents, got {len(tile_latents)}")
+ if not tile_latents:
+ raise ValueError("tile_latents must be non-empty")
+
+ pieces: list[torch.Tensor] = []
+ for latent, tile in zip(tile_latents, ranges, strict=True):
+ if latent.ndim != 5:
+ raise ValueError(f"Expected tile latent (B, C, T, H, W), got {tuple(latent.shape)}")
+ expected_t = tile.latent_end_exclusive - tile.latent_start
+ if latent.shape[2] != expected_t:
+ raise ValueError(
+ f"Tile latent T={latent.shape[2]} != expected {expected_t} "
+ f"for range [{tile.latent_start}, {tile.latent_end_exclusive})"
+ )
+ if not 0 <= tile.drop_latent_prefix < latent.shape[2]:
+ raise ValueError(f"drop_latent_prefix={tile.drop_latent_prefix} invalid for tile T={latent.shape[2]}")
+ pieces.append(latent[:, :, tile.drop_latent_prefix :])
+ return torch.cat(pieces, dim=2)
+
+
+def remap_positions_to_local(positions: Sequence[int], pixel_start: int) -> list[int]:
+ """Shift global pixel indices into a tile-local frame (``local = global - pixel_start``)."""
+ return [int(position) - pixel_start for position in positions]
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/dfr_pipeline.py b/packages/ltx-pipelines/src/ltx_pipelines/dfr_pipeline.py
new file mode 100644
index 0000000..69db24d
--- /dev/null
+++ b/packages/ltx-pipelines/src/ltx_pipelines/dfr_pipeline.py
@@ -0,0 +1,630 @@
+"""DFR (Diffusion Fidelity Rendering): keyframe-slot base, spatial detailing, tiled temporal rounds."""
+
+from __future__ import annotations
+
+import logging
+from collections.abc import Iterator, Sequence
+from dataclasses import replace as dataclass_replace
+from functools import partial
+
+import torch
+from safetensors import safe_open
+
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
+from ltx_core.components.diffusion_steps import EulerAncestralDiffusionStep
+from ltx_core.components.noisers import GaussianNoiser
+from ltx_core.conditioning import (
+ ConditioningItem,
+ VideoConditionByKeyframeIndex,
+ VideoConditionByReferenceLatent,
+ VideoGeneratedKeyframeSlots,
+)
+from ltx_core.loader import LoraPathStrengthAndSDOps
+from ltx_core.loader.registry import Registry
+from ltx_core.model.transformer.compiling import CompilationConfig
+from ltx_core.model.video_vae import AUTO_TILING, AutoTiling, TilingConfig, get_video_chunks_number
+from ltx_core.model.video_vae.transformer import DiffVAEMode
+from ltx_core.quantization import QuantizationPolicy
+from ltx_core.types import VIDEO_SCALE_FACTORS, Audio, LatentState, VideoPixelShape
+from ltx_pipelines.dfr_layout import (
+ remap_positions_to_local,
+ resolve_canvas,
+ stitch_tile_latents,
+ tile_ranges,
+)
+from ltx_pipelines.iclora_utils import read_lora_reference_downscale_factor
+from ltx_pipelines.utils.args import (
+ ImageConditioningInput,
+ LoraAction,
+ default_2_stage_arg_parser,
+ resolve_cli_params,
+ resolve_existing_path,
+)
+from ltx_pipelines.utils.blocks import (
+ AudioDecoder,
+ DiffusionStage,
+ DurationPredictor,
+ ImageConditioner,
+ PromptEncoder,
+ VideoDecoder,
+ VideoUpsampler,
+ require_num_frames_source,
+ resolve_num_frames,
+)
+from ltx_pipelines.utils.constants import DISTILLED_SIGMAS, STAGE_2_DISTILLED_SIGMAS
+from ltx_pipelines.utils.denoisers import SimpleDenoiser
+from ltx_pipelines.utils.helpers import (
+ assert_resolution,
+ combined_image_conditionings,
+ ensure_tiling_config,
+ get_device,
+ tiling_scale_factors_for_vae,
+)
+from ltx_pipelines.utils.media_io import encode_video
+from ltx_pipelines.utils.model_paths import ModelPaths
+from ltx_pipelines.utils.samplers import euler_ancestral_denoising_loop
+from ltx_pipelines.utils.types import DEFAULT_AUTO_DURATION, AutoDuration, ModalitySpec, OffloadMode
+
+logger = logging.getLogger(__name__)
+
+# Anchor keyframes carried between temporal rounds are ours, pinned just short of fully clean so a
+# tile can still settle its seam frame.
+_ANCHOR_KEYFRAME_STRENGTH = 0.95
+_TEMPORAL_ANCESTRAL_ETA = 0.5
+# Conditioning fps is capped independently of playback fps. RoPE time is ``pixel_frame / fps``, so a
+# 120 fps time base halves every token's temporal span versus the trained distribution and the model
+# can no longer lay out the 8 pixel frames inside one latent token -- it decodes as a motion spike at
+# each latent border followed by a stall. Playback fps is used for decoding only.
+_MAX_CONDITIONING_FPS = 60.0
+
+
+def _keyframe_conditionings_from_latents(
+ keyframes: torch.Tensor,
+ positions: Sequence[int],
+ strength: float,
+) -> list[ConditioningItem]:
+ """Build ``VideoConditionByKeyframeIndex`` guides from already-encoded keyframe latents."""
+ if keyframes.ndim != 5:
+ raise ValueError(f"Expected keyframes (B, C, K, H, W), got {tuple(keyframes.shape)}")
+ if keyframes.shape[2] != len(positions):
+ raise ValueError(f"Expected {len(positions)} keyframe latents, got K={keyframes.shape[2]}")
+ return [
+ VideoConditionByKeyframeIndex(
+ keyframes=keyframes[:, :, index : index + 1],
+ frame_idx=int(frame_idx),
+ strength=strength,
+ )
+ for index, frame_idx in enumerate(positions)
+ ]
+
+
+def _slot_initials_from_video(
+ video_latent: torch.Tensor,
+ positions: Sequence[int],
+ temporal_scale: int,
+) -> torch.Tensor:
+ """Stack the nearest video latent frames as ``(B, C, K, H, W)`` slot seeds."""
+ frames = []
+ for position in positions:
+ index = min(max(round(int(position) / temporal_scale), 0), video_latent.shape[2] - 1)
+ frames.append(video_latent[:, :, index : index + 1])
+ return torch.cat(frames, dim=2)
+
+
+def _merge_carry_forward_keyframes(
+ anchor_positions: Sequence[int],
+ anchor_latents: torch.Tensor | None,
+ slot_positions: Sequence[int],
+ slot_latents: torch.Tensor | None,
+) -> tuple[list[int], torch.Tensor]:
+ """Build the next round's anchor bag: carried keyframe stills plus this round's denoised slots.
+ Positions must already be on the current round's pixel grid; callers remap (x2) for the next round.
+ """
+ by_position: dict[int, torch.Tensor] = {}
+ for positions, latents, label in (
+ (anchor_positions, anchor_latents, "anchor"),
+ (slot_positions, slot_latents, "slot"),
+ ):
+ if not positions:
+ continue
+ if latents is None:
+ raise RuntimeError(f"Missing {label} keyframe latents for carry-forward merge")
+ if latents.shape[2] != len(positions):
+ raise ValueError(f"{label} latents K={latents.shape[2]} != {len(positions)} positions")
+ for index, position in enumerate(positions):
+ by_position[int(position)] = latents[:, :, index : index + 1]
+ if not by_position:
+ raise RuntimeError("Carry-forward keyframe bag is empty")
+ ordered = sorted(by_position)
+ return ordered, torch.cat([by_position[position] for position in ordered], dim=2)
+
+
+def _detailing_downscale_factor(lora_path: str) -> int:
+ """Prefer LoRA metadata; default to 2 for x2 spatial detailing."""
+ try:
+ with safe_open(lora_path, framework="pt") as handle:
+ metadata = handle.metadata() or {}
+ if "reference_downscale_factor" in metadata:
+ return int(metadata["reference_downscale_factor"])
+ except Exception as exc:
+ logger.warning("Failed to read detailing LoRA metadata from %s: %s", lora_path, exc)
+ factor = read_lora_reference_downscale_factor(lora_path)
+ return factor if factor != 1 else 2
+
+
+class DFRPipeline:
+ """
+ DFR pipeline on a keyframe-slot-capable SFT base plus a distilled LoRA.
+ Stage 1 (half-res) generates video and keyframe slots on an x8-border segment grid; the half-res
+ video is reserved as the IC-LoRA reference while video and slots are spatially latent-upsampled.
+ Stage 2 re-denoises at full resolution with the distilled LoRA and an optional x2 detailing
+ IC-LoRA. Shipped audio comes from stage 1: stage 2 still runs an audio pass because video needs
+ the cross-modal attention, but it re-noises audio under the detailing LoRA and no later stage
+ refines it.
+ Optional ``temporal_upsample_rounds`` (0-2): each round temporally x2-upsamples, splits the canvas
+ into ``2**round`` keyframe-seam tiles, invents mid-segment slots per tile, densifies with ancestral
+ Euler, and stitches. The caller always gets ``(num_frames - 1) * 2**rounds + 1`` frames even when
+ the canvas padded its tail.
+ """
+
+ def __init__( # noqa: PLR0913
+ self,
+ model_paths: ModelPaths,
+ distilled_lora: list[LoraPathStrengthAndSDOps],
+ spatial_upsampler_path: str,
+ loras: list[LoraPathStrengthAndSDOps],
+ detailing_lora: list[LoraPathStrengthAndSDOps] | None = None,
+ temporal_upsampler_path: str | None = None,
+ device: torch.device | None = None,
+ quantization: QuantizationPolicy | None = None,
+ registry: Registry | None = None,
+ compilation_config: CompilationConfig | None = None,
+ offload_mode: OffloadMode = OffloadMode.NONE,
+ alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
+ prompt_enhancer_gemma_root: str | None = None,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
+ ):
+ self.device = device or get_device()
+ self.dtype = torch.bfloat16
+ self._distilled_lora = tuple(distilled_lora)
+ self._user_loras = tuple(loras)
+ self._detailing_lora = tuple(detailing_lora or ())
+ self._detailing_downscale = (
+ _detailing_downscale_factor(self._detailing_lora[0].path) if self._detailing_lora else 2
+ )
+
+ self.prompt_encoder = PromptEncoder(
+ model_paths,
+ self.dtype,
+ self.device,
+ registry=registry,
+ offload_mode=offload_mode,
+ alloc_trim_strategy=alloc_trim_strategy,
+ prompt_enhancer_gemma_root=prompt_enhancer_gemma_root,
+ )
+ self.image_conditioner = ImageConditioner(
+ model_paths.video_vae(),
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
+ )
+ stage_loras = (*self._user_loras, *self._distilled_lora)
+ self.stage = DiffusionStage.from_checkpoint(
+ model_paths.transformer(),
+ self.dtype,
+ self.device,
+ loras=stage_loras,
+ quantization=quantization,
+ registry=registry,
+ compilation_config=compilation_config,
+ offload_mode=offload_mode,
+ alloc_trim_strategy=alloc_trim_strategy,
+ )
+ self.stage_detailing = (
+ self.stage.with_loras((*stage_loras, *self._detailing_lora)) if self._detailing_lora else self.stage
+ )
+ self.upsampler = VideoUpsampler(
+ model_paths.video_vae(),
+ spatial_upsampler_path,
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
+ )
+ self.temporal_upsampler = (
+ VideoUpsampler(
+ model_paths.video_vae(),
+ temporal_upsampler_path,
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
+ )
+ if temporal_upsampler_path
+ else None
+ )
+ self.video_decoder = VideoDecoder(
+ model_paths.video_vae(),
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
+ diffvae_optimization=diffvae_optimization,
+ )
+ self.audio_decoder = AudioDecoder(
+ model_paths.audio_vae(),
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
+ )
+ self.duration_predictor = DurationPredictor.from_checkpoint(
+ model_paths.duration_head_path,
+ self.dtype,
+ self.device,
+ )
+
+ def __call__( # noqa: PLR0912, PLR0913, PLR0915
+ self,
+ prompt: str,
+ seed: int,
+ height: int,
+ width: int,
+ frame_rate: float,
+ images: list[ImageConditioningInput],
+ num_frames: int | AutoDuration = DEFAULT_AUTO_DURATION,
+ temporal_upsample_rounds: int = 0,
+ tiling_config: TilingConfig | AutoTiling | None = AUTO_TILING,
+ enhance_prompt: bool = False,
+ enhance_static_cache: bool = False,
+ stage_1_sigmas: torch.Tensor = DISTILLED_SIGMAS,
+ stage_2_sigmas: torch.Tensor = STAGE_2_DISTILLED_SIGMAS,
+ ) -> tuple[Iterator[torch.Tensor], Audio, int, TilingConfig | None]:
+ if temporal_upsample_rounds not in (0, 1, 2):
+ raise ValueError(f"temporal_upsample_rounds must be 0, 1, or 2, got {temporal_upsample_rounds}")
+ if temporal_upsample_rounds > 0 and self.temporal_upsampler is None:
+ raise ValueError("temporal_upsample_rounds > 0 requires temporal_upsampler_path")
+
+ require_num_frames_source(num_frames, self.duration_predictor)
+ images = self.image_conditioner.resolve_crf(images)
+ assert_resolution(height=height, width=width, is_two_stage=True)
+
+ generator = torch.Generator(device=self.device).manual_seed(seed)
+ noiser = GaussianNoiser(generator=generator)
+ dtype = torch.bfloat16
+ temporal_scale = VIDEO_SCALE_FACTORS.time
+
+ (ctx_p,) = self.prompt_encoder(
+ [prompt],
+ enhance_first_prompt=enhance_prompt,
+ enhance_static_cache=enhance_static_cache,
+ enhance_prompt_image=images[0][0] if len(images) > 0 else None,
+ )
+ video_context, audio_context = ctx_p.video_encoding, ctx_p.audio_encoding
+
+ num_frames = resolve_num_frames(
+ num_frames,
+ self.duration_predictor,
+ video_encoding=video_context,
+ audio_encoding=audio_context,
+ frame_rate=frame_rate,
+ )
+ requested_frames = num_frames
+ num_frames, _segment, positions = resolve_canvas(num_frames)
+ self.stage.assert_generated_keyframes_supported()
+
+ # --- Stage 1: half-res base + keyframe slots -----------------------------------
+ stage_1_sigmas = stage_1_sigmas.to(dtype=torch.float32, device=self.device)
+ stage_1_w, stage_1_h = width // 2, height // 2
+ stage_1_conditionings = self.image_conditioner(
+ lambda enc: combined_image_conditionings(
+ images=images,
+ height=stage_1_h,
+ width=stage_1_w,
+ video_encoder=enc,
+ dtype=dtype,
+ device=self.device,
+ )
+ )
+ stage_1_conditionings.append(VideoGeneratedKeyframeSlots(pixel_frame_indices=positions))
+
+ video_state, audio_state = self.stage(
+ denoiser=SimpleDenoiser(video_context, audio_context),
+ sigmas=stage_1_sigmas,
+ noiser=noiser,
+ width=stage_1_w,
+ height=stage_1_h,
+ frames=num_frames,
+ fps=frame_rate,
+ video=ModalitySpec(context=video_context, conditionings=stage_1_conditionings),
+ audio=ModalitySpec(context=audio_context),
+ )
+
+ reserved_half_res_video = video_state.latent[:1].detach().clone()
+ stage_1_audio_latent = audio_state.latent.detach().clone() if audio_state is not None else None
+ if video_state.generated_keyframes is None:
+ raise RuntimeError("Stage 1 did not return generated_keyframes despite requesting slots")
+ upsampled_slot_keyframes = self.upsampler(video_state.generated_keyframes)
+ upscaled_video_latent = self.upsampler(reserved_half_res_video)
+
+ # --- Stage 2: spatial detailing ------------------------------------------------
+ stage_2_sigmas = stage_2_sigmas.to(dtype=torch.float32, device=self.device)
+ stage_2_conditionings = self.image_conditioner(
+ lambda enc: combined_image_conditionings(
+ images=images,
+ height=height,
+ width=width,
+ video_encoder=enc,
+ dtype=dtype,
+ device=self.device,
+ )
+ )
+ stage_2_conditionings.append(
+ VideoGeneratedKeyframeSlots(pixel_frame_indices=positions, initial_keyframes=upsampled_slot_keyframes)
+ )
+ if self._detailing_lora:
+ stage_2_conditionings.append(
+ VideoConditionByReferenceLatent(
+ latent=reserved_half_res_video,
+ downscale_factor=self._detailing_downscale,
+ strength=1.0,
+ )
+ )
+
+ video_state, audio_state = self.stage_detailing(
+ denoiser=SimpleDenoiser(video_context, audio_context),
+ sigmas=stage_2_sigmas,
+ noiser=noiser,
+ width=width,
+ height=height,
+ frames=num_frames,
+ fps=frame_rate,
+ video=ModalitySpec(
+ context=video_context,
+ conditionings=stage_2_conditionings,
+ noise_scale=stage_2_sigmas[0].item(),
+ initial_latent=upscaled_video_latent,
+ ),
+ audio=ModalitySpec(
+ context=audio_context,
+ noise_scale=stage_2_sigmas[0].item(),
+ initial_latent=audio_state.latent,
+ ),
+ )
+
+ # Stage 2's slots become the next round's anchors.
+ carry_positions = list(positions)
+ carry_keyframes = video_state.generated_keyframes
+ current_fps = frame_rate
+ temporal_sigmas = DISTILLED_SIGMAS[4:].to(dtype=torch.float32, device=self.device)
+
+ for round_idx in range(1, temporal_upsample_rounds + 1):
+ assert self.temporal_upsampler is not None
+ if carry_keyframes is None or not carry_positions:
+ raise RuntimeError(f"Temporal round {round_idx}: missing carry-forward keyframes")
+
+ video_latent = self.temporal_upsampler(video_state.latent[:1])
+ num_frames = 2 * (num_frames - 1) + 1
+ current_fps = 2 * current_fps
+ # Carried keyframes are single-frame latents, so only their positions scale with the round.
+ seam_positions = [2 * position for position in carry_positions]
+ anchor_keyframes = carry_keyframes
+ seam_to_index = {seam: index for index, seam in enumerate(seam_positions)}
+ cond_fps = min(current_fps, _MAX_CONDITIONING_FPS)
+ tiles = tile_ranges(seam_positions, num_frames, 2**round_idx, temporal_scale=temporal_scale)
+
+ tile_latents: list[torch.Tensor] = []
+ slot_positions: list[int] = []
+ slot_latent_slices: list[torch.Tensor] = []
+
+ for tile_index, tile in enumerate(tiles):
+ local_frames = (tile.latent_end_exclusive - tile.latent_start - 1) * temporal_scale + 1
+ tile_video = video_latent[:, :, tile.latent_start : tile.latent_end_exclusive]
+
+ # Image conditioning is tile-local: ``frame_idx=0`` means this tile's first frame, so
+ # re-applying the opening image on a non-first tile would pin the wrong frame onto the
+ # seam. Only images that actually fall inside the window are re-attached.
+ if tile.pixel_start == 0:
+ tile_images = images
+ else:
+ tile_images = [
+ ImageConditioningInput(
+ image.path, image.frame_idx - tile.pixel_start, image.strength, image.crf
+ )
+ for image in images
+ if tile.pixel_start <= image.frame_idx <= tile.pixel_end
+ ]
+ round_conditionings = (
+ self.image_conditioner(
+ lambda enc, _images=tile_images: combined_image_conditionings(
+ images=_images,
+ height=height,
+ width=width,
+ video_encoder=enc,
+ dtype=dtype,
+ device=self.device,
+ )
+ )
+ if tile_images
+ else []
+ )
+
+ # Every seam in the window is a hard keyframe, including the one at local frame 0.
+ anchor_global = list(tile.anchor_kf_global)
+ if anchor_global:
+ missing = [position for position in anchor_global if position not in seam_to_index]
+ if missing:
+ raise RuntimeError(f"Anchor seams {missing} missing from the carry-forward bag")
+ anchor_latents = torch.cat(
+ [anchor_keyframes[:, :, seam_to_index[p] : seam_to_index[p] + 1] for p in anchor_global], dim=2
+ )
+ round_conditionings.extend(
+ _keyframe_conditionings_from_latents(
+ anchor_latents,
+ remap_positions_to_local(anchor_global, tile.pixel_start),
+ strength=_ANCHOR_KEYFRAME_STRENGTH,
+ )
+ )
+
+ slot_global = list(tile.slot_kf_global)
+ if slot_global:
+ slot_local = remap_positions_to_local(slot_global, tile.pixel_start)
+ round_conditionings.append(
+ VideoGeneratedKeyframeSlots(
+ pixel_frame_indices=slot_local,
+ initial_keyframes=_slot_initials_from_video(tile_video, slot_local, temporal_scale),
+ )
+ )
+
+ tile_state, _ = self.stage(
+ denoiser=SimpleDenoiser(video_context, audio_context),
+ sigmas=temporal_sigmas,
+ noiser=noiser,
+ width=width,
+ height=height,
+ frames=local_frames,
+ fps=cond_fps,
+ video=ModalitySpec(
+ context=video_context,
+ conditionings=round_conditionings,
+ noise_scale=temporal_sigmas[0].item(),
+ initial_latent=tile_video,
+ ),
+ audio=None,
+ stepper=EulerAncestralDiffusionStep(eta=_TEMPORAL_ANCESTRAL_ETA),
+ # Tiles are positionally identical, so a shared ancestral seed would inject
+ # byte-identical noise into every one of them.
+ loop=partial(euler_ancestral_denoising_loop, noise_seed=seed + 1000 * round_idx + tile_index),
+ )
+ tile_latents.append(tile_state.latent[:1])
+
+ if slot_global:
+ if tile_state.generated_keyframes is None:
+ raise RuntimeError(f"Temporal round {round_idx}: tile produced no keyframe slots")
+ slot_positions.extend(slot_global)
+ slot_latent_slices.append(tile_state.generated_keyframes)
+
+ stitched = stitch_tile_latents(tile_latents, tiles)
+ expected_t = (num_frames - 1) // temporal_scale + 1
+ if stitched.shape[2] != expected_t:
+ raise RuntimeError(f"Stitched latent T={stitched.shape[2]} != expected {expected_t}")
+ if not isinstance(video_state, LatentState):
+ raise TypeError(f"Expected LatentState, got {type(video_state)}")
+ video_state = dataclass_replace(video_state, latent=stitched, generated_keyframes=None)
+
+ slot_latents = torch.cat(slot_latent_slices, dim=2) if slot_latent_slices else None
+ if slot_positions and slot_latents is not None:
+ # Lead-in segments repeat the previous tile's slots; the earlier tile's version wins.
+ first_index: dict[int, int] = {}
+ for index, position in enumerate(slot_positions):
+ first_index.setdefault(position, index)
+ slot_positions = sorted(first_index)
+ slot_latents = torch.cat(
+ [slot_latents[:, :, first_index[p] : first_index[p] + 1] for p in slot_positions], dim=2
+ )
+
+ carry_positions, carry_keyframes = _merge_carry_forward_keyframes(
+ seam_positions, anchor_keyframes, slot_positions, slot_latents
+ )
+
+ # The canvas may have padded its tail, and each round maps N -> 2(N-1)+1, so the caller's
+ # contract is ``(requested - 1) * 2**rounds + 1``. ``requested - 1`` is a multiple of the VAE
+ # temporal scale, so the trim always lands on a latent boundary.
+ target_frames = (requested_frames - 1) * 2**temporal_upsample_rounds + 1
+ if target_frames > num_frames:
+ raise RuntimeError(f"Target {target_frames} frames exceeds the generated canvas {num_frames}")
+ if target_frames != num_frames:
+ keep_latents = (target_frames - 1) // temporal_scale + 1
+ video_state = dataclass_replace(video_state, latent=video_state.latent[:, :, :keep_latents])
+ num_frames = target_frames
+
+ playback_fps = frame_rate * 2**temporal_upsample_rounds
+ tiling_config = ensure_tiling_config(
+ tiling_config,
+ scale_factors=tiling_scale_factors_for_vae(self.video_decoder.checkpoint_path),
+ vae_checkpoint_path=self.video_decoder.checkpoint_path,
+ video_shape=VideoPixelShape(batch=1, frames=num_frames, height=height, width=width, fps=playback_fps),
+ diffvae_optimization=self.video_decoder.diffvae_optimization,
+ device=self.device,
+ )
+ decoded_video = self.video_decoder(video_state.latent, tiling_config, generator)
+ if stage_1_audio_latent is None:
+ raise RuntimeError("Stage 1 produced no audio latent to ship")
+ decoded_audio = self.audio_decoder(stage_1_audio_latent)
+ # Audio was generated for the padded canvas, so cut it to the video's duration or the muxed
+ # container outlasts the picture.
+ video_seconds = num_frames / playback_fps
+ audio_samples = min(decoded_audio.waveform.shape[-1], round(video_seconds * decoded_audio.sampling_rate))
+ if audio_samples != decoded_audio.waveform.shape[-1]:
+ decoded_audio = dataclass_replace(decoded_audio, waveform=decoded_audio.waveform[..., :audio_samples])
+ return decoded_video, decoded_audio, num_frames, tiling_config
+
+
+def main() -> None:
+ logging.basicConfig(level=logging.INFO)
+ params = resolve_cli_params()
+ parser = default_2_stage_arg_parser(params=params, supports_auto_duration=True)
+ parser.add_argument(
+ "--detailing-lora",
+ dest="detailing_lora",
+ action=LoraAction,
+ nargs="+",
+ metavar=("PATH", "STRENGTH"),
+ default=[],
+ help="Stage-2 x2 spatial detailing IC-LoRA (path and optional strength). Omit to run without it.",
+ )
+ parser.add_argument(
+ "--temporal-upsampler-path",
+ type=resolve_existing_path,
+ default=None,
+ help="Path to the temporal x2 latent upsampler (required when --temporal-upsample-rounds > 0).",
+ )
+ parser.add_argument(
+ "--temporal-upsample-rounds",
+ type=int,
+ choices=(0, 1, 2),
+ default=0,
+ help="Number of temporal x2 refine rounds (0->base fps, 1->2x with 2 tiles, 2->4x with 4 tiles).",
+ )
+ args = parser.parse_args()
+
+ pipeline = DFRPipeline(
+ model_paths=args.model_paths,
+ distilled_lora=args.distilled_lora,
+ spatial_upsampler_path=args.spatial_upsampler_path,
+ loras=tuple(args.lora) if args.lora else (),
+ detailing_lora=args.detailing_lora,
+ temporal_upsampler_path=args.temporal_upsampler_path,
+ quantization=args.quantization,
+ compilation_config=args.compile,
+ offload_mode=args.offload_mode,
+ prompt_enhancer_gemma_root=args.prompt_enhancer_gemma_root,
+ diffvae_optimization=args.diffvae_optimization,
+ )
+ video, audio, num_frames, tiling_config = pipeline(
+ prompt=args.prompt,
+ seed=args.seed,
+ height=args.height,
+ width=args.width,
+ num_frames=args.num_frames,
+ frame_rate=args.frame_rate,
+ images=args.images,
+ tiling_config=AUTO_TILING,
+ enhance_prompt=args.enhance_prompt,
+ enhance_static_cache=args.enhance_static_cache,
+ temporal_upsample_rounds=args.temporal_upsample_rounds,
+ )
+
+ encode_video(
+ video=video,
+ fps=int(args.frame_rate * (2**args.temporal_upsample_rounds)),
+ audio=audio,
+ output_path=args.output_path,
+ video_chunks_number=get_video_chunks_number(num_frames, tiling_config),
+ )
+
+
+if __name__ == "__main__":
+ main()
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/distilled.py b/packages/ltx-pipelines/src/ltx_pipelines/distilled.py
index e588340..70e8efe 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/distilled.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/distilled.py
@@ -1,41 +1,87 @@
import logging
-from collections.abc import Iterator
+from collections.abc import Iterator, Sequence
+from functools import partial
+from typing import Any
import torch
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
+from ltx_core.components.diffusion_steps import EulerAncestralDiffusionStep
from ltx_core.components.noisers import GaussianNoiser
from ltx_core.loader import LoraPathStrengthAndSDOps
from ltx_core.loader.registry import Registry
from ltx_core.model.transformer.compiling import CompilationConfig
-from ltx_core.model.video_vae import TilingConfig, get_video_chunks_number
+from ltx_core.model.video_vae import AUTO_TILING, AutoTiling, TilingConfig, get_video_chunks_number
+from ltx_core.model.video_vae.transformer import DiffVAEMode
from ltx_core.quantization import QuantizationPolicy
-from ltx_core.types import Audio
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
+from ltx_core.types import Audio, VideoPixelShape
from ltx_pipelines.utils.args import (
ImageConditioningInput,
+ add_generated_keyframes_arg,
default_2_stage_distilled_arg_parser,
resolve_cli_params,
)
from ltx_pipelines.utils.blocks import (
AudioDecoder,
DiffusionStage,
+ DurationPredictor,
ImageConditioner,
PromptEncoder,
VideoDecoder,
VideoUpsampler,
+ require_num_frames_source,
+ resolve_num_frames,
)
from ltx_pipelines.utils.constants import (
DISTILLED_SIGMAS,
STAGE_2_DISTILLED_SIGMAS,
+ detect_model_version,
)
from ltx_pipelines.utils.denoisers import SimpleDenoiser
from ltx_pipelines.utils.helpers import (
assert_resolution,
combined_image_conditionings,
+ ensure_tiling_config,
+ generated_keyframe_conditionings,
get_device,
+ has_generated_keyframes,
+ tiling_scale_factors_for_vae,
)
-from ltx_pipelines.utils.media_io import encode_video
-from ltx_pipelines.utils.types import ModalitySpec, OffloadMode
+from ltx_pipelines.utils.media_io import (
+ HDRColorSpace,
+ encode_video,
+ resolve_hdr_color_space,
+ vae_dtype_for_hdr,
+)
+from ltx_pipelines.utils.model_paths import ModelPaths
+from ltx_pipelines.utils.samplers import euler_ancestral_denoising_loop
+from ltx_pipelines.utils.types import DEFAULT_AUTO_DURATION, AutoDuration, ModalitySpec, OffloadMode
+
+# Generation from which stage 1 is sampled with the ancestral (SDE) Euler sampler instead of the
+# deterministic one.
+ANCESTRAL_SAMPLER_SINCE_VERSION = (2, 5)
+
+# Fully ancestral noise injection: eta=0 is a plain Euler step, eta=1 injects the full
+# variance-preserving amount at every step.
+ANCESTRAL_ETA = 1.0
+ANCESTRAL_S_NOISE = 1.0
+
+# The loop's noise generator is seeded from the pipeline seed plus this offset. Without it the
+# loop's first draw would be bit-identical to the initial latent noise: GaussianNoiser and the
+# loop's ``_get_plain_noise`` both draw ``torch.randn`` at the same shape, dtype, and device from a
+# freshly seeded generator. Mirrors the substep-seed offset in ``res2s_audio_video_denoising_loop``.
+ANCESTRAL_NOISE_SEED_OFFSET = 10000
+
+
+def should_use_ancestral_sampler(transformer_path: str) -> bool:
+ """Whether a checkpoint's generation calls for the ancestral stage-1 sampler.
+ Takes the transformer checkpoint (``ModelPaths.transformer()``) since that is the component
+ carrying ``model_version`` in both the monolith and split layouts.
+ This is what :class:`DistilledPipeline` resolves at construction into
+ ``self.use_ancestral_sampler``; a named function rather than an inline comparison so the rule
+ can be tested, and reused, without loading a checkpoint's weights.
+ """
+ return detect_model_version(transformer_path) >= ANCESTRAL_SAMPLER_SINCE_VERSION
class DistilledPipeline:
@@ -45,10 +91,9 @@ class DistilledPipeline:
by 2x and refines with additional denoising steps for higher quality output.
"""
- def __init__(
+ def __init__( # noqa: PLR0913
self,
- distilled_checkpoint_path: str,
- gemma_root: str,
+ model_paths: ModelPaths,
spatial_upsampler_path: str,
loras: list[LoraPathStrengthAndSDOps],
device: torch.device | None = None,
@@ -57,28 +102,30 @@ class DistilledPipeline:
compilation_config: CompilationConfig | None = None,
offload_mode: OffloadMode = OffloadMode.NONE,
alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
+ prompt_enhancer_gemma_root: str | None = None,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
):
self.device = device or get_device()
self.dtype = torch.bfloat16
self.prompt_encoder = PromptEncoder(
- distilled_checkpoint_path,
- gemma_root,
+ model_paths,
self.dtype,
self.device,
registry=registry,
offload_mode=offload_mode,
alloc_trim_strategy=alloc_trim_strategy,
+ prompt_enhancer_gemma_root=prompt_enhancer_gemma_root,
)
self.image_conditioner = ImageConditioner(
- distilled_checkpoint_path,
+ model_paths.video_vae(),
self.dtype,
self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
)
self.stage = DiffusionStage.from_checkpoint(
- distilled_checkpoint_path,
+ model_paths.transformer(),
self.dtype,
self.device,
loras=tuple(loras),
@@ -89,7 +136,7 @@ class DistilledPipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.upsampler = VideoUpsampler(
- distilled_checkpoint_path,
+ model_paths.video_vae(),
spatial_upsampler_path,
self.dtype,
self.device,
@@ -97,19 +144,45 @@ class DistilledPipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.video_decoder = VideoDecoder(
- distilled_checkpoint_path,
+ model_paths.video_vae(),
self.dtype,
self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
+ diffvae_optimization=diffvae_optimization,
)
self.audio_decoder = AudioDecoder(
- distilled_checkpoint_path,
+ model_paths.audio_vae(),
self.dtype,
self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
)
+ # None on checkpoints that predate DurationHead (LTX 2.5 / gemma4 only) -- __call__ requires
+ # an explicit num_frames in that case instead of crashing deep in a forward pass.
+ self.duration_predictor = DurationPredictor.from_checkpoint(
+ model_paths.duration_head_path,
+ self.dtype,
+ self.device,
+ )
+ self.use_ancestral_sampler = should_use_ancestral_sampler(model_paths.transformer())
+
+ def _stage_1_sampler_kwargs(self, seed: int) -> dict[str, Any]:
+ """Resolve stage 1's ``stepper`` / ``loop`` overrides for :class:`DiffusionStage`.
+ Returns an empty dict for the deterministic sampler, letting ``DiffusionStage`` apply its
+ own ``EulerDiffusionStep`` + ``euler_denoising_loop`` defaults rather than restating them.
+ """
+ if not self.use_ancestral_sampler:
+ return {}
+
+ return {
+ "stepper": EulerAncestralDiffusionStep(eta=ANCESTRAL_ETA, s_noise=ANCESTRAL_S_NOISE),
+ "loop": partial(
+ euler_ancestral_denoising_loop,
+ noise_seed=seed + ANCESTRAL_NOISE_SEED_OFFSET,
+ model_dtype=self.dtype,
+ ),
+ }
def __call__( # noqa: PLR0913
self,
@@ -117,27 +190,62 @@ class DistilledPipeline:
seed: int,
height: int,
width: int,
- num_frames: int,
frame_rate: float,
images: list[ImageConditioningInput],
- tiling_config: TilingConfig | None = None,
+ num_frames: int | AutoDuration = DEFAULT_AUTO_DURATION,
+ vae_dtype: torch.dtype | None = None,
+ tiling_config: TilingConfig | AutoTiling | None = AUTO_TILING,
enhance_prompt: bool = False,
+ enhance_static_cache: bool = False,
stage_1_sigmas: torch.Tensor = DISTILLED_SIGMAS,
stage_2_sigmas: torch.Tensor = STAGE_2_DISTILLED_SIGMAS,
- ) -> tuple[Iterator[torch.Tensor], Audio]:
+ color_space: HDRColorSpace | None = None,
+ generated_keyframes: int | Sequence[int] = 0,
+ ) -> tuple[Iterator[torch.Tensor], Audio, int, TilingConfig | None]:
+ """Generate a video.
+ Stage 1 samples with the ancestral (SDE) Euler sampler or the deterministic one according
+ to ``self.use_ancestral_sampler``, detected from the checkpoint generation. Stage 2 is
+ always deterministic -- its 3-step refinement schedule is too short to remove freshly
+ injected noise.
+ """
+ require_num_frames_source(num_frames, self.duration_predictor)
+ images = self.image_conditioner.resolve_crf(images)
assert_resolution(height=height, width=width, is_two_stage=True)
+ if has_generated_keyframes(generated_keyframes):
+ self.stage.assert_generated_keyframes_supported()
generator = torch.Generator(device=self.device).manual_seed(seed)
noiser = GaussianNoiser(generator=generator)
dtype = torch.bfloat16
+ if vae_dtype is None:
+ vae_dtype = dtype
(ctx_p,) = self.prompt_encoder(
[prompt],
enhance_first_prompt=enhance_prompt,
+ enhance_static_cache=enhance_static_cache,
enhance_prompt_image=images[0][0] if len(images) > 0 else None,
)
video_context, audio_context = ctx_p.video_encoding, ctx_p.audio_encoding
+ num_frames = resolve_num_frames(
+ num_frames,
+ self.duration_predictor,
+ video_encoding=video_context,
+ audio_encoding=audio_context,
+ frame_rate=frame_rate,
+ )
+
+ scale_factors = tiling_scale_factors_for_vae(self.video_decoder.checkpoint_path)
+ tiling_config = ensure_tiling_config(
+ tiling_config,
+ scale_factors=scale_factors,
+ vae_checkpoint_path=self.video_decoder.checkpoint_path,
+ video_shape=VideoPixelShape(batch=1, frames=num_frames, height=height, width=width, fps=frame_rate),
+ diffvae_optimization=self.video_decoder.diffvae_optimization,
+ device=self.device,
+ )
+
# Stage 1: Initial low resolution video generation.
stage_1_sigmas = stage_1_sigmas.to(dtype=torch.float32, device=self.device)
stage_1_w, stage_1_h = width // 2, height // 2
@@ -149,8 +257,10 @@ class DistilledPipeline:
video_encoder=enc,
dtype=dtype,
device=self.device,
+ color_space=color_space,
)
)
+ stage_1_conditionings.extend(generated_keyframe_conditionings(generated_keyframes, num_frames))
video_state, audio_state = self.stage(
denoiser=SimpleDenoiser(video_context, audio_context),
@@ -162,6 +272,7 @@ class DistilledPipeline:
fps=frame_rate,
video=ModalitySpec(context=video_context, conditionings=stage_1_conditionings),
audio=ModalitySpec(context=audio_context),
+ **self._stage_1_sampler_kwargs(seed),
)
# Stage 2: Upsample and refine the video at higher resolution with distilled LORA.
@@ -176,6 +287,7 @@ class DistilledPipeline:
video_encoder=enc,
dtype=dtype,
device=self.device,
+ color_space=color_space,
)
)
@@ -200,29 +312,32 @@ class DistilledPipeline:
),
)
- decoded_video = self.video_decoder(video_state.latent, tiling_config, generator)
+ decoded_video = self.video_decoder(video_state.latent, tiling_config, generator, dtype=vae_dtype)
decoded_audio = self.audio_decoder(audio_state.latent)
- return decoded_video, decoded_audio
+ return decoded_video, decoded_audio, num_frames, tiling_config
@torch.inference_mode()
def main() -> None:
logging.basicConfig(level=logging.INFO)
params = resolve_cli_params(distilled=True)
- parser = default_2_stage_distilled_arg_parser(params=params)
+ parser = add_generated_keyframes_arg(
+ default_2_stage_distilled_arg_parser(params=params, supports_auto_duration=True)
+ )
args = parser.parse_args()
pipeline = DistilledPipeline(
- distilled_checkpoint_path=args.distilled_checkpoint_path,
+ model_paths=args.model_paths,
spatial_upsampler_path=args.spatial_upsampler_path,
- gemma_root=args.gemma_root,
loras=tuple(args.lora) if args.lora else (),
quantization=args.quantization,
compilation_config=args.compile,
offload_mode=args.offload_mode,
+ prompt_enhancer_gemma_root=args.prompt_enhancer_gemma_root,
+ diffvae_optimization=args.diffvae_optimization,
)
- tiling_config = TilingConfig.default()
- video_chunks_number = get_video_chunks_number(args.num_frames, tiling_config)
- video, audio = pipeline(
+ hdr = resolve_hdr_color_space(images=args.images, hdr=args.hdr)
+ vae_dtype = vae_dtype_for_hdr(hdr, torch.bfloat16)
+ video, audio, num_frames, tiling_config = pipeline(
prompt=args.prompt,
seed=args.seed,
height=args.height,
@@ -230,8 +345,12 @@ def main() -> None:
num_frames=args.num_frames,
frame_rate=args.frame_rate,
images=args.images,
- tiling_config=tiling_config,
+ vae_dtype=vae_dtype,
+ color_space=hdr,
enhance_prompt=args.enhance_prompt,
+ enhance_static_cache=args.enhance_static_cache,
+ tiling_config=AUTO_TILING,
+ generated_keyframes=args.num_generated_keyframes,
)
encode_video(
@@ -239,7 +358,8 @@ def main() -> None:
fps=args.frame_rate,
audio=audio,
output_path=args.output_path,
- video_chunks_number=video_chunks_number,
+ video_chunks_number=get_video_chunks_number(num_frames, tiling_config),
+ color_space=hdr,
)
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/distilled_mgpu.py b/packages/ltx-pipelines/src/ltx_pipelines/distilled_mgpu.py
index daf7de6..868a231 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/distilled_mgpu.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/distilled_mgpu.py
@@ -11,17 +11,18 @@ Requires ``ltx-kernels`` to be installed (transitive via SP builder).
from __future__ import annotations
import logging
-from collections.abc import Callable, Iterator
+from collections.abc import Callable, Iterator, Sequence
from multiprocessing import SimpleQueue
from typing import Any
import torch
import torch.distributed as dist
-from ltx_core.loader.registry import StateDictRegistry
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
+from ltx_core.loader.registry import ModelRegistry
from ltx_core.model.transformer.compiling import CompilationConfig
from ltx_core.model.video_vae import get_video_chunks_number
-from ltx_core.model.video_vae.tiling import TilingConfig
+from ltx_core.model.video_vae.transformer import DiffVAEMode
from ltx_core.multigpu.transformer.attention import AttentionManager
from ltx_core.quantization import QuantizationPolicy
from ltx_core.quantization.fp8_cast import build_policy as _build_fp8_cast_policy
@@ -33,8 +34,9 @@ from ltx_pipelines.multigpu.runner import MGPURunner
from ltx_pipelines.multigpu.sp_builder import SequenceParallelBuilder
from ltx_pipelines.multigpu.vae_builders import DistributedDecoderBuilder
from ltx_pipelines.multigpu.weight_tracker import TransformerWeightTracker
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
-from ltx_pipelines.utils.media_io import encode_video
+from ltx_pipelines.utils.media_io import HDRColorSpace, encode_video, resolve_hdr_color_space, vae_dtype_for_hdr
+from ltx_pipelines.utils.model_paths import ModelPaths
+from ltx_pipelines.utils.types import DEFAULT_AUTO_DURATION, AutoDuration
logger = logging.getLogger(__name__)
@@ -51,28 +53,30 @@ class DistilledRunner(MGPURunner):
def setup(
self,
*,
- distilled_checkpoint_path: str,
- gemma_root: str,
+ model_paths: ModelPaths,
+ prompt_enhancer_gemma_root: str | None = None,
spatial_upsampler_path: str,
vae_queue: SimpleQueue,
compilation_config: CompilationConfig | None = None,
sp_max_tokens: int = _DEFAULT_SP_MAX_TOKENS,
quantization: Callable[[], QuantizationPolicy] | None = None,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
) -> None:
# quantization is a picklable zero-arg builder (built per worker, post-spawn); default fp8-cast.
quantization_policy = (
- quantization() if quantization is not None else _build_fp8_cast_policy(distilled_checkpoint_path)
+ quantization() if quantization is not None else _build_fp8_cast_policy(model_paths.transformer())
)
- registry = StateDictRegistry()
+ registry = ModelRegistry()
pipeline = DistilledPipeline(
- distilled_checkpoint_path=distilled_checkpoint_path,
- gemma_root=gemma_root,
+ model_paths=model_paths,
+ prompt_enhancer_gemma_root=prompt_enhancer_gemma_root,
spatial_upsampler_path=spatial_upsampler_path,
loras=[],
registry=registry,
quantization=quantization_policy,
compilation_config=compilation_config,
alloc_trim_strategy=AllocatorTrimStrategy.DEFER,
+ diffvae_optimization=diffvae_optimization,
)
tracker = TransformerWeightTracker(group=self.groups.transformer_group)
@@ -92,15 +96,30 @@ class DistilledRunner(MGPURunner):
tracker=tracker,
)
- # Accelerate Gemma parallelization.
- pipeline.prompt_encoder._text_encoder_builder = AccelerateGemmaBuilder(
- gemma_root_path=gemma_root,
+ # Accelerate Gemma parallelization. Capture shared-vs-separate before replacing
+ # the encode builder so a shared alias is re-bound to the new instance.
+ pe = pipeline.prompt_encoder
+ separate_enhancer = pe._enhancer_text_encoder_builder is not pe._text_encoder_builder
+ pe._text_encoder_builder = AccelerateGemmaBuilder(
+ gemma_root_path=model_paths.text_encoder(),
gemma_group=self.groups.gemma_group,
broadcast_group=self.groups.transformer_group,
registry=registry,
src_rank=_DRIVER_RANK,
dtype=pipeline.dtype,
)
+ if separate_enhancer:
+ assert prompt_enhancer_gemma_root is not None
+ pe._enhancer_text_encoder_builder = AccelerateGemmaBuilder(
+ gemma_root_path=prompt_enhancer_gemma_root,
+ gemma_group=self.groups.gemma_group,
+ broadcast_group=self.groups.transformer_group,
+ registry=registry,
+ src_rank=_DRIVER_RANK,
+ dtype=pipeline.dtype,
+ )
+ else:
+ pe._enhancer_text_encoder_builder = pe._text_encoder_builder
# Distributed VAE decoding: balanced 2D spatial grid over the group (one tile/rank).
# height takes the smaller factor of world_size, width the larger; size-aware split is a follow-up.
@@ -121,7 +140,7 @@ class DistilledRunner(MGPURunner):
self._pipeline = pipeline
@torch.inference_mode()
- def __call__(
+ def __call__( # noqa: PLR0913
self,
*,
output_path: str,
@@ -129,13 +148,19 @@ class DistilledRunner(MGPURunner):
seed: int,
height: int,
width: int,
- num_frames: int,
frame_rate: float,
+ num_frames: int | AutoDuration = DEFAULT_AUTO_DURATION,
images: list[Any] | None = None,
+ enhance_prompt: bool = False,
+ enhance_static_cache: bool = False,
+ hdr: HDRColorSpace | None = None,
+ generated_keyframes: int | Sequence[int] = 0,
) -> Iterator[str | None]:
# The pipeline raises ValueError on invalid input (symmetric across ranks); the controller
# catches that and turns it into a recoverable RunnerError. Anything else is fatal.
- video, audio = self._pipeline(
+ hdr = resolve_hdr_color_space(images=images or [], hdr=hdr)
+ vae_dtype = vae_dtype_for_hdr(hdr, torch.bfloat16)
+ video, audio, num_frames, tiling_config = self._pipeline(
prompt=prompt,
seed=seed,
height=height,
@@ -143,7 +168,12 @@ class DistilledRunner(MGPURunner):
num_frames=num_frames,
frame_rate=frame_rate,
images=images or [],
+ vae_dtype=vae_dtype,
+ color_space=hdr,
tiling_config=None,
+ enhance_prompt=enhance_prompt,
+ enhance_static_cache=enhance_static_cache,
+ generated_keyframes=generated_keyframes,
)
if dist.get_rank() != _DRIVER_RANK:
yield None # workers: nothing to encode
@@ -153,29 +183,35 @@ class DistilledRunner(MGPURunner):
fps=frame_rate,
audio=audio,
output_path=output_path,
- video_chunks_number=get_video_chunks_number(num_frames, TilingConfig.default()),
+ video_chunks_number=get_video_chunks_number(num_frames, tiling_config),
+ color_space=hdr,
)
yield output_path
if __name__ == "__main__":
from ltx_pipelines.utils.args import (
+ add_generated_keyframes_arg,
default_2_stage_distilled_arg_parser,
resolve_cli_params,
)
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(message)s")
params = resolve_cli_params(distilled=True)
- args = default_2_stage_distilled_arg_parser(params=params).parse_args()
+ parser = add_generated_keyframes_arg(
+ default_2_stage_distilled_arg_parser(params=params, supports_auto_duration=True)
+ )
+ args = parser.parse_args()
vae_queue = torch.multiprocessing.get_context("spawn").SimpleQueue()
controller = MGPUController(DistilledRunner)
controller.start(
- distilled_checkpoint_path=args.distilled_checkpoint_path,
- gemma_root=args.gemma_root,
+ model_paths=args.model_paths,
+ prompt_enhancer_gemma_root=args.prompt_enhancer_gemma_root,
spatial_upsampler_path=args.spatial_upsampler_path,
vae_queue=vae_queue,
compilation_config=args.compile,
+ diffvae_optimization=args.diffvae_optimization,
)
try:
for _ in controller.stream(
@@ -187,6 +223,10 @@ if __name__ == "__main__":
num_frames=args.num_frames,
frame_rate=args.frame_rate,
images=args.images,
+ enhance_prompt=args.enhance_prompt,
+ enhance_static_cache=args.enhance_static_cache,
+ hdr=args.hdr,
+ generated_keyframes=args.num_generated_keyframes,
):
pass # drive the job to completion; the runner writes the file as a side effect
finally:
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/dubit.py b/packages/ltx-pipelines/src/ltx_pipelines/dubit.py
index 37a7ef1..3956713 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/dubit.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/dubit.py
@@ -7,6 +7,7 @@ from collections.abc import Iterator
import torch
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_core.components.noisers import GaussianNoiser
from ltx_core.components.patchifiers import AudioPatchifier
from ltx_core.conditioning import AudioConditionByReferenceLatent
@@ -14,14 +15,21 @@ from ltx_core.loader import LoraPathStrengthAndSDOps
from ltx_core.loader.registry import Registry
from ltx_core.model.audio_vae import encode_audio as vae_encode_audio
from ltx_core.model.transformer.compiling import CompilationConfig
-from ltx_core.model.video_vae import TilingConfig, VideoEncoder, get_video_chunks_number
+from ltx_core.model.video_vae import (
+ AUTO_TILING,
+ AutoTiling,
+ TileSizeConfig,
+ TilingConfig,
+ VideoEncoder,
+ get_video_chunks_number,
+)
+from ltx_core.model.video_vae.transformer import DiffVAEMode
from ltx_core.quantization import QuantizationPolicy
-from ltx_core.types import Audio, AudioLatentShape, SpatioTemporalScaleFactors, VideoPixelShape
+from ltx_core.types import Audio, AudioLatentShape, VideoPixelShape
from ltx_pipelines.iclora_utils import (
append_ic_lora_reference_video_conditionings,
read_lora_reference_downscale_factor,
)
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_pipelines.utils.args import (
ImageConditioningInput,
dubit_arg_parser,
@@ -38,25 +46,31 @@ from ltx_pipelines.utils.blocks import (
)
from ltx_pipelines.utils.constants import DISTILLED_SIGMAS, STAGE_2_DISTILLED_SIGMAS
from ltx_pipelines.utils.denoisers import SimpleDenoiser
-from ltx_pipelines.utils.helpers import assert_resolution, combined_image_conditionings, get_device
-from ltx_pipelines.utils.media_io import decode_audio_from_file, encode_video, get_videostream_metadata
+from ltx_pipelines.utils.helpers import (
+ assert_resolution,
+ combined_image_conditionings,
+ ensure_tiling_config,
+ get_device,
+ snap_frames_to_grid,
+ tiling_scale_factors_for_vae,
+)
+from ltx_pipelines.utils.media_io import (
+ HDRColorSpace,
+ decode_audio_from_file,
+ encode_video,
+ get_videostream_metadata,
+)
+from ltx_pipelines.utils.model_paths import ModelPaths
from ltx_pipelines.utils.types import ModalitySpec, OffloadMode
-def _snap_frames_to_8k1(frames: int) -> int:
- """Round ``frames`` down to the nearest ``8k+1`` (the model's required frame count)."""
- time_scale = SpatioTemporalScaleFactors.default().time
- return ((frames - 1) // time_scale) * time_scale + 1
-
-
class DubItPipeline:
"""Two-stage Dub-It with IC-LoRA video reference and appended audio reference tokens."""
- def __init__(
+ def __init__( # noqa: PLR0913
self,
- distilled_checkpoint_path: str,
+ model_paths: ModelPaths,
spatial_upsampler_path: str,
- gemma_root: str,
ic_lora: LoraPathStrengthAndSDOps,
device: torch.device | None = None,
quantization: QuantizationPolicy | None = None,
@@ -64,6 +78,8 @@ class DubItPipeline:
compilation_config: CompilationConfig | None = None,
offload_mode: OffloadMode = OffloadMode.NONE,
alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
+ prompt_enhancer_gemma_root: str | None = None,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
) -> None:
self.device = device or get_device()
self.dtype = torch.bfloat16
@@ -71,30 +87,30 @@ class DubItPipeline:
loras = (ic_lora,)
self.prompt_encoder = PromptEncoder(
- distilled_checkpoint_path,
- gemma_root,
+ model_paths,
self.dtype,
self.device,
registry=registry,
offload_mode=offload_mode,
alloc_trim_strategy=alloc_trim_strategy,
+ prompt_enhancer_gemma_root=prompt_enhancer_gemma_root,
)
self.image_conditioner = ImageConditioner(
- distilled_checkpoint_path,
+ model_paths.video_vae(),
self.dtype,
self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
)
self.audio_conditioner = AudioConditioner(
- distilled_checkpoint_path,
+ model_paths.audio_vae(),
self.dtype,
self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
)
self.stage = DiffusionStage.from_checkpoint(
- distilled_checkpoint_path,
+ model_paths.transformer(),
self.dtype,
self.device,
loras=loras,
@@ -105,7 +121,7 @@ class DubItPipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.upsampler = VideoUpsampler(
- distilled_checkpoint_path,
+ model_paths.video_vae(),
spatial_upsampler_path,
self.dtype,
self.device,
@@ -113,14 +129,15 @@ class DubItPipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.video_decoder = VideoDecoder(
- distilled_checkpoint_path,
+ model_paths.video_vae(),
self.dtype,
self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
+ diffvae_optimization=diffvae_optimization,
)
self.audio_decoder = AudioDecoder(
- distilled_checkpoint_path,
+ model_paths.audio_vae(),
self.dtype,
self.device,
registry=registry,
@@ -138,6 +155,7 @@ class DubItPipeline:
num_frames: int,
video_encoder: VideoEncoder,
encode_tiling: TilingConfig | None,
+ color_space: HDRColorSpace | None = None,
) -> list:
conditionings = combined_image_conditionings(
images=images,
@@ -146,6 +164,7 @@ class DubItPipeline:
video_encoder=video_encoder,
dtype=self.dtype,
device=self.device,
+ color_space=color_space,
)
append_ic_lora_reference_video_conditionings(
conditionings,
@@ -160,6 +179,7 @@ class DubItPipeline:
conditioning_attention_strength=1.0,
conditioning_attention_mask=None,
tiling_config=encode_tiling,
+ color_space=color_space,
)
return conditionings
@@ -181,27 +201,44 @@ class DubItPipeline:
reference_video_path: str,
reference_strength: float = 1.0,
enhance_prompt: bool = False,
- tiling_config: TilingConfig | None = None,
+ enhance_static_cache: bool = False,
+ vae_dtype: torch.dtype | None = None,
+ tiling_config: TilingConfig | AutoTiling | None = AUTO_TILING,
stage_1_sigmas: torch.Tensor = DISTILLED_SIGMAS,
stage_2_sigmas: torch.Tensor = STAGE_2_DISTILLED_SIGMAS,
- ) -> tuple[Iterator[torch.Tensor], Audio]:
+ color_space: HDRColorSpace | None = None,
+ ) -> tuple[Iterator[torch.Tensor], Audio, TilingConfig | None]:
+ images = self.image_conditioner.resolve_crf(images)
assert_resolution(height=height, width=width, is_two_stage=True)
meta = get_videostream_metadata(reference_video_path)
- num_frames = _snap_frames_to_8k1(meta.frames)
+ num_frames = snap_frames_to_grid(meta.frames)
frame_rate = float(meta.fps)
generator = torch.Generator(device=self.device).manual_seed(seed)
noiser = GaussianNoiser(generator=generator)
+ if vae_dtype is None:
+ vae_dtype = self.dtype
(ctx_p,) = self.prompt_encoder(
[prompt],
enhance_first_prompt=enhance_prompt,
+ enhance_static_cache=enhance_static_cache,
enhance_prompt_image=images[0][0] if len(images) > 0 else None,
enhance_prompt_seed=seed,
)
video_context, audio_context = ctx_p.video_encoding, ctx_p.audio_encoding
+ scale_factors = tiling_scale_factors_for_vae(self.video_decoder.checkpoint_path)
+ tiling_config = ensure_tiling_config(
+ tiling_config,
+ scale_factors=scale_factors,
+ vae_checkpoint_path=self.video_decoder.checkpoint_path,
+ video_shape=VideoPixelShape(batch=1, frames=num_frames, height=height, width=width, fps=frame_rate),
+ diffvae_optimization=self.video_decoder.diffvae_optimization,
+ device=self.device,
+ )
+
stage_1_output_shape = VideoPixelShape(
batch=1,
frames=num_frames,
@@ -209,7 +246,7 @@ class DubItPipeline:
height=height // 2,
fps=frame_rate,
)
- encode_tiling = TilingConfig.default()
+ encode_tiling = TileSizeConfig.default()
def build_image_conditionings(output_shape: VideoPixelShape) -> list:
return self.image_conditioner(
@@ -222,6 +259,7 @@ class DubItPipeline:
num_frames=num_frames,
video_encoder=enc,
encode_tiling=encode_tiling,
+ color_space=color_space,
)
)
@@ -289,9 +327,9 @@ class DubItPipeline:
),
)
- decoded_video = self.video_decoder(video_state.latent, tiling_config, generator)
+ decoded_video = self.video_decoder(video_state.latent, tiling_config, generator, dtype=vae_dtype)
decoded_audio = self.audio_decoder(s1_audio_latent)
- return decoded_video, decoded_audio
+ return decoded_video, decoded_audio, tiling_config
def patchify_dubit_audio_reference_latent(
@@ -327,18 +365,18 @@ def main() -> None:
raise ValueError("Dub-It requires exactly one --lora (the Dub-It IC-LoRA).")
pipeline = DubItPipeline(
- distilled_checkpoint_path=args.distilled_checkpoint_path,
+ model_paths=args.model_paths,
spatial_upsampler_path=args.spatial_upsampler_path,
- gemma_root=args.gemma_root,
ic_lora=args.lora[0],
quantization=args.quantization,
compilation_config=args.compile,
offload_mode=args.offload_mode,
+ prompt_enhancer_gemma_root=args.prompt_enhancer_gemma_root,
+ diffvae_optimization=args.diffvae_optimization,
)
- tiling_config = TilingConfig.default()
src = get_videostream_metadata(args.reference_video)
- video_chunks_number = get_video_chunks_number(_snap_frames_to_8k1(src.frames), tiling_config)
- video, audio = pipeline(
+ # Dub-It is SDR-only (no ``--hdr``); EXR references are rejected in arg validation.
+ video, audio, tiling_config = pipeline(
prompt=args.prompt,
seed=args.seed,
height=args.height,
@@ -346,15 +384,16 @@ def main() -> None:
images=[],
reference_video_path=args.reference_video,
reference_strength=args.reference_strength,
- tiling_config=tiling_config,
+ tiling_config=AUTO_TILING,
enhance_prompt=args.enhance_prompt,
+ enhance_static_cache=args.enhance_static_cache,
)
encode_video(
video=video,
fps=int(src.fps),
audio=audio,
output_path=args.output_path,
- video_chunks_number=video_chunks_number,
+ video_chunks_number=get_video_chunks_number(snap_frames_to_grid(src.frames), tiling_config),
)
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/hdr_ic_lora.py b/packages/ltx-pipelines/src/ltx_pipelines/hdr_ic_lora.py
index 6b9787d..e1fe319 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/hdr_ic_lora.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/hdr_ic_lora.py
@@ -33,6 +33,7 @@ import torch
from einops import rearrange
from safetensors import safe_open
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_core.components.noisers import GaussianNoiser
from ltx_core.components.patchifiers import VideoLatentPatchifier
from ltx_core.conditioning import (
@@ -40,17 +41,17 @@ from ltx_core.conditioning import (
VideoConditionByReferenceLatent,
)
from ltx_core.devices import empty_device_cache
-from ltx_core.hdr import apply_hdr_decode_postprocess
+from ltx_core.hdr import HDRTransfer, to_hdr_linear
from ltx_core.loader import LoraPathStrengthAndSDOps
-from ltx_core.loader.registry import Registry
+from ltx_core.loader.registry import ModelRegistry, Registry
from ltx_core.loader.sd_ops import LTXV_LORA_COMFY_RENAMING_MAP
from ltx_core.modality_tiling import VideoModalityTilingHelper
-from ltx_core.model.video_vae import TilingConfig, VideoEncoder
+from ltx_core.model.video_vae import AUTO_TILING, AutoTiling, TilingConfig, VideoEncoder
+from ltx_core.model.video_vae.transformer import DiffVAEMode
from ltx_core.quantization import QuantizationPolicy
-from ltx_core.tiling import DimensionTilingConfig, TileCountConfig
+from ltx_core.tiling import DimensionSizeConfig, DimensionTilingConfig, TileCountConfig, TileSizeConfig
from ltx_core.tools import VideoLatentTools
from ltx_core.types import VideoLatentShape, VideoPixelShape
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_pipelines.utils.blocks import (
DiffusionStage,
ImageConditioner,
@@ -59,8 +60,14 @@ from ltx_pipelines.utils.blocks import (
)
from ltx_pipelines.utils.constants import DISTILLED_SIGMA_VALUES, STAGE_2_DISTILLED_SIGMA_VALUES
from ltx_pipelines.utils.denoisers import SimpleDenoiser
-from ltx_pipelines.utils.helpers import get_device, modality_from_latent_state
+from ltx_pipelines.utils.helpers import (
+ ensure_tiling_config,
+ get_device,
+ modality_from_latent_state,
+ tiling_scale_factors_for_vae,
+)
from ltx_pipelines.utils.media_io import ResizeMode, align_resolution, load_video_conditioning_hdr
+from ltx_pipelines.utils.model_paths import ModelPaths
from ltx_pipelines.utils.quantization_factory import QuantizationKind
from ltx_pipelines.utils.types import ModalitySpec, OffloadMode
@@ -97,6 +104,20 @@ STAGE2_SIGMAS = [[_S2[0], _S2[1], 0.0]]
STAGE2_USE_IC_LORA = [True]
+def _encode_tiling_config(tiling_config: TilingConfig) -> TilingConfig:
+ if not isinstance(tiling_config, TileSizeConfig):
+ return tiling_config
+ if not tiling_config.height.is_tiled() and not tiling_config.width.is_tiled():
+ return tiling_config
+ long = max(tiling_config.height.tile_size, tiling_config.width.tile_size)
+ overlap = tiling_config.height.overlap if tiling_config.height.is_tiled() else tiling_config.width.overlap
+ return TileSizeConfig(
+ frames=tiling_config.frames,
+ height=DimensionSizeConfig(tile_size=long, overlap=overlap),
+ width=DimensionSizeConfig(tile_size=long, overlap=overlap),
+ )
+
+
def _clamp_dim_tiling(cfg: DimensionTilingConfig, dim_size: int, axis: str) -> DimensionTilingConfig:
"""Clamp a single dim's tile count and overlap to the latent's extent.
``split_by_count`` requires ``overlap < tile_size``; with
@@ -150,7 +171,6 @@ DEFAULT_SPATIAL_OVERLAP = 256
DEFAULT_TEMPORAL_TILE = 32
DEFAULT_TEMPORAL_OVERLAP = 16
-
# ---------------------------------------------------------------------------
# HDR LoRA config
# ---------------------------------------------------------------------------
@@ -163,7 +183,7 @@ class HdrLoraConfig:
constructed manually for testing.
"""
- hdr_transform: str = "logc3"
+ hdr_transform: HDRTransfer = HDRTransfer.LOGC3
reference_downscale_factor: int = 1
@@ -178,14 +198,15 @@ def read_hdr_lora_config(lora_path: str) -> HdrLoraConfig | None:
logger.warning("Failed to read metadata from LoRA file '%s': %s", lora_path, e)
return None
- hdr_transform = metadata.get("hdr_transform", "")
- has_hdr = bool(hdr_transform or metadata.get("use_hdr_transform"))
+ raw_transform = metadata.get("hdr_transform", "")
+ has_hdr = bool(raw_transform or metadata.get("use_hdr_transform"))
if not has_hdr:
return None
- transform = hdr_transform if hdr_transform and hdr_transform != "true" else "logc3"
+ # Metadata may store a bare flag ("true") or a transfer name ("logc3").
+ transfer = HDRTransfer(raw_transform) if raw_transform and raw_transform != "true" else HDRTransfer.LOGC3
scale = int(metadata.get("reference_downscale_factor", 1))
- return HdrLoraConfig(hdr_transform=transform, reference_downscale_factor=scale)
+ return HdrLoraConfig(hdr_transform=transfer, reference_downscale_factor=scale)
# ---------------------------------------------------------------------------
@@ -203,7 +224,7 @@ class HDRICLoraPipeline:
def __init__( # noqa: PLR0913
self,
- distilled_checkpoint_path: str,
+ model_paths: ModelPaths,
spatial_upsampler_path: str,
hdr_lora: str | Path,
text_embeddings_path: str | Path,
@@ -214,10 +235,11 @@ class HDRICLoraPipeline:
tiled_vae_encode_pixel_threshold: int = TILED_VAE_ENCODE_PIXEL_THRESHOLD,
offload_mode: OffloadMode = OffloadMode.NONE,
alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
):
"""
Args:
- distilled_checkpoint_path: Path to the distilled model checkpoint.
+ model_paths: Resolved component paths (diffusion + video VAE at minimum).
spatial_upsampler_path: Path to the spatial upsampler checkpoint.
hdr_lora: Path to the HDR IC-LoRA ``.safetensors`` file.
text_embeddings_path: Path to pre-computed text embeddings
@@ -225,7 +247,10 @@ class HDRICLoraPipeline:
``audio_context`` tensors).
device: Target device. Auto-detected when ``None``.
quantization: Quantization policy. Defaults to ``fp8_cast``.
- registry: Optional model registry for caching loaded components.
+ registry: Optional registry for non-diffusion blocks (VAE encode/decode,
+ upsampler). Diffusion stages always use a dedicated full
+ :class:`ModelRegistry` that is cleared before decode so
+ transformer weights do not pin VRAM.
hdr_lora_config: Explicit HDR LoRA config override. When ``None``,
auto-detected from LoRA safetensors metadata.
tiled_vae_encode_pixel_threshold: Conditioning videos whose spatial
@@ -237,7 +262,7 @@ class HDRICLoraPipeline:
self.device = device or get_device()
self._tiled_vae_encode_threshold = tiled_vae_encode_pixel_threshold
if isinstance(quantization, QuantizationKind):
- quantization = quantization.to_policy(checkpoint_path=distilled_checkpoint_path)
+ quantization = quantization.to_policy(checkpoint_path=model_paths.transformer())
if offload_mode != OffloadMode.NONE and quantization is not None:
logger.info("Offload mode enabled — disabling quantization (not supported with layer streaming).")
quantization = None
@@ -256,34 +281,37 @@ class HDRICLoraPipeline:
)
self.image_conditioner = ImageConditioner(
- distilled_checkpoint_path,
+ model_paths.video_vae(),
self.dtype,
self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
)
+ # Full cache for diffusion only: cheap per-tile stage_2 rebuilds. Cleared
+ # before decode so transformer SDs are not still pinning VRAM.
+ self._diffusion_registry = ModelRegistry()
self.stage_1 = DiffusionStage.from_checkpoint(
- distilled_checkpoint_path,
+ model_paths.transformer(),
self.dtype,
self.device,
loras=loras,
quantization=quantization,
- registry=registry,
+ registry=self._diffusion_registry,
offload_mode=offload_mode,
alloc_trim_strategy=alloc_trim_strategy,
)
self.stage_2 = DiffusionStage.from_checkpoint(
- distilled_checkpoint_path,
+ model_paths.transformer(),
self.dtype,
self.device,
loras=loras,
quantization=quantization,
- registry=registry,
+ registry=self._diffusion_registry,
offload_mode=offload_mode,
alloc_trim_strategy=alloc_trim_strategy,
)
self.upsampler = VideoUpsampler(
- distilled_checkpoint_path,
+ model_paths.video_vae(),
spatial_upsampler_path,
self.dtype,
self.device,
@@ -291,11 +319,12 @@ class HDRICLoraPipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.video_decoder = VideoDecoder(
- distilled_checkpoint_path,
+ model_paths.video_vae(),
self.dtype,
self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
+ diffvae_optimization=diffvae_optimization,
)
# HDR config: explicit override, or auto-detect from LoRA metadata.
@@ -305,12 +334,15 @@ class HDRICLoraPipeline:
self._hdr_config = read_hdr_lora_config(lora_path)
if self._hdr_config is not None:
- logger.info("[HDR IC-LoRA] HDR mode enabled (%s decode)", self._hdr_config.hdr_transform)
+ logger.info(
+ "[HDR IC-LoRA] HDR mode enabled (%s decode)",
+ self._hdr_config.hdr_transform.value,
+ )
@property
- def hdr_transform(self) -> str:
- """Active HDR transform name (defaults to 'logc3')."""
- return self._hdr_config.hdr_transform if self._hdr_config is not None else "logc3"
+ def hdr_transform(self) -> HDRTransfer:
+ """Active HDR working-space transfer (defaults to LogC3)."""
+ return self._hdr_config.hdr_transform if self._hdr_config is not None else HDRTransfer.LOGC3
@property
def reference_downscale_factor(self) -> int:
@@ -325,7 +357,7 @@ class HDRICLoraPipeline:
num_frames: int,
frame_rate: float,
video_conditioning: list[tuple[str, float]],
- tiling_config: TilingConfig | None = None,
+ tiling_config: TilingConfig | AutoTiling | None = AUTO_TILING,
high_quality_hdr: bool = False,
stage2_tilings: list[TileCountConfig] | None = None,
stage2_sigmas: list[list[float]] | None = None,
@@ -377,6 +409,16 @@ class HDRICLoraPipeline:
crop_h,
)
+ scale_factors = tiling_scale_factors_for_vae(self.video_decoder.checkpoint_path)
+ tiling_config = ensure_tiling_config(
+ tiling_config,
+ scale_factors=scale_factors,
+ vae_checkpoint_path=self.video_decoder.checkpoint_path,
+ video_shape=VideoPixelShape(batch=1, frames=gen_num_frames, height=gen_h, width=gen_w, fps=frame_rate),
+ diffvae_optimization=self.video_decoder.diffvae_optimization,
+ device=self.device,
+ )
+
generator = torch.Generator(device=self.device).manual_seed(seed)
noiser = GaussianNoiser(generator=generator)
@@ -399,60 +441,46 @@ class HDRICLoraPipeline:
stage_1_sigmas = torch.Tensor(DISTILLED_SIGMA_VALUES).to(self.device)
- # HDR is video-only: skip the audio stream to avoid denoising 5B audio params.
- video_state, _ = self.stage_1(
- denoiser=SimpleDenoiser(video_context, None),
- sigmas=stage_1_sigmas,
- noiser=noiser,
- width=s1_w,
- height=s1_h,
- frames=gen_num_frames,
- fps=frame_rate,
- video=ModalitySpec(
- context=video_context,
- conditionings=stage_1_conditionings,
- ),
- )
-
- if stage2_tilings is None:
- stage2_tilings = list(STAGE2_TILINGS)
- if stage2_sigmas is None:
- stage2_sigmas = [list(s) for s in STAGE2_SIGMAS]
- if stage2_use_ic_lora is None:
- stage2_use_ic_lora = list(STAGE2_USE_IC_LORA)
- if not (len(stage2_tilings) == len(stage2_sigmas) == len(stage2_use_ic_lora)):
- raise ValueError("stage2_tilings, stage2_sigmas, and stage2_use_ic_lora must have equal length")
-
- # Stage 2: Upsample and refine at full resolution.
- upscaled_video_latent = self.upsampler(video_state.latent[:1])
-
- stage_2_conditionings = self.image_conditioner(
- lambda enc: self._create_conditionings(
- video_conditioning=video_conditioning,
- height=gen_h,
- width=gen_w,
- video_encoder=enc,
- num_frames=gen_num_frames,
- tiling_config=tiling_config,
- high_quality_hdr=high_quality_hdr,
+ try:
+ # HDR is video-only: skip the audio stream to avoid denoising 5B audio params.
+ video_state, _ = self.stage_1(
+ denoiser=SimpleDenoiser(video_context, None),
+ sigmas=stage_1_sigmas,
+ noiser=noiser,
+ width=s1_w,
+ height=s1_h,
+ frames=gen_num_frames,
+ fps=frame_rate,
+ video=ModalitySpec(
+ context=video_context,
+ conditionings=stage_1_conditionings,
+ ),
)
- )
- # video_tools is required by TiledDataParallelBuilder when stage_2 is
- # wrapped for multi-GPU
- stage2_video_tools = VideoLatentTools(
- VideoLatentPatchifier(patch_size=1),
- VideoLatentShape.from_pixel_shape(
- VideoPixelShape(
- batch=1,
- frames=gen_num_frames,
+
+ if stage2_tilings is None:
+ stage2_tilings = list(STAGE2_TILINGS)
+ if stage2_sigmas is None:
+ stage2_sigmas = [list(s) for s in STAGE2_SIGMAS]
+ if stage2_use_ic_lora is None:
+ stage2_use_ic_lora = list(STAGE2_USE_IC_LORA)
+ if not (len(stage2_tilings) == len(stage2_sigmas) == len(stage2_use_ic_lora)):
+ raise ValueError("stage2_tilings, stage2_sigmas, and stage2_use_ic_lora must have equal length")
+
+ # Stage 2: Upsample and refine at full resolution.
+ upscaled_video_latent = self.upsampler(video_state.latent[:1])
+
+ stage_2_conditionings = self.image_conditioner(
+ lambda enc: self._create_conditionings(
+ video_conditioning=video_conditioning,
height=gen_h,
width=gen_w,
- fps=frame_rate,
+ video_encoder=enc,
+ num_frames=gen_num_frames,
+ tiling_config=tiling_config,
+ high_quality_hdr=high_quality_hdr,
)
- ),
- frame_rate,
- )
- with self.stage_2.model_context(video_tools=stage2_video_tools) as transformer:
+ )
+ # Per-tile stage_2(...) rebuilds are cheap with shell caching.
phase_latent = upscaled_video_latent
for phase_idx, (tiling, sigmas_list, use_ic) in enumerate(
zip(stage2_tilings, stage2_sigmas, stage2_use_ic_lora, strict=True)
@@ -469,7 +497,6 @@ class HDRICLoraPipeline:
diffusion_tiling.width,
)
phase_latent = self._run_stage2_phase(
- transformer=transformer,
latent=phase_latent,
conditionings=conditionings,
tiling=diffusion_tiling,
@@ -478,8 +505,10 @@ class HDRICLoraPipeline:
frame_rate=frame_rate,
seed=seed,
)
-
- final_video_latent = phase_latent
+ final_video_latent = phase_latent
+ finally:
+ # Drop cached transformer shells/weights so decode (or failure cleanup) can claim VRAM.
+ self._diffusion_registry.clear()
crop_size = (crop_w, crop_h) if needs_crop else None
return self._decode_video(
@@ -492,7 +521,6 @@ class HDRICLoraPipeline:
def _run_stage2_phase(
self,
- transformer: object,
latent: torch.Tensor,
conditionings: list[ConditioningItem],
tiling: TileCountConfig,
@@ -502,13 +530,18 @@ class HDRICLoraPipeline:
seed: int,
) -> torch.Tensor:
"""Run one stage-2 denoising phase with optional IC-LoRA conditioning.
- Each tile calls ``stage_2.run()`` with a tile-sized ``ModalitySpec`` for
- video only (audio is omitted entirely for HDR). IC-LoRA conditionings
- are sliced spatially to match each tile's extent.
+ Each tile calls ``stage_2(...)`` (build→denoise→dispose) with a tile-sized
+ ``ModalitySpec`` for video only (audio is omitted entirely for HDR).
+ IC-LoRA conditionings are sliced spatially to match each tile's extent.
"""
batch, n_channels, n_frames, n_height, n_width = latent.shape
full_shape = VideoLatentShape(batch=batch, channels=n_channels, frames=n_frames, height=n_height, width=n_width)
- full_tools = VideoLatentTools(VideoLatentPatchifier(patch_size=1), full_shape, frame_rate)
+ full_tools = VideoLatentTools(
+ VideoLatentPatchifier(patch_size=1),
+ full_shape,
+ frame_rate,
+ scale_factors=self.stage_2.video_scale_factors,
+ )
helper = VideoModalityTilingHelper(tiling, full_tools)
ref_initial = full_tools.create_initial_state(device=self.device, dtype=self.dtype)
@@ -540,14 +573,14 @@ class HDRICLoraPipeline:
for cond in conditionings
]
- tile_video_state, _ = self.stage_2.run(
- transformer=transformer,
+ sf = self.stage_2.video_scale_factors
+ tile_video_state, _ = self.stage_2(
denoiser=SimpleDenoiser(v_ctx, None),
sigmas=sigmas,
noiser=GaussianNoiser(generator=torch.Generator(device=self.device).manual_seed(seed + tile_idx)),
- width=tile_w * 32,
- height=tile_h * 32,
- frames=(tile_f - 1) * 8 + 1,
+ width=tile_w * sf.width,
+ height=tile_h * sf.height,
+ frames=(tile_f - 1) * sf.time + 1,
fps=frame_rate,
video=ModalitySpec(
context=v_ctx,
@@ -580,16 +613,15 @@ class HDRICLoraPipeline:
Returns:
Linear HDR float tensor ``[f, h, w, c]``.
"""
- # Cast to float32 so tiled-decode accumulation buffers and blending
- # masks run in full precision, avoiding bfloat16 seam artifacts.
- # apply_hdr_decode_postprocess expects float32 [0, 1].
- latent = latent.float()
+ # Always-HDR path: float32 weights + latent so compute/output/tiling stay fp32.
+ # to_hdr_linear expects float32 [0, 1] working-space codes.
+ latent = latent.to(dtype=torch.float32)
decoded = torch.cat(
- [chunk.float() for chunk in self.video_decoder(latent, tiling_config, generator)],
+ list(self.video_decoder(latent, tiling_config, generator, dtype=torch.float32)),
dim=0,
)
decoded = rearrange(decoded, "f h w c -> 1 c f h w")
- hdr = apply_hdr_decode_postprocess(decoded, transform=self.hdr_transform)
+ hdr = to_hdr_linear(decoded, transfer=self.hdr_transform)
del decoded
out = rearrange(hdr[0], "c f h w -> f h w c")
if crop_size is not None:
@@ -632,7 +664,7 @@ class HDRICLoraPipeline:
frame_cap=load_frame_cap,
dtype=self.dtype,
device=self.device,
- hdr_transform=self.hdr_transform,
+ transfer=self.hdr_transform,
resize_mode=ResizeMode.REFLECT_PAD,
)
),
@@ -641,7 +673,7 @@ class HDRICLoraPipeline:
if high_quality_hdr:
video = video.repeat_interleave(2, dim=2)[:, :, :num_frames, :, :]
if tiling_config is not None and ref_height * ref_width > self._tiled_vae_encode_threshold:
- encoded_video = video_encoder.tiled_encode(video, tiling_config)
+ encoded_video = video_encoder.tiled_encode(video, _encode_tiling_config(tiling_config))
else:
encoded_video = video_encoder(video)
@@ -674,14 +706,12 @@ def _make_tiling_config(
16 overlap) are suitable for H100-80 GB. On GPUs with less VRAM,
reduce the spatial tile size (e.g. ``spatial_tile=768``).
"""
- from ltx_core.model.video_vae.tiling import SpatialTilingConfig, TemporalTilingConfig # noqa: PLC0415
+ from ltx_core.tiling import DimensionSizeConfig, TileSizeConfig # noqa: PLC0415
- return TilingConfig(
- spatial_config=SpatialTilingConfig(tile_size_in_pixels=spatial_tile, tile_overlap_in_pixels=spatial_overlap),
- temporal_config=TemporalTilingConfig(
- tile_size_in_frames=temporal_tile,
- tile_overlap_in_frames=temporal_overlap,
- ),
+ return TileSizeConfig(
+ height=DimensionSizeConfig(tile_size=spatial_tile, overlap=spatial_overlap),
+ width=DimensionSizeConfig(tile_size=spatial_tile, overlap=spatial_overlap),
+ frames=DimensionSizeConfig(tile_size=temporal_tile, overlap=temporal_overlap),
)
@@ -709,7 +739,6 @@ def _process_single_video( # noqa: PLR0913
tiling_config: TilingConfig,
seed: int,
skip_mp4: bool,
- exr_half: bool,
exr_executor: "ThreadPoolExecutor", # noqa: F821
exr_futures: list,
high_quality_hdr: bool = False,
@@ -739,7 +768,7 @@ def _process_single_video( # noqa: PLR0913
for j in range(hdr_video.shape[0]):
frame_cpu = hdr_video[j].cpu().clone()
path = exr_dir / f"frame_{j:05d}.exr"
- exr_futures.append(exr_executor.submit(save_exr_tensor, frame_cpu, str(path), exr_half))
+ exr_futures.append(exr_executor.submit(save_exr_tensor, frame_cpu, str(path), True))
del hdr_video
gc.collect()
@@ -767,6 +796,8 @@ def _build_arg_parser() -> "argparse.ArgumentParser": # noqa: F821
parser = argparse.ArgumentParser(
description="HDR IC-LoRA inference: EXR frames + tonemapped ProRes .mov.",
+ # Prevent ``--hdr`` from abbreviating to ``--hdr-lora`` (native HDR flag is not supported here).
+ allow_abbrev=False,
epilog="""\
Resolution & frame constraints
------------------------------
@@ -817,7 +848,6 @@ Max frames by resolution (fp8_cast, bfloat16 VAE, tiled decode)
"Reduce on lower-VRAM GPUs (e.g. 768 for 48 GB).",
)
parser.add_argument("--skip-mp4", action="store_true", help="Skip H.264 MP4 encoding, only produce EXR.")
- parser.add_argument("--exr-half", action="store_true", help="Save EXR as float16.")
parser.add_argument("--seed", type=int, default=10, help="Random seed (default: 10).")
parser.add_argument(
"--offload",
@@ -839,6 +869,30 @@ Max frames by resolution (fp8_cast, bfloat16 VAE, tiled decode)
help="High-quality HDR mode. Generates at 2x frame count internally "
"and keeps every other frame for smoother output. ~2x slower.",
)
+ parser.add_argument(
+ "--video-vae-path",
+ default=None,
+ help=(
+ "Optional path to a separate video VAE checkpoint (.safetensors). "
+ "When set, encoding/decoding use this file instead of "
+ "--distilled-checkpoint-path. Decoder kind is selected from file metadata. "
+ "Diffusion VAEs require the natten extra "
+ "(uv sync --package ltx-core --extra natten)."
+ ),
+ )
+ parser.add_argument(
+ "--diffvae-optimization",
+ type=DiffVAEMode,
+ default=DiffVAEMode.CHUNKED_EAGER,
+ choices=list(DiffVAEMode),
+ help=(
+ "DiffVAE decode optimization preset. "
+ "'chunked_eager' (default): deferred stage-4, W-chunks=4, cutlass-fna. "
+ "'chunked_compile': same chunking with torch.compile (det stages off). "
+ "'combined_compile': combined context, full compile (highest VRAM, fastest warm). "
+ "Ignored for convolutional VAEs."
+ ),
+ )
return parser
@torch.inference_mode()
def main() -> None:
@@ -867,12 +921,20 @@ def main() -> None:
logger.info("Found %d video(s), generating %d frames each", len(videos), num_frames)
logger.info("Loading pipeline...")
+ # HDR uses precomputed embeddings — no text encoder. CLI boundary builds ModelPaths; the
+ # pipeline only consumes that object (and non-path args like LoRA / embeddings file).
+ model_paths = ModelPaths.from_monolith(
+ args.distilled_checkpoint_path,
+ gemma_root=None,
+ video_vae_path=args.video_vae_path,
+ )
pipeline = HDRICLoraPipeline(
- distilled_checkpoint_path=args.distilled_checkpoint_path,
+ model_paths=model_paths,
spatial_upsampler_path=args.spatial_upsampler_path,
hdr_lora=args.hdr_lora,
text_embeddings_path=args.text_embeddings,
offload_mode=args.offload_mode,
+ diffvae_optimization=args.diffvae_optimization,
)
logger.info("Pipeline loaded.")
@@ -899,7 +961,6 @@ def main() -> None:
tiling_config=tiling_config,
seed=args.seed,
skip_mp4=args.skip_mp4,
- exr_half=args.exr_half,
exr_executor=exr_executor,
exr_futures=exr_futures,
high_quality_hdr=high_quality,
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/ic_lora.py b/packages/ltx-pipelines/src/ltx_pipelines/ic_lora.py
index a6f7afc..e020c88 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/ic_lora.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/ic_lora.py
@@ -3,12 +3,14 @@ from collections.abc import Iterator
import torch
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_core.components.noisers import GaussianNoiser
from ltx_core.conditioning import ConditioningItem
from ltx_core.loader import LoraPathStrengthAndSDOps
from ltx_core.loader.registry import Registry
from ltx_core.model.transformer.compiling import CompilationConfig
-from ltx_core.model.video_vae import TilingConfig, VideoEncoder, get_video_chunks_number
+from ltx_core.model.video_vae import AUTO_TILING, AutoTiling, TilingConfig, VideoEncoder, get_video_chunks_number
+from ltx_core.model.video_vae.transformer import DiffVAEMode
from ltx_core.quantization import QuantizationPolicy
from ltx_core.types import Audio, VideoPixelShape
from ltx_pipelines.iclora_utils import (
@@ -16,7 +18,6 @@ from ltx_pipelines.iclora_utils import (
read_lora_reference_downscale_factor,
read_lora_reference_temporal_scale_factor,
)
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_pipelines.utils.args import (
ImageConditioningInput,
VideoConditioningAction,
@@ -37,8 +38,22 @@ from ltx_pipelines.utils.constants import (
STAGE_2_DISTILLED_SIGMAS,
)
from ltx_pipelines.utils.denoisers import SimpleDenoiser
-from ltx_pipelines.utils.helpers import assert_resolution, combined_image_conditionings, get_device
-from ltx_pipelines.utils.media_io import decode_video_by_frame, encode_video, video_preprocess
+from ltx_pipelines.utils.helpers import (
+ assert_resolution,
+ combined_image_conditionings,
+ ensure_tiling_config,
+ get_device,
+ tiling_scale_factors_for_vae,
+)
+from ltx_pipelines.utils.media_io import (
+ HDRColorSpace,
+ decode_video_by_frame,
+ encode_video,
+ resolve_hdr_color_space,
+ vae_dtype_for_hdr,
+ video_preprocess,
+)
+from ltx_pipelines.utils.model_paths import ModelPaths
from ltx_pipelines.utils.types import ModalitySpec, OffloadMode
@@ -53,11 +68,10 @@ class ICLoraPipeline:
Both stages use distilled models for efficiency.
"""
- def __init__(
+ def __init__( # noqa: PLR0913
self,
- distilled_checkpoint_path: str,
+ model_paths: ModelPaths,
spatial_upsampler_path: str,
- gemma_root: str,
loras: list[LoraPathStrengthAndSDOps],
device: torch.device | None = None,
quantization: QuantizationPolicy | None = None,
@@ -65,28 +79,30 @@ class ICLoraPipeline:
compilation_config: CompilationConfig | None = None,
offload_mode: OffloadMode = OffloadMode.NONE,
alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
- ):
+ prompt_enhancer_gemma_root: str | None = None,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
+ ) -> None:
self.device = device or get_device()
self.dtype = torch.bfloat16
self.prompt_encoder = PromptEncoder(
- distilled_checkpoint_path,
- gemma_root,
+ model_paths,
self.dtype,
self.device,
registry=registry,
offload_mode=offload_mode,
alloc_trim_strategy=alloc_trim_strategy,
+ prompt_enhancer_gemma_root=prompt_enhancer_gemma_root,
)
self.image_conditioner = ImageConditioner(
- distilled_checkpoint_path,
+ model_paths.video_vae(),
self.dtype,
self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
)
self.stage_1 = DiffusionStage.from_checkpoint(
- distilled_checkpoint_path,
+ model_paths.transformer(),
self.dtype,
self.device,
loras=tuple(loras),
@@ -97,7 +113,7 @@ class ICLoraPipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.stage_2 = DiffusionStage.from_checkpoint(
- distilled_checkpoint_path,
+ model_paths.transformer(),
self.dtype,
self.device,
loras=(),
@@ -108,7 +124,7 @@ class ICLoraPipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.upsampler = VideoUpsampler(
- distilled_checkpoint_path,
+ model_paths.video_vae(),
spatial_upsampler_path,
self.dtype,
self.device,
@@ -116,14 +132,15 @@ class ICLoraPipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.video_decoder = VideoDecoder(
- distilled_checkpoint_path,
+ model_paths.video_vae(),
self.dtype,
self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
+ diffvae_optimization=diffvae_optimization,
)
self.audio_decoder = AudioDecoder(
- distilled_checkpoint_path,
+ model_paths.audio_vae(),
self.dtype,
self.device,
registry=registry,
@@ -166,13 +183,16 @@ class ICLoraPipeline:
images: list[ImageConditioningInput],
video_conditioning: list[tuple[str, float]],
enhance_prompt: bool = False,
- tiling_config: TilingConfig | None = None,
+ enhance_static_cache: bool = False,
+ vae_dtype: torch.dtype | None = None,
+ tiling_config: TilingConfig | AutoTiling | None = AUTO_TILING,
conditioning_attention_strength: float = 1.0,
skip_stage_2: bool = False,
conditioning_attention_mask: torch.Tensor | None = None,
stage_1_sigmas: torch.Tensor = DISTILLED_SIGMAS,
stage_2_sigmas: torch.Tensor = STAGE_2_DISTILLED_SIGMAS,
- ) -> tuple[Iterator[torch.Tensor], Audio]:
+ color_space: HDRColorSpace | None = None,
+ ) -> tuple[Iterator[torch.Tensor], Audio, TilingConfig | None]:
"""
Generate video with IC-LoRA conditioning.
Args:
@@ -205,6 +225,7 @@ class ICLoraPipeline:
Returns:
Tuple of (video_iterator, audio_tensor).
"""
+ images = self.image_conditioner.resolve_crf(images)
assert_resolution(height=height, width=width, is_two_stage=True)
if not (0.0 <= conditioning_attention_strength <= 1.0):
raise ValueError(
@@ -213,15 +234,28 @@ class ICLoraPipeline:
generator = torch.Generator(device=self.device).manual_seed(seed)
noiser = GaussianNoiser(generator=generator)
+ if vae_dtype is None:
+ vae_dtype = self.dtype
(ctx_p,) = self.prompt_encoder(
[prompt],
enhance_first_prompt=enhance_prompt,
+ enhance_static_cache=enhance_static_cache,
enhance_prompt_image=images[0][0] if len(images) > 0 else None,
enhance_prompt_seed=seed,
)
video_context, audio_context = ctx_p.video_encoding, ctx_p.audio_encoding
+ scale_factors = tiling_scale_factors_for_vae(self.video_decoder.checkpoint_path)
+ tiling_config = ensure_tiling_config(
+ tiling_config,
+ scale_factors=scale_factors,
+ vae_checkpoint_path=self.video_decoder.checkpoint_path,
+ video_shape=VideoPixelShape(batch=1, frames=num_frames, height=height, width=width, fps=frame_rate),
+ diffvae_optimization=self.video_decoder.diffvae_optimization,
+ device=self.device,
+ )
+
# Stage 1: Initial low resolution video generation.
stage_1_output_shape = VideoPixelShape(
batch=1,
@@ -242,6 +276,7 @@ class ICLoraPipeline:
num_frames=num_frames,
conditioning_attention_strength=conditioning_attention_strength,
conditioning_attention_mask=conditioning_attention_mask,
+ color_space=color_space,
)
)
@@ -267,9 +302,9 @@ class ICLoraPipeline:
if skip_stage_2:
# Skip Stage 2: Decode directly from Stage 1 output at half resolution
logging.info("[IC-LoRA] Skipping Stage 2 (--skip-stage-2 enabled)")
- decoded_video = self.video_decoder(video_state.latent, tiling_config, generator)
+ decoded_video = self.video_decoder(video_state.latent, tiling_config, generator, dtype=vae_dtype)
decoded_audio = self.audio_decoder(audio_state.latent)
- return decoded_video, decoded_audio
+ return decoded_video, decoded_audio, tiling_config
# Stage 2: Upsample and refine the video at higher resolution with distilled LORA.
upscaled_video_latent = self.upsampler(video_state.latent[:1])
@@ -284,6 +319,7 @@ class ICLoraPipeline:
video_encoder=enc,
dtype=self.dtype,
device=self.device,
+ color_space=color_space,
)
)
@@ -308,9 +344,9 @@ class ICLoraPipeline:
),
)
- decoded_video = self.video_decoder(video_state.latent, tiling_config, generator)
+ decoded_video = self.video_decoder(video_state.latent, tiling_config, generator, dtype=vae_dtype)
decoded_audio = self.audio_decoder(audio_state.latent)
- return decoded_video, decoded_audio
+ return decoded_video, decoded_audio, tiling_config
def _create_conditionings(
self,
@@ -322,6 +358,7 @@ class ICLoraPipeline:
video_encoder: VideoEncoder,
conditioning_attention_strength: float = 1.0,
conditioning_attention_mask: torch.Tensor | None = None,
+ color_space: HDRColorSpace | None = None,
) -> list[ConditioningItem]:
"""
Create conditioning items for video generation.
@@ -344,6 +381,7 @@ class ICLoraPipeline:
video_encoder=video_encoder,
dtype=self.dtype,
device=self.device,
+ color_space=color_space,
)
append_ic_lora_reference_video_conditionings(
@@ -360,6 +398,7 @@ class ICLoraPipeline:
conditioning_attention_strength=conditioning_attention_strength,
conditioning_attention_mask=conditioning_attention_mask,
tiling_config=None,
+ color_space=color_space,
)
if video_conditioning:
@@ -379,6 +418,10 @@ def main() -> None:
nargs=2,
metavar=("PATH", "STRENGTH"),
required=True,
+ help=(
+ "IC-LoRA reference: video file (SDR) or directory of scene-linear *.exr frames (HDR), "
+ "plus strength. Example: --video-conditioning ref.mp4 1.0 or --video-conditioning exr_dir/ 1.0"
+ ),
)
parser.add_argument(
"--conditioning-attention-mask",
@@ -420,17 +463,22 @@ def main() -> None:
)
pipeline = ICLoraPipeline(
- distilled_checkpoint_path=args.distilled_checkpoint_path,
+ model_paths=args.model_paths,
spatial_upsampler_path=args.spatial_upsampler_path,
- gemma_root=args.gemma_root,
loras=tuple(args.lora) if args.lora else (),
quantization=args.quantization,
compilation_config=args.compile,
offload_mode=args.offload_mode,
+ prompt_enhancer_gemma_root=args.prompt_enhancer_gemma_root,
+ diffvae_optimization=args.diffvae_optimization,
)
- tiling_config = TilingConfig.default()
- video_chunks_number = get_video_chunks_number(args.num_frames, tiling_config)
- video, audio = pipeline(
+ hdr = resolve_hdr_color_space(
+ images=args.images,
+ video_paths=[path for path, _ in args.video_conditioning],
+ hdr=args.hdr,
+ )
+ vae_dtype = vae_dtype_for_hdr(hdr, torch.bfloat16)
+ video, audio, tiling_config = pipeline(
prompt=args.prompt,
seed=args.seed,
height=args.height,
@@ -439,11 +487,16 @@ def main() -> None:
frame_rate=args.frame_rate,
images=args.images,
video_conditioning=args.video_conditioning,
- tiling_config=tiling_config,
+ enhance_prompt=args.enhance_prompt,
+ enhance_static_cache=args.enhance_static_cache,
+ vae_dtype=vae_dtype,
+ color_space=hdr,
+ tiling_config=AUTO_TILING,
conditioning_attention_strength=conditioning_attention_strength,
skip_stage_2=args.skip_stage_2,
conditioning_attention_mask=conditioning_attention_mask,
)
+ video_chunks_number = get_video_chunks_number(args.num_frames, tiling_config)
encode_video(
video=video,
@@ -451,6 +504,7 @@ def main() -> None:
audio=audio,
output_path=args.output_path,
video_chunks_number=video_chunks_number,
+ color_space=hdr,
)
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/iclora_utils.py b/packages/ltx-pipelines/src/ltx_pipelines/iclora_utils.py
index c1669c8..d7fb0e1 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/iclora_utils.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/iclora_utils.py
@@ -17,7 +17,14 @@ from ltx_core.conditioning import (
)
from ltx_core.model.video_vae import TilingConfig, VideoEncoder
from ltx_core.types import VideoLatentShape
-from ltx_pipelines.utils.media_io import decode_video_by_frame, video_preprocess
+from ltx_pipelines.utils.media_io import (
+ ResizeMode,
+ decode_video_by_frame,
+ is_exr_dir,
+ load_exr_folder_conditioning_hdr,
+ video_preprocess,
+)
+from ltx_pipelines.utils.media_io.color_config import HDRColorSpace
def read_lora_reference_downscale_factor(lora_path: str) -> int:
@@ -98,6 +105,7 @@ def append_ic_lora_reference_video_conditionings( # noqa: PLR0913
conditioning_attention_strength: float,
conditioning_attention_mask: torch.Tensor | None,
tiling_config: TilingConfig | None = None,
+ color_space: HDRColorSpace | None = None,
) -> None:
"""Append :class:`VideoConditionByReferenceLatent` items for each reference path."""
scale = reference_downscale_factor
@@ -109,8 +117,29 @@ def append_ic_lora_reference_video_conditionings( # noqa: PLR0913
ref_width = width // scale
for video_path, strength in video_conditioning:
- frame_gen = decode_video_by_frame(path=video_path, frame_cap=num_frames, device=device)
- video = video_preprocess(frame_gen, ref_height, ref_width, dtype, device)
+ if is_exr_dir(video_path):
+ if color_space is None:
+ raise ValueError(
+ "EXR input requires --hdr {SRGB_LINEAR,ACESCG,ACESCCT} to declare the source colour space."
+ )
+ video = torch.cat(
+ list(
+ load_exr_folder_conditioning_hdr(
+ exr_dir=video_path,
+ height=ref_height,
+ width=ref_width,
+ frame_cap=num_frames,
+ dtype=dtype,
+ device=device,
+ color_space=color_space,
+ resize_mode=ResizeMode.REFLECT_PAD,
+ )
+ ),
+ dim=2,
+ )
+ else:
+ frame_gen = decode_video_by_frame(path=video_path, frame_cap=num_frames, device=device)
+ video = video_preprocess(frame_gen, ref_height, ref_width, dtype, device)
if reference_temporal_scale_factor > 1:
video = temporal_subsample(video, reference_temporal_scale_factor)
if tiling_config is not None:
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/keyframe_interpolation.py b/packages/ltx-pipelines/src/ltx_pipelines/keyframe_interpolation.py
index a447888..b3901fb 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/keyframe_interpolation.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/keyframe_interpolation.py
@@ -3,6 +3,7 @@ from collections.abc import Iterator
import torch
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_core.components.guiders import (
MultiModalGuiderFactory,
MultiModalGuiderParams,
@@ -13,10 +14,10 @@ from ltx_core.components.schedulers import LTX2Scheduler
from ltx_core.loader import LoraPathStrengthAndSDOps
from ltx_core.loader.registry import Registry
from ltx_core.model.transformer.compiling import CompilationConfig
-from ltx_core.model.video_vae import TilingConfig, get_video_chunks_number
+from ltx_core.model.video_vae import AUTO_TILING, AutoTiling, TilingConfig, get_video_chunks_number
+from ltx_core.model.video_vae.transformer import DiffVAEMode
from ltx_core.quantization import QuantizationPolicy
from ltx_core.types import Audio, VideoPixelShape
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_pipelines.utils.args import (
ImageConditioningInput,
default_2_stage_arg_parser,
@@ -36,10 +37,18 @@ from ltx_pipelines.utils.constants import (
from ltx_pipelines.utils.denoisers import FactoryGuidedDenoiser, SimpleDenoiser
from ltx_pipelines.utils.helpers import (
assert_resolution,
+ ensure_tiling_config,
get_device,
image_conditionings_by_adding_guiding_latent,
+ tiling_scale_factors_for_vae,
)
-from ltx_pipelines.utils.media_io import encode_video
+from ltx_pipelines.utils.media_io import (
+ HDRColorSpace,
+ encode_video,
+ resolve_hdr_color_space,
+ vae_dtype_for_hdr,
+)
+from ltx_pipelines.utils.model_paths import ModelPaths
from ltx_pipelines.utils.types import ModalitySpec, OffloadMode
@@ -55,10 +64,9 @@ class KeyframeInterpolationPipeline:
def __init__( # noqa: PLR0913
self,
- checkpoint_path: str,
+ model_paths: ModelPaths,
distilled_lora: list[LoraPathStrengthAndSDOps],
spatial_upsampler_path: str,
- gemma_root: str,
loras: list[LoraPathStrengthAndSDOps],
device: torch.device | None = None,
quantization: QuantizationPolicy | None = None,
@@ -66,25 +74,31 @@ class KeyframeInterpolationPipeline:
compilation_config: CompilationConfig | None = None,
offload_mode: OffloadMode = OffloadMode.NONE,
alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
+ prompt_enhancer_gemma_root: str | None = None,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
):
self.device = device or get_device()
self.dtype = torch.bfloat16
self._scheduler = LTX2Scheduler()
self.prompt_encoder = PromptEncoder(
- checkpoint_path,
- gemma_root,
+ model_paths,
self.dtype,
self.device,
registry=registry,
offload_mode=offload_mode,
alloc_trim_strategy=alloc_trim_strategy,
+ prompt_enhancer_gemma_root=prompt_enhancer_gemma_root,
)
self.image_conditioner = ImageConditioner(
- checkpoint_path, self.dtype, self.device, registry=registry, alloc_trim_strategy=alloc_trim_strategy
+ model_paths.video_vae(),
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
)
self.stage_1 = DiffusionStage.from_checkpoint(
- checkpoint_path,
+ model_paths.transformer(),
self.dtype,
self.device,
loras=tuple(loras),
@@ -96,7 +110,7 @@ class KeyframeInterpolationPipeline:
)
stage_2_loras = (*tuple(loras), *tuple(distilled_lora))
self.stage_2 = DiffusionStage.from_checkpoint(
- checkpoint_path,
+ model_paths.transformer(),
self.dtype,
self.device,
loras=stage_2_loras,
@@ -107,7 +121,7 @@ class KeyframeInterpolationPipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.upsampler = VideoUpsampler(
- checkpoint_path,
+ model_paths.video_vae(),
spatial_upsampler_path,
self.dtype,
self.device,
@@ -115,10 +129,19 @@ class KeyframeInterpolationPipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.video_decoder = VideoDecoder(
- checkpoint_path, self.dtype, self.device, registry=registry, alloc_trim_strategy=alloc_trim_strategy
+ model_paths.video_vae(),
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
+ diffvae_optimization=diffvae_optimization,
)
self.audio_decoder = AudioDecoder(
- checkpoint_path, self.dtype, self.device, registry=registry, alloc_trim_strategy=alloc_trim_strategy
+ model_paths.audio_vae(),
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
)
def __call__( # noqa: PLR0913
@@ -134,27 +157,44 @@ class KeyframeInterpolationPipeline:
video_guider_params: MultiModalGuiderParams | MultiModalGuiderFactory,
audio_guider_params: MultiModalGuiderParams | MultiModalGuiderFactory,
images: list[ImageConditioningInput],
- tiling_config: TilingConfig | None = None,
+ vae_dtype: torch.dtype | None = None,
+ tiling_config: TilingConfig | AutoTiling | None = AUTO_TILING,
enhance_prompt: bool = False,
+ enhance_static_cache: bool = False,
max_batch_size: int = 1,
stage_1_sigmas: torch.Tensor | None = None,
stage_2_sigmas: torch.Tensor = STAGE_2_DISTILLED_SIGMAS,
- ) -> tuple[Iterator[torch.Tensor], Audio]:
+ color_space: HDRColorSpace | None = None,
+ ) -> tuple[Iterator[torch.Tensor], Audio, TilingConfig | None]:
+ images = self.image_conditioner.resolve_crf(images)
assert_resolution(height=height, width=width, is_two_stage=True)
generator = torch.Generator(device=self.device).manual_seed(seed)
noiser = GaussianNoiser(generator=generator)
dtype = torch.bfloat16
+ if vae_dtype is None:
+ vae_dtype = dtype
ctx_p, ctx_n = self.prompt_encoder(
[prompt, negative_prompt],
enhance_first_prompt=enhance_prompt,
+ enhance_static_cache=enhance_static_cache,
enhance_prompt_image=images[0][0] if len(images) > 0 else None,
enhance_prompt_seed=seed,
)
v_context_p, a_context_p = ctx_p.video_encoding, ctx_p.audio_encoding
v_context_n, a_context_n = ctx_n.video_encoding, ctx_n.audio_encoding
+ scale_factors = tiling_scale_factors_for_vae(self.video_decoder.checkpoint_path)
+ tiling_config = ensure_tiling_config(
+ tiling_config,
+ scale_factors=scale_factors,
+ vae_checkpoint_path=self.video_decoder.checkpoint_path,
+ video_shape=VideoPixelShape(batch=1, frames=num_frames, height=height, width=width, fps=frame_rate),
+ diffvae_optimization=self.video_decoder.diffvae_optimization,
+ device=self.device,
+ )
+
# Stage 1: Initial low resolution video generation.
sigmas = (
stage_1_sigmas if stage_1_sigmas is not None else self._scheduler.execute(steps=num_inference_steps)
@@ -175,6 +215,7 @@ class KeyframeInterpolationPipeline:
video_encoder=enc,
dtype=dtype,
device=self.device,
+ color_space=color_space,
)
)
@@ -223,6 +264,7 @@ class KeyframeInterpolationPipeline:
video_encoder=enc,
dtype=dtype,
device=self.device,
+ color_space=color_space,
)
)
@@ -247,9 +289,9 @@ class KeyframeInterpolationPipeline:
),
)
- decoded_video = self.video_decoder(video_state.latent, tiling_config, generator)
+ decoded_video = self.video_decoder(video_state.latent, tiling_config, generator, dtype=vae_dtype)
decoded_audio = self.audio_decoder(audio_state.latent)
- return decoded_video, decoded_audio
+ return decoded_video, decoded_audio, tiling_config
@torch.inference_mode()
@@ -259,18 +301,19 @@ def main() -> None:
parser = default_2_stage_arg_parser(params=params)
args = parser.parse_args()
pipeline = KeyframeInterpolationPipeline(
- checkpoint_path=args.checkpoint_path,
+ model_paths=args.model_paths,
distilled_lora=args.distilled_lora,
spatial_upsampler_path=args.spatial_upsampler_path,
- gemma_root=args.gemma_root,
loras=tuple(args.lora) if args.lora else (),
quantization=args.quantization,
compilation_config=args.compile,
offload_mode=args.offload_mode,
+ prompt_enhancer_gemma_root=args.prompt_enhancer_gemma_root,
+ diffvae_optimization=args.diffvae_optimization,
)
- tiling_config = TilingConfig.default()
- video_chunks_number = get_video_chunks_number(args.num_frames, tiling_config)
- video, audio = pipeline(
+ hdr = resolve_hdr_color_space(images=args.images, hdr=args.hdr)
+ vae_dtype = vae_dtype_for_hdr(hdr, torch.bfloat16)
+ video, audio, tiling_config = pipeline(
prompt=args.prompt,
negative_prompt=args.negative_prompt,
seed=args.seed,
@@ -296,9 +339,14 @@ def main() -> None:
stg_blocks=args.audio_stg_blocks,
),
images=args.images,
- tiling_config=tiling_config,
+ vae_dtype=vae_dtype,
+ color_space=hdr,
+ enhance_prompt=args.enhance_prompt,
+ enhance_static_cache=args.enhance_static_cache,
+ tiling_config=AUTO_TILING,
max_batch_size=args.max_batch_size,
)
+ video_chunks_number = get_video_chunks_number(args.num_frames, tiling_config)
encode_video(
video=video,
@@ -306,6 +354,7 @@ def main() -> None:
audio=audio,
output_path=args.output_path,
video_chunks_number=video_chunks_number,
+ color_space=hdr,
)
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/multigpu/bp_gemma_builder.py b/packages/ltx-pipelines/src/ltx_pipelines/multigpu/bp_gemma_builder.py
index 4d23d4a..1cfb31c 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/multigpu/bp_gemma_builder.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/multigpu/bp_gemma_builder.py
@@ -1,12 +1,13 @@
"""Batch-parallel Gemma text encoder builder.
-Each rank materialises a full :class:`GemmaTextEncoder` on its own local
+Each rank materialises a full :class:`LTXGemmaTextEncoder` on its own local
CUDA device via the standard :class:`SingleGPUModelBuilder` pipeline (the
same code path used by the non-MGPU pipelines). No Accelerate, no
``device_map``, no per-layer dispatch hooks.
Every ``build()`` reconstructs the encoder through
:class:`SingleGPUModelBuilder`: a fresh meta module is created, the
-``GEMMA_MODEL_OPS`` chain re-runs (recomputing the rotary / position
-buffers that live outside the safetensors file), and the trained weights
+family-specific model-ops chain from :func:`get_gemma_ops` re-runs
+(recomputing the rotary / position buffers that live outside the
+safetensors file), and the trained weights
are bound from the provided :class:`Registry`. The registry caches the
loaded state dict so subsequent calls skip disk I/O while still rebuilding
the module tree -- mirroring the rebuild logic of
@@ -30,12 +31,10 @@ from ltx_core.loader.registry import Registry
from ltx_core.loader.single_gpu_model_builder import SingleGPUModelBuilder as Builder
from ltx_core.multigpu.gemma.batch_parallel_wrapper import BatchParallelGemmaWrapper
from ltx_core.text_encoders.gemma import (
- GEMMA_LLM_KEY_OPS,
- GEMMA_MODEL_OPS,
GemmaTextEncoderConfigurator,
- module_ops_from_gemma_root,
+ get_gemma_ops,
+ resolve_gemma_weight_paths,
)
-from ltx_core.utils import find_matching_file
logger = logging.getLogger(__name__)
@@ -59,13 +58,13 @@ class BatchParallelGemmaBuilder(BuilderProtocol):
src_rank: int,
dtype: torch.dtype = torch.bfloat16,
) -> None:
- model_folder = find_matching_file(gemma_root_path, "model*.safetensors").parent
- weight_paths = tuple(str(p) for p in model_folder.rglob("*.safetensors"))
+ weight_paths = resolve_gemma_weight_paths(gemma_root_path)
+ gemma_sd_ops, gemma_module_ops = get_gemma_ops(gemma_root_path)
self._inner = Builder(
model_path=weight_paths,
- model_class_configurator=GemmaTextEncoderConfigurator,
- model_sd_ops=GEMMA_LLM_KEY_OPS,
- module_ops=(GEMMA_MODEL_OPS, *module_ops_from_gemma_root(gemma_root_path)),
+ model_class_configurator=GemmaTextEncoderConfigurator.with_gemma_model_path(gemma_root_path),
+ model_sd_ops=gemma_sd_ops,
+ module_ops=gemma_module_ops,
registry=registry,
)
self._broadcast_group = broadcast_group
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/multigpu/delegating_builder.py b/packages/ltx-pipelines/src/ltx_pipelines/multigpu/delegating_builder.py
index 6d24b8a..0be95cb 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/multigpu/delegating_builder.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/multigpu/delegating_builder.py
@@ -68,6 +68,10 @@ class DelegatingBuilder(Generic[InnerModelT]):
def registry(self) -> Registry:
return self._inner.registry
+ @property
+ def keeps_gpu_resident_weights(self) -> bool:
+ return self._inner.keeps_gpu_resident_weights
+
def with_registry(self, registry: Registry) -> Self:
clone = copy.copy(self)
clone._inner = self._inner.with_registry(registry)
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/multigpu/gemma_builders.py b/packages/ltx-pipelines/src/ltx_pipelines/multigpu/gemma_builders.py
index 570fa18..7822dcb 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/multigpu/gemma_builders.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/multigpu/gemma_builders.py
@@ -4,26 +4,32 @@ Replaces the text encoder builder on the ``PromptEncoder`` block with an
source rank and a broadcast stub elsewhere.
On the source rank the first ``build()`` loads via HuggingFace
``from_pretrained`` and caches the full state dict (including non-persistent
-buffers) in the provided :class:`Registry`. Subsequent calls recreate the
-model from cache and reinstall accelerate dispatch hooks — no disk I/O.
+buffers) in the provided :class:`Registry`. Model shells are reused from the
+registry when the structural key matches: weights are reassigned from the SD,
+while non-persistent buffers are left on the shell (``dispose`` does not meta
+them). A weights-only hit (no shell) rebuilds a meta model from the cached SD,
+assigns both persistent and non-persistent tensors, then reinstalls accelerate
+dispatch hooks. The outer wrapper is not cached.
"""
from __future__ import annotations
import copy
import logging
+from pathlib import Path
from typing import TYPE_CHECKING, Any
import torch
import torch.distributed as dist
from accelerate import dispatch_model
-from transformers import Gemma3ForConditionalGeneration
+from transformers import AutoModelForImageTextToText
from ltx_core.loader.primitives import BuilderProtocol, StateDict
-from ltx_core.loader.registry import Registry
+from ltx_core.loader.registry import Registry, module_registry_key
from ltx_core.multigpu.gemma.accelerate_wrapper import AccelerateGemmaWrapper
from ltx_core.multigpu.gemma.loader import load_gemma_with_device_map
-from ltx_core.text_encoders.gemma.encoders.base_encoder import GemmaTextEncoder
+from ltx_core.text_encoders.gemma import gemma_model_config
+from ltx_core.text_encoders.gemma.encoders.base_encoder import LTXGemmaTextEncoder
if TYPE_CHECKING:
from typing_extensions import Self
@@ -31,6 +37,33 @@ if TYPE_CHECKING:
logger = logging.getLogger(__name__)
+def _assign_non_persistent(model: torch.nn.Module, non_persistent_sd: dict[str, torch.Tensor]) -> None:
+ for name, tensor in non_persistent_sd.items():
+ parent_path, attr = name.rsplit(".", 1)
+ module = model
+ for part in parent_path.split("."):
+ module = getattr(module, part)
+ setattr(module, attr, tensor)
+
+
+def _split_persistent(
+ model: torch.nn.Module, sd: dict[str, torch.Tensor]
+) -> tuple[dict[str, torch.Tensor], dict[str, torch.Tensor]]:
+ expected_keys = set(model.state_dict().keys())
+ persistent = {k: v for k, v in sd.items() if k in expected_keys}
+ non_persistent = {k: v for k, v in sd.items() if k not in expected_keys}
+ return persistent, non_persistent
+
+
+def _state_dict_with_non_persistent(model: torch.nn.Module) -> dict[str, torch.Tensor]:
+ """``state_dict()`` plus non-persistent buffers (needed for weights-only rebuild)."""
+ sd = model.state_dict()
+ for name, buf in model.named_buffers():
+ if name not in sd:
+ sd[name] = buf
+ return sd
+
+
class AccelerateGemmaBuilder(BuilderProtocol):
"""Builder that loads Gemma with ``device_map="auto"`` on the source rank.
Conforms to the builder interface expected by ``PromptEncoder``:
@@ -70,8 +103,19 @@ class AccelerateGemmaBuilder(BuilderProtocol):
clone._registry = registry
return clone
+ def model_metadata(self) -> dict:
+ """Full metadata with a ``config`` sub-dict (same shape as safetensors loaders)."""
+ return {"config": gemma_model_config(self._gemma_root_path)}
+
def model_config(self) -> dict:
- return {}
+ return self.model_metadata().get("config", {})
+
+ def _module_registry_key(self) -> str:
+ return module_registry_key(
+ configurator=AccelerateGemmaBuilder,
+ config={"accelerate_gemma": str(Path(self._gemma_root_path).resolve())},
+ module_ops_names=(),
+ )
def build(
self,
@@ -91,58 +135,63 @@ class AccelerateGemmaBuilder(BuilderProtocol):
device=device,
)
- # -- src-rank helpers ---------------------------------------------------
-
- def _build_encoder(self, dtype: torch.dtype) -> GemmaTextEncoder:
- cached = self._registry.get([self._gemma_root_path], None)
- if cached is not None:
+ def _build_encoder(self, dtype: torch.dtype) -> LTXGemmaTextEncoder:
+ struct = self._module_registry_key()
+ cached_sd = self._registry.get([self._gemma_root_path], None)
+ cached_model = self._registry.get_model(struct)
+
+ if cached_model is not None:
+ if cached_sd is None:
+ raise RuntimeError(
+ "Gemma state dict missing from registry but cached encoder is set; "
+ "registry must outlive the builder."
+ )
+ encoder = cached_model # type: ignore[assignment]
+ encoder.model.load_state_dict(cached_sd.sd, strict=False, assign=True)
+ encoder.dtype = dtype
+ return encoder
+
+ if cached_sd is not None:
+ if self._config is None or self._hf_device_map is None:
+ raise RuntimeError(
+ "Gemma state dict is in the registry but this builder has no HF config/"
+ "device_map/tokenizer/processor. Rebuild requires a builder that previously "
+ "loaded from disk, or use cache_models=True so the encoder shell is reused."
+ )
logger.info("Rebuilding Gemma from cached state dict (no disk I/O).")
- return self._rebuild_from_cache(cached, dtype)
-
- encoder = load_gemma_with_device_map(self._gemma_root_path, dtype)
-
- # Cache non-tensor objects on the builder instance.
- self._config = encoder.model.config
- self._hf_device_map = encoder.model.hf_device_map
- self._tokenizer = encoder.tokenizer
- self._processor = encoder.processor
-
- # Cache full state dict including non-persistent buffers.
- sd = encoder.model.state_dict()
- for name, buf in encoder.model.named_buffers():
- if name not in sd:
- sd[name] = buf
- total_size = sum(t.nelement() * t.element_size() for t in sd.values())
- dtypes = {t.dtype for t in sd.values()}
- self._registry.add(
- [self._gemma_root_path],
- None,
- StateDict(sd=sd, device=torch.device("meta"), size=total_size, dtype=dtypes),
- )
- logger.info("Cached Gemma state dict in registry (%d entries).", len(sd))
-
- return encoder
-
- def _rebuild_from_cache(self, cached: StateDict, dtype: torch.dtype) -> GemmaTextEncoder:
+ encoder = self._rebuild_from_cache(cached_sd, dtype)
+ else:
+ encoder = load_gemma_with_device_map(self._gemma_root_path, dtype)
+
+ self._config = encoder.model.config
+ self._hf_device_map = encoder.model.hf_device_map
+ self._tokenizer = encoder.tokenizer
+ self._processor = encoder.processor
+
+ # Include non-persistent buffers so weights-only rebuild can restore them
+ # onto a fresh meta model (there is no shell to keep them on).
+ sd = _state_dict_with_non_persistent(encoder.model)
+ total_size = sum(t.nelement() * t.element_size() for t in sd.values())
+ dtypes = {t.dtype for t in sd.values()}
+ self._registry.add(
+ [self._gemma_root_path],
+ None,
+ StateDict(sd=sd, device=torch.device("meta"), size=total_size, dtype=dtypes),
+ )
+ logger.info("Cached Gemma state dict in registry (%d entries).", len(sd))
+
+ return self._registry.add_model(struct, encoder) # type: ignore[return-value]
+
+ def _rebuild_from_cache(self, cached: StateDict, dtype: torch.dtype) -> LTXGemmaTextEncoder:
with torch.device("meta"):
- model = Gemma3ForConditionalGeneration(self._config)
-
- # Split into persistent (load_state_dict) and non-persistent (manual assign).
- expected_keys = set(model.state_dict().keys())
- persistent_sd = {k: v for k, v in cached.sd.items() if k in expected_keys}
- non_persistent_sd = {k: v for k, v in cached.sd.items() if k not in expected_keys}
+ model = AutoModelForImageTextToText.from_config(self._config)
+ persistent_sd, non_persistent_sd = _split_persistent(model, cached.sd)
model.load_state_dict(persistent_sd, strict=True, assign=True)
- for name, tensor in non_persistent_sd.items():
- parent_path, attr = name.rsplit(".", 1)
- module = model
- for part in parent_path.split("."):
- module = getattr(module, part)
- setattr(module, attr, tensor)
-
+ _assign_non_persistent(model, non_persistent_sd)
dispatch_model(model, self._hf_device_map)
- return GemmaTextEncoder(
+ return LTXGemmaTextEncoder(
model=model,
tokenizer=self._tokenizer,
processor=self._processor,
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/multigpu/sp_builder.py b/packages/ltx-pipelines/src/ltx_pipelines/multigpu/sp_builder.py
index 6834b54..0f76fdd 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/multigpu/sp_builder.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/multigpu/sp_builder.py
@@ -41,6 +41,11 @@ class SequenceParallelBuilder(DelegatingBuilder[InnerModelT], Generic[InnerModel
self._tracker = tracker
self._attn_mgr = attn_mgr
+ @property
+ def keeps_gpu_resident_weights(self) -> bool:
+ # Weight tracker keeps registry tensors GPU-resident and rebinds them across builds.
+ return True
+
@property
def all2all_timeout_seconds(self) -> float:
"""The SP all2all barrier timeout (seconds); forwards to the AttentionManager that owns the refs."""
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/multigpu/tdp_builder.py b/packages/ltx-pipelines/src/ltx_pipelines/multigpu/tdp_builder.py
index b530014..71d586c 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/multigpu/tdp_builder.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/multigpu/tdp_builder.py
@@ -50,6 +50,11 @@ class TiledDataParallelBuilder(DelegatingBuilder[InnerModelT], Generic[InnerMode
self._tiling = tiling
self._normalize_positions = normalize_positions
+ @property
+ def keeps_gpu_resident_weights(self) -> bool:
+ # Weight tracker keeps registry tensors GPU-resident and rebinds them across builds.
+ return True
+
def build(
self,
device: torch.device | None = None,
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/multigpu/vae_builders.py b/packages/ltx-pipelines/src/ltx_pipelines/multigpu/vae_builders.py
index 53da561..e0dcc3c 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/multigpu/vae_builders.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/multigpu/vae_builders.py
@@ -11,8 +11,10 @@ import torch
import torch.distributed as dist
from torch.multiprocessing import Queue
+from ltx_core.loader.module_ops import ModuleOps
from ltx_core.loader.primitives import BuilderProtocol
from ltx_core.loader.registry import Registry
+from ltx_core.loader.sd_ops import SDOps
from ltx_core.multigpu.vae.distributed_decoder import DistributedVideoDecoder
from ltx_core.tiling import TileCountConfig
@@ -21,7 +23,11 @@ if TYPE_CHECKING:
class DistributedDecoderBuilder(BuilderProtocol):
- """Builder that wraps a base decoder builder with distributed logic."""
+ """Builder that wraps a base decoder builder with distributed logic.
+ Forwards ``module_ops`` / ``with_module_ops`` to the inner builder so
+ pipeline flags like ``diffvae_optimization`` (``build_diffvae_mode_op``)
+ still apply to the base ``DiffusionVideoDecoder`` before wrapping.
+ """
def __init__(
self,
@@ -47,6 +53,24 @@ class DistributedDecoderBuilder(BuilderProtocol):
clone._inner = self._inner.with_registry(registry)
return clone
+ @property
+ def model_sd_ops(self) -> SDOps | None:
+ return self._inner.model_sd_ops
+
+ def with_sd_ops(self, sd_ops: SDOps | None) -> Self:
+ clone = copy.copy(self)
+ clone._inner = self._inner.with_sd_ops(sd_ops)
+ return clone
+
+ @property
+ def module_ops(self) -> tuple[ModuleOps, ...]:
+ return self._inner.module_ops
+
+ def with_module_ops(self, module_ops: tuple[ModuleOps, ...]) -> Self:
+ clone = copy.copy(self)
+ clone._inner = self._inner.with_module_ops(module_ops)
+ return clone
+
def build(
self,
device: torch.device | None = None,
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/multigpu/weight_tracker.py b/packages/ltx-pipelines/src/ltx_pipelines/multigpu/weight_tracker.py
index 003e071..7d5d314 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/multigpu/weight_tracker.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/multigpu/weight_tracker.py
@@ -154,19 +154,16 @@ class TransformerWeightTracker:
**kwargs: object,
) -> ModelType:
"""Build the transformer model with distributed LoRA hot-swap.
- Populates the registry with clean weights on first call, then applies
- LoRAs in-place and broadcasts to all ranks. Assumes the builder carries
- a non-dummy :class:`Registry` so that weights can be cached and reused
- across calls.
+ Builds (or reuses a registry-cached shell with rebound clean weights) via
+ ``clean_builder.build``. LoRAs are then fused in-place into the registry
+ tensors and broadcast. Assumes a non-dummy :class:`Registry`.
"""
loras = builder.loras
clean_builder = builder.with_loras(())
model_paths = list(builder.model_path) if isinstance(builder.model_path, tuple) else [builder.model_path]
- # First call: populate the registry with clean weights.
- if clean_builder.registry.get(model_paths, clean_builder.model_sd_ops) is None:
- clean_builder.build(device=device, dtype=dtype, **kwargs)
+ model = clean_builder.build(device=device, dtype=dtype, **kwargs)
cached_sd = clean_builder.registry.get(model_paths, clean_builder.model_sd_ops)
if cached_sd is None:
@@ -181,4 +178,4 @@ class TransformerWeightTracker:
else:
self.reset_loras(cached_sd.sd)
- return clean_builder.build(device=device, dtype=dtype, **kwargs)
+ return model
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/retake.py b/packages/ltx-pipelines/src/ltx_pipelines/retake.py
index 6cc27c8..c1cf48b 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/retake.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/retake.py
@@ -5,6 +5,7 @@ from collections.abc import Iterator
import torch
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_core.components.guiders import MultiModalGuider, MultiModalGuiderParams
from ltx_core.components.noisers import GaussianNoiser
from ltx_core.components.schedulers import LTX2Scheduler
@@ -12,12 +13,13 @@ from ltx_core.conditioning.types.noise_mask_cond import TemporalRegionMask
from ltx_core.loader import LoraPathStrengthAndSDOps
from ltx_core.loader.registry import Registry
from ltx_core.model.transformer.compiling import CompilationConfig
-from ltx_core.model.video_vae import TilingConfig, get_video_chunks_number
+from ltx_core.model.video_vae import AUTO_TILING, AutoTiling, TilingConfig, get_video_chunks_number
+from ltx_core.model.video_vae.transformer import DiffVAEMode
from ltx_core.quantization import QuantizationPolicy
from ltx_core.types import (
SpatioTemporalScaleFactors,
+ VideoPixelShape,
)
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_pipelines.utils.args import video_editing_arg_parser
from ltx_pipelines.utils.blocks import (
AudioConditioner,
@@ -31,13 +33,20 @@ from ltx_pipelines.utils.constants import DISTILLED_SIGMAS, detect_params
from ltx_pipelines.utils.denoisers import GuidedDenoiser, SimpleDenoiser
from ltx_pipelines.utils.helpers import (
audio_latent_from_file,
+ ensure_tiling_config,
get_device,
+ tiling_scale_factors_for_vae,
video_latent_from_file,
)
from ltx_pipelines.utils.media_io import (
+ HDRColorSpace,
encode_video,
get_videostream_metadata,
+ is_exr_dir,
+ resolve_hdr_color_space,
+ vae_dtype_for_hdr,
)
+from ltx_pipelines.utils.model_paths import ModelPaths
from ltx_pipelines.utils.types import ModalitySpec, OffloadMode
@@ -66,10 +75,9 @@ class RetakePipeline:
function will be used during ``__call__``.
"""
- def __init__(
+ def __init__( # noqa: PLR0913
self,
- checkpoint_path: str,
- gemma_root: str,
+ model_paths: ModelPaths,
loras: list[LoraPathStrengthAndSDOps],
device: torch.device | None = None,
quantization: QuantizationPolicy | None = None,
@@ -78,6 +86,8 @@ class RetakePipeline:
compilation_config: CompilationConfig | None = None,
offload_mode: OffloadMode = OffloadMode.NONE,
alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
+ prompt_enhancer_gemma_root: str | None = None,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
):
self.device = device or get_device()
self.dtype = torch.bfloat16
@@ -85,30 +95,30 @@ class RetakePipeline:
if not distilled:
self._scheduler = LTX2Scheduler()
self.prompt_encoder = PromptEncoder(
- checkpoint_path=checkpoint_path,
- gemma_root=gemma_root,
+ model_paths,
dtype=self.dtype,
device=self.device,
registry=registry,
offload_mode=offload_mode,
alloc_trim_strategy=alloc_trim_strategy,
+ prompt_enhancer_gemma_root=prompt_enhancer_gemma_root,
)
self.image_conditioner = ImageConditioner(
- checkpoint_path=checkpoint_path,
+ model_paths.video_vae(),
dtype=self.dtype,
device=self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
)
self.audio_conditioner = AudioConditioner(
- checkpoint_path=checkpoint_path,
+ model_paths.audio_vae(),
dtype=self.dtype,
device=self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
)
self.stage = DiffusionStage.from_checkpoint(
- checkpoint_path=checkpoint_path,
+ model_paths.transformer(),
dtype=self.dtype,
device=self.device,
loras=tuple(loras),
@@ -119,14 +129,15 @@ class RetakePipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.video_decoder = VideoDecoder(
- checkpoint_path=checkpoint_path,
+ model_paths.video_vae(),
dtype=self.dtype,
device=self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
+ diffvae_optimization=diffvae_optimization,
)
self.audio_decoder = AudioDecoder(
- checkpoint_path=checkpoint_path,
+ model_paths.audio_vae(),
dtype=self.dtype,
device=self.device,
registry=registry,
@@ -145,6 +156,7 @@ class RetakePipeline:
end_time: float,
seed: int,
*,
+ fps: float | None = None,
negative_prompt: str = "",
num_inference_steps: int = 40,
video_guider_params: MultiModalGuiderParams | None = None,
@@ -152,21 +164,29 @@ class RetakePipeline:
regenerate_video: bool = True,
regenerate_audio: bool = True,
enhance_prompt: bool = False,
- tiling_config: TilingConfig | None = None,
+ enhance_static_cache: bool = False,
+ vae_dtype: torch.dtype | None = None,
+ tiling_config: TilingConfig | AutoTiling | None = AUTO_TILING,
max_batch_size: int = 1,
sigmas: torch.Tensor | None = None,
- ) -> tuple[Iterator[torch.Tensor], torch.Tensor]:
+ color_space: HDRColorSpace | None = None,
+ ) -> tuple[Iterator[torch.Tensor], torch.Tensor, TilingConfig | None]:
"""Regenerate ``[start_time, end_time]`` of the source video (retake).
Parameters
----------
video_path : str
- Path to the source video file (must contain video; audio is optional).
+ Path to the source video file, or a directory of scene-linear ``*.exr``
+ frames (native HDR). Audio is optional for video files and absent for
+ EXR folders.
prompt : str
Text prompt describing the *regenerated* section.
start_time, end_time : float
Time window (in seconds) of the section to regenerate.
seed : int
Random seed for reproducibility.
+ fps : float | None
+ Frame rate when *video_path* is an EXR-frame folder (required then).
+ Ignored for regular video files.
negative_prompt : str
Negative prompt for CFG guidance (ignored in distilled mode).
num_inference_steps : int
@@ -185,8 +205,8 @@ class RetakePipeline:
Whether to enhance the prompt via the text encoder.
Returns
-------
- tuple[Iterator[torch.Tensor], torch.Tensor]
- ``(video_frames_iterator, audio_waveform)``
+ tuple[Iterator[torch.Tensor], torch.Tensor, TilingConfig]
+ ``(video_frames_iterator, audio_waveform, tiling_config)``
"""
if start_time >= end_time:
raise ValueError(f"start_time ({start_time}) must be less than end_time ({end_time})")
@@ -194,8 +214,27 @@ class RetakePipeline:
generator = torch.Generator(device=self.device).manual_seed(seed)
noiser = GaussianNoiser(generator=generator)
dtype = self.dtype
+ if vae_dtype is None:
+ vae_dtype = dtype
+
+ output_shape = get_videostream_metadata(video_path, fps=fps)
+
+ scale_factors = tiling_scale_factors_for_vae(self.video_decoder.checkpoint_path)
+ tiling_config = ensure_tiling_config(
+ tiling_config,
+ scale_factors=scale_factors,
+ vae_checkpoint_path=self.video_decoder.checkpoint_path,
+ video_shape=VideoPixelShape(
+ batch=1,
+ frames=output_shape.frames,
+ height=output_shape.height,
+ width=output_shape.width,
+ fps=output_shape.fps,
+ ),
+ diffvae_optimization=self.video_decoder.diffvae_optimization,
+ device=self.device,
+ )
- output_shape = get_videostream_metadata(video_path)
initial_video_latent = self.image_conditioner(
lambda enc: video_latent_from_file(
video_encoder=enc,
@@ -203,6 +242,7 @@ class RetakePipeline:
output_shape=output_shape,
dtype=dtype,
device=self.device,
+ color_space=color_space,
)
)
@@ -220,6 +260,7 @@ class RetakePipeline:
contexts = self.prompt_encoder(
prompts_to_encode,
enhance_first_prompt=enhance_prompt,
+ enhance_static_cache=enhance_static_cache,
enhance_prompt_seed=seed,
)
@@ -282,11 +323,10 @@ class RetakePipeline:
max_batch_size=max_batch_size,
)
- # Decode
- decoded_video = self.video_decoder(video_state.latent, tiling_config, generator)
+ decoded_video = self.video_decoder(video_state.latent, tiling_config, generator, dtype=vae_dtype)
decoded_audio = self.audio_decoder(audio_state.latent)
- return decoded_video, decoded_audio
+ return decoded_video, decoded_audio, tiling_config
@torch.inference_mode()
@@ -302,7 +342,8 @@ def main() -> None:
# Validate frame count (8k+1) and resolution (multiples of 32) at CLI stage
video_scale = SpatioTemporalScaleFactors.default()
- src = get_videostream_metadata(args.video_path)
+ exr_input = is_exr_dir(args.video_path)
+ src = get_videostream_metadata(args.video_path, fps=args.frame_rate if exr_input else None)
if (src.frames - 1) % video_scale.time != 0:
snapped = ((src.frames - 1) // video_scale.time) * video_scale.time + 1
raise ValueError(
@@ -312,27 +353,35 @@ def main() -> None:
raise ValueError(f"Video width and height must be multiples of 32. Got {src.width}x{src.height}.")
pipeline = RetakePipeline(
- checkpoint_path=args.distilled_checkpoint_path,
- gemma_root=args.gemma_root,
+ model_paths=args.model_paths,
loras=tuple(args.lora) if args.lora else (),
quantization=args.quantization,
distilled=True,
compilation_config=args.compile,
offload_mode=args.offload_mode,
+ prompt_enhancer_gemma_root=args.prompt_enhancer_gemma_root,
+ diffvae_optimization=args.diffvae_optimization,
)
- params = detect_params(args.distilled_checkpoint_path)
- tiling_config = TilingConfig.default()
- video_iter, audio = pipeline(
+ params = detect_params(args.model_paths.transformer())
+ hdr = resolve_hdr_color_space(video_paths=[args.video_path], hdr=args.hdr)
+ vae_dtype = vae_dtype_for_hdr(hdr, torch.bfloat16)
+ video_iter, audio, tiling_config = pipeline(
video_path=args.video_path,
prompt=args.prompt,
start_time=args.start_time,
end_time=args.end_time,
seed=args.seed,
+ fps=args.frame_rate if exr_input else None,
+ enhance_prompt=args.enhance_prompt,
+ enhance_static_cache=args.enhance_static_cache,
video_guider_params=params.video_guider_params,
audio_guider_params=params.audio_guider_params,
- tiling_config=tiling_config,
+ vae_dtype=vae_dtype,
+ color_space=hdr,
+ tiling_config=AUTO_TILING,
max_batch_size=args.max_batch_size,
)
+
video_chunks_number = get_video_chunks_number(src.frames, tiling_config)
encode_video(
video=video_iter,
@@ -340,6 +389,7 @@ def main() -> None:
audio=audio,
output_path=args.output_path,
video_chunks_number=video_chunks_number,
+ color_space=hdr,
)
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/t2a_one_stage.py b/packages/ltx-pipelines/src/ltx_pipelines/t2a_one_stage.py
index 8b3cea3..7d5e965 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/t2a_one_stage.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/t2a_one_stage.py
@@ -2,6 +2,7 @@ import logging
import torch
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_core.components.guiders import (
MultiModalGuiderFactory,
MultiModalGuiderParams,
@@ -16,7 +17,6 @@ from ltx_core.model.transformer.compiling import CompilationConfig
from ltx_core.quantization import QuantizationPolicy
from ltx_core.types import Audio
from ltx_pipelines.utils import get_device
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_pipelines.utils.args import (
default_1_stage_t2a_arg_parser,
resolve_cli_params,
@@ -24,11 +24,15 @@ from ltx_pipelines.utils.args import (
from ltx_pipelines.utils.blocks import (
AudioDecoder,
DiffusionStage,
+ DurationPredictor,
PromptEncoder,
+ require_num_frames_source,
+ resolve_num_frames,
)
from ltx_pipelines.utils.denoisers import FactoryGuidedDenoiser
from ltx_pipelines.utils.media_io import encode_audio
-from ltx_pipelines.utils.types import ModalitySpec, OffloadMode
+from ltx_pipelines.utils.model_paths import ModelPaths
+from ltx_pipelines.utils.types import DEFAULT_AUTO_DURATION, AutoDuration, ModalitySpec, OffloadMode
# Placeholder pixel dimensions used for ``VideoPixelShape`` construction.
# Audio-only generation reads ``frames`` and ``fps`` from the pixel shape via
@@ -48,8 +52,7 @@ class T2AOneStagePipeline:
def __init__(
self,
- checkpoint_path: str,
- gemma_root: str,
+ model_paths: ModelPaths,
loras: list[LoraPathStrengthAndSDOps],
device: torch.device | None = None,
quantization: QuantizationPolicy | None = None,
@@ -57,25 +60,26 @@ class T2AOneStagePipeline:
compilation_config: CompilationConfig | None = None,
offload_mode: OffloadMode = OffloadMode.NONE,
alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
+ prompt_enhancer_gemma_root: str | None = None,
):
self.dtype = torch.bfloat16
self.device = device or get_device()
self._scheduler = LTX2Scheduler()
self.prompt_encoder = PromptEncoder(
- checkpoint_path=checkpoint_path,
- gemma_root=gemma_root,
+ model_paths,
dtype=self.dtype,
device=self.device,
registry=registry,
offload_mode=offload_mode,
alloc_trim_strategy=alloc_trim_strategy,
+ prompt_enhancer_gemma_root=prompt_enhancer_gemma_root,
)
# Audio-only: build an audio-only transformer (model_configurator) so the video
# weights are never instantiated, plus a use-case-specific SDOps that restricts
# checkpoint reads to the audio model's keys, so the video weights are never even
# read from disk (the loader skips any key the SDOps maps to None).
self.stage = DiffusionStage.from_checkpoint(
- checkpoint_path=checkpoint_path,
+ model_paths.transformer(),
dtype=self.dtype,
device=self.device,
loras=tuple(loras),
@@ -88,38 +92,52 @@ class T2AOneStagePipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.audio_decoder = AudioDecoder(
- checkpoint_path=checkpoint_path,
+ model_paths.audio_vae(),
dtype=self.dtype,
device=self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
)
+ # None on checkpoints that predate DurationHead (LTX 2.5 / gemma4 only) -- __call__ requires
+ # an explicit num_frames in that case instead of crashing deep in a forward pass.
+ self.duration_predictor = DurationPredictor.from_checkpoint(
+ checkpoint_path=model_paths.duration_head_path,
+ dtype=self.dtype,
+ device=self.device,
+ )
- def __call__(
+ def __call__( # noqa: PLR0913
self,
prompt: str,
negative_prompt: str,
seed: int,
- num_frames: int,
frame_rate: float,
num_inference_steps: int,
audio_guider_params: MultiModalGuiderParams | MultiModalGuiderFactory,
+ num_frames: int | AutoDuration = DEFAULT_AUTO_DURATION,
enhance_prompt: bool = False,
+ enhance_static_cache: bool = False,
max_batch_size: int = 1,
sigmas: torch.Tensor | None = None,
) -> Audio:
+ require_num_frames_source(num_frames, self.duration_predictor)
generator = torch.Generator(device=self.device).manual_seed(seed)
noiser = GaussianNoiser(generator=generator)
ctx_p, ctx_n = self.prompt_encoder(
[prompt, negative_prompt],
enhance_first_prompt=enhance_prompt,
+ enhance_static_cache=enhance_static_cache,
enhance_prompt_image=None,
enhance_prompt_seed=seed,
)
a_context_p = ctx_p.audio_encoding
a_context_n = ctx_n.audio_encoding
+ num_frames = resolve_num_frames(
+ num_frames, self.duration_predictor, video_encoding=None, audio_encoding=a_context_p, frame_rate=frame_rate
+ )
+
sigmas = (sigmas if sigmas is not None else self._scheduler.execute(steps=num_inference_steps)).to(
dtype=torch.float32, device=self.device
)
@@ -161,12 +179,12 @@ def main() -> None:
parser = default_1_stage_t2a_arg_parser(params=params)
args = parser.parse_args()
pipeline = T2AOneStagePipeline(
- checkpoint_path=args.checkpoint_path,
- gemma_root=args.gemma_root,
+ model_paths=args.model_paths,
loras=tuple(args.lora) if args.lora else (),
quantization=args.quantization,
compilation_config=args.compile,
offload_mode=args.offload_mode,
+ prompt_enhancer_gemma_root=args.prompt_enhancer_gemma_root,
)
audio = pipeline(
prompt=args.prompt,
@@ -185,6 +203,8 @@ def main() -> None:
skip_step=args.audio_skip_step,
stg_blocks=args.audio_stg_blocks,
),
+ enhance_prompt=args.enhance_prompt,
+ enhance_static_cache=args.enhance_static_cache,
max_batch_size=args.max_batch_size,
)
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_one_stage.py b/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_one_stage.py
index 0985c05..c5f1873 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_one_stage.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_one_stage.py
@@ -1,8 +1,9 @@
import logging
-from collections.abc import Iterator
+from collections.abc import Iterator, Sequence
import torch
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_core.components.guiders import (
MultiModalGuiderFactory,
MultiModalGuiderParams,
@@ -13,30 +14,44 @@ from ltx_core.components.schedulers import LTX2Scheduler
from ltx_core.loader import LoraPathStrengthAndSDOps
from ltx_core.loader.registry import Registry
from ltx_core.model.transformer.compiling import CompilationConfig
-from ltx_core.model.video_vae.tiling import TilingConfig
+from ltx_core.model.video_vae import AUTO_TILING, AutoTiling, TilingConfig, get_video_chunks_number
+from ltx_core.model.video_vae.transformer import DiffVAEMode
from ltx_core.quantization import QuantizationPolicy
-from ltx_core.types import Audio
-from ltx_pipelines.utils import (
- assert_resolution,
- combined_image_conditionings,
- get_device,
-)
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
+from ltx_core.types import Audio, VideoPixelShape
from ltx_pipelines.utils.args import (
ImageConditioningInput,
+ add_generated_keyframes_arg,
default_1_stage_arg_parser,
resolve_cli_params,
)
from ltx_pipelines.utils.blocks import (
AudioDecoder,
DiffusionStage,
+ DurationPredictor,
ImageConditioner,
PromptEncoder,
VideoDecoder,
+ require_num_frames_source,
+ resolve_num_frames,
)
from ltx_pipelines.utils.denoisers import FactoryGuidedDenoiser
-from ltx_pipelines.utils.media_io import encode_video
-from ltx_pipelines.utils.types import ModalitySpec, OffloadMode
+from ltx_pipelines.utils.helpers import (
+ assert_resolution,
+ combined_image_conditionings,
+ ensure_tiling_config,
+ generated_keyframe_conditionings,
+ get_device,
+ has_generated_keyframes,
+ tiling_scale_factors_for_vae,
+)
+from ltx_pipelines.utils.media_io import (
+ HDRColorSpace,
+ encode_video,
+ resolve_hdr_color_space,
+ vae_dtype_for_hdr,
+)
+from ltx_pipelines.utils.model_paths import ModelPaths
+from ltx_pipelines.utils.types import DEFAULT_AUTO_DURATION, AutoDuration, ModalitySpec, OffloadMode
class TI2VidOneStagePipeline:
@@ -50,8 +65,7 @@ class TI2VidOneStagePipeline:
def __init__(
self,
- checkpoint_path: str,
- gemma_root: str,
+ model_paths: ModelPaths,
loras: list[LoraPathStrengthAndSDOps],
device: torch.device | None = None,
quantization: QuantizationPolicy | None = None,
@@ -59,28 +73,30 @@ class TI2VidOneStagePipeline:
compilation_config: CompilationConfig | None = None,
offload_mode: OffloadMode = OffloadMode.NONE,
alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
+ prompt_enhancer_gemma_root: str | None = None,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
):
self.dtype = torch.bfloat16
self.device = device or get_device()
self._scheduler = LTX2Scheduler()
self.prompt_encoder = PromptEncoder(
- checkpoint_path=checkpoint_path,
- gemma_root=gemma_root,
+ model_paths,
dtype=self.dtype,
device=self.device,
registry=registry,
offload_mode=offload_mode,
alloc_trim_strategy=alloc_trim_strategy,
+ prompt_enhancer_gemma_root=prompt_enhancer_gemma_root,
)
self.image_conditioner = ImageConditioner(
- checkpoint_path=checkpoint_path,
+ model_paths.video_vae(),
dtype=self.dtype,
device=self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
)
self.stage = DiffusionStage.from_checkpoint(
- checkpoint_path=checkpoint_path,
+ model_paths.transformer(),
dtype=self.dtype,
device=self.device,
loras=tuple(loras),
@@ -91,19 +107,27 @@ class TI2VidOneStagePipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.video_decoder = VideoDecoder(
- checkpoint_path=checkpoint_path,
+ model_paths.video_vae(),
dtype=self.dtype,
device=self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
+ diffvae_optimization=diffvae_optimization,
)
self.audio_decoder = AudioDecoder(
- checkpoint_path=checkpoint_path,
+ model_paths.audio_vae(),
dtype=self.dtype,
device=self.device,
registry=registry,
alloc_trim_strategy=alloc_trim_strategy,
)
+ # None on checkpoints that predate DurationHead (LTX 2.5 / gemma4 only) -- __call__ requires
+ # an explicit num_frames in that case instead of crashing deep in a forward pass.
+ self.duration_predictor = DurationPredictor.from_checkpoint(
+ checkpoint_path=model_paths.duration_head_path,
+ dtype=self.dtype,
+ device=self.device,
+ )
def __call__( # noqa: PLR0913
self,
@@ -112,32 +136,61 @@ class TI2VidOneStagePipeline:
seed: int,
height: int,
width: int,
- num_frames: int,
frame_rate: float,
num_inference_steps: int,
video_guider_params: MultiModalGuiderParams | MultiModalGuiderFactory,
audio_guider_params: MultiModalGuiderParams | MultiModalGuiderFactory,
images: list[ImageConditioningInput],
+ num_frames: int | AutoDuration = DEFAULT_AUTO_DURATION,
enhance_prompt: bool = False,
- tiling_config: TilingConfig | None = None,
+ enhance_static_cache: bool = False,
+ vae_dtype: torch.dtype | None = None,
+ tiling_config: TilingConfig | AutoTiling | None = AUTO_TILING,
max_batch_size: int = 1,
sigmas: torch.Tensor | None = None,
- ) -> tuple[Iterator[torch.Tensor], Audio]:
+ color_space: HDRColorSpace | None = None,
+ generated_keyframes: int | Sequence[int] = 0,
+ ) -> tuple[Iterator[torch.Tensor], Audio, TilingConfig | None]:
+ require_num_frames_source(num_frames, self.duration_predictor)
+ images = self.image_conditioner.resolve_crf(images)
assert_resolution(height=height, width=width, is_two_stage=False)
+ if has_generated_keyframes(generated_keyframes):
+ self.stage.assert_generated_keyframes_supported()
generator = torch.Generator(device=self.device).manual_seed(seed)
noiser = GaussianNoiser(generator=generator)
dtype = torch.bfloat16
+ if vae_dtype is None:
+ vae_dtype = dtype
ctx_p, ctx_n = self.prompt_encoder(
[prompt, negative_prompt],
enhance_first_prompt=enhance_prompt,
+ enhance_static_cache=enhance_static_cache,
enhance_prompt_image=images[0][0] if len(images) > 0 else None,
enhance_prompt_seed=seed,
)
v_context_p, a_context_p = ctx_p.video_encoding, ctx_p.audio_encoding
v_context_n, a_context_n = ctx_n.video_encoding, ctx_n.audio_encoding
+ num_frames = resolve_num_frames(
+ num_frames,
+ self.duration_predictor,
+ video_encoding=v_context_p,
+ audio_encoding=a_context_p,
+ frame_rate=frame_rate,
+ )
+
+ scale_factors = tiling_scale_factors_for_vae(self.video_decoder.checkpoint_path)
+ tiling_config = ensure_tiling_config(
+ tiling_config,
+ scale_factors=scale_factors,
+ vae_checkpoint_path=self.video_decoder.checkpoint_path,
+ video_shape=VideoPixelShape(batch=1, frames=num_frames, height=height, width=width, fps=frame_rate),
+ diffvae_optimization=self.video_decoder.diffvae_optimization,
+ device=self.device,
+ )
+
stage_1_conditionings = self.image_conditioner(
lambda enc: combined_image_conditionings(
images=images,
@@ -146,8 +199,10 @@ class TI2VidOneStagePipeline:
video_encoder=enc,
dtype=dtype,
device=self.device,
+ color_space=color_space,
)
)
+ stage_1_conditionings.extend(generated_keyframe_conditionings(generated_keyframes, num_frames))
sigmas = (sigmas if sigmas is not None else self._scheduler.execute(steps=num_inference_steps)).to(
dtype=torch.float32, device=self.device
@@ -185,26 +240,29 @@ class TI2VidOneStagePipeline:
max_batch_size=max_batch_size,
)
- decoded_video = self.video_decoder(video_state.latent, tiling_config, generator=generator)
+ decoded_video = self.video_decoder(video_state.latent, tiling_config, generator=generator, dtype=vae_dtype)
decoded_audio = self.audio_decoder(audio_state.latent)
- return decoded_video, decoded_audio
+ return decoded_video, decoded_audio, tiling_config
@torch.inference_mode()
def main() -> None:
logging.basicConfig(level=logging.INFO)
params = resolve_cli_params()
- parser = default_1_stage_arg_parser(params=params)
+ parser = add_generated_keyframes_arg(default_1_stage_arg_parser(params=params, supports_auto_duration=True))
args = parser.parse_args()
pipeline = TI2VidOneStagePipeline(
- checkpoint_path=args.checkpoint_path,
- gemma_root=args.gemma_root,
+ model_paths=args.model_paths,
loras=tuple(args.lora) if args.lora else (),
quantization=args.quantization,
compilation_config=args.compile,
offload_mode=args.offload_mode,
+ prompt_enhancer_gemma_root=args.prompt_enhancer_gemma_root,
+ diffvae_optimization=args.diffvae_optimization,
)
- video, audio = pipeline(
+ hdr = resolve_hdr_color_space(images=args.images, hdr=args.hdr)
+ vae_dtype = vae_dtype_for_hdr(hdr, torch.bfloat16)
+ video, audio, tiling_config = pipeline(
prompt=args.prompt,
negative_prompt=args.negative_prompt,
seed=args.seed,
@@ -230,7 +288,13 @@ def main() -> None:
stg_blocks=args.audio_stg_blocks,
),
images=args.images,
+ vae_dtype=vae_dtype,
+ color_space=hdr,
+ enhance_prompt=args.enhance_prompt,
+ enhance_static_cache=args.enhance_static_cache,
max_batch_size=args.max_batch_size,
+ tiling_config=AUTO_TILING,
+ generated_keyframes=args.num_generated_keyframes,
)
encode_video(
@@ -238,7 +302,8 @@ def main() -> None:
fps=args.frame_rate,
audio=audio,
output_path=args.output_path,
- video_chunks_number=1,
+ video_chunks_number=get_video_chunks_number(args.num_frames, tiling_config),
+ color_space=hdr,
)
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages.py b/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages.py
index 3934753..c99ff7d 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages.py
@@ -1,8 +1,9 @@
import logging
-from collections.abc import Iterator
+from collections.abc import Iterator, Sequence
import torch
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_core.components.guiders import (
MultiModalGuiderFactory,
MultiModalGuiderParams,
@@ -13,22 +14,26 @@ from ltx_core.components.schedulers import LTX2Scheduler
from ltx_core.loader import LoraPathStrengthAndSDOps
from ltx_core.loader.registry import Registry
from ltx_core.model.transformer.compiling import CompilationConfig
-from ltx_core.model.video_vae import TilingConfig, get_video_chunks_number
+from ltx_core.model.video_vae import AUTO_TILING, AutoTiling, TilingConfig, get_video_chunks_number
+from ltx_core.model.video_vae.transformer import DiffVAEMode
from ltx_core.quantization import QuantizationPolicy
from ltx_core.types import Audio, VideoPixelShape
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_pipelines.utils.args import (
ImageConditioningInput,
+ add_generated_keyframes_arg,
default_2_stage_arg_parser,
resolve_cli_params,
)
from ltx_pipelines.utils.blocks import (
AudioDecoder,
DiffusionStage,
+ DurationPredictor,
ImageConditioner,
PromptEncoder,
VideoDecoder,
VideoUpsampler,
+ require_num_frames_source,
+ resolve_num_frames,
)
from ltx_pipelines.utils.constants import (
STAGE_2_DISTILLED_SIGMAS,
@@ -37,10 +42,20 @@ from ltx_pipelines.utils.denoisers import FactoryGuidedDenoiser, SimpleDenoiser
from ltx_pipelines.utils.helpers import (
assert_resolution,
combined_image_conditionings,
+ ensure_tiling_config,
+ generated_keyframe_conditionings,
get_device,
+ has_generated_keyframes,
+ tiling_scale_factors_for_vae,
)
-from ltx_pipelines.utils.media_io import encode_video
-from ltx_pipelines.utils.types import ModalitySpec, OffloadMode
+from ltx_pipelines.utils.media_io import (
+ HDRColorSpace,
+ encode_video,
+ resolve_hdr_color_space,
+ vae_dtype_for_hdr,
+)
+from ltx_pipelines.utils.model_paths import ModelPaths
+from ltx_pipelines.utils.types import DEFAULT_AUTO_DURATION, AutoDuration, ModalitySpec, OffloadMode
class TI2VidTwoStagesPipeline:
@@ -54,10 +69,9 @@ class TI2VidTwoStagesPipeline:
def __init__( # noqa: PLR0913
self,
- checkpoint_path: str,
+ model_paths: ModelPaths,
distilled_lora: list[LoraPathStrengthAndSDOps],
spatial_upsampler_path: str,
- gemma_root: str,
loras: list[LoraPathStrengthAndSDOps],
device: torch.device | None = None,
quantization: QuantizationPolicy | None = None,
@@ -65,25 +79,31 @@ class TI2VidTwoStagesPipeline:
compilation_config: CompilationConfig | None = None,
offload_mode: OffloadMode = OffloadMode.NONE,
alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
+ prompt_enhancer_gemma_root: str | None = None,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
):
self.device = device or get_device()
self.dtype = torch.bfloat16
self._scheduler = LTX2Scheduler()
self.prompt_encoder = PromptEncoder(
- checkpoint_path,
- gemma_root,
+ model_paths,
self.dtype,
self.device,
registry=registry,
offload_mode=offload_mode,
alloc_trim_strategy=alloc_trim_strategy,
+ prompt_enhancer_gemma_root=prompt_enhancer_gemma_root,
)
self.image_conditioner = ImageConditioner(
- checkpoint_path, self.dtype, self.device, registry=registry, alloc_trim_strategy=alloc_trim_strategy
+ model_paths.video_vae(),
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
)
self.upsampler = VideoUpsampler(
- checkpoint_path,
+ model_paths.video_vae(),
spatial_upsampler_path,
self.dtype,
self.device,
@@ -91,14 +111,30 @@ class TI2VidTwoStagesPipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.video_decoder = VideoDecoder(
- checkpoint_path, self.dtype, self.device, registry=registry, alloc_trim_strategy=alloc_trim_strategy
+ model_paths.video_vae(),
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
+ diffvae_optimization=diffvae_optimization,
)
self.audio_decoder = AudioDecoder(
- checkpoint_path, self.dtype, self.device, registry=registry, alloc_trim_strategy=alloc_trim_strategy
+ model_paths.audio_vae(),
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
+ )
+ # None on checkpoints that predate DurationHead (LTX 2.5 / gemma4 only) -- __call__ requires
+ # an explicit num_frames in that case instead of crashing deep in a forward pass.
+ self.duration_predictor = DurationPredictor.from_checkpoint(
+ model_paths.duration_head_path,
+ self.dtype,
+ self.device,
)
self.stage_1 = DiffusionStage.from_checkpoint(
- checkpoint_path,
+ model_paths.transformer(),
self.dtype,
self.device,
loras=tuple(loras),
@@ -109,7 +145,7 @@ class TI2VidTwoStagesPipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.stage_2 = DiffusionStage.from_checkpoint(
- checkpoint_path,
+ model_paths.transformer(),
self.dtype,
self.device,
loras=(*tuple(loras), *distilled_lora),
@@ -127,33 +163,62 @@ class TI2VidTwoStagesPipeline:
seed: int,
height: int,
width: int,
- num_frames: int,
frame_rate: float,
num_inference_steps: int,
video_guider_params: MultiModalGuiderParams | MultiModalGuiderFactory,
audio_guider_params: MultiModalGuiderParams | MultiModalGuiderFactory,
images: list[ImageConditioningInput],
- tiling_config: TilingConfig | None = None,
+ num_frames: int | AutoDuration = DEFAULT_AUTO_DURATION,
+ vae_dtype: torch.dtype | None = None,
+ tiling_config: TilingConfig | AutoTiling | None = AUTO_TILING,
enhance_prompt: bool = False,
+ enhance_static_cache: bool = False,
max_batch_size: int = 1,
stage_1_sigmas: torch.Tensor | None = None,
stage_2_sigmas: torch.Tensor = STAGE_2_DISTILLED_SIGMAS,
- ) -> tuple[Iterator[torch.Tensor], Audio]:
+ color_space: HDRColorSpace | None = None,
+ generated_keyframes: int | Sequence[int] = 0,
+ ) -> tuple[Iterator[torch.Tensor], Audio, int, TilingConfig | None]:
+ require_num_frames_source(num_frames, self.duration_predictor)
+ images = self.image_conditioner.resolve_crf(images)
assert_resolution(height=height, width=width, is_two_stage=True)
+ if has_generated_keyframes(generated_keyframes):
+ self.stage_1.assert_generated_keyframes_supported()
generator = torch.Generator(device=self.device).manual_seed(seed)
noiser = GaussianNoiser(generator=generator)
dtype = torch.bfloat16
+ if vae_dtype is None:
+ vae_dtype = dtype
ctx_p, ctx_n = self.prompt_encoder(
[prompt, negative_prompt],
enhance_first_prompt=enhance_prompt,
+ enhance_static_cache=enhance_static_cache,
enhance_prompt_image=images[0][0] if len(images) > 0 else None,
enhance_prompt_seed=seed,
)
v_context_p, a_context_p = ctx_p.video_encoding, ctx_p.audio_encoding
v_context_n, a_context_n = ctx_n.video_encoding, ctx_n.audio_encoding
+ num_frames = resolve_num_frames(
+ num_frames,
+ self.duration_predictor,
+ video_encoding=v_context_p,
+ audio_encoding=a_context_p,
+ frame_rate=frame_rate,
+ )
+
+ scale_factors = tiling_scale_factors_for_vae(self.video_decoder.checkpoint_path)
+ tiling_config = ensure_tiling_config(
+ tiling_config,
+ scale_factors=scale_factors,
+ vae_checkpoint_path=self.video_decoder.checkpoint_path,
+ video_shape=VideoPixelShape(batch=1, frames=num_frames, height=height, width=width, fps=frame_rate),
+ diffvae_optimization=self.video_decoder.diffvae_optimization,
+ device=self.device,
+ )
+
# Stage 1: Generate video at half resolution with CFG guidance.
stage_1_output_shape = VideoPixelShape(
batch=1,
@@ -170,8 +235,10 @@ class TI2VidTwoStagesPipeline:
video_encoder=enc,
dtype=dtype,
device=self.device,
+ color_space=color_space,
)
)
+ stage_1_conditionings.extend(generated_keyframe_conditionings(generated_keyframes, num_frames))
sigmas = (
stage_1_sigmas if stage_1_sigmas is not None else self._scheduler.execute(steps=num_inference_steps)
@@ -213,6 +280,7 @@ class TI2VidTwoStagesPipeline:
video_encoder=enc,
dtype=dtype,
device=self.device,
+ color_space=color_space,
)
)
@@ -239,30 +307,31 @@ class TI2VidTwoStagesPipeline:
),
)
- decoded_video = self.video_decoder(video_state.latent, tiling_config, generator)
+ decoded_video = self.video_decoder(video_state.latent, tiling_config, generator, dtype=vae_dtype)
decoded_audio = self.audio_decoder(audio_state.latent)
- return decoded_video, decoded_audio
+ return decoded_video, decoded_audio, num_frames, tiling_config
@torch.inference_mode()
def main() -> None:
logging.basicConfig(level=logging.INFO)
params = resolve_cli_params()
- parser = default_2_stage_arg_parser(params=params)
+ parser = add_generated_keyframes_arg(default_2_stage_arg_parser(params=params, supports_auto_duration=True))
args = parser.parse_args()
pipeline = TI2VidTwoStagesPipeline(
- checkpoint_path=args.checkpoint_path,
+ model_paths=args.model_paths,
distilled_lora=args.distilled_lora,
spatial_upsampler_path=args.spatial_upsampler_path,
- gemma_root=args.gemma_root,
loras=tuple(args.lora) if args.lora else (),
quantization=args.quantization,
compilation_config=args.compile,
offload_mode=args.offload_mode,
+ prompt_enhancer_gemma_root=args.prompt_enhancer_gemma_root,
+ diffvae_optimization=args.diffvae_optimization,
)
- tiling_config = TilingConfig.default()
- video_chunks_number = get_video_chunks_number(args.num_frames, tiling_config)
- video, audio = pipeline(
+ hdr = resolve_hdr_color_space(images=args.images, hdr=args.hdr)
+ vae_dtype = vae_dtype_for_hdr(hdr, torch.bfloat16)
+ video, audio, num_frames, tiling_config = pipeline(
prompt=args.prompt,
negative_prompt=args.negative_prompt,
seed=args.seed,
@@ -288,8 +357,13 @@ def main() -> None:
stg_blocks=args.audio_stg_blocks,
),
images=args.images,
- tiling_config=tiling_config,
+ vae_dtype=vae_dtype,
+ color_space=hdr,
+ enhance_prompt=args.enhance_prompt,
+ enhance_static_cache=args.enhance_static_cache,
max_batch_size=args.max_batch_size,
+ tiling_config=AUTO_TILING,
+ generated_keyframes=args.num_generated_keyframes,
)
encode_video(
@@ -297,7 +371,8 @@ def main() -> None:
fps=args.frame_rate,
audio=audio,
output_path=args.output_path,
- video_chunks_number=video_chunks_number,
+ video_chunks_number=get_video_chunks_number(num_frames, tiling_config),
+ color_space=hdr,
)
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages_hq.py b/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages_hq.py
index a752479..e6662bd 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages_hq.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages_hq.py
@@ -1,8 +1,9 @@
import logging
-from collections.abc import Iterator
+from collections.abc import Iterator, Sequence
import torch
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_core.components.diffusion_steps import Res2sDiffusionStep
from ltx_core.components.guiders import MultiModalGuider, MultiModalGuiderParams
from ltx_core.components.noisers import GaussianNoiser
@@ -10,18 +11,25 @@ from ltx_core.components.schedulers import LTX2Scheduler
from ltx_core.loader import LoraPathStrengthAndSDOps
from ltx_core.loader.registry import Registry
from ltx_core.model.transformer.compiling import CompilationConfig
-from ltx_core.model.video_vae import TilingConfig, get_video_chunks_number
+from ltx_core.model.video_vae import AUTO_TILING, AutoTiling, TilingConfig, get_video_chunks_number
+from ltx_core.model.video_vae.transformer import DiffVAEMode
from ltx_core.quantization import QuantizationPolicy
from ltx_core.types import Audio, VideoLatentShape, VideoPixelShape
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
-from ltx_pipelines.utils.args import ImageConditioningInput, hq_2_stage_arg_parser
+from ltx_pipelines.utils.args import (
+ ImageConditioningInput,
+ add_generated_keyframes_arg,
+ hq_2_stage_arg_parser,
+)
from ltx_pipelines.utils.blocks import (
AudioDecoder,
DiffusionStage,
+ DurationPredictor,
ImageConditioner,
PromptEncoder,
VideoDecoder,
VideoUpsampler,
+ require_num_frames_source,
+ resolve_num_frames,
)
from ltx_pipelines.utils.constants import (
LTX_2_3_HQ_PARAMS,
@@ -31,11 +39,21 @@ from ltx_pipelines.utils.denoisers import GuidedDenoiser, SimpleDenoiser
from ltx_pipelines.utils.helpers import (
assert_resolution,
combined_image_conditionings,
+ ensure_tiling_config,
+ generated_keyframe_conditionings,
get_device,
+ has_generated_keyframes,
+ tiling_scale_factors_for_vae,
+)
+from ltx_pipelines.utils.media_io import (
+ HDRColorSpace,
+ encode_video,
+ resolve_hdr_color_space,
+ vae_dtype_for_hdr,
)
-from ltx_pipelines.utils.media_io import encode_video
+from ltx_pipelines.utils.model_paths import ModelPaths
from ltx_pipelines.utils.samplers import res2s_audio_video_denoising_loop
-from ltx_pipelines.utils.types import ModalitySpec, OffloadMode
+from ltx_pipelines.utils.types import DEFAULT_AUTO_DURATION, AutoDuration, ModalitySpec, OffloadMode
class TI2VidTwoStagesHQPipeline:
@@ -52,12 +70,11 @@ class TI2VidTwoStagesHQPipeline:
def __init__( # noqa: PLR0913
self,
- checkpoint_path: str,
+ model_paths: ModelPaths,
distilled_lora: list[LoraPathStrengthAndSDOps],
distilled_lora_strength_stage_1: float,
distilled_lora_strength_stage_2: float,
spatial_upsampler_path: str,
- gemma_root: str,
loras: tuple[LoraPathStrengthAndSDOps, ...],
device: torch.device | None = None,
quantization: QuantizationPolicy | None = None,
@@ -65,6 +82,8 @@ class TI2VidTwoStagesHQPipeline:
compilation_config: CompilationConfig | None = None,
offload_mode: OffloadMode = OffloadMode.NONE,
alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
+ prompt_enhancer_gemma_root: str | None = None,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
):
self.device = device or get_device()
self.dtype = torch.bfloat16
@@ -82,19 +101,23 @@ class TI2VidTwoStagesHQPipeline:
)
self.prompt_encoder = PromptEncoder(
- checkpoint_path,
- gemma_root,
+ model_paths,
self.dtype,
self.device,
registry=registry,
offload_mode=offload_mode,
alloc_trim_strategy=alloc_trim_strategy,
+ prompt_enhancer_gemma_root=prompt_enhancer_gemma_root,
)
self.image_conditioner = ImageConditioner(
- checkpoint_path, self.dtype, self.device, registry=registry, alloc_trim_strategy=alloc_trim_strategy
+ model_paths.video_vae(),
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
)
self.upsampler = VideoUpsampler(
- checkpoint_path,
+ model_paths.video_vae(),
spatial_upsampler_path,
self.dtype,
self.device,
@@ -102,14 +125,30 @@ class TI2VidTwoStagesHQPipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.video_decoder = VideoDecoder(
- checkpoint_path, self.dtype, self.device, registry=registry, alloc_trim_strategy=alloc_trim_strategy
+ model_paths.video_vae(),
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
+ diffvae_optimization=diffvae_optimization,
)
self.audio_decoder = AudioDecoder(
- checkpoint_path, self.dtype, self.device, registry=registry, alloc_trim_strategy=alloc_trim_strategy
+ model_paths.audio_vae(),
+ self.dtype,
+ self.device,
+ registry=registry,
+ alloc_trim_strategy=alloc_trim_strategy,
+ )
+ # None on checkpoints that predate DurationHead (LTX 2.5 / gemma4 only) -- __call__ requires
+ # an explicit num_frames in that case instead of crashing deep in a forward pass.
+ self.duration_predictor = DurationPredictor.from_checkpoint(
+ model_paths.duration_head_path,
+ self.dtype,
+ self.device,
)
self.stage_1 = DiffusionStage.from_checkpoint(
- checkpoint_path,
+ model_paths.transformer(),
self.dtype,
self.device,
loras=(*loras, distilled_lora_stage_1),
@@ -120,7 +159,7 @@ class TI2VidTwoStagesHQPipeline:
alloc_trim_strategy=alloc_trim_strategy,
)
self.stage_2 = DiffusionStage.from_checkpoint(
- checkpoint_path,
+ model_paths.transformer(),
self.dtype,
self.device,
loras=(*loras, distilled_lora_stage_2),
@@ -139,33 +178,62 @@ class TI2VidTwoStagesHQPipeline:
seed: int,
height: int,
width: int,
- num_frames: int,
frame_rate: float,
num_inference_steps: int,
video_guider_params: MultiModalGuiderParams,
audio_guider_params: MultiModalGuiderParams,
images: list[ImageConditioningInput],
- tiling_config: TilingConfig | None = None,
+ num_frames: int | AutoDuration = DEFAULT_AUTO_DURATION,
+ vae_dtype: torch.dtype | None = None,
+ tiling_config: TilingConfig | AutoTiling | None = AUTO_TILING,
enhance_prompt: bool = False,
+ enhance_static_cache: bool = False,
max_batch_size: int = 1,
stage_1_sigmas: torch.Tensor | None = None,
stage_2_sigmas: torch.Tensor = STAGE_2_DISTILLED_SIGMAS,
- ) -> tuple[Iterator[torch.Tensor], Audio]:
+ color_space: HDRColorSpace | None = None,
+ generated_keyframes: int | Sequence[int] = 0,
+ ) -> tuple[Iterator[torch.Tensor], Audio, int, TilingConfig | None]:
+ require_num_frames_source(num_frames, self.duration_predictor)
+ images = self.image_conditioner.resolve_crf(images)
assert_resolution(height=height, width=width, is_two_stage=True)
+ if has_generated_keyframes(generated_keyframes):
+ self.stage_1.assert_generated_keyframes_supported()
generator = torch.Generator(device=self.device).manual_seed(seed)
noiser = GaussianNoiser(generator=generator)
dtype = torch.bfloat16
+ if vae_dtype is None:
+ vae_dtype = dtype
ctx_p, ctx_n = self.prompt_encoder(
[prompt, negative_prompt],
enhance_first_prompt=enhance_prompt,
+ enhance_static_cache=enhance_static_cache,
enhance_prompt_image=images[0][0] if len(images) > 0 else None,
enhance_prompt_seed=seed,
)
v_context_p, a_context_p = ctx_p.video_encoding, ctx_p.audio_encoding
v_context_n, a_context_n = ctx_n.video_encoding, ctx_n.audio_encoding
+ num_frames = resolve_num_frames(
+ num_frames,
+ self.duration_predictor,
+ video_encoding=v_context_p,
+ audio_encoding=a_context_p,
+ frame_rate=frame_rate,
+ )
+
+ scale_factors = tiling_scale_factors_for_vae(self.video_decoder.checkpoint_path)
+ tiling_config = ensure_tiling_config(
+ tiling_config,
+ scale_factors=scale_factors,
+ vae_checkpoint_path=self.video_decoder.checkpoint_path,
+ video_shape=VideoPixelShape(batch=1, frames=num_frames, height=height, width=width, fps=frame_rate),
+ diffvae_optimization=self.video_decoder.diffvae_optimization,
+ device=self.device,
+ )
+
# Stage 1: Generate video at half resolution with CFG guidance using res2s sampler.
stage_1_output_shape = VideoPixelShape(
batch=1,
@@ -182,13 +250,20 @@ class TI2VidTwoStagesHQPipeline:
video_encoder=enc,
dtype=dtype,
device=self.device,
+ color_space=color_space,
)
)
+ stage_1_conditionings.extend(generated_keyframe_conditionings(generated_keyframes, num_frames))
stepper = Res2sDiffusionStep()
if stage_1_sigmas is None:
- empty_latent = torch.empty(VideoLatentShape.from_pixel_shape(stage_1_output_shape).to_torch_shape())
+ empty_latent = torch.empty(
+ VideoLatentShape.from_pixel_shape(
+ stage_1_output_shape,
+ scale_factors=self.stage_1.video_scale_factors,
+ ).to_torch_shape()
+ )
stage_1_sigmas = self._scheduler.execute(latent=empty_latent, steps=num_inference_steps)
sigmas = stage_1_sigmas.to(dtype=torch.float32, device=self.device)
@@ -231,6 +306,7 @@ class TI2VidTwoStagesHQPipeline:
video_encoder=enc,
dtype=dtype,
device=self.device,
+ color_space=color_space,
)
)
@@ -259,31 +335,32 @@ class TI2VidTwoStagesHQPipeline:
loop=res2s_audio_video_denoising_loop,
)
- decoded_video = self.video_decoder(video_state.latent, tiling_config, generator)
+ decoded_video = self.video_decoder(video_state.latent, tiling_config, generator, dtype=vae_dtype)
decoded_audio = self.audio_decoder(audio_state.latent)
- return decoded_video, decoded_audio
+ return decoded_video, decoded_audio, num_frames, tiling_config
@torch.inference_mode()
def main() -> None:
logging.basicConfig(level=logging.INFO)
- parser = hq_2_stage_arg_parser(params=LTX_2_3_HQ_PARAMS)
+ parser = add_generated_keyframes_arg(hq_2_stage_arg_parser(params=LTX_2_3_HQ_PARAMS, supports_auto_duration=True))
args = parser.parse_args()
pipeline = TI2VidTwoStagesHQPipeline(
- checkpoint_path=args.checkpoint_path,
+ model_paths=args.model_paths,
distilled_lora=args.distilled_lora,
distilled_lora_strength_stage_1=args.distilled_lora_strength_stage_1,
distilled_lora_strength_stage_2=args.distilled_lora_strength_stage_2,
spatial_upsampler_path=args.spatial_upsampler_path,
- gemma_root=args.gemma_root,
loras=tuple(args.lora) if args.lora else (),
quantization=args.quantization,
compilation_config=args.compile,
offload_mode=args.offload_mode,
+ prompt_enhancer_gemma_root=args.prompt_enhancer_gemma_root,
+ diffvae_optimization=args.diffvae_optimization,
)
- tiling_config = TilingConfig.default()
- video_chunks_number = get_video_chunks_number(args.num_frames, tiling_config)
- video, audio = pipeline(
+ hdr = resolve_hdr_color_space(images=args.images, hdr=args.hdr)
+ vae_dtype = vae_dtype_for_hdr(hdr, torch.bfloat16)
+ video, audio, num_frames, tiling_config = pipeline(
prompt=args.prompt,
negative_prompt=args.negative_prompt,
seed=args.seed,
@@ -309,8 +386,13 @@ def main() -> None:
stg_blocks=args.audio_stg_blocks,
),
images=args.images,
- tiling_config=tiling_config,
+ vae_dtype=vae_dtype,
+ color_space=hdr,
+ enhance_prompt=args.enhance_prompt,
+ enhance_static_cache=args.enhance_static_cache,
max_batch_size=args.max_batch_size,
+ tiling_config=AUTO_TILING,
+ generated_keyframes=args.num_generated_keyframes,
)
encode_video(
@@ -318,7 +400,8 @@ def main() -> None:
fps=args.frame_rate,
audio=audio,
output_path=args.output_path,
- video_chunks_number=video_chunks_number,
+ video_chunks_number=get_video_chunks_number(num_frames, tiling_config),
+ color_space=hdr,
)
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages_hq_mgpu.py b/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages_hq_mgpu.py
index 64fac7d..f1588e0 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages_hq_mgpu.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages_hq_mgpu.py
@@ -13,18 +13,19 @@ Requires ``ltx-kernels`` to be installed (transitive via SP builder).
from __future__ import annotations
import logging
-from collections.abc import Iterator
+from collections.abc import Iterator, Sequence
from multiprocessing import SimpleQueue
import torch
import torch.distributed as dist
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_core.components.guiders import MultiModalGuiderParams
from ltx_core.loader import LTXV_LORA_COMFY_RENAMING_MAP, LoraPathStrengthAndSDOps
-from ltx_core.loader.registry import StateDictRegistry
+from ltx_core.loader.registry import ModelRegistry
from ltx_core.model.transformer.compiling import CompilationConfig
from ltx_core.model.video_vae import get_video_chunks_number
-from ltx_core.model.video_vae.tiling import TilingConfig
+from ltx_core.model.video_vae.transformer import DiffVAEMode
from ltx_core.multigpu.transformer.attention import AttentionManager
from ltx_core.quantization.fp8_cast import build_policy as _build_fp8_cast_policy
from ltx_core.tiling import DimensionTilingConfig, TileCountConfig, balanced_tile_split
@@ -36,9 +37,10 @@ from ltx_pipelines.multigpu.tdp_builder import TiledDataParallelBuilder
from ltx_pipelines.multigpu.vae_builders import DistributedDecoderBuilder
from ltx_pipelines.multigpu.weight_tracker import TransformerWeightTracker
from ltx_pipelines.ti2vid_two_stages_hq import TI2VidTwoStagesHQPipeline
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_pipelines.utils.constants import TDP_DISTILLED_SIGMAS
-from ltx_pipelines.utils.media_io import encode_video
+from ltx_pipelines.utils.media_io import HDRColorSpace, encode_video, resolve_hdr_color_space, vae_dtype_for_hdr
+from ltx_pipelines.utils.model_paths import ModelPaths
+from ltx_pipelines.utils.types import DEFAULT_AUTO_DURATION, AutoDuration
logger = logging.getLogger(__name__)
@@ -55,8 +57,8 @@ class TI2VidTwoStagesHQRunner(MGPURunner):
def setup(
self,
*,
- checkpoint_path: str,
- gemma_root: str,
+ model_paths: ModelPaths,
+ prompt_enhancer_gemma_root: str | None = None,
spatial_upsampler_path: str,
vae_queue: SimpleQueue,
distilled_lora_path: str,
@@ -64,21 +66,23 @@ class TI2VidTwoStagesHQRunner(MGPURunner):
distilled_lora_strength_stage_2: float,
compilation_config: CompilationConfig | None = None,
sp_max_tokens: int = _DEFAULT_SP_MAX_TOKENS,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
) -> None:
distilled_lora = [LoraPathStrengthAndSDOps(distilled_lora_path, 1.0, LTXV_LORA_COMFY_RENAMING_MAP)]
- registry = StateDictRegistry()
+ registry = ModelRegistry()
pipeline = TI2VidTwoStagesHQPipeline(
- checkpoint_path=checkpoint_path,
+ model_paths=model_paths,
distilled_lora=distilled_lora,
distilled_lora_strength_stage_1=distilled_lora_strength_stage_1,
distilled_lora_strength_stage_2=distilled_lora_strength_stage_2,
spatial_upsampler_path=spatial_upsampler_path,
- gemma_root=gemma_root,
+ prompt_enhancer_gemma_root=prompt_enhancer_gemma_root,
loras=(),
registry=registry,
- quantization=_build_fp8_cast_policy(checkpoint_path),
+ quantization=_build_fp8_cast_policy(model_paths.transformer()),
compilation_config=compilation_config,
alloc_trim_strategy=AllocatorTrimStrategy.DEFER,
+ diffvae_optimization=diffvae_optimization,
)
tracker = TransformerWeightTracker(group=self.groups.transformer_group)
@@ -113,15 +117,30 @@ class TI2VidTwoStagesHQRunner(MGPURunner):
tracker=tracker,
)
- # Accelerate Gemma parallelization.
- pipeline.prompt_encoder._text_encoder_builder = AccelerateGemmaBuilder(
- gemma_root_path=gemma_root,
+ # Accelerate Gemma parallelization. Capture shared-vs-separate before replacing
+ # the encode builder so a shared alias is re-bound to the new instance.
+ pe = pipeline.prompt_encoder
+ separate_enhancer = pe._enhancer_text_encoder_builder is not pe._text_encoder_builder
+ pe._text_encoder_builder = AccelerateGemmaBuilder(
+ gemma_root_path=model_paths.text_encoder(),
gemma_group=self.groups.gemma_group,
broadcast_group=self.groups.transformer_group,
registry=registry,
src_rank=_DRIVER_RANK,
dtype=pipeline.dtype,
)
+ if separate_enhancer:
+ assert prompt_enhancer_gemma_root is not None
+ pe._enhancer_text_encoder_builder = AccelerateGemmaBuilder(
+ gemma_root_path=prompt_enhancer_gemma_root,
+ gemma_group=self.groups.gemma_group,
+ broadcast_group=self.groups.transformer_group,
+ registry=registry,
+ src_rank=_DRIVER_RANK,
+ dtype=pipeline.dtype,
+ )
+ else:
+ pe._enhancer_text_encoder_builder = pe._text_encoder_builder
# Distributed VAE decoding: balanced 2D spatial grid over the group (one tile/rank).
# height takes the smaller factor of world_size, width the larger; size-aware split is a follow-up.
@@ -151,16 +170,22 @@ class TI2VidTwoStagesHQRunner(MGPURunner):
seed: int,
height: int,
width: int,
- num_frames: int,
frame_rate: float,
num_inference_steps: int,
video_guider_params: MultiModalGuiderParams,
audio_guider_params: MultiModalGuiderParams,
+ num_frames: int | AutoDuration = DEFAULT_AUTO_DURATION,
images: list | None = None,
+ enhance_prompt: bool = False,
+ enhance_static_cache: bool = False,
+ hdr: HDRColorSpace | None = None,
+ generated_keyframes: int | Sequence[int] = 0,
) -> Iterator[str | None]:
# The pipeline raises ValueError on invalid input (symmetric across ranks); the controller
# catches that and turns it into a recoverable RunnerError. Anything else is fatal.
- video, audio = self._pipeline(
+ hdr = resolve_hdr_color_space(images=images or [], hdr=hdr)
+ vae_dtype = vae_dtype_for_hdr(hdr, torch.bfloat16)
+ video, audio, num_frames, tiling_config = self._pipeline(
prompt=prompt,
negative_prompt=negative_prompt,
seed=seed,
@@ -172,7 +197,12 @@ class TI2VidTwoStagesHQRunner(MGPURunner):
video_guider_params=video_guider_params,
audio_guider_params=audio_guider_params,
images=images or [],
+ vae_dtype=vae_dtype,
+ color_space=hdr,
tiling_config=None,
+ enhance_prompt=enhance_prompt,
+ enhance_static_cache=enhance_static_cache,
+ generated_keyframes=generated_keyframes,
stage_2_sigmas=TDP_DISTILLED_SIGMAS,
)
if dist.get_rank() != _DRIVER_RANK:
@@ -183,29 +213,32 @@ class TI2VidTwoStagesHQRunner(MGPURunner):
fps=frame_rate,
audio=audio,
output_path=output_path,
- video_chunks_number=get_video_chunks_number(num_frames, TilingConfig.default()),
+ video_chunks_number=get_video_chunks_number(num_frames, tiling_config),
+ color_space=hdr,
)
yield output_path
if __name__ == "__main__":
- from ltx_pipelines.utils.args import hq_2_stage_arg_parser
+ from ltx_pipelines.utils.args import add_generated_keyframes_arg, hq_2_stage_arg_parser
from ltx_pipelines.utils.constants import LTX_2_3_HQ_PARAMS
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(message)s")
- args = hq_2_stage_arg_parser(params=LTX_2_3_HQ_PARAMS).parse_args()
+ parser = add_generated_keyframes_arg(hq_2_stage_arg_parser(params=LTX_2_3_HQ_PARAMS, supports_auto_duration=True))
+ args = parser.parse_args()
vae_queue = torch.multiprocessing.get_context("spawn").SimpleQueue()
controller = MGPUController(TI2VidTwoStagesHQRunner)
controller.start(
- checkpoint_path=args.checkpoint_path,
- gemma_root=args.gemma_root,
+ model_paths=args.model_paths,
+ prompt_enhancer_gemma_root=args.prompt_enhancer_gemma_root,
spatial_upsampler_path=args.spatial_upsampler_path,
vae_queue=vae_queue,
distilled_lora_path=args.distilled_lora[0].path,
distilled_lora_strength_stage_1=args.distilled_lora_strength_stage_1,
distilled_lora_strength_stage_2=args.distilled_lora_strength_stage_2,
compilation_config=args.compile,
+ diffvae_optimization=args.diffvae_optimization,
)
try:
for _ in controller.stream(
@@ -235,6 +268,10 @@ if __name__ == "__main__":
stg_blocks=args.audio_stg_blocks,
),
images=args.images,
+ enhance_prompt=args.enhance_prompt,
+ enhance_static_cache=args.enhance_static_cache,
+ hdr=args.hdr,
+ generated_keyframes=args.num_generated_keyframes,
):
pass # drive the job to completion; the runner writes the file as a side effect
finally:
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages_mgpu.py b/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages_mgpu.py
index 9dd1845..4fb0627 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages_mgpu.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages_mgpu.py
@@ -10,18 +10,19 @@ Requires ``ltx-kernels`` to be installed (transitive via SP builder).
from __future__ import annotations
import logging
-from collections.abc import Callable, Iterator
+from collections.abc import Callable, Iterator, Sequence
from multiprocessing import SimpleQueue
import torch
import torch.distributed as dist
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_core.components.guiders import MultiModalGuiderParams
from ltx_core.loader import LTXV_LORA_COMFY_RENAMING_MAP, LoraPathStrengthAndSDOps
-from ltx_core.loader.registry import StateDictRegistry
+from ltx_core.loader.registry import ModelRegistry
from ltx_core.model.transformer.compiling import CompilationConfig
from ltx_core.model.video_vae import get_video_chunks_number
-from ltx_core.model.video_vae.tiling import TilingConfig
+from ltx_core.model.video_vae.transformer import DiffVAEMode
from ltx_core.multigpu.transformer.attention import AttentionManager
from ltx_core.quantization import QuantizationPolicy
from ltx_core.quantization.fp8_cast import build_policy as _build_fp8_cast_policy
@@ -34,9 +35,10 @@ from ltx_pipelines.multigpu.tdp_builder import TiledDataParallelBuilder
from ltx_pipelines.multigpu.vae_builders import DistributedDecoderBuilder
from ltx_pipelines.multigpu.weight_tracker import TransformerWeightTracker
from ltx_pipelines.ti2vid_two_stages import TI2VidTwoStagesPipeline
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_pipelines.utils.constants import TDP_DISTILLED_SIGMAS
-from ltx_pipelines.utils.media_io import encode_video
+from ltx_pipelines.utils.media_io import HDRColorSpace, encode_video, resolve_hdr_color_space, vae_dtype_for_hdr
+from ltx_pipelines.utils.model_paths import ModelPaths
+from ltx_pipelines.utils.types import DEFAULT_AUTO_DURATION, AutoDuration
logger = logging.getLogger(__name__)
@@ -53,29 +55,33 @@ class TI2VidTwoStagesRunner(MGPURunner):
def setup(
self,
*,
- checkpoint_path: str,
- gemma_root: str,
+ model_paths: ModelPaths,
+ prompt_enhancer_gemma_root: str | None = None,
spatial_upsampler_path: str,
vae_queue: SimpleQueue,
distilled_lora_path: str,
compilation_config: CompilationConfig | None = None,
sp_max_tokens: int = _DEFAULT_SP_MAX_TOKENS,
quantization: Callable[[], QuantizationPolicy] | None = None,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
) -> None:
# quantization is a picklable zero-arg builder (built per worker, post-spawn); default fp8-cast.
- quantization_policy = quantization() if quantization is not None else _build_fp8_cast_policy(checkpoint_path)
+ quantization_policy = (
+ quantization() if quantization is not None else _build_fp8_cast_policy(model_paths.transformer())
+ )
distilled_lora = [LoraPathStrengthAndSDOps(distilled_lora_path, 1.0, LTXV_LORA_COMFY_RENAMING_MAP)]
- registry = StateDictRegistry()
+ registry = ModelRegistry()
pipeline = TI2VidTwoStagesPipeline(
- checkpoint_path=checkpoint_path,
+ model_paths=model_paths,
distilled_lora=distilled_lora,
spatial_upsampler_path=spatial_upsampler_path,
- gemma_root=gemma_root,
+ prompt_enhancer_gemma_root=prompt_enhancer_gemma_root,
loras=[],
registry=registry,
quantization=quantization_policy,
compilation_config=compilation_config,
alloc_trim_strategy=AllocatorTrimStrategy.DEFER,
+ diffvae_optimization=diffvae_optimization,
)
tracker = TransformerWeightTracker(group=self.groups.transformer_group)
@@ -110,15 +116,30 @@ class TI2VidTwoStagesRunner(MGPURunner):
tracker=tracker,
)
- # Accelerate Gemma parallelization.
- pipeline.prompt_encoder._text_encoder_builder = AccelerateGemmaBuilder(
- gemma_root_path=gemma_root,
+ # Accelerate Gemma parallelization. Capture shared-vs-separate before replacing
+ # the encode builder so a shared alias is re-bound to the new instance.
+ pe = pipeline.prompt_encoder
+ separate_enhancer = pe._enhancer_text_encoder_builder is not pe._text_encoder_builder
+ pe._text_encoder_builder = AccelerateGemmaBuilder(
+ gemma_root_path=model_paths.text_encoder(),
gemma_group=self.groups.gemma_group,
broadcast_group=self.groups.transformer_group,
registry=registry,
src_rank=_DRIVER_RANK,
dtype=pipeline.dtype,
)
+ if separate_enhancer:
+ assert prompt_enhancer_gemma_root is not None
+ pe._enhancer_text_encoder_builder = AccelerateGemmaBuilder(
+ gemma_root_path=prompt_enhancer_gemma_root,
+ gemma_group=self.groups.gemma_group,
+ broadcast_group=self.groups.transformer_group,
+ registry=registry,
+ src_rank=_DRIVER_RANK,
+ dtype=pipeline.dtype,
+ )
+ else:
+ pe._enhancer_text_encoder_builder = pe._text_encoder_builder
# Distributed VAE decoding: balanced 2D spatial grid over the group (one tile/rank).
# height takes the smaller factor of world_size, width the larger; size-aware split is a follow-up.
@@ -148,16 +169,22 @@ class TI2VidTwoStagesRunner(MGPURunner):
seed: int,
height: int,
width: int,
- num_frames: int,
frame_rate: float,
num_inference_steps: int,
video_guider_params: MultiModalGuiderParams,
audio_guider_params: MultiModalGuiderParams,
+ num_frames: int | AutoDuration = DEFAULT_AUTO_DURATION,
images: list | None = None,
+ enhance_prompt: bool = False,
+ enhance_static_cache: bool = False,
+ hdr: HDRColorSpace | None = None,
+ generated_keyframes: int | Sequence[int] = 0,
) -> Iterator[str | None]:
# The pipeline raises ValueError on invalid input (symmetric across ranks); the controller
# catches that and turns it into a recoverable RunnerError. Anything else is fatal.
- video, audio = self._pipeline(
+ hdr = resolve_hdr_color_space(images=images or [], hdr=hdr)
+ vae_dtype = vae_dtype_for_hdr(hdr, torch.bfloat16)
+ video, audio, num_frames, tiling_config = self._pipeline(
prompt=prompt,
negative_prompt=negative_prompt,
seed=seed,
@@ -169,7 +196,12 @@ class TI2VidTwoStagesRunner(MGPURunner):
video_guider_params=video_guider_params,
audio_guider_params=audio_guider_params,
images=images or [],
+ vae_dtype=vae_dtype,
+ color_space=hdr,
tiling_config=None,
+ enhance_prompt=enhance_prompt,
+ enhance_static_cache=enhance_static_cache,
+ generated_keyframes=generated_keyframes,
stage_2_sigmas=TDP_DISTILLED_SIGMAS,
)
if dist.get_rank() != _DRIVER_RANK:
@@ -180,30 +212,34 @@ class TI2VidTwoStagesRunner(MGPURunner):
fps=frame_rate,
audio=audio,
output_path=output_path,
- video_chunks_number=get_video_chunks_number(num_frames, TilingConfig.default()),
+ video_chunks_number=get_video_chunks_number(num_frames, tiling_config),
+ color_space=hdr,
)
yield output_path
if __name__ == "__main__":
from ltx_pipelines.utils.args import (
+ add_generated_keyframes_arg,
default_2_stage_arg_parser,
resolve_cli_params,
)
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(message)s")
params = resolve_cli_params()
- args = default_2_stage_arg_parser(params=params).parse_args()
+ parser = add_generated_keyframes_arg(default_2_stage_arg_parser(params=params, supports_auto_duration=True))
+ args = parser.parse_args()
vae_queue = torch.multiprocessing.get_context("spawn").SimpleQueue()
controller = MGPUController(TI2VidTwoStagesRunner)
controller.start(
- checkpoint_path=args.checkpoint_path,
- gemma_root=args.gemma_root,
+ model_paths=args.model_paths,
+ prompt_enhancer_gemma_root=args.prompt_enhancer_gemma_root,
spatial_upsampler_path=args.spatial_upsampler_path,
vae_queue=vae_queue,
distilled_lora_path=args.distilled_lora[0].path,
compilation_config=args.compile,
+ diffvae_optimization=args.diffvae_optimization,
)
try:
for _ in controller.stream(
@@ -233,6 +269,10 @@ if __name__ == "__main__":
stg_blocks=args.audio_stg_blocks,
),
images=args.images,
+ enhance_prompt=args.enhance_prompt,
+ enhance_static_cache=args.enhance_static_cache,
+ hdr=args.hdr,
+ generated_keyframes=args.num_generated_keyframes,
):
pass # drive the job to completion; the runner writes the file as a side effect
finally:
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/__init__.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/__init__.py
index 33cf327..ab79873 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/utils/__init__.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/__init__.py
@@ -12,10 +12,14 @@ from ltx_pipelines.utils.helpers import (
assert_resolution,
cleanup_memory,
combined_image_conditionings,
+ evenly_spaced_keyframe_positions,
+ generated_keyframe_conditionings,
get_device,
image_conditionings_by_adding_guiding_latent,
+ resolve_generated_keyframes,
)
from ltx_pipelines.utils.samplers import (
+ euler_ancestral_denoising_loop,
euler_cfg_pp_denoising_loop,
euler_denoising_loop,
gradient_estimating_euler_denoising_loop,
@@ -40,10 +44,14 @@ __all__ = [
"assert_resolution",
"cleanup_memory",
"combined_image_conditionings",
+ "euler_ancestral_denoising_loop",
"euler_cfg_pp_denoising_loop",
"euler_denoising_loop",
+ "evenly_spaced_keyframe_positions",
+ "generated_keyframe_conditionings",
"get_device",
"gradient_estimating_euler_denoising_loop",
"image_conditionings_by_adding_guiding_latent",
"res2s_audio_video_denoising_loop",
+ "resolve_generated_keyframes",
]
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/allocator_trim_strategy.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/allocator_trim_strategy.py
deleted file mode 100644
index c8fc927..0000000
--- a/packages/ltx-pipelines/src/ltx_pipelines/utils/allocator_trim_strategy.py
+++ /dev/null
@@ -1,8 +0,0 @@
-from enum import Enum
-
-
-class AllocatorTrimStrategy(Enum):
- """How a block releases its model's memory when its scope exits."""
-
- TRIM = "trim" # sync, release storage (to meta), and empty_cache() back to the OS
- DEFER = "defer" # skip teardown; let GC reclaim it and keep the CUDA cache warm
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/args.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/args.py
index d86fdc0..2f7e9dc 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/utils/args.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/args.py
@@ -1,5 +1,6 @@
import argparse
import json
+import logging
import sys
from collections.abc import Sequence
from pathlib import Path
@@ -7,9 +8,9 @@ from typing import Any, NamedTuple
from ltx_core.loader import LTXV_LORA_COMFY_RENAMING_MAP, LoraPathStrengthAndSDOps
from ltx_core.model.transformer.compiling import CompilationConfig
+from ltx_core.model.video_vae.transformer import DiffVAEMode
from ltx_core.quantization import QuantizationPolicy
from ltx_pipelines.utils.constants import (
- DEFAULT_IMAGE_CRF,
DEFAULT_LORA_STRENGTH,
DEFAULT_NEGATIVE_PROMPT,
LTX_2_3_HQ_PARAMS,
@@ -18,14 +19,50 @@ from ltx_pipelines.utils.constants import (
detect_params,
)
from ltx_pipelines.utils.quantization_factory import QuantizationKind
-from ltx_pipelines.utils.types import OffloadMode
+from ltx_pipelines.utils.types import AutoDuration, OffloadMode
+
+logger = logging.getLogger(__name__)
+
+
+def add_hdr_args(parser: argparse.ArgumentParser) -> argparse.ArgumentParser:
+ """Add ``--hdr`` colour-space flag. Behaviour is implemented in ``media_io``."""
+ from ltx_pipelines.utils.media_io.color_config import HDRColorSpace # noqa: PLC0415
+
+ names = [m.name for m in HDRColorSpace]
+
+ def _parse_hdr(value: str) -> HDRColorSpace:
+ key = value.upper()
+ try:
+ return HDRColorSpace[key]
+ except KeyError as exc:
+ raise argparse.ArgumentTypeError(f"invalid --hdr {value!r}; choose from {', '.join(names)}") from exc
+
+ parser.add_argument(
+ "--hdr",
+ type=_parse_hdr,
+ choices=[HDRColorSpace[n] for n in names],
+ default=None,
+ metavar="{" + ",".join(names) + "}",
+ help=(
+ "HDR colour space for EXR conditioning / HDR encode (EXR half + BT.2020/HLG). "
+ "Required when any EXR still or folder is passed. Default: SDR."
+ ),
+ )
+ return parser
class ImageConditioningInput(NamedTuple):
+ """An image to condition on, with the H.264 CRF it should be re-compressed at.
+ Leaving ``crf`` unset means "use whatever matches the model": the pipeline fills it in
+ from the checkpoint it runs (``ImageConditioner.resolve_crf``), since the value the model
+ was trained with is a property of the model generation. Pass ``crf`` explicitly to
+ override it, including ``0`` to skip re-compression entirely.
+ """
+
path: str
frame_idx: int
strength: float
- crf: int = DEFAULT_IMAGE_CRF
+ crf: int | None = None
class VideoConditioningAction(argparse.Action):
@@ -68,7 +105,29 @@ class VideoMaskConditioningAction(argparse.Action):
setattr(namespace, self.dest, (mask_path, strength))
+class AutoDurationAction(argparse.Action):
+ """Parse ``--auto-duration MIN_SECONDS MAX_SECONDS`` into an :class:`AutoDuration`."""
+
+ def __call__(
+ self,
+ parser: argparse.ArgumentParser, # noqa: ARG002
+ namespace: argparse.Namespace,
+ values: list[str],
+ option_string: str | None = None,
+ ) -> None:
+ min_seconds, max_seconds = float(values[0]), float(values[1])
+ if min_seconds > max_seconds:
+ msg = f"{option_string} MIN_SECONDS ({min_seconds}) must be <= MAX_SECONDS ({max_seconds})"
+ raise argparse.ArgumentError(self, msg)
+ setattr(namespace, self.dest, AutoDuration(min_seconds=min_seconds, max_seconds=max_seconds))
+
+
class ImageAction(argparse.Action):
+ """Parse ``--image PATH FRAME_IDX STRENGTH [CRF]``.
+ An omitted CRF stays ``None``, which the pipeline resolves from the checkpoint it runs
+ (see ``ImageConditioner.resolve_crf``) -- the CLI does not need to know the value.
+ """
+
def __call__(
self,
parser: argparse.ArgumentParser, # noqa: ARG002
@@ -84,7 +143,7 @@ class ImageAction(argparse.Action):
path=resolve_existing_path(values[0]),
frame_idx=int(values[1]),
strength=float(values[2]),
- crf=int(values[3]) if len(values) > 3 else DEFAULT_IMAGE_CRF,
+ crf=int(values[3]) if len(values) > 3 else None,
)
current = getattr(namespace, self.dest) or []
current.append(conditioning)
@@ -124,7 +183,19 @@ class CompileAction(argparse.Action):
messages rather than uncaught tracebacks.
"""
- _ALLOWED_KEYS = frozenset({"mode", "backend", "fullgraph", "dynamic", "inductor_config", "dynamo_config"})
+ _ALLOWED_KEYS = frozenset(
+ {
+ "mode",
+ "backend",
+ "fullgraph",
+ "dynamic",
+ "inductor_config",
+ "dynamo_config",
+ "seq_dim_dynamic",
+ "recompile_perturbed_block",
+ "capture",
+ }
+ )
def __call__(
self,
@@ -150,7 +221,7 @@ class CompileAction(argparse.Action):
overrides[key] = self._parse_mode(raw)
elif key == "backend":
overrides[key] = self._parse_non_empty(key, raw)
- elif key == "fullgraph":
+ elif key in ("fullgraph", "seq_dim_dynamic", "recompile_perturbed_block", "capture"):
overrides[key] = self._parse_bool(key, raw)
elif key == "dynamic":
overrides[key] = self._parse_dynamic(raw)
@@ -239,12 +310,139 @@ def _resolve_quantization(namespace: argparse.Namespace) -> None:
kind = QuantizationKind(name)
except ValueError:
return
- ckpt = getattr(namespace, "checkpoint_path", None) or getattr(namespace, "distilled_checkpoint_path", None)
+ # Always require a checkpoint path for a clear CLI error, even for kinds
+ # (e.g. nvfp4-cast) whose policy builder does not consume it.
+ # Split-checkpoint runs may only have --transformer-path.
+ ckpt = (
+ getattr(namespace, "checkpoint_path", None)
+ or getattr(namespace, "distilled_checkpoint_path", None)
+ or getattr(namespace, "transformer_path", None)
+ )
if ckpt is None:
- raise SystemExit(f"--quantization {kind.value} requires --checkpoint-path (or --distilled-checkpoint-path).")
+ raise SystemExit(
+ f"--quantization {kind.value} requires --checkpoint-path, "
+ "--distilled-checkpoint-path, or --transformer-path."
+ )
namespace.quantization = kind.to_policy(checkpoint_path=ckpt)
+def _resolve_model_paths(namespace: argparse.Namespace) -> None:
+ """Attach ``namespace.model_paths`` — the post-parse path contract for pipelines.
+ Raw checkpoint / split flags remain on the namespace for parser tests and rare
+ pre-resolve helpers; pipeline ``main()`` and constructors should read only
+ ``args.model_paths``.
+ """
+ # Deferred: model_paths imports argparse helpers from this module at module scope.
+ from ltx_pipelines.utils.model_paths import model_paths_from_namespace # noqa: PLC0415
+
+ namespace.model_paths = model_paths_from_namespace(namespace)
+
+
+def _resolve_num_frames(namespace: argparse.Namespace) -> None:
+ """Collapse ``--num-frames``/``--auto-duration`` into the single value a pipeline's
+ ``num_frames`` parameter expects: an explicit ``--num-frames`` wins (with a warning if
+ ``--auto-duration`` was also given); otherwise ``--auto-duration`` if given, else the
+ ``AutoDuration()`` default. No-op for parsers without ``supports_auto_duration=True`` (neither
+ attribute exists on the namespace).
+ """
+ if not hasattr(namespace, "num_frames") or not hasattr(namespace, "auto_duration"):
+ return
+ if namespace.num_frames is not None and namespace.auto_duration is not None:
+ logger.warning(
+ "Both --num-frames and --auto-duration were given; using --num-frames=%d and ignoring --auto-duration.",
+ namespace.num_frames,
+ )
+ if namespace.num_frames is None:
+ namespace.num_frames = namespace.auto_duration if namespace.auto_duration is not None else AutoDuration()
+
+
+def _is_exr_file(path: str | Path) -> bool:
+ return Path(path).is_file() and str(path).lower().endswith(".exr")
+
+
+def _verify_sequence_path(flag: str, path: str) -> None:
+ """Video/sequence flags accept a video file or a directory of ``*.exr`` frames."""
+ from ltx_pipelines.utils.media_io import is_exr_dir # noqa: PLC0415
+
+ p = Path(path)
+ if _is_exr_file(path):
+ raise SystemExit(f"{flag} '{path}' is a single .exr file; pass a directory of *.exr frames.")
+ if p.is_dir() and not is_exr_dir(path):
+ raise SystemExit(f"{flag} '{path}' is a directory without *.exr frames.")
+
+
+def _verify_media_path_args(namespace: argparse.Namespace) -> None: # noqa: PLR0912
+ """Validate HDR/SDR path shapes and couple retake ``--frame-rate`` to EXR folders.
+ Rules:
+ * ``--image``: a still file (``.exr`` or PNG/JPEG). Not a directory.
+ * ``--video-conditioning`` / ``--video-path``: a video file or an EXR-frame folder.
+ * Any EXR still/folder requires ``--hdr {SRGB_LINEAR,ACESCG,ACESCCT}``.
+ * ``--image`` + ``--video-conditioning`` (and multiples of each) must be all EXR or all
+ non-EXR — no mix. ``--conditioning-attention-mask`` is always SDR and is not checked.
+ * Retake ``--frame-rate``: required for EXR folders, forbidden for video files.
+ * Dub-It ``--reference-video``: video file only (fps + audio from the container). EXR
+ folders / single ``.exr`` files are rejected.
+ """
+ from ltx_pipelines.utils.media_io import is_exr_dir # noqa: PLC0415
+
+ modality: list[tuple[str, str, bool]] = [] # (flag, path, is_exr)
+
+ for img in getattr(namespace, "images", None) or []:
+ path = getattr(img, "path", img)
+ if Path(path).is_dir():
+ raise SystemExit(
+ f"--image '{path}' is a directory; pass a still file (.exr or PNG/JPEG). "
+ "For an EXR sequence use --video-conditioning or --video-path."
+ )
+ modality.append(("--image", path, _is_exr_file(path)))
+
+ for item in getattr(namespace, "video_conditioning", None) or []:
+ path = item[0] if isinstance(item, (tuple, list)) else item
+ _verify_sequence_path("--video-conditioning", path)
+ modality.append(("--video-conditioning", path, is_exr_dir(path)))
+
+ if len({is_exr for _, _, is_exr in modality}) > 1:
+ detail = ", ".join(f"{flag} '{path}' ({'EXR' if is_exr else 'SDR'})" for flag, path, is_exr in modality)
+ raise SystemExit(
+ "--image / --video-conditioning must be all EXR or all SDR; "
+ f"got mixed: {detail}. (--conditioning-attention-mask is always SDR and is ignored here.)"
+ )
+
+ reference_video = getattr(namespace, "reference_video", None)
+ if reference_video is not None:
+ if _is_exr_file(reference_video) or is_exr_dir(reference_video):
+ raise SystemExit(
+ f"--reference-video '{reference_video}' must be a video file with an audio track; "
+ "EXR is not supported (fps and audio identity come from the container)."
+ )
+ if Path(reference_video).is_dir():
+ raise SystemExit(
+ f"--reference-video '{reference_video}' is a directory; pass a video file "
+ "(fps and audio identity come from the container)."
+ )
+
+ video_path = getattr(namespace, "video_path", None)
+ if video_path is not None:
+ _verify_sequence_path("--video-path", video_path)
+ if is_exr_dir(video_path):
+ modality.append(("--video-path", video_path, True))
+ if hasattr(namespace, "frame_rate"):
+ if is_exr_dir(video_path):
+ if namespace.frame_rate is None:
+ raise SystemExit(
+ f"--video-path '{video_path}' is an EXR-frame folder; --frame-rate is required "
+ "(EXR sequences have no container fps)."
+ )
+ elif namespace.frame_rate is not None:
+ raise SystemExit(
+ "--frame-rate is only valid when --video-path is an EXR-frame folder; "
+ "for video files the container fps is used."
+ )
+
+ if any(is_exr for _, _, is_exr in modality) and getattr(namespace, "hdr", None) is None:
+ raise SystemExit("EXR input requires --hdr {SRGB_LINEAR,ACESCG,ACESCCT} to declare the source colour space.")
+
+
class _PipelineArgumentParser(argparse.ArgumentParser):
def parse_args( # type: ignore[override]
self,
@@ -253,16 +451,30 @@ class _PipelineArgumentParser(argparse.ArgumentParser):
) -> argparse.Namespace:
ns = super().parse_args(args, namespace)
_resolve_quantization(ns)
+ _resolve_model_paths(ns)
+ _resolve_num_frames(ns)
+ _verify_media_path_args(ns)
return ns
def detect_checkpoint_path(distilled: bool = False) -> str:
- """Pre-parse argv to extract the checkpoint path before building the full parser."""
+ """Pre-parse argv to extract the checkpoint path before building the full parser.
+ Prefers monolith ``--checkpoint-path`` / ``--distilled-checkpoint-path``, then
+ falls back to ``--transformer-path`` for split layouts.
+ """
pre = argparse.ArgumentParser(add_help=False)
flag = "--distilled-checkpoint-path" if distilled else "--checkpoint-path"
- pre.add_argument(flag, type=resolve_existing_path, required=True)
+ pre.add_argument(flag, type=resolve_existing_path, required=False, default=None)
+ pre.add_argument("--transformer-path", type=resolve_existing_path, required=False, default=None)
known, _ = pre.parse_known_args()
- return known.distilled_checkpoint_path if distilled else known.checkpoint_path
+ monolith = known.distilled_checkpoint_path if distilled else known.checkpoint_path
+ path = monolith or known.transformer_path
+ if path is None:
+ raise SystemExit(
+ f"Missing {flag} (monolith) or --transformer-path (split). "
+ "Pass one of them before building the argument parser."
+ )
+ return path
def help_requested() -> bool:
@@ -292,15 +504,23 @@ def basic_arg_parser(
parser.add_argument(
"--distilled-checkpoint-path",
type=resolve_existing_path,
- required=True,
- help="Path to LTX-2 distilled model checkpoint (.safetensors file).",
+ required=False,
+ default=None,
+ help=(
+ "Path to LTX-2 distilled monolith checkpoint (.safetensors). "
+ "Required in monolith mode; omit when using split --transformer-path etc."
+ ),
)
else:
parser.add_argument(
"--checkpoint-path",
type=resolve_existing_path,
- required=True,
- help="Path to LTX-2 model checkpoint (.safetensors file).",
+ required=False,
+ default=None,
+ help=(
+ "Path to LTX-2 monolith checkpoint (.safetensors). "
+ "Required in monolith mode; omit when using split --transformer-path etc."
+ ),
)
parser.add_argument(
"--num-inference-steps",
@@ -314,8 +534,49 @@ def basic_arg_parser(
parser.add_argument(
"--gemma-root",
type=resolve_existing_path,
- required=True,
- help="Path to the root directory containing the Gemma text encoder model files.",
+ required=False,
+ default=None,
+ help=(
+ "Path to the Gemma text encoder HF directory (monolith mode). "
+ "Omit when using --text-encoder-path (split single-file TE)."
+ ),
+ )
+ parser.add_argument(
+ "--transformer-path",
+ type=resolve_existing_path,
+ default=None,
+ help=(
+ "Split layout: transformer safetensors (DiT + connectors). "
+ "Provide the subset of split flags this pipeline needs; unused may be omitted."
+ ),
+ )
+ parser.add_argument(
+ "--text-encoder-path",
+ type=resolve_existing_path,
+ default=None,
+ help="Split layout: Gemma + text_embedding_projection single-file safetensors.",
+ )
+ parser.add_argument(
+ "--video-vae-path",
+ type=resolve_existing_path,
+ default=None,
+ help=(
+ "Video VAE safetensors (encoder + decoder). Split: the vae/ component. "
+ "Monolith: optional override of the VAE inside the fat checkpoint "
+ "(e.g. a distilled DiffVAE). Decoder kind is selected from file metadata."
+ ),
+ )
+ parser.add_argument(
+ "--audio-vae-path",
+ type=resolve_existing_path,
+ default=None,
+ help="Split layout: audio VAE + vocoder safetensors.",
+ )
+ parser.add_argument(
+ "--duration-head-path",
+ type=resolve_existing_path,
+ default=None,
+ help="Split layout: duration head safetensors (omit if unused / unavailable).",
)
parser.add_argument(
"--prompt",
@@ -350,6 +611,25 @@ def basic_arg_parser(
)
parser.add_argument("--enhance-prompt", action="store_true")
+ parser.add_argument(
+ "--enhance-static-cache",
+ action="store_true",
+ help=(
+ "Use HF static KV-cache for prompt enhancement (opt-in). Helps multi-prompt enhance "
+ "latency after warmup; does not change encode."
+ ),
+ )
+ parser.add_argument(
+ "--prompt-enhancer-gemma-root",
+ type=resolve_existing_path,
+ default=None,
+ help=(
+ "Optional path to a generative Gemma instruct checkpoint used only for prompt "
+ "enhancement. Required when --enhance-prompt is set and the encode TE "
+ "(--gemma-root or --text-encoder-path) is not gemma3 "
+ "(e.g. gemma4_unified encode + gemma4 E2B-it enhance). Ignored for gemma3 encode roots."
+ ),
+ )
def _positive_int(value: str) -> int:
try:
@@ -399,7 +679,10 @@ def basic_arg_parser(
"fp8-cast uses FP8 casting with upcasting during inference. "
"fp8-scaled-mm uses FP8 scaled matrix multiplication; the layer set is auto-discovered "
"from the checkpoint's .weight_scale tensors. "
- "Example: --quantization fp8-cast or --quantization fp8-scaled-mm"
+ "nvfp4-cast online-quantizes BF16 Linear weights to NVFP4 (Blackwell, ltx-kernels). "
+ "nvfp4-prequant loads a pre-quantized NVFP4 checkpoint (pair with a BF16 VAE). "
+ "Example: --quantization fp8-cast, --quantization fp8-scaled-mm, "
+ "or --quantization nvfp4-prequant"
),
)
parser.add_argument(
@@ -411,7 +694,8 @@ def basic_arg_parser(
help=(
"Enable torch.compile for transformer blocks. Pass alone for defaults, "
"or with KEY=VALUE overrides for any CompilationConfig field. "
- "Keys: mode, backend, fullgraph, dynamic, inductor_config, dynamo_config. "
+ "Keys: mode, backend, fullgraph, dynamic, inductor_config, dynamo_config, "
+ "seq_dim_dynamic, recompile_perturbed_block, capture. "
"inductor_config/dynamo_config take JSON objects (inline or a path to a .json file) "
"that fully replace the defaults. "
"Examples: --compile or --compile mode=reduce-overhead or "
@@ -419,13 +703,84 @@ def basic_arg_parser(
"--compile inductor_config='{\"max_autotune\": true}'"
),
)
+ parser.add_argument(
+ "--diffvae-optimization",
+ type=DiffVAEMode,
+ default=DiffVAEMode.CHUNKED_EAGER,
+ choices=list(DiffVAEMode),
+ help=(
+ "DiffVAE decode optimization preset. "
+ "'chunked_eager' (default): deferred stage-4, W-chunks=4, cutlass-fna. "
+ "'chunked_compile': same chunking with torch.compile (det stages off). "
+ "'combined_compile': combined context, full compile (highest VRAM, fastest warm). "
+ "'blackwell_dsl': deferred stage-4 + CuTe DSL NA/fused stage-5 (datacenter Blackwell). "
+ "Ignored for convolutional VAEs. "
+ "Example: --diffvae-optimization combined_compile"
+ ),
+ )
return parser
+def _add_num_frames_args(
+ parser: argparse.ArgumentParser, params: PipelineParams, supports_auto_duration: bool, noun: str
+) -> None:
+ """Add ``--num-frames`` (and, when optional, ``--auto-duration``) to *parser*.
+ Shared by every pipeline CLI that exposes a frame-count knob (video-generating and
+ audio-only alike) so the ``--num-frames``/``--auto-duration`` precedence rule lives in one
+ place. ``supports_auto_duration`` makes ``--num-frames`` default to ``None`` and adds
+ ``--auto-duration``, for pipelines that auto-predict duration from the caption via
+ DurationHead when ``--num-frames`` is omitted. DurationHead ships from LTX-2.5
+ (gemma4) onward, so the help text calls that out rather than silently requiring a
+ 2.5+ checkpoint.
+ Resolving the parsed ``args.num_frames``/``args.auto_duration`` pair into the single value a
+ pipeline's ``num_frames`` parameter expects happens automatically in
+ ``_PipelineArgumentParser.parse_args`` (see ``_resolve_num_frames``) -- callers never need to
+ do it themselves.
+ """
+ if supports_auto_duration:
+ parser.add_argument(
+ "--num-frames",
+ type=int,
+ default=None,
+ help=(
+ f"Number of frames {noun}, num_frames = 8 * k + 1, where k is a non-negative "
+ "integer. Omit (along with --auto-duration) to auto-predict duration from the "
+ "caption via DurationHead using its default range, or pass --auto-duration to "
+ "control that range explicitly (only available for LTX-2.5 / gemma4 onward)."
+ ),
+ )
+ parser.add_argument(
+ "--auto-duration",
+ dest="auto_duration",
+ action=AutoDurationAction,
+ nargs=2,
+ metavar=("MIN_SECONDS", "MAX_SECONDS"),
+ default=None,
+ help=(
+ "Auto-predict duration from the caption via DurationHead, clamped to "
+ f"[MIN_SECONDS, MAX_SECONDS] (default when neither this nor --num-frames is given: "
+ f"[{AutoDuration().min_seconds}, {AutoDuration().max_seconds}]). Ignored with a warning "
+ "if --num-frames is also given."
+ ),
+ )
+ else:
+ parser.add_argument(
+ "--num-frames",
+ type=int,
+ default=params.num_frames,
+ help=f"Number of frames {noun}, num_frames = 8 * k + 1, "
+ f"where k is a non-negative integer (default: {params.num_frames}).",
+ )
+
+
def new_video_gen_arg_parser(
params: PipelineParams = LTX_2_3_PARAMS,
distilled: bool = False,
+ supports_auto_duration: bool = False,
) -> argparse.ArgumentParser:
+ """Build the shared video-generation argument parser.
+ See :func:`_add_num_frames_args` for the ``supports_auto_duration``/``--auto-duration`` contract.
+ """
parser = basic_arg_parser(params=params, distilled=distilled)
parser.add_argument(
"--height",
@@ -439,13 +794,7 @@ def new_video_gen_arg_parser(
default=params.stage_1_width,
help=f"Width of the generated video in pixels, should be divisible by 32 (default: {params.stage_1_width}).",
)
- parser.add_argument(
- "--num-frames",
- type=int,
- default=params.num_frames,
- help=f"Number of frames to generate in the output video sequence, num-frames = (8 x K) + 1, "
- f"where k is a non-negative integer (default: {params.num_frames}).",
- )
+ _add_num_frames_args(parser, params, supports_auto_duration, noun="to generate in the output video sequence")
parser.add_argument(
"--frame-rate",
type=float,
@@ -461,14 +810,38 @@ def new_video_gen_arg_parser(
default=[],
help=(
"Image conditioning input: PATH FRAME_IDX STRENGTH [CRF]. "
- "PATH is the image file, FRAME_IDX is the target frame index, "
- "STRENGTH is the conditioning strength (all three required). "
- f"CRF is the optional H.264 compression quality (0=lossless, default: {DEFAULT_IMAGE_CRF}). "
+ "PATH is a still file — PNG/JPEG (SDR) or scene-linear .exr (HDR). "
+ "FRAME_IDX is the target frame index, STRENGTH is the conditioning strength "
+ "(all three required). "
+ "CRF is the optional H.264 compression quality for SDR stills (0=lossless); when "
+ "omitted, the value matching the checkpoint's model version is used. "
"Can be specified multiple times. Example: --image path/to/image1.jpg 0 0.8 "
- "--image path/to/image2.jpg 160 0.9 0"
+ "--image path/to/plate.exr 0 1.0 --hdr SRGB_LINEAR"
),
)
+ add_hdr_args(parser)
+ return parser
+
+def add_generated_keyframes_arg(parser: argparse.ArgumentParser) -> argparse.ArgumentParser:
+ """Add ``--num-generated-keyframes`` to a pipeline that supports generated keyframe slots.
+ Opt-in per CLI rather than added to the shared video parser: only pipelines that actually
+ forward the value to their first diffusion stage should advertise the flag, otherwise it would
+ parse and be silently ignored. Requires a checkpoint whose transformer config sets
+ ``use_keyframes_abs_pos_embedding``; ``DiffusionStage`` raises otherwise.
+ """
+ parser.add_argument(
+ "--num-generated-keyframes",
+ type=int,
+ default=0,
+ help=(
+ "Number of extra generated keyframes to place at evenly spaced interior frame "
+ "positions (default: 0, off). Each keyframe relaxes the effective temporal "
+ "compression at its position but costs a full latent frame of tokens while yielding "
+ "one pixel frame, so N keyframes add roughly N / num_latent_frames to the sequence "
+ "length. Requires a generated-keyframe checkpoint."
+ ),
+ )
return parser
@@ -480,9 +853,27 @@ def video_editing_arg_parser(
(no height/width/num-frames; resolution comes from input video). Default is distilled checkpoint only.
"""
parser = basic_arg_parser(distilled=distilled)
- parser.add_argument("--video-path", type=resolve_existing_path, required=True, help="Path to the source video.")
+ parser.add_argument(
+ "--video-path",
+ type=resolve_existing_path,
+ required=True,
+ help=(
+ "Path to the source video file, or a directory of scene-linear *.exr "
+ "frames (HDR retake). EXR folders require --frame-rate (no container fps)."
+ ),
+ )
+ parser.add_argument(
+ "--frame-rate",
+ type=float,
+ default=None,
+ help=(
+ "Frame rate (fps). Required when --video-path is an EXR-frame folder; "
+ "must not be set for video files (container fps is used)."
+ ),
+ )
parser.add_argument("--start-time", type=float, required=True, help="Start time of the region to regenerate (s).")
parser.add_argument("--end-time", type=float, required=True, help="End time of the region to regenerate (s).")
+ add_hdr_args(parser)
return parser
@@ -522,7 +913,10 @@ def dubit_arg_parser(
"--reference-video",
type=resolve_path,
required=True,
- help="Reference video file (video + audio track used for IC-LoRA and audio identity).",
+ help=(
+ "Reference video file (video + audio). Frame count/fps and audio identity come "
+ "from this container; EXR folders are not supported."
+ ),
)
parser.add_argument(
"--reference-strength",
@@ -533,10 +927,13 @@ def dubit_arg_parser(
return parser
-def default_1_stage_arg_parser(params: PipelineParams = LTX_2_3_PARAMS) -> argparse.ArgumentParser:
+def default_1_stage_arg_parser(
+ params: PipelineParams = LTX_2_3_PARAMS,
+ supports_auto_duration: bool = False,
+) -> argparse.ArgumentParser:
video_guider = params.video_guider_params
audio_guider = params.audio_guider_params
- parser = new_video_gen_arg_parser(params=params)
+ parser = new_video_gen_arg_parser(params=params, supports_auto_duration=supports_auto_duration)
parser.add_argument(
"--negative-prompt",
type=str,
@@ -674,11 +1071,8 @@ def default_1_stage_t2a_arg_parser(params: PipelineParams = LTX_2_3_PARAMS) -> a
"""Argument parser for single-stage text-to-audio pipelines (audio-only)."""
audio_guider = params.audio_guider_params
parser = basic_arg_parser(params=params)
- parser.add_argument(
- "--num-frames",
- type=int,
- default=params.num_frames,
- help="Number of frames used to derive audio duration (num-frames / frame-rate).",
+ _add_num_frames_args(
+ parser, params, supports_auto_duration=True, noun="used to derive audio duration (num-frames / frame-rate)"
)
parser.add_argument(
"--frame-rate",
@@ -726,8 +1120,11 @@ def default_1_stage_t2a_arg_parser(params: PipelineParams = LTX_2_3_PARAMS) -> a
return parser
-def default_2_stage_arg_parser(params: PipelineParams = LTX_2_3_PARAMS) -> argparse.ArgumentParser:
- parser = default_1_stage_arg_parser(params=params)
+def default_2_stage_arg_parser(
+ params: PipelineParams = LTX_2_3_PARAMS,
+ supports_auto_duration: bool = False,
+) -> argparse.ArgumentParser:
+ parser = default_1_stage_arg_parser(params=params, supports_auto_duration=supports_auto_duration)
parser.set_defaults(height=params.stage_2_height, width=params.stage_2_width)
# Update help text to reflect 2-stage defaults
for action in parser._actions:
@@ -768,8 +1165,11 @@ def default_2_stage_arg_parser(params: PipelineParams = LTX_2_3_PARAMS) -> argpa
return parser
-def hq_2_stage_arg_parser(params: PipelineParams = LTX_2_3_HQ_PARAMS) -> argparse.ArgumentParser:
- parser = default_2_stage_arg_parser(params=params)
+def hq_2_stage_arg_parser(
+ params: PipelineParams = LTX_2_3_HQ_PARAMS,
+ supports_auto_duration: bool = False,
+) -> argparse.ArgumentParser:
+ parser = default_2_stage_arg_parser(params=params, supports_auto_duration=supports_auto_duration)
parser.add_argument(
"--distilled-lora-strength-stage-1",
type=float,
@@ -785,8 +1185,11 @@ def hq_2_stage_arg_parser(params: PipelineParams = LTX_2_3_HQ_PARAMS) -> argpars
return parser
-def default_2_stage_distilled_arg_parser(params: PipelineParams = LTX_2_3_PARAMS) -> argparse.ArgumentParser:
- parser = new_video_gen_arg_parser(params=params, distilled=True)
+def default_2_stage_distilled_arg_parser(
+ params: PipelineParams = LTX_2_3_PARAMS,
+ supports_auto_duration: bool = False,
+) -> argparse.ArgumentParser:
+ parser = new_video_gen_arg_parser(params=params, distilled=True, supports_auto_duration=supports_auto_duration)
parser.set_defaults(height=params.stage_2_height, width=params.stage_2_width)
# Update help text to reflect 2-stage defaults
for action in parser._actions:
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/blocks.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/blocks.py
index a50cbca..9d2d7d6 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/utils/blocks.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/blocks.py
@@ -8,25 +8,32 @@ from __future__ import annotations
import copy
import logging
-from collections.abc import Iterator
+from collections.abc import Iterator, Sequence
from contextlib import AbstractContextManager, contextmanager
from dataclasses import replace
from typing import Callable, TypeVar
import torch
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_core.batch_split import BatchSplitAdapter
from ltx_core.block_streaming import DISK_CPU_SLOTS, StreamingModelBuilder
from ltx_core.components.diffusion_steps import EulerDiffusionStep
from ltx_core.components.noisers import Noiser
from ltx_core.components.patchifiers import AudioPatchifier, VideoLatentPatchifier
from ltx_core.components.protocols import DiffusionStepProtocol
+from ltx_core.conditioning import VideoGeneratedKeyframeSlots
+from ltx_core.duration_head import (
+ DURATION_HEAD_KEY_OPS,
+ DurationHead,
+ DurationHeadConfigurator,
+)
from ltx_core.loader import SDOps
from ltx_core.loader.attention_ops import set_attention_module_op
from ltx_core.loader.fuse_loras import bf16_fuse_rule
from ltx_core.loader.module_ops import ModuleOps
from ltx_core.loader.primitives import BuilderProtocol, LoraPathStrengthAndSDOps, ModelBuilderProtocol
-from ltx_core.loader.registry import DummyRegistry, Registry
+from ltx_core.loader.registry import ModelRegistry, Registry
from ltx_core.loader.single_gpu_model_builder import SingleGPUModelBuilder as Builder
from ltx_core.model.audio_vae import (
AUDIO_VAE_DECODER_COMFY_KEYS_FILTER,
@@ -56,6 +63,7 @@ from ltx_core.model.transformer.compiling import (
)
from ltx_core.model.upsampler import LatentUpsamplerConfigurator, upsample_video
from ltx_core.model.video_vae import (
+ CHANNELS_LAST_3D_WEIGHTS,
MEMORY_EFFICIENT_DECODE,
VAE_DECODER_COMFY_KEYS_FILTER,
VAE_ENCODER_COMFY_KEYS_FILTER,
@@ -63,29 +71,49 @@ from ltx_core.model.video_vae import (
VideoDecoderConfigurator,
VideoEncoder,
VideoEncoderConfigurator,
+ is_diffusion_video_vae,
+ video_decoder_sd_ops_for_checkpoint,
+)
+from ltx_core.model.video_vae.transformer import (
+ DiffVAEMode,
+ NAttentionKind,
+ build_diffvae_mode_op,
+ na_dsl_available,
)
from ltx_core.quantization import QuantizationPolicy, fp8_cast_fuse_rule
from ltx_core.text_encoders.gemma import (
EMBEDDINGS_PROCESSOR_KEY_OPS,
- GEMMA_LLM_KEY_OPS,
- GEMMA_MODEL_OPS,
EmbeddingsProcessorConfigurator,
GemmaTextEncoderConfigurator,
- module_ops_from_gemma_root,
+ gemma_model_type,
+ get_gemma_ops,
+ resolve_gemma_weight_paths,
)
from ltx_core.text_encoders.gemma.embeddings_processor import EmbeddingsProcessor, EmbeddingsProcessorOutput
from ltx_core.tools import AudioLatentTools, LatentTools, VideoLatentTools
-from ltx_core.types import Audio, AudioLatentShape, LatentState, VideoLatentShape, VideoPixelShape
-from ltx_core.utils import find_matching_file
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
+from ltx_core.types import (
+ VIDEO_SCALE_FACTORS,
+ Audio,
+ AudioLatentShape,
+ LatentState,
+ SpatioTemporalScaleFactors,
+ VideoLatentShape,
+ VideoPixelShape,
+)
+from ltx_pipelines.utils.args import ImageConditioningInput
+from ltx_pipelines.utils.constants import detect_params
from ltx_pipelines.utils.gpu_model import gpu_model
from ltx_pipelines.utils.helpers import (
cleanup_memory,
create_noised_state,
generate_enhanced_prompt,
+ seconds_to_clamped_num_frames,
)
+from ltx_pipelines.utils.model_paths import ModelPaths
from ltx_pipelines.utils.samplers import euler_denoising_loop
-from ltx_pipelines.utils.types import Denoiser, ModalitySpec, OffloadMode
+from ltx_pipelines.utils.types import AutoDuration, Denoiser, ModalitySpec, OffloadMode
+
+_ENCODE_MODEL_TYPES = frozenset({"gemma3", "gemma4", "gemma4_unified"})
logger = logging.getLogger(__name__)
@@ -134,6 +162,29 @@ def _apply_compile_ops(
return sd_ops, module_ops, loras
+def _ensure_cudagraph_compatible_builder(
+ builder: ModelBuilderProtocol[LTXModelProtocol], compilation_config: CompilationConfig | None
+) -> None:
+ """CUDA-graph compile paths need GPU-resident weights across dispose/rebuild.
+ Covers ``capture=True`` and inductor cudagraph modes (``reduce-overhead`` /
+ ``max-autotune``). Checked lazily at prepare/build time so MGPU runners can
+ wrap the stage's builder with SP/TDP (+ weight tracker) after construction.
+ """
+ if compilation_config is None:
+ return
+ cudagraph_modes = frozenset({"reduce-overhead", "max-autotune"})
+ needs_resident = compilation_config.capture or compilation_config.mode in cudagraph_modes
+ if not needs_resident or builder.keeps_gpu_resident_weights:
+ return
+ raise ValueError(
+ "CompilationConfig capture / mode=reduce-overhead|max-autotune requires a builder "
+ "with keeps_gpu_resident_weights=True (SequenceParallelBuilder / "
+ "TiledDataParallelBuilder with a weight tracker, or StreamingModelBuilder). "
+ "Plain SingleGPUModelBuilder reloads weights onto fresh GPU storages each stage, "
+ "which invalidates CUDA graphs (or repeatedly recaptures until Dynamo gives up)."
+ )
+
+
@contextmanager
def _streaming_model(
builder: StreamingModelBuilder,
@@ -145,16 +196,16 @@ def _streaming_model(
The builder's own ``cpu_slots_count`` selects RAM vs disk streaming.
``teardown()`` always runs -- it releases non-memory resources (forward
hooks, the disk I/O worker thread, open file handles) that GC would not
- reclaim promptly. ``alloc_trim_strategy=DEFER`` only skips the eager allocator
- reclaim (``to("meta")`` + ``cleanup_memory()``), leaving param storage for GC.
+ reclaim promptly. ``dispose`` always metas parameter storage; ``TRIM``
+ also runs ``cleanup_memory()``, while ``DEFER`` leaves the CUDA cache warm.
"""
wrapped = builder.build(device=target_device, dtype=dtype)
try:
yield wrapped
finally:
wrapped.teardown()
+ wrapped.dispose()
if alloc_trim_strategy == AllocatorTrimStrategy.TRIM:
- wrapped.to("meta")
cleanup_memory()
@@ -176,7 +227,11 @@ def _build_state(
initial_latent=spec.initial_latent,
)
if spec.frozen:
- state = replace(state, denoise_mask=torch.zeros_like(state.denoise_mask))
+ state = replace(
+ state,
+ denoise_mask=torch.zeros_like(state.denoise_mask),
+ frozen=True,
+ )
return state
@@ -210,6 +265,7 @@ class DiffusionStage:
quantization: QuantizationPolicy | None = None,
compilation_config: CompilationConfig | None = None,
alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
+ scale_factors: SpatioTemporalScaleFactors = VIDEO_SCALE_FACTORS,
) -> None:
"""Construct a stage from a single pre-built transformer ``builder``.
Holds only that builder plus build-time configuration (dtype, device,
@@ -218,9 +274,10 @@ class DiffusionStage:
lives in :meth:`from_checkpoint`, which is how pipelines normally create a
stage. A :class:`StreamingModelBuilder` selects the block-streaming build
path; any other builder uses the standard (all-on-GPU) path.
- ``quantization`` and ``compilation_config`` are applied lazily on the
- standard path; on the streaming path they are already baked into the
- streaming builder by :meth:`from_checkpoint` and these fields are unused.
+ ``quantization`` and ``compilation_config`` are applied lazily by
+ :meth:`_prepared_builder` on both the standard and streaming paths.
+ ``scale_factors`` are the video VAE's spatiotemporal downscaling factors,
+ defaulting to the 32x32x8 layout.
"""
self._transformer_builder = transformer_builder
self._dtype = dtype
@@ -228,6 +285,7 @@ class DiffusionStage:
self._quantization = quantization
self._compilation_config = compilation_config
self._alloc_trim_strategy = alloc_trim_strategy
+ self.video_scale_factors = scale_factors
@classmethod
def from_checkpoint( # noqa: PLR0913
@@ -243,15 +301,16 @@ class DiffusionStage:
offload_mode: OffloadMode = OffloadMode.NONE,
model_configurator: type[ModelConfigurator] = LTXModelConfigurator,
model_sd_ops: SDOps = LTXV_MODEL_COMFY_RENAMING_MAP,
+ scale_factors: SpatioTemporalScaleFactors = VIDEO_SCALE_FACTORS,
) -> "DiffusionStage":
"""Build a stage from a checkpoint path and LoRA set.
Constructs a single transformer builder from ``checkpoint_path`` +
- ``loras`` + ``quantization`` and delegates to ``__init__``. When
- ``offload_mode != OffloadMode.NONE`` that builder is a
- :class:`StreamingModelBuilder` (with quantization/compilation baked in and
- its ``cpu_slots_count`` set for the requested mode); otherwise it is the
- standard single-GPU builder. This is the high-level entry point used by
- pipelines; ``__init__`` itself takes an already-built builder.
+ ``loras`` and delegates to ``__init__``. When ``offload_mode != OffloadMode.NONE``
+ that builder is a :class:`StreamingModelBuilder` (fuse rule +
+ ``cpu_slots_count`` for the mode); otherwise it is the standard single-GPU
+ builder. Quantization and compilation stay on the stage and are applied
+ lazily at build time. This is the high-level entry point used by pipelines;
+ ``__init__`` itself takes an already-built builder.
``model_configurator`` / ``model_sd_ops`` let callers (e.g. the audio-only
T2A pipeline) override the model class configurator and the state-dict key
mapping. A quantization policy that pins its own configurator takes
@@ -272,7 +331,7 @@ class DiffusionStage:
model_class_configurator=configurator,
model_sd_ops=model_sd_ops,
loras=tuple(loras),
- registry=registry or DummyRegistry(),
+ registry=registry or ModelRegistry(cache_models=True, cache_weights=False),
)
else:
transformer_builder = cls._build_streaming_builder(
@@ -281,7 +340,7 @@ class DiffusionStage:
model_sd_ops=model_sd_ops,
loras=tuple(loras),
quantization=quantization,
- registry=registry or DummyRegistry(),
+ registry=registry or ModelRegistry(cache_models=True, cache_weights=False),
offload_mode=offload_mode,
)
@@ -292,6 +351,7 @@ class DiffusionStage:
quantization=quantization,
compilation_config=compilation_config,
alloc_trim_strategy=alloc_trim_strategy,
+ scale_factors=scale_factors,
)
@staticmethod
@@ -306,12 +366,10 @@ class DiffusionStage:
offload_mode: OffloadMode,
) -> StreamingModelBuilder:
"""Construct the streaming transformer builder for an offloading stage.
- Holds only raw config (``model_sd_ops`` / ``loras``); compilation and
- quantization are applied at build time by :meth:`_prepared_builder`, exactly
- as on the standard path -- so the builder's LoRA set stays raw and
- :meth:`with_loras` swaps it consistently. ``cpu_slots_count`` is pinned for
- the requested ``offload_mode`` (disk streaming uses a small slot count;
- CPU/RAM streaming pins every block).
+ Returns a :class:`StreamingModelBuilder` with the checkpoint path, LoRAs,
+ fuse rule (bf16 or fp8_cast), and ``cpu_slots_count`` for ``offload_mode``.
+ Compilation / quantization sd_ops and module_ops are not applied here --
+ the stage applies them lazily via :meth:`_prepared_builder`.
"""
# WeightsProvider currently only supports plain bf16 + fp8_cast LoRA fusion
# (no companion-key emission). Quantization policies that emit
@@ -333,6 +391,39 @@ class DiffusionStage:
cpu_slots_count=DISK_CPU_SLOTS if offload_mode == OffloadMode.DISK else None,
)
+ @property
+ def supports_generated_keyframes(self) -> bool:
+ """Whether this stage's checkpoint was trained with the keyframe absolute-position embedding.
+ Read from the checkpoint's transformer config, so it is answered before any weights are
+ built. Generated keyframe slots on a checkpoint without it would be denoised as unmarked
+ tokens while still costing a full latent frame of tokens each, so pipelines refuse rather
+ than silently degrade.
+ """
+ transformer_config = self._transformer_builder.model_config().get("transformer", {})
+ return bool(transformer_config.get("use_keyframes_abs_pos_embedding", False))
+
+ def assert_generated_keyframes_supported(self) -> None:
+ """Raise unless this stage's checkpoint declares the keyframe embedding.
+ Call this from a pipeline's ``__call__`` preamble, before any model is built: the answer
+ comes from the checkpoint config alone, so an unsupported request should fail immediately
+ rather than after the text encoder has been loaded. :meth:`__call__` re-checks as a backstop
+ for callers that build conditioning items directly.
+ """
+ if self.supports_generated_keyframes:
+ return
+ raise ValueError(
+ f"Generated keyframe slots were requested, but the checkpoint at "
+ f"{self._transformer_builder.checkpoint} does not set 'use_keyframes_abs_pos_embedding' "
+ f"in its transformer config, so it has no keyframe absolute-position embedding. Use a "
+ f"generated-keyframe checkpoint or drop the keyframe request."
+ )
+
+ def _assert_supports_conditionings(self, video: ModalitySpec | None) -> None:
+ if video is None or self.supports_generated_keyframes:
+ return
+ if any(isinstance(item, VideoGeneratedKeyframeSlots) for item in video.conditionings):
+ self.assert_generated_keyframes_supported()
+
def with_attention(self, attention: AttentionFunction | AttentionCallable | None) -> "DiffusionStage":
"""Return a new ``DiffusionStage`` that pins the transformer build to ``attention``.
Functional: never mutates ``self``. The returned stage shares all other
@@ -372,17 +463,18 @@ class DiffusionStage:
``StreamingModelBuilder`` stays one).
"""
builder = self._transformer_builder
+ _ensure_cudagraph_compatible_builder(builder, self._compilation_config)
sd_ops = builder.model_sd_ops
module_ops = builder.module_ops
loras = builder.loras
+ if self._quantization is not None:
+ sd_ops, module_ops = _chain_quantization(sd_ops, module_ops, self._quantization)
+ builder = builder.with_fuse_rule(self._quantization.fuse_rule)
if self._compilation_config is not None:
number_of_layers = builder.model_config()["transformer"]["num_layers"]
sd_ops, module_ops, loras = _apply_compile_ops(
sd_ops, module_ops, loras, number_of_layers, self._compilation_config
)
- if self._quantization is not None:
- sd_ops, module_ops = _chain_quantization(sd_ops, module_ops, self._quantization)
- builder = builder.with_fuse_rule(self._quantization.fuse_rule)
return builder.with_module_ops(module_ops).with_sd_ops(sd_ops).with_loras(loras)
def _build_transformer(self, *, device: torch.device | None = None, **kwargs: object) -> X0Model:
@@ -406,16 +498,8 @@ class DiffusionStage:
return self._streaming_transformer_ctx()
return gpu_model(self._build_transformer(**kwargs), alloc_trim_strategy=self._alloc_trim_strategy)
- def model_context(self, **kwargs: object) -> AbstractContextManager:
- """Build the transformer, yield it, then free its memory on exit.
- Keyword arguments are forwarded to the underlying builder (e.g.
- ``video_tools`` required by ``TiledDataParallelBuilder``).
- """
- return self._transformer_ctx(**kwargs)
-
- def run( # noqa: PLR0913
+ def __call__( # noqa: PLR0913
self,
- transformer: object,
denoiser: Denoiser,
sigmas: torch.Tensor,
noiser: Noiser,
@@ -429,17 +513,13 @@ class DiffusionStage:
loop: Callable[..., tuple[LatentState | None, LatentState | None]] | None = None,
max_batch_size: int = 1,
) -> tuple[LatentState | None, LatentState | None]:
- """Run denoising with a pre-built transformer.
- Same semantics as ``__call__`` but accepts a pre-built transformer so
- the model can be shared across multiple calls (e.g. tiled inference
- inside a single ``model_context()`` block). Audio supports
- ``ModalitySpec(frozen=True)`` to keep the latent unchanged throughout
- denoising while still providing cross-modal context to the transformer.
+ """Build transformer -> run denoising loop -> free transformer.
Returns ``(video_state | None, audio_state | None)`` with cleared
conditionings and unpatchified latents for present modalities.
"""
if video is None and audio is None:
raise ValueError("At least one of `video` or `audio` must be provided")
+ self._assert_supports_conditionings(video)
if loop is None:
loop = euler_denoising_loop
@@ -448,66 +528,17 @@ class DiffusionStage:
pixel_shape = VideoPixelShape(batch=1, frames=frames, height=height, width=width, fps=fps)
- video_state: LatentState | None = None
- video_tools: LatentTools | None = None
- if video is not None:
- v_shape = VideoLatentShape.from_pixel_shape(pixel_shape)
- video_tools = VideoLatentTools(VideoLatentPatchifier(patch_size=1), v_shape, fps)
- video_state = _build_state(video, video_tools, noiser, self._dtype, self._device)
-
- audio_state: LatentState | None = None
- audio_tools: LatentTools | None = None
- if audio is not None:
- a_shape = AudioLatentShape.from_video_pixel_shape(pixel_shape)
- audio_tools = AudioLatentTools(AudioPatchifier(patch_size=1), a_shape)
- audio_state = _build_state(audio, audio_tools, noiser, self._dtype, self._device)
-
- wrapped = BatchSplitAdapter(transformer, max_batch_size=max_batch_size) # type: ignore[arg-type]
- video_state, audio_state = loop(
- sigmas=sigmas,
- video_state=video_state,
- audio_state=audio_state,
- stepper=stepper,
- transformer=wrapped,
- denoiser=denoiser,
- )
-
- if video_state is not None and video_tools is not None:
- video_state = video_tools.clear_conditioning(video_state)
- video_state = video_tools.unpatchify(video_state)
- if audio_state is not None and audio_tools is not None:
- audio_state = audio_tools.clear_conditioning(audio_state)
- audio_state = audio_tools.unpatchify(audio_state)
-
- return video_state, audio_state
-
- def __call__( # noqa: PLR0913
- self,
- denoiser: Denoiser,
- sigmas: torch.Tensor,
- noiser: Noiser,
- width: int,
- height: int,
- frames: int,
- fps: float,
- video: ModalitySpec | None = None,
- audio: ModalitySpec | None = None,
- stepper: DiffusionStepProtocol | None = None,
- loop: Callable[..., tuple[LatentState | None, LatentState | None]] | None = None,
- max_batch_size: int = 1,
- ) -> tuple[LatentState | None, LatentState | None]:
- """Build transformer -> run denoising loop -> free transformer.
- Returns ``(video_state | None, audio_state | None)`` with cleared
- conditionings and unpatchified latents for present modalities.
- """
# Build video_tools up front so it can be forwarded to the transformer
# context (required by TiledDataParallelBuilder in multi-GPU mode).
- # `run()` rebuilds its own tools internally; the duplication is cheap.
video_tools: LatentTools | None = None
if video is not None:
- pixel_shape = VideoPixelShape(batch=1, frames=frames, height=height, width=width, fps=fps)
- v_shape = VideoLatentShape.from_pixel_shape(pixel_shape)
- video_tools = VideoLatentTools(VideoLatentPatchifier(patch_size=1), v_shape, fps)
+ v_shape = VideoLatentShape.from_pixel_shape(
+ pixel_shape,
+ scale_factors=self.video_scale_factors,
+ )
+ video_tools = VideoLatentTools(
+ VideoLatentPatchifier(patch_size=1), v_shape, fps, scale_factors=self.video_scale_factors
+ )
mode = "streaming" if self._is_streaming else "standard"
logger.info("Building transformer (%s) from %s", mode, self._transformer_builder.checkpoint)
@@ -520,22 +551,75 @@ class DiffusionStage:
frames,
fps,
)
- return self.run(
- transformer,
- denoiser,
- sigmas,
- noiser,
- width,
- height,
- frames,
- fps,
- video,
- audio,
- stepper,
- loop,
- max_batch_size,
+ video_state: LatentState | None = None
+ if video is not None and video_tools is not None:
+ video_state = _build_state(video, video_tools, noiser, self._dtype, self._device)
+
+ audio_tools: LatentTools | None = None
+ audio_state: LatentState | None = None
+ if audio is not None:
+ a_shape = AudioLatentShape.from_video_pixel_shape(pixel_shape)
+ audio_tools = AudioLatentTools(AudioPatchifier(patch_size=1), a_shape)
+ audio_state = _build_state(audio, audio_tools, noiser, self._dtype, self._device)
+
+ wrapped = BatchSplitAdapter(transformer, max_batch_size=max_batch_size) # type: ignore[arg-type]
+ video_state, audio_state = loop(
+ sigmas=sigmas,
+ video_state=video_state,
+ audio_state=audio_state,
+ stepper=stepper,
+ transformer=wrapped,
+ denoiser=denoiser,
)
+ if video_state is not None and video_tools is not None:
+ video_state = video_tools.clear_conditioning(video_state)
+ video_state = video_tools.unpatchify(video_state)
+ if audio_state is not None and audio_tools is not None:
+ audio_state = audio_tools.clear_conditioning(audio_state)
+ audio_state = audio_tools.unpatchify(audio_state)
+
+ return video_state, audio_state
+
+
+class RecordingDiffusionStage:
+ """Wraps a :class:`DiffusionStage` and records the states each call produced.
+ The supported way to reach a stage's non-video outputs -- currently the generated keyframe
+ latents on ``LatentState.generated_keyframes`` -- from *outside* a pipeline, without the
+ pipeline having to grow a diagnostics return value or a lifecycle callback. Pipelines hold
+ their stage in a plain attribute, so a caller substitutes this in::
+ pipeline.stage = RecordingDiffusionStage(pipeline.stage)
+ video, audio = pipeline(...)
+ keyframes = pipeline.stage.video_states[0].generated_keyframes
+ Delegates every other attribute to the wrapped stage, so a substituted stage stays usable
+ wherever the original was. Recording holds references to the returned states, which keeps
+ their latents alive -- fine for diagnostics on one run, not something to leave enabled in a
+ long-lived serving process.
+ """
+
+ def __init__(self, stage: DiffusionStage) -> None:
+ self._stage = stage
+ self.video_states: list[LatentState] = []
+ self.audio_states: list[LatentState | None] = []
+
+ def __call__(self, *args: object, **kwargs: object) -> tuple[LatentState | None, LatentState | None]:
+ video_state, audio_state = self._stage(*args, **kwargs) # type: ignore[arg-type]
+ if video_state is not None:
+ self.video_states.append(video_state)
+ self.audio_states.append(audio_state)
+ return video_state, audio_state
+
+ @property
+ def generated_keyframes(self) -> torch.Tensor | None:
+ """Generated keyframe latents from the first recorded call, if it produced any."""
+ for state in self.video_states:
+ if state.generated_keyframes is not None:
+ return state.generated_keyframes
+ return None
+
+ def __getattr__(self, name: str) -> object:
+ return getattr(self._stage, name)
+
# ---------------------------------------------------------------------------
# PromptEncoder
@@ -544,27 +628,52 @@ class DiffusionStage:
class PromptEncoder:
"""Owns text encoder + embeddings processor lifecycle.
- Loads Gemma, encodes prompts, frees Gemma, then loads the embeddings
- processor to produce final outputs.
+ Loads Gemma, optionally enhances then encodes prompts, frees Gemma, then loads the
+ embeddings processor. ``_enhancer_text_encoder_builder`` is always set: when enhance
+ and encode share a checkpoint it aliases ``_text_encoder_builder`` (same object /
+ residency); a distinct builder means sequential enhance-then-encode contexts.
"""
def __init__(
self,
- checkpoint_path: str,
- gemma_root: str,
+ model_paths: ModelPaths,
dtype: torch.dtype,
device: torch.device,
registry: Registry | None = None,
offload_mode: OffloadMode = OffloadMode.NONE,
text_encoder_builder: BuilderProtocol | None = None,
alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
+ prompt_enhancer_gemma_root: str | None = None,
+ enhancer_text_encoder_builder: BuilderProtocol | None = None,
) -> None:
- self._gemma_root = gemma_root
- self._checkpoint_path = checkpoint_path
+ text_encoder_path = model_paths.text_encoder()
+ embeddings_paths = model_paths.embeddings_weight_paths
+ if not embeddings_paths:
+ raise ValueError(
+ "PromptEncoder requires ModelPaths.embeddings_weight_paths "
+ "(transformer checkpoint and, in split mode, the text-encoder file)."
+ )
+ self._text_encoder_path = text_encoder_path
+ self._embeddings_paths = embeddings_paths
self._dtype = dtype
self._device = device
self._offload_mode = offload_mode
self._alloc_trim_strategy = alloc_trim_strategy
+ self._prompt_enhancer_gemma_root = prompt_enhancer_gemma_root
+
+ registry = registry or ModelRegistry(cache_models=True, cache_weights=False)
+ self._registry = registry
+
+ if text_encoder_builder is not None:
+ encode_type = text_encoder_builder.model_config().get("model_type") or gemma_model_type(text_encoder_path)
+ else:
+ encode_type = gemma_model_type(text_encoder_path)
+ if encode_type not in _ENCODE_MODEL_TYPES:
+ raise ValueError(
+ f"Encode root model_type={encode_type!r} is not supported for encoding; "
+ f"expected one of {sorted(_ENCODE_MODEL_TYPES)}."
+ )
+ self._encode_model_type = encode_type
if text_encoder_builder is not None:
if offload_mode != OffloadMode.NONE:
@@ -575,37 +684,56 @@ class PromptEncoder:
self._text_encoder_builder = text_encoder_builder
self._streaming_text_encoder_builder = None
else:
- module_ops = module_ops_from_gemma_root(gemma_root)
- model_folder = find_matching_file(gemma_root, "model*.safetensors").parent
- weight_paths = [str(p) for p in model_folder.rglob("*.safetensors")]
+ gemma_sd_ops, gemma_module_ops = get_gemma_ops(text_encoder_path)
+ weight_paths = resolve_gemma_weight_paths(text_encoder_path)
self._text_encoder_builder = Builder(
- model_path=tuple(weight_paths),
- model_class_configurator=GemmaTextEncoderConfigurator,
- model_sd_ops=GEMMA_LLM_KEY_OPS,
- module_ops=(GEMMA_MODEL_OPS, *module_ops),
- registry=registry or DummyRegistry(),
+ model_path=weight_paths,
+ model_class_configurator=GemmaTextEncoderConfigurator.with_gemma_model_path(text_encoder_path),
+ model_sd_ops=gemma_sd_ops,
+ module_ops=gemma_module_ops,
+ registry=registry,
)
self._streaming_text_encoder_builder = StreamingModelBuilder(
- model_path=tuple(weight_paths),
- model_class_configurator=GemmaTextEncoderConfigurator,
- model_sd_ops=GEMMA_LLM_KEY_OPS,
- module_ops=(GEMMA_MODEL_OPS, *module_ops),
- registry=registry or DummyRegistry(),
+ model_path=weight_paths,
+ model_class_configurator=GemmaTextEncoderConfigurator.with_gemma_model_path(text_encoder_path),
+ model_sd_ops=gemma_sd_ops,
+ module_ops=gemma_module_ops,
+ registry=registry,
blocks_attr="model.model.language_model.layers",
blocks_prefix="model.model.language_model.layers",
cpu_slots_count=DISK_CPU_SLOTS if offload_mode == OffloadMode.DISK else None,
)
+
+ # Always set: shared enhance aliases the encode builder (same object / residency).
+ if enhancer_text_encoder_builder is not None:
+ self._enhancer_text_encoder_builder = enhancer_text_encoder_builder
+ elif prompt_enhancer_gemma_root is not None and prompt_enhancer_gemma_root != text_encoder_path:
+ enhancer_sd_ops, enhancer_module_ops = get_gemma_ops(prompt_enhancer_gemma_root)
+ enhancer_paths = resolve_gemma_weight_paths(prompt_enhancer_gemma_root)
+ self._enhancer_text_encoder_builder = Builder(
+ model_path=enhancer_paths,
+ model_class_configurator=GemmaTextEncoderConfigurator.with_gemma_model_path(prompt_enhancer_gemma_root),
+ model_sd_ops=enhancer_sd_ops,
+ module_ops=enhancer_module_ops,
+ registry=registry,
+ )
+ else:
+ self._enhancer_text_encoder_builder = self._text_encoder_builder
+
self._embeddings_processor_builder = Builder(
- model_path=checkpoint_path,
- model_class_configurator=EmbeddingsProcessorConfigurator,
+ model_path=embeddings_paths,
+ model_class_configurator=EmbeddingsProcessorConfigurator.with_gemma_model_path(text_encoder_path),
model_sd_ops=EMBEDDINGS_PROCESSOR_KEY_OPS,
- registry=registry or DummyRegistry(),
+ registry=registry,
)
def _build_text_encoder(self) -> torch.nn.Module:
"""Build the Gemma text encoder (non-streaming path)."""
return self._text_encoder_builder.build(device=self._device, dtype=self._dtype).eval()
+ def _build_enhancer_text_encoder(self) -> torch.nn.Module:
+ return self._enhancer_text_encoder_builder.build(device=self._device, dtype=self._dtype).eval()
+
def _build_embeddings_processor(self) -> EmbeddingsProcessor:
"""Build the embeddings processor on the target device."""
return self._embeddings_processor_builder.build(device=self._device, dtype=self._dtype).eval()
@@ -624,17 +752,40 @@ class PromptEncoder:
enhance_first_prompt: bool = False,
enhance_prompt_image: str | None = None,
enhance_prompt_seed: int = 42,
+ enhance_static_cache: bool = False,
) -> list[EmbeddingsProcessorOutput]:
"""Encode *prompts* through Gemma -> embeddings processor, freeing each model after use."""
- logger.info("Building text encoder from %s", self._gemma_root)
+ prompts = list(prompts)
+ enhance_kwargs = {
+ "image_path": enhance_prompt_image,
+ "seed": enhance_prompt_seed,
+ "static_cache": enhance_static_cache,
+ }
+ separate_enhancer = self._enhancer_text_encoder_builder is not self._text_encoder_builder
+
+ if enhance_first_prompt and separate_enhancer:
+ logger.info(
+ "Enhancing with separate Gemma%s",
+ f" from {self._prompt_enhancer_gemma_root}" if self._prompt_enhancer_gemma_root else "",
+ )
+ with gpu_model(
+ self._build_enhancer_text_encoder(),
+ alloc_trim_strategy=self._alloc_trim_strategy,
+ ) as enhancer:
+ prompts[0] = generate_enhanced_prompt(enhancer, prompts[0], **enhance_kwargs)
+ elif enhance_first_prompt and self._encode_model_type != "gemma3":
+ raise ValueError(
+ f"Prompt enhancement with encode root model_type={self._encode_model_type!r} "
+ "requires --prompt-enhancer-gemma-root pointing at a generative instruct checkpoint "
+ "(e.g. gemma3 or gemma4 E2B-it)."
+ )
+
+ logger.info("Building text encoder from %s", self._text_encoder_path)
with self._text_encoder_ctx() as text_encoder:
- if enhance_first_prompt:
- prompts = list(prompts)
- prompts[0] = generate_enhanced_prompt(
- text_encoder, prompts[0], enhance_prompt_image, seed=enhance_prompt_seed
- )
+ if enhance_first_prompt and not separate_enhancer:
+ prompts[0] = generate_enhanced_prompt(text_encoder, prompts[0], **enhance_kwargs)
raw_outputs = text_encoder.encode(prompts)
- logger.info("Text encoder done, building embeddings processor from %s", self._checkpoint_path)
+ logger.info("Text encoder done, building embeddings processor from %s", self._embeddings_paths)
with gpu_model(
self._build_embeddings_processor(), alloc_trim_strategy=self._alloc_trim_strategy
@@ -644,14 +795,151 @@ class PromptEncoder:
return result
+# ---------------------------------------------------------------------------
+# DurationPredictor
+# ---------------------------------------------------------------------------
+
+
+class DurationPredictor:
+ """Predicts shot duration (in frames) from ``PromptEncoder`` output.
+ Unlike most blocks, the model is held directly rather than rebuilt on every call:
+ DurationHead is a few MB, so there's no memory pressure motivating the
+ build-on-call / free-on-exit pattern used for the large transformer/VAE blocks.
+ Construct via :meth:`from_checkpoint`.
+ """
+
+ def __init__(self, head: DurationHead) -> None:
+ """Construct from an already-built, already-loaded head."""
+ self._head = head
+
+ @classmethod
+ def from_checkpoint(
+ cls,
+ checkpoint_path: str | None,
+ dtype: torch.dtype,
+ device: torch.device,
+ model_configurator: type[ModelConfigurator[DurationHead]] = DurationHeadConfigurator,
+ model_sd_ops: SDOps = DURATION_HEAD_KEY_OPS,
+ ) -> "DurationPredictor | None":
+ """Build a predictor from a checkpoint path, or ``None`` if unavailable.
+ Returns ``None`` when ``checkpoint_path`` is ``None`` (split pack without a
+ duration-head file), or when the file has no DurationHead weights (pre-2.5 /
+ gemma3 monoliths). The underlying loader uses ``strict=False``, so a missing
+ head does not raise -- it silently leaves parameters on the meta device;
+ checked here so callers get ``None`` instead of a predictor that would crash
+ later.
+ No registry: the head is a few MB, so there's no benefit to caching its weights or
+ shell across pipeline instances the way the large transformer/VAE builders do.
+ """
+ if checkpoint_path is None:
+ return None
+ builder = Builder(
+ model_path=checkpoint_path,
+ model_class_configurator=model_configurator,
+ model_sd_ops=model_sd_ops,
+ )
+ head = builder.build(device=device, dtype=dtype).eval()
+ if any(param.is_meta for param in head.parameters()):
+ logger.info(
+ "No DurationHead weights found in %s; auto-duration prediction unavailable.",
+ checkpoint_path,
+ )
+ return None
+ return cls(head)
+
+ def __call__(
+ self,
+ video_encoding: torch.Tensor | None,
+ audio_encoding: torch.Tensor | None,
+ *,
+ frame_rate: float,
+ min_seconds: float = 1.0,
+ max_seconds: float = 20.0,
+ ) -> int:
+ """Predict a frame count from caption connector tokens, snapped to the VAE's grid.
+ ``min_seconds``/``max_seconds`` clamp the prediction so a misbehaving prediction can't
+ request a degenerate or OOM-sized generation; the defaults are 1s and 20s. The result is
+ a frame count snapped to the VAE's ``8k + 1`` causal temporal grid. Callers doing offline
+ analysis of raw predictions (rather than feeding a real generation) can pass a much wider
+ range to see the unclamped duration.
+ """
+ if video_encoding is None and audio_encoding is None:
+ raise ValueError("DurationPredictor requires at least one of video_encoding / audio_encoding")
+ seconds_pred = self._head(video_encoding, audio_encoding)
+ if seconds_pred.shape != (1,):
+ raise ValueError(
+ f"DurationPredictor only supports a single-item batch, got prediction shape {tuple(seconds_pred.shape)}"
+ )
+ seconds = seconds_pred.item()
+ min_frames = round(min_seconds * frame_rate)
+ max_frames = round(max_seconds * frame_rate)
+ num_frames = seconds_to_clamped_num_frames(
+ seconds, frame_rate=frame_rate, min_frames=min_frames, max_frames=max_frames
+ )
+ if seconds > max_seconds or seconds < min_seconds:
+ logger.warning(
+ "DurationHead prediction clamped: raw %.2fs outside [%.2fs, %.2fs], using %.2fs (%d frames) @ %.2f fps",
+ seconds,
+ min_seconds,
+ max_seconds,
+ num_frames / frame_rate,
+ num_frames,
+ frame_rate,
+ )
+ else:
+ logger.info("DurationHead predicted %.2fs (%d frames @ %.2f fps)", seconds, num_frames, frame_rate)
+ return num_frames
+
+
+def require_num_frames_source(num_frames: int | AutoDuration, duration_predictor: DurationPredictor | None) -> None:
+ """Guard against an unsatisfiable auto-duration request.
+ Call at the very top of a pipeline's ``__call__`` -- before prompt encoding or any other
+ work -- so a checkpoint without DurationHead weights (anything predating 2.5) fails fast
+ with a clear message instead of after paying for work whose result would be discarded.
+ """
+ if isinstance(num_frames, AutoDuration) and duration_predictor is None:
+ raise ValueError(
+ "num_frames was AutoDuration but this checkpoint has no DurationHead weights to "
+ "auto-predict duration from (DurationHead ships from LTX 2.5 / gemma4 onward). "
+ "Pass num_frames explicitly."
+ )
+
+
+def resolve_num_frames(
+ num_frames: int | AutoDuration,
+ duration_predictor: DurationPredictor | None,
+ *,
+ video_encoding: torch.Tensor | None,
+ audio_encoding: torch.Tensor | None,
+ frame_rate: float,
+) -> int:
+ """Resolve ``num_frames`` to a concrete frame count, predicting it if ``AutoDuration``.
+ Call after prompt encoding (once ``video_encoding``/``audio_encoding`` exist) and after
+ ``require_num_frames_source`` has already validated a predictor is available when needed.
+ """
+ if not isinstance(num_frames, AutoDuration):
+ return num_frames
+ return duration_predictor(
+ video_encoding,
+ audio_encoding,
+ frame_rate=frame_rate,
+ min_seconds=num_frames.min_seconds,
+ max_seconds=num_frames.max_seconds,
+ )
+
+
# ---------------------------------------------------------------------------
# ImageConditioner
# ---------------------------------------------------------------------------
class ImageConditioner:
- """Owns video encoder lifecycle.
+ """Owns video encoder lifecycle, and the CRF image conditionings are re-compressed at.
Builds the encoder, passes it to the user-supplied callable, then frees it.
+ Also the single place that knows what H.264 CRF an image conditioning should be
+ re-compressed at: that value is a property of the model generation, and this block
+ already holds the checkpoint it belongs to. Pipelines call ``resolve_crf`` so callers
+ may omit the CRF and still condition the way the model was trained.
"""
def __init__(
@@ -662,16 +950,38 @@ class ImageConditioner:
registry: Registry | None = None,
alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
) -> None:
+ self._checkpoint_path = checkpoint_path
+ self._default_image_crf: int | None = None
self._dtype = dtype
self._device = device
self._encoder_builder = Builder(
model_path=checkpoint_path,
model_class_configurator=VideoEncoderConfigurator,
model_sd_ops=VAE_ENCODER_COMFY_KEYS_FILTER,
- registry=registry or DummyRegistry(),
+ registry=registry or ModelRegistry(cache_models=True, cache_weights=False),
)
self._alloc_trim_strategy = alloc_trim_strategy
+ @property
+ def default_image_crf(self) -> int:
+ """The H.264 CRF image conditionings should be re-compressed at for this checkpoint.
+ Read from the checkpoint's ``model_version`` metadata (see ``detect_params``) rather
+ than hardcoded, because the value the model was trained with changed between
+ generations. Resolved on first use and cached, so a run without image conditionings
+ never reads the header.
+ """
+ if self._default_image_crf is None:
+ self._default_image_crf = detect_params(self._checkpoint_path).default_image_crf
+ return self._default_image_crf
+
+ def resolve_crf(self, images: Sequence[ImageConditioningInput]) -> list[ImageConditioningInput]:
+ """Fill in ``default_image_crf`` for every conditioning that left its CRF unset (``crf=None``).
+ Call near the top of a pipeline's ``__call__``: omitting the CRF then means "use what
+ matches this model", while an explicitly passed CRF (including ``0`` for no
+ re-compression) is always honoured.
+ """
+ return [image if image.crf is not None else image._replace(crf=self.default_image_crf) for image in images]
+
def _build_encoder(self) -> VideoEncoder:
return self._encoder_builder.build(device=self._device, dtype=self._dtype).eval()
@@ -705,12 +1015,12 @@ class VideoUpsampler:
model_path=checkpoint_path,
model_class_configurator=VideoEncoderConfigurator,
model_sd_ops=VAE_ENCODER_COMFY_KEYS_FILTER,
- registry=registry or DummyRegistry(),
+ registry=registry or ModelRegistry(cache_models=True, cache_weights=False),
)
self._upsampler_builder = Builder(
model_path=upsampler_path,
model_class_configurator=LatentUpsamplerConfigurator,
- registry=registry or DummyRegistry(),
+ registry=registry or ModelRegistry(cache_models=True, cache_weights=False),
)
self._alloc_trim_strategy = alloc_trim_strategy
@@ -749,31 +1059,84 @@ class VideoDecoder:
memory_efficient: bool = True,
decoder_builder: BuilderProtocol | None = None,
alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
) -> None:
self._checkpoint_path = checkpoint_path
self._dtype = dtype
self._device = device
+ self._diffvae_optimization = diffvae_optimization
+ diffusion_vae = is_diffusion_video_vae(self._checkpoint_path)
+ cfg = diffvae_optimization.resolve() if diffusion_vae else None
+ use_dsl = cfg is not None and cfg.attention is NAttentionKind.BLACKWELL_DSL
if decoder_builder is not None:
self._decoder_builder = decoder_builder
else:
+ if diffusion_vae and use_dsl and not na_dsl_available():
+ raise RuntimeError(
+ "diffvae_optimization=blackwell_dsl needs a datacenter Blackwell GPU and "
+ "nvidia-cutlass-dsl (uv sync --group kernels)"
+ )
+ sd_ops = (
+ video_decoder_sd_ops_for_checkpoint(
+ self._checkpoint_path,
+ diffusion_vae=True,
+ na_dsl_kernel=use_dsl,
+ )
+ if diffusion_vae
+ else VAE_DECODER_COMFY_KEYS_FILTER
+ )
+ module_ops: tuple[ModuleOps, ...] = ()
+ # channels-last + memory-efficient decode apply to ConvVideoDecoder only
+ if memory_efficient and not diffusion_vae:
+ sd_ops = SDOps(
+ name=f"sd_ops_chain_{sd_ops.name}+{CHANNELS_LAST_3D_WEIGHTS.name}",
+ mapping=(*sd_ops.mapping, *CHANNELS_LAST_3D_WEIGHTS.mapping),
+ )
+ module_ops = (MEMORY_EFFICIENT_DECODE,)
self._decoder_builder = Builder(
- model_path=checkpoint_path,
+ model_path=self._checkpoint_path,
model_class_configurator=VideoDecoderConfigurator,
- model_sd_ops=VAE_DECODER_COMFY_KEYS_FILTER,
- registry=registry or DummyRegistry(),
- module_ops=(MEMORY_EFFICIENT_DECODE,) if memory_efficient else (),
+ model_sd_ops=sd_ops,
+ registry=registry or ModelRegistry(cache_models=True, cache_weights=False),
+ module_ops=module_ops,
+ )
+ # DiffVAE ModuleOps from ``diffvae_optimization`` policy (default ChunkedEager).
+ # MGPU wraps this builder in ``DistributedDecoderBuilder`` — keep the op on the
+ # inner builder so it still runs before the distributed wrapper is constructed.
+ if diffusion_vae:
+ op = build_diffvae_mode_op(
+ diffvae_optimization,
+ CompilationConfig() if diffvae_optimization.resolve().compile_blocks else None,
+ )
+ self._decoder_builder = self._decoder_builder.with_module_ops(
+ (*self._decoder_builder.module_ops, op),
)
self._alloc_trim_strategy = alloc_trim_strategy
+ @property
+ def checkpoint_path(self) -> str:
+ return self._checkpoint_path
+
+ @property
+ def diffvae_optimization(self) -> DiffVAEMode:
+ return self._diffvae_optimization
+
def __call__(
self,
latent: torch.Tensor,
tiling_config: TilingConfig | None = None,
generator: torch.Generator | None = None,
+ *,
+ dtype: torch.dtype | None = None,
) -> Iterator[torch.Tensor]:
- """Decode *latent* to pixel-space video chunks. Decoder freed after exhaustion."""
+ """Decode *latent* to pixel-space video chunks. Decoder freed after exhaustion.
+ ``dtype`` overrides the constructor dtype for this call only (e.g. float32 for
+ HDR raw-in/raw-out). Omitted → same dtype as on construction (SDR default).
+ """
+ build_dtype = self._dtype if dtype is None else dtype
+ latent = latent.to(dtype=build_dtype)
logger.info("Building video decoder from %s", self._checkpoint_path)
- decoder = self._decoder_builder.build(device=self._device, dtype=self._dtype).eval()
+ decoder = self._decoder_builder.build(device=self._device, dtype=build_dtype).eval()
return _cleanup_iter(
decoder.decode_video(latent, tiling_config, generator),
decoder,
@@ -804,13 +1167,13 @@ class AudioDecoder:
model_path=checkpoint_path,
model_class_configurator=AudioDecoderConfigurator,
model_sd_ops=AUDIO_VAE_DECODER_COMFY_KEYS_FILTER,
- registry=registry or DummyRegistry(),
+ registry=registry or ModelRegistry(cache_models=True, cache_weights=False),
)
self._vocoder_builder = Builder(
model_path=checkpoint_path,
model_class_configurator=VocoderConfigurator,
model_sd_ops=VOCODER_COMFY_KEYS_FILTER,
- registry=registry or DummyRegistry(),
+ registry=registry or ModelRegistry(cache_models=True, cache_weights=False),
)
self._alloc_trim_strategy = alloc_trim_strategy
@@ -861,7 +1224,7 @@ class AudioConditioner:
model_path=checkpoint_path,
model_class_configurator=AudioEncoderConfigurator,
model_sd_ops=AUDIO_VAE_ENCODER_COMFY_KEYS_FILTER,
- registry=registry or DummyRegistry(),
+ registry=registry or ModelRegistry(cache_models=True, cache_weights=False),
)
def __call__(self, fn: Callable[[torch.nn.Module], T]) -> T:
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/color_conversion.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/color_conversion.py
deleted file mode 100644
index 937acce..0000000
--- a/packages/ltx-pipelines/src/ltx_pipelines/utils/color_conversion.py
+++ /dev/null
@@ -1,224 +0,0 @@
-"""Color space conversion utilities for video encoding.
-Provides GPU-accelerated RGB to YUV420 conversion that runs between the
-VAE decoder (which yields float RGB chunks) and ``encode_video``, bypassing
-pyav's CPU-side libswscale conversion. The ``FrameConverter`` also carries
-the codec metadata (pixel format, colour space, colour range) that
-``encode_video`` needs to tag the output stream.
-"""
-
-from __future__ import annotations
-
-import enum
-from collections.abc import Callable
-from dataclasses import dataclass, field
-
-import torch
-
-
-class ColorSpace(enum.Enum):
- """YUV color space standard."""
-
- BT_709 = "bt709"
- BT_2020_NCL = "bt2020ncl"
-
- @property
- def av_colorspace(self) -> int:
- """FFmpeg ``AVCOL_SPC_*`` constant for ``codec_context.colorspace``."""
- return _AV_COLORSPACE[self]
-
-
-class ColorRange(enum.Enum):
- """YUV color range."""
-
- MPEG = "mpeg"
- JPEG = "jpeg"
-
- @property
- def av_color_range(self) -> int:
- """FFmpeg ``AVCOL_RANGE_*`` constant for ``codec_context.color_range``."""
- return _AV_COLOR_RANGE[self]
-
-
-class PixelFormat(enum.Enum):
- """Pixel format for video frames."""
-
- RGB24 = "rgb24"
- YUV420P = "yuv420p"
-
- @property
- def av_format(self) -> str:
- """PyAV format string for ``VideoFrame.from_ndarray``."""
- return self.value
-
-
-_AV_COLORSPACE = {
- ColorSpace.BT_709: 1, # AVCOL_SPC_BT709
- ColorSpace.BT_2020_NCL: 9, # AVCOL_SPC_BT2020_NCL
-}
-
-_AV_COLOR_RANGE = {
- ColorRange.MPEG: 1, # AVCOL_RANGE_MPEG (limited)
- ColorRange.JPEG: 2, # AVCOL_RANGE_JPEG (full)
-}
-
-# BT.709 RGB->YUV matrix (row-major: each row produces one of Y, U, V)
-_BT709_MATRIX = torch.tensor(
- [
- [0.2126, 0.7152, 0.0722],
- [-0.1146, -0.3854, 0.5],
- [0.5, -0.4542, -0.0458],
- ],
- dtype=torch.float32,
-)
-
-# BT.2020 NCL RGB->YUV matrix
-_KR_2020 = 0.2627
-_KG_2020 = 0.6780
-_KB_2020 = 0.0593
-_BT2020_MATRIX = torch.tensor(
- [
- [_KR_2020, _KG_2020, _KB_2020],
- [-_KR_2020 / 1.8814, -_KG_2020 / 1.8814, 0.5],
- [0.5, -_KG_2020 / 1.4746, -_KB_2020 / 1.4746],
- ],
- dtype=torch.float32,
-)
-
-_COLOR_SPACE_MATRICES = {
- ColorSpace.BT_709: _BT709_MATRIX,
- ColorSpace.BT_2020_NCL: _BT2020_MATRIX,
-}
-
-
-@dataclass(frozen=True)
-class FrameConverter:
- """Converts ``[*, C, H, W]`` float ``[0, 1]`` frames to uint8.
- Carries encoding metadata so ``encode_video`` can derive pixel format,
- color space, and color range from the converter itself.
- The ``fn_`` callable **may mutate its input** (PyTorch trailing-underscore
- convention). Callers that need to keep the original ``frames`` afterwards
- must pass ``frames.clone()``. Inside ``encode_video``'s per-chunk
- generator each chunk is consumed once, so direct passthrough is safe.
- """
-
- pixel_format: PixelFormat
- fn_: Callable[[torch.Tensor], torch.Tensor] = field(repr=False)
- color_space: ColorSpace | None = None
- color_range: ColorRange | None = None
-
- def __call__(self, frames: torch.Tensor) -> torch.Tensor:
- return self.fn_(frames)
-
-
-def rgb_to_yuv(image: torch.Tensor, color_space: ColorSpace) -> torch.Tensor:
- """Convert an RGB image to YUV.
- The image data is assumed to be in the range of ``[0, 1]``.
- Uses a single matrix multiply for better memory locality.
- Args:
- image: RGB image with shape ``(*, 3, H, W)``.
- color_space: Color space standard for the conversion matrix.
- Returns:
- YUV image with shape ``(*, 3, H, W)``.
- """
- if len(image.shape) < 3 or image.shape[-3] != 3:
- raise ValueError(f"Input size must have a shape of (*, 3, H, W). Got {image.shape}")
-
- mat = _COLOR_SPACE_MATRICES[color_space].to(device=image.device, dtype=image.dtype)
- # [*, 3, H, W] -> [*, H, W, 3] @ [3, 3]^T -> [*, H, W, 3] -> [*, 3, H, W]
- pixels = image.movedim(-3, -1) # [*, H, W, 3]
- yuv = pixels @ mat.T # [*, H, W, 3]
- return yuv.movedim(-1, -3) # [*, 3, H, W]
-
-
-def apply_color_range_(y: torch.Tensor, uv: torch.Tensor, color_range: ColorRange) -> tuple[torch.Tensor, torch.Tensor]:
- """Scale Y and UV planes to the specified color range, in-place.
- Args:
- y: Luma plane in ``[0, 1]``.
- uv: Chroma planes centered at 0.
- color_range: Target color range.
- Returns:
- Scaled ``(Y, UV)`` tensors (modified in-place).
- """
- if color_range == ColorRange.MPEG:
- y.mul_(219).add_(16)
- uv.mul_(224).add_(128)
- elif color_range == ColorRange.JPEG:
- y.mul_(255)
- uv.add_(0.5).mul_(255)
- else:
- raise ValueError(f"Unsupported color range: {color_range}")
- return y, uv
-
-
-def rgb_to_yuv420(
- image: torch.Tensor, color_space: ColorSpace, color_range: ColorRange
-) -> tuple[torch.Tensor, torch.Tensor]:
- """Convert an RGB image to YUV 4:2:0 with chroma subsampling.
- Chroma is subsampled by averaging 2x2 pixel blocks (chroma siting
- ``(128, 128)``).
- Args:
- image: RGB image with shape ``(*, 3, H, W)`` in ``[0, 1]``.
- H and W must be divisible by 2.
- color_space: Color space standard.
- color_range: Color range for the output.
- Returns:
- ``(Y, UV)`` where Y has shape ``(*, 1, H, W)`` and UV has shape
- ``(*, 2, H//2, W//2)``.
- """
- if len(image.shape) < 3 or image.shape[-3] != 3:
- raise ValueError(f"Input size must have a shape of (*, 3, H, W). Got {image.shape}")
- if image.shape[-2] % 2 != 0 or image.shape[-1] % 2 != 0:
- raise ValueError(f"Input H and W must be divisible by 2. Got {image.shape}")
-
- yuv = rgb_to_yuv(image, color_space)
- y = yuv[..., :1, :, :]
- # Subsample chroma: average 2x2 blocks via avg_pool2d (contiguous, fused kernel)
- uv_full = yuv[..., 1:3, :, :].contiguous()
- # Flatten leading dims for avg_pool2d which expects [N, C, H, W]
- lead = uv_full.shape[:-3]
- uv_flat = uv_full.reshape(-1, 2, uv_full.shape[-2], uv_full.shape[-1])
- uv = torch.nn.functional.avg_pool2d(uv_flat, kernel_size=2, stride=2)
- uv = uv.reshape(*lead, 2, uv.shape[-2], uv.shape[-1])
-
- return apply_color_range_(y, uv, color_range)
-
-
-def pack_i420(y: torch.Tensor, uv: torch.Tensor) -> torch.Tensor:
- """Pack Y and UV planes into I420 layout for pyav.
- I420 packs the three planes into a single 2D array of height ``H * 3 // 2``
- and width ``W``. The Y plane occupies the first ``H`` rows. The UV tensor
- ``(*, 2, H//2, W//2)`` is reshaped to ``(*, H//2, W)`` -- U rows packed
- two-by-two followed by V rows packed two-by-two -- and appended below.
- Args:
- y: Luma with shape ``(*, 1, H, W)``.
- uv: Chroma with shape ``(*, 2, H//2, W//2)``.
- Returns:
- Packed tensor with shape ``(*, H*3//2, W)`` uint8.
- """
- y_plane = y[..., 0, :, :] # [*, H, W]
- uv_packed = uv.reshape(*uv.shape[:-3], uv.shape[-2], uv.shape[-1] * 2) # [*, H//2, W]
- packed = torch.cat([y_plane, uv_packed], dim=-2) # [*, H*3//2, W]
- return packed.clamp_(0, 255).to(torch.uint8)
-
-
-def _rgb_uint8_fn_(frames: torch.Tensor) -> torch.Tensor:
- """In-place: mutates ``frames`` via ``clamp_`` + ``mul_``, returns a uint8 view."""
- return frames.clamp_(0.0, 1.0).mul_(255.0).to(torch.uint8).movedim(-3, -1)
-
-
-rgb_uint8_converter_ = FrameConverter(pixel_format=PixelFormat.RGB24, fn_=_rgb_uint8_fn_)
-"""``(*, 3, H, W)`` float ``[0, 1]`` to ``(*, H, W, 3)`` uint8. Mutates input."""
-
-
-def _yuv420p_bt709_fn_(frames: torch.Tensor) -> torch.Tensor:
- y, uv = rgb_to_yuv420(frames, ColorSpace.BT_709, ColorRange.MPEG)
- return pack_i420(y, uv)
-
-
-yuv420p_bt709_converter_ = FrameConverter(
- pixel_format=PixelFormat.YUV420P,
- fn_=_yuv420p_bt709_fn_,
- color_space=ColorSpace.BT_709,
- color_range=ColorRange.MPEG,
-)
-"""``(*, 3, H, W)`` float ``[0, 1]`` to ``(*, H*3//2, W)`` uint8 YUV420p BT.709 MPEG."""
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/constants.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/constants.py
index 99d7090..da63617 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/utils/constants.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/constants.py
@@ -5,6 +5,7 @@ import torch
from safetensors import safe_open
from ltx_core.components.guiders import MultiModalGuiderParams
+from ltx_core.loader import parse_model_version
from ltx_core.types import SpatioTemporalScaleFactors
# =============================================================================
@@ -28,6 +29,13 @@ TDP_DISTILLED_SIGMAS = torch.tensor([0.625, 0.4, 0.0])
# Pipeline Parameters
# =============================================================================
+# H.264 CRF an image conditioning is re-compressed at, matching the compression the model was
+# trained against. This is a property of the model generation, not a code-level fallback -- reach it
+# through ``PipelineParams.default_image_crf`` (see ``detect_params``), which is what a pipeline's
+# ``ImageConditioner`` resolves an unset ``ImageConditioningInput.crf`` against.
+DEFAULT_IMAGE_CRF = 33
+LTX_2_4_IMAGE_CRF = 18
+
@dataclass(frozen=True)
class PipelineParams:
@@ -37,6 +45,7 @@ class PipelineParams:
num_frames: int = 121
frame_rate: float = 24.0
num_inference_steps: int = 40
+ default_image_crf: int = DEFAULT_IMAGE_CRF
video_guider_params: MultiModalGuiderParams = field(
default_factory=lambda: MultiModalGuiderParams(
cfg_scale=3.0,
@@ -77,6 +86,12 @@ LTX_2_3_PARAMS = replace(
video_guider_params=replace(LTX_2_PARAMS.video_guider_params, stg_blocks=[28]),
audio_guider_params=replace(LTX_2_PARAMS.audio_guider_params, stg_blocks=[28]),
)
+
+
+# HQ preset: Res2s sampler, fewer steps, STG off. A plain constant on purpose -- it overrides
+# every knob that varies between generations, so there is nothing for it to inherit from a
+# detected checkpoint. The one generation-dependent value, ``default_image_crf``, is resolved from
+# checkpoint by the pipeline's ``ImageConditioner``, not read off this object.
LTX_2_3_HQ_PARAMS = PipelineParams(
num_inference_steps=15,
stage_1_height=1088 // 2,
@@ -100,18 +115,33 @@ LTX_2_3_HQ_PARAMS = PipelineParams(
)
DEFAULT_LORA_STRENGTH = 1.0
-DEFAULT_IMAGE_CRF = 33
VIDEO_SCALE_FACTORS = SpatioTemporalScaleFactors.default()
VIDEO_LATENT_CHANNELS = 128
-_LTX_2_3_MODEL_VERSION_PREFIX = "2.3"
+# 2.4 continues the 2.3 lineage, so it inherits 2.3's knobs (30 steps, STG on block 28) and
+# only moves the image CRF. Deriving it from LTX_2_PARAMS instead would silently hand a 2.4
+# checkpoint the 2.0 step count and STG block.
+LTX_2_4_PARAMS = replace(LTX_2_3_PARAMS, default_image_crf=LTX_2_4_IMAGE_CRF)
+
+# Params per model generation, newest first. A checkpoint gets the params of the newest
+# generation it is at or above, so an unrecognised *newer* version inherits the closest
+# known one instead of silently falling back to the 2.0 defaults. Adding a generation is
+# one row; anything older than every row falls through to LTX_2_PARAMS.
+_PARAMS_SINCE_VERSION: tuple[tuple[tuple[int, ...], PipelineParams], ...] = (
+ ((2, 4), LTX_2_4_PARAMS),
+ ((2, 3), LTX_2_3_PARAMS),
+)
-def detect_params(checkpoint_path: str) -> PipelineParams:
- """Detect pipeline params from checkpoint metadata.
- Reads the ``model_version`` field from the safetensors config metadata.
- Returns ``LTX_2_3_PARAMS`` when the version starts with "2.3",
- otherwise falls back to ``LTX_2_PARAMS``.
+def detect_model_version(checkpoint_path: str) -> tuple[int, ...]:
+ """Read a checkpoint's ``model_version`` metadata as comparable numeric components.
+ Returns ``()`` -- which compares below every real version -- when the field is unset,
+ unparseable, or the file cannot be read, so callers get their oldest fallback.
+ This is the single place that turns a checkpoint path into a version tuple: it owns both
+ the metadata read and the separator normalization that ``parse_model_version`` documents
+ but deliberately leaves to its callers. Use it for any "is this checkpoint at least
+ generation X" question; ``detect_params`` is the same read specialised to per-generation
+ parameter defaults.
"""
logger = logging.getLogger(__name__)
@@ -120,13 +150,32 @@ def detect_params(checkpoint_path: str) -> PipelineParams:
metadata = f.metadata() or {}
version = metadata.get("model_version", "")
except Exception:
- logger.warning("Could not read checkpoint metadata from %s, using LTX-2 defaults", checkpoint_path)
- return LTX_2_PARAMS
+ logger.warning(
+ "Could not read checkpoint metadata from %s, treating it as unversioned",
+ checkpoint_path,
+ )
+ return ()
+
+ # Pre-release tags come both dot- and hyphen-separated ("2.3.rc1", "2.4-rc2"); normalizing
+ # the separator maps a release candidate onto the generation it is a candidate for.
+ parsed = parse_model_version(version.replace("-", "."))
+ logger.info("Checkpoint declares model_version=%s (parsed as %s)", version or "unknown", parsed)
+ return parsed
+
- if version.startswith(_LTX_2_3_MODEL_VERSION_PREFIX):
- return LTX_2_3_PARAMS
+def detect_params(checkpoint_path: str) -> PipelineParams:
+ """Detect pipeline params from checkpoint metadata.
+ Reads the ``model_version`` field from the safetensors config metadata and returns the
+ params of the newest generation that version is at or above, falling back to
+ ``LTX_2_PARAMS`` for older, unset, or unreadable versions.
+ Does not log: ``detect_model_version`` already reports the version it read, and which
+ generation's params that selects follows from it.
+ """
+ parsed = detect_model_version(checkpoint_path)
+ for since, params in _PARAMS_SINCE_VERSION:
+ if parsed >= since:
+ return params
- logger.info("Using LTX_2_PARAMS for checkpoint (version=%s)", version or "unknown")
return LTX_2_PARAMS
@@ -135,6 +184,7 @@ def detect_params(checkpoint_path: str) -> PipelineParams:
# =============================================================================
DEFAULT_NEGATIVE_PROMPT = (
+ "has_subtitles, has_blurbox, transition from black, transition to black, speech_ending_short, "
"blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise, "
"grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones, "
"deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands, "
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/denoisers.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/denoisers.py
index 2aaf3c9..7be1190 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/utils/denoisers.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/denoisers.py
@@ -51,6 +51,10 @@ def _repeat_state(state: LatentState, n: int) -> LatentState:
positions=_repeat(state.positions),
clean_latent=_repeat(state.clean_latent),
attention_mask=_repeat(state.attention_mask) if state.attention_mask is not None else None,
+ keyframes_mask=_repeat(state.keyframes_mask) if state.keyframes_mask is not None else None,
+ # Token layout is identical across guidance passes, so the layout carries over unchanged.
+ generated_keyframe_layout=state.generated_keyframe_layout,
+ frozen=state.frozen,
)
@@ -228,9 +232,19 @@ class SimpleDenoiser:
sigmas: torch.Tensor,
step_index: int,
) -> tuple[DenoisedLatentResult | None, DenoisedLatentResult | None]:
+ # Modality.sigma is (B,); expand the scalar schedule value per modality so a rank-stable
+ # sigma reaches the (compiled) block instead of a 0-d scalar that recompiles on sigma.ndim.
sigma = sigmas[step_index]
- pos_video = modality_from_latent_state(video_state, self.v_context, sigma) if video_state is not None else None
- pos_audio = modality_from_latent_state(audio_state, self.a_context, sigma) if audio_state is not None else None
+ pos_video = (
+ modality_from_latent_state(video_state, self.v_context, sigma.expand(video_state.latent.shape[0]))
+ if video_state is not None
+ else None
+ )
+ pos_audio = (
+ modality_from_latent_state(audio_state, self.a_context, sigma.expand(audio_state.latent.shape[0]))
+ if audio_state is not None
+ else None
+ )
denoised_video, denoised_audio = transformer(video=pos_video, audio=pos_audio, perturbations=None)
return (
DenoisedLatentResult.result_or_none(denoised=denoised_video),
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/gpu_model.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/gpu_model.py
index e8616bc..bf3d5c5 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/utils/gpu_model.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/gpu_model.py
@@ -2,34 +2,33 @@ from collections.abc import Iterator
from contextlib import contextmanager
from typing import TypeVar
-import torch
-
+from ltx_core.allocator_trim_strategy import AllocatorTrimStrategy
from ltx_core.devices import synchronize_device
-from ltx_pipelines.utils.allocator_trim_strategy import AllocatorTrimStrategy
+from ltx_core.model.disposable import DisposableProtocol
from ltx_pipelines.utils.helpers import cleanup_memory
-_M = TypeVar("_M", bound=torch.nn.Module)
+_M = TypeVar("_M", bound=DisposableProtocol)
@contextmanager
def gpu_model(model: _M, alloc_trim_strategy: AllocatorTrimStrategy = AllocatorTrimStrategy.TRIM) -> Iterator[_M]:
"""Context manager that yields a model and releases its memory on exit.
- On ``TRIM`` (default): synchronize, move parameters/buffers to the ``meta``
- device (releasing GPU+CPU storage), then ``cleanup_memory()`` to return
- cached blocks to the OS. ``DEFER`` skips this -- the model's storage is
- reclaimed by normal GC and the CUDA caching allocator stays warm for the
- next build (cheaper for back-to-back runs).
+ Always calls ``model.dispose()`` so parameter / persistent-buffer storage
+ moves to meta (shell-safe; fused LoRA weights do not linger on a cached
+ module). ``TRIM`` (default) also synchronizes and ``cleanup_memory()`` to
+ return cached blocks to the OS. ``DEFER`` skips sync / ``empty_cache`` so
+ the CUDA caching allocator stays warm for the next build.
Usage::
with gpu_model(build_encoder()) as encoder:
... # use encoder -- typed as the concrete class
- # GPU + CPU memory freed automatically
+ # parameter storage released; TRIM also returns cached blocks to the OS
"""
try:
yield model
finally:
if alloc_trim_strategy == AllocatorTrimStrategy.TRIM:
synchronize_device()
- # .to("meta") releases storage for all parameters/buffers regardless
- # of their original device (CUDA or CPU).
- model.to("meta")
+ model.dispose()
cleanup_memory()
+ else:
+ model.dispose()
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py
index 7a6a70e..a0bd85a 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py
@@ -1,4 +1,5 @@
import logging
+from collections.abc import Sequence
import torch
@@ -7,24 +8,45 @@ from ltx_core.conditioning import (
ConditioningItem,
VideoConditionByKeyframeIndex,
VideoConditionByLatentIndex,
+ VideoGeneratedKeyframeSlots,
)
-from ltx_core.devices import cleanup_accelerator_memory, get_preferred_device
+from ltx_core.devices import cleanup_accelerator_memory, cuda_activation_budget_bytes, get_preferred_device
+from ltx_core.loader.sft_loader import SafetensorsModelStateDictLoader
from ltx_core.model.audio_vae import encode_audio
from ltx_core.model.transformer import Modality
-from ltx_core.model.video_vae import TilingConfig, VideoEncoder
-from ltx_core.text_encoders.gemma import GemmaTextEncoder
+from ltx_core.model.video_vae import AUTO_TILING, AutoTiling, TileSizeConfig, TilingConfig, VideoEncoder
+from ltx_core.model.video_vae.diffusion_tiling import recommended_decode_tiling_config
+from ltx_core.model.video_vae.model_configurator import (
+ diffvae_tiling_geometry_from_vae_config,
+ estimate_diffusion_decoder_weight_bytes,
+ is_diffusion_video_vae,
+)
+from ltx_core.model.video_vae.transformer.config import DiffVAEMode
+from ltx_core.text_encoders.gemma import LTXGemmaTextEncoder
+from ltx_core.tiling import DimensionSizeConfig
from ltx_core.tools import LatentTools
-from ltx_core.types import AudioLatentShape, LatentState, VideoLatentShape, VideoPixelShape
+from ltx_core.types import (
+ VIDEO_SCALE_FACTORS,
+ AudioLatentShape,
+ LatentState,
+ SpatioTemporalScaleFactors,
+ VideoLatentShape,
+ VideoPixelShape,
+)
from ltx_pipelines.utils.args import ImageConditioningInput
from ltx_pipelines.utils.media_io import (
+ ResizeMode,
decode_audio_from_file,
decode_image,
decode_video_from_file,
get_videostream_fps,
+ is_exr_dir,
+ load_exr_folder_conditioning_hdr,
load_image_and_preprocess,
resize_aspect_ratio_preserving,
video_preprocess,
)
+from ltx_pipelines.utils.media_io.color_config import HDRColorSpace
def get_device() -> torch.device:
@@ -35,6 +57,95 @@ def cleanup_memory() -> None:
cleanup_accelerator_memory()
+# Historical Conv VAE ``TilingConfig.default()`` spatial long-side + temporal chunk
+# (main ``latent_tile_splitters`` aspect-coupled a single 768px tile to H/W).
+_CONV_AUTO_LONG_SIDE = DimensionSizeConfig(tile_size=768, overlap=64)
+_CONV_AUTO_FRAMES = DimensionSizeConfig(tile_size=80, overlap=24)
+
+
+def tiling_scale_factors_for_vae(vae_checkpoint_path: str) -> SpatioTemporalScaleFactors:
+ """Scale factors decode will pass to ``to_splitters`` for this checkpoint."""
+ if not is_diffusion_video_vae(vae_checkpoint_path):
+ return VIDEO_SCALE_FACTORS
+ metadata = SafetensorsModelStateDictLoader().metadata(vae_checkpoint_path)
+ vae_config = metadata.get("config", {}).get("vae", {})
+ return diffvae_tiling_geometry_from_vae_config(vae_config)["pixel_scale"]
+
+
+def tiling_config_for_vae(
+ vae_checkpoint_path: str,
+ *,
+ height: int,
+ width: int,
+ num_frames: int,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
+ device: torch.device | None = None,
+ free_bytes: int | None = None,
+) -> TilingConfig:
+ """Decode tiling for pipelines.
+ Conv VAE: aspect-coupled long-side 768/64 + temporal 80/24.
+ DiffVAE: halo/memory-aware :func:`recommended_decode_tiling_config`.
+ """
+ if not is_diffusion_video_vae(vae_checkpoint_path):
+ _ = num_frames # API parity with DiffVAE; Conv auto layout is aspect-only.
+ return TileSizeConfig.from_long_side(
+ long_side=_CONV_AUTO_LONG_SIDE,
+ height=height,
+ width=width,
+ scale_factors=VIDEO_SCALE_FACTORS,
+ frames=_CONV_AUTO_FRAMES,
+ )
+
+ metadata = SafetensorsModelStateDictLoader().metadata(vae_checkpoint_path)
+ vae_config = metadata.get("config", {}).get("vae", {})
+ geometry = diffvae_tiling_geometry_from_vae_config(vae_config)
+ model_bytes = estimate_diffusion_decoder_weight_bytes(vae_checkpoint_path)
+
+ if free_bytes is None:
+ dev = device if device is not None else get_device()
+ free_bytes = cuda_activation_budget_bytes(dev) if dev.type == "cuda" and torch.cuda.is_available() else 0
+
+ return recommended_decode_tiling_config(
+ **geometry,
+ height=height,
+ width=width,
+ num_frames=num_frames,
+ mode=diffvae_optimization,
+ free_bytes=free_bytes,
+ model_bytes=model_bytes,
+ )
+
+
+def ensure_tiling_config(
+ tiling_config: TilingConfig | AutoTiling | None,
+ *,
+ scale_factors: SpatioTemporalScaleFactors,
+ video_shape: VideoPixelShape,
+ vae_checkpoint_path: str,
+ diffvae_optimization: DiffVAEMode = DiffVAEMode.CHUNKED_EAGER,
+ device: torch.device | None = None,
+ free_bytes: int | None = None,
+) -> TilingConfig | None:
+ """Resolve pipeline tiling: ``AUTO_TILING`` → recommend; ``None`` → untiled; else validate.
+ ``scale_factors`` must be the same factors decode will pass to ``to_splitters``
+ (from :func:`tiling_scale_factors_for_vae`). Call only after ``video_shape.frames`` is known.
+ """
+ if tiling_config is None:
+ return None
+ if tiling_config is AUTO_TILING:
+ return tiling_config_for_vae(
+ vae_checkpoint_path,
+ height=video_shape.height,
+ width=video_shape.width,
+ num_frames=video_shape.frames,
+ diffvae_optimization=diffvae_optimization,
+ device=device,
+ free_bytes=free_bytes,
+ )
+ tiling_config.validate(scale_factors, video_shape)
+ return tiling_config
+
+
def _conform_latent_length(latent: torch.Tensor, expected_frames_count: int) -> torch.Tensor:
actual_frames = latent.shape[2]
if actual_frames > expected_frames_count:
@@ -60,30 +171,65 @@ def video_latent_from_file(
start_time: float = 0.0,
max_duration: float | None = None,
tiling_config: TilingConfig | None = None,
+ color_space: HDRColorSpace | None = None,
) -> torch.Tensor | None:
- """Load video from a file, and construct the video latent conforming to video output shape.
+ """Load video from a file or EXR-frame folder, and encode to latents.
Args:
video_encoder: Model used to encode pixel frames to latent space.
- file_path: Path to the video file.
+ file_path: Path to a video file, or a directory of ``*.exr`` frames
+ (HDR; requires ``color_space`` from ``--hdr``).
output_shape: Target pixel shape (height, width, frames, fps) for the conditioning.
device: Device to run the encoder and hold tensors on.
dtype: Dtype for the output latents.
start_time: Start time in seconds to begin reading the video (default 0.0).
max_duration: Maximum duration in seconds. If None, uses output_shape.frames at
output_shape.fps (default None).
- tiling_config: Tiling configuration for the encoder. Defaults to TilingConfig.default().
+ tiling_config: Tiling configuration for the encoder. Defaults to
+ ``TileSizeConfig.default()`` (independent H=W=768).
+ color_space: HDR colour space when *file_path* is an EXR folder.
+ Ignored for regular video files.
Returns:
Encoded video latents of shape (1, C, T, H, W) with T = required_latent_frames, or
None (currently this function always returns a tensor).
"""
- fps = get_videostream_fps(file_path)
- if fps != output_shape.fps:
- raise ValueError(f"Input video FPS {fps} does not match output FPS {output_shape.fps}, not supported")
+ fps = output_shape.fps
max_duration = max_duration or output_shape.frames / fps
- frame_gen = decode_video_from_file(path=file_path, device=device, start_time=start_time, max_duration=max_duration)
- frames = video_preprocess(frame_gen, output_shape.height, output_shape.width, dtype, device)
- latents = video_encoder.tiled_encode(frames, tiling_config or TilingConfig.default())
- required_latent_frames = VideoLatentShape.from_pixel_shape(output_shape).frames
+ if is_exr_dir(file_path):
+ if color_space is None:
+ raise ValueError(
+ "EXR input requires --hdr {SRGB_LINEAR,ACESCG,ACESCCT} to declare the source colour space."
+ )
+ # Center-crop matches the SDR video_preprocess path used for mp4 inputs.
+ frame_start = round(start_time * fps)
+ frame_cap = max(1, round(max_duration * fps))
+ frames = torch.cat(
+ list(
+ load_exr_folder_conditioning_hdr(
+ exr_dir=file_path,
+ height=output_shape.height,
+ width=output_shape.width,
+ frame_cap=frame_cap,
+ dtype=dtype,
+ device=device,
+ color_space=color_space,
+ resize_mode=ResizeMode.CENTER_CROP,
+ frame_start=frame_start,
+ )
+ ),
+ dim=2,
+ )
+ else:
+ src_fps = get_videostream_fps(file_path)
+ if src_fps != output_shape.fps:
+ raise ValueError(f"Input video FPS {src_fps} does not match output FPS {output_shape.fps}, not supported")
+ frame_gen = decode_video_from_file(
+ path=file_path, device=device, start_time=start_time, max_duration=max_duration
+ )
+ frames = video_preprocess(frame_gen, output_shape.height, output_shape.width, dtype, device)
+ latents = video_encoder.tiled_encode(frames, tiling_config or TileSizeConfig.default())
+ required_latent_frames = VideoLatentShape.from_pixel_shape(
+ output_shape, scale_factors=video_encoder.video_scale_factors
+ ).frames
return _conform_latent_length(latents, required_latent_frames)
@@ -100,6 +246,7 @@ def audio_latent_from_file(
Args:
audio_encoder: Model used to encode audio to latent space.
file_path: Path to the audio or video file containing an audio stream.
+ EXR-frame folders have no audio and return ``None``.
output_shape: Target video pixel shape; used to derive required latent frames
and, when max_duration is None, the audio duration (output_shape.frames / fps).
device: Device to run the encoder and hold tensors on.
@@ -111,6 +258,8 @@ def audio_latent_from_file(
Encoded audio latents of shape (1, C, T, ...) with T = required_latent_frames, or
None if the file has no audio stream.
"""
+ if is_exr_dir(file_path):
+ return None
max_duration = max_duration or output_shape.frames / output_shape.fps
audio_in = decode_audio_from_file(file_path, device, start_time, max_duration)
if audio_in is None:
@@ -127,6 +276,7 @@ def combined_image_conditionings(
video_encoder: VideoEncoder,
dtype: torch.dtype,
device: torch.device,
+ color_space: HDRColorSpace | None = None,
) -> list[ConditioningItem]:
"""Create a list of conditionings by replacing the latent at the first frame with the encoded image if present
and using other encoded images as the keyframe conditionings."""
@@ -139,6 +289,7 @@ def combined_image_conditionings(
dtype=dtype,
device=device,
crf=img.crf,
+ color_space=color_space,
)
encoded_image = video_encoder(image)
if img.frame_idx == 0:
@@ -164,6 +315,7 @@ def image_conditionings_by_replacing_latent(
video_encoder: VideoEncoder,
dtype: torch.dtype,
device: torch.device,
+ color_space: HDRColorSpace | None = None,
) -> list[ConditioningItem]:
conditionings = []
for img in images:
@@ -174,6 +326,7 @@ def image_conditionings_by_replacing_latent(
dtype=dtype,
device=device,
crf=img.crf,
+ color_space=color_space,
)
encoded_image = video_encoder(image)
conditionings.append(
@@ -194,6 +347,7 @@ def image_conditionings_by_adding_guiding_latent(
video_encoder: VideoEncoder,
dtype: torch.dtype,
device: torch.device,
+ color_space: HDRColorSpace | None = None,
) -> list[ConditioningItem]:
conditionings = []
for img in images:
@@ -204,6 +358,7 @@ def image_conditionings_by_adding_guiding_latent(
dtype=dtype,
device=device,
crf=img.crf,
+ color_space=color_space,
)
encoded_image = video_encoder(image)
conditionings.append(
@@ -212,6 +367,64 @@ def image_conditionings_by_adding_guiding_latent(
return conditionings
+def evenly_spaced_keyframe_positions(num_keyframes: int, num_frames: int) -> list[int]:
+ """Interior pixel-frame positions for *num_keyframes* generated keyframes. Endpoints excluded."""
+ if num_keyframes < 0:
+ raise ValueError(f"num_keyframes must be non-negative, got {num_keyframes}")
+ if num_keyframes == 0:
+ return []
+ if num_frames < num_keyframes + 2:
+ raise ValueError(
+ f"Generated keyframes need at least num_keyframes + 2 target frames, got "
+ f"num_keyframes={num_keyframes}, num_frames={num_frames}"
+ )
+ return torch.linspace(0, num_frames - 1, num_keyframes + 2).round().to(torch.int64).tolist()[1:-1]
+
+
+def has_generated_keyframes(generated_keyframes: int | Sequence[int]) -> bool:
+ """Whether a ``generated_keyframes`` request asks for any slots.
+ Callers must not test the argument's truthiness directly: a ``Sequence`` may be a tensor or an
+ array, whose truth value is ambiguous and raises.
+ """
+ if isinstance(generated_keyframes, int):
+ return generated_keyframes > 0
+ return len(generated_keyframes) > 0
+
+
+def resolve_generated_keyframes(
+ generated_keyframes: int | Sequence[int],
+ num_frames: int,
+) -> list[int]:
+ """Normalize the pipeline-level ``generated_keyframes`` argument to pixel-frame indices.
+ An ``int`` requests that many evenly spaced interior keyframes; a sequence gives the target
+ pixel-frame indices explicitly. ``0`` / empty means the feature is off.
+ """
+ if isinstance(generated_keyframes, int):
+ return evenly_spaced_keyframe_positions(generated_keyframes, num_frames)
+
+ positions = sorted({int(position) for position in generated_keyframes})
+ if positions and (positions[0] < 0 or positions[-1] >= num_frames):
+ raise ValueError(
+ f"Generated keyframe positions must lie in [0, {num_frames}), got "
+ f"{sorted(int(p) for p in generated_keyframes)}"
+ )
+ return positions
+
+
+def generated_keyframe_conditionings(
+ generated_keyframes: int | Sequence[int],
+ num_frames: int,
+) -> list[ConditioningItem]:
+ """Build the generated-keyframe conditioning, or an empty list when the feature is off.
+ All slots go into one :class:`VideoGeneratedKeyframeSlots` so their tokens form a single
+ contiguous, exactly-locatable range.
+ """
+ positions = resolve_generated_keyframes(generated_keyframes, num_frames)
+ if not positions:
+ return []
+ return [VideoGeneratedKeyframeSlots(pixel_frame_indices=positions)]
+
+
def create_noised_state(
tools: LatentTools,
conditionings: list[ConditioningItem],
@@ -259,7 +472,12 @@ def modality_from_latent_state(
"""Create a Modality from a latent state.
Constructs a Modality object with the latent state's data, timesteps derived
from the denoise mask and sigma, positions, and the provided context.
+ When ``state.frozen`` is True, ``Modality.sigma`` is forced to 0 so prompt AdaLN
+ and cross-modality gates match frozen conditioning (per-token timesteps are
+ already zeroed via ``denoise_mask``).
"""
+ if state.frozen:
+ sigma = torch.zeros_like(sigma)
return Modality(
enabled=enabled,
latent=state.latent,
@@ -269,6 +487,7 @@ def modality_from_latent_state(
context=context,
context_mask=None,
attention_mask=state.attention_mask,
+ keyframes_mask=state.keyframes_mask,
)
@@ -299,22 +518,22 @@ def clean_response(text: str) -> str:
def generate_enhanced_prompt(
- text_encoder: GemmaTextEncoder,
+ text_encoder: LTXGemmaTextEncoder,
prompt: str,
image_path: str | None = None,
image_long_side: int = 896,
seed: int = 42,
+ static_cache: bool = False,
) -> str:
"""Generate an enhanced prompt from a text encoder and a prompt."""
- image = None
if image_path:
image = decode_image(image_path=image_path)
image = torch.tensor(image)
image = resize_aspect_ratio_preserving(image, image_long_side).to(torch.uint8)
- prompt = text_encoder.enhance_i2v(prompt, image, seed=seed)
+ prompt = text_encoder.enhance_i2v(prompt, image, seed=seed, static_cache=static_cache)
else:
- prompt = text_encoder.enhance_t2v(prompt, seed=seed)
- logging.info(f"Enhanced prompt: {prompt}")
+ prompt = text_encoder.enhance_t2v(prompt, seed=seed, static_cache=static_cache)
+ logging.info("Enhanced prompt: %s", prompt)
return clean_response(prompt)
@@ -330,3 +549,37 @@ def assert_resolution(height: int, width: int, is_two_stage: bool) -> None:
f"For {'two-stage' if is_two_stage else 'one-stage'} pipelines, "
f"height and width must be multiples of {divisor}."
)
+
+
+def snap_frames_to_grid(frames: int, scale_factors: SpatioTemporalScaleFactors = VIDEO_SCALE_FACTORS) -> int:
+ """Round ``frames`` down to the nearest ``k * scale_factors.time + 1``.
+ The model's frame count must satisfy ``(frames - 1) % scale_factors.time == 0``
+ (causal VAE temporal grid).
+ """
+ if frames < 1:
+ raise ValueError(f"frames must be >= 1, got {frames}")
+ time_scale = scale_factors.time
+ return ((frames - 1) // time_scale) * time_scale + 1
+
+
+def seconds_to_clamped_num_frames(
+ seconds: float,
+ *,
+ frame_rate: float,
+ min_frames: int = 1,
+ max_frames: int = 1024,
+ scale_factors: SpatioTemporalScaleFactors = VIDEO_SCALE_FACTORS,
+) -> int:
+ """Convert a duration in seconds to a frame count snapped to the VAE's temporal grid.
+ Outlier durations are clamped to ``[min_frames, max_frames]`` (before snapping) so a
+ misbehaving prediction can't request an OOM-sized generation. Snapping floors to the
+ grid, which can undershoot ``min_frames``; when that happens the result is snapped up
+ to the next grid point instead, so the ``[min_frames, max_frames]`` contract always holds.
+ """
+ raw_frames = round(seconds * frame_rate)
+ raw_frames = max(min_frames, min(raw_frames, max_frames))
+ frames = snap_frames_to_grid(raw_frames, scale_factors)
+ if frames < min_frames:
+ time_scale = scale_factors.time
+ frames = min(-(-(min_frames - 1) // time_scale) * time_scale + 1, max_frames)
+ return frames
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py
deleted file mode 100644
index bd9cfd9..0000000
--- a/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py
+++ /dev/null
@@ -1,813 +0,0 @@
-import enum
-import logging
-import math
-import threading
-from collections.abc import Generator, Iterator
-from fractions import Fraction
-from io import BytesIO
-from pathlib import Path
-from queue import Queue
-
-import av
-import numpy as np
-import OpenImageIO
-import torch
-from einops import rearrange
-from PIL import Image
-from torch._prims_common import DeviceLikeType
-from tqdm import tqdm
-
-from ltx_core.hdr import LogC3
-from ltx_core.types import Audio, VideoPixelShape
-from ltx_pipelines.utils.color_conversion import FrameConverter, PixelFormat, yuv420p_bt709_converter_
-from ltx_pipelines.utils.constants import DEFAULT_IMAGE_CRF
-
-logger = logging.getLogger(__name__)
-
-
-class ResizeMode(enum.Enum):
- """How to fit a conditioning video to the target resolution."""
-
- CENTER_CROP = "center_crop"
- REFLECT_PAD = "reflect_pad"
-
-
-def resize_aspect_ratio_preserving(image: torch.Tensor, long_side: int) -> torch.Tensor:
- """
- Resize image preserving aspect ratio (filling target long side).
- Preserves the input dimensions order.
- Args:
- image: Input image tensor with shape (F (optional), H, W, C)
- long_side: Target long side size.
- Returns:
- Tensor with shape (F (optional), H, W, C) F = 1 if input is 3D, otherwise input shape[0]
- """
- height, width = image.shape[-3:2]
- max_side = max(height, width)
- scale = long_side / float(max_side)
- target_height = int(height * scale)
- target_width = int(width * scale)
- resized = resize_and_center_crop(image, target_height, target_width)
- # rearrange and remove batch dimension
- result = rearrange(resized, "b c f h w -> b f h w c")[0]
- # preserve input dimensions
- return result[0] if result.shape[0] == 1 else result
-
-
-def resize_and_center_crop(tensor: torch.Tensor, height: int, width: int) -> torch.Tensor:
- """
- Resize tensor preserving aspect ratio (filling target), then center crop to exact dimensions.
- Args:
- latent: Input tensor with shape (H, W, C) or (F, H, W, C)
- height: Target height
- width: Target width
- Returns:
- Tensor with shape (1, C, 1, height, width) for 3D input or (1, C, F, height, width) for 4D input
- """
- if tensor.ndim == 3:
- tensor = rearrange(tensor, "h w c -> 1 c h w")
- elif tensor.ndim == 4:
- tensor = rearrange(tensor, "f h w c -> f c h w")
- else:
- raise ValueError(f"Expected input with 3 or 4 dimensions; got shape {tensor.shape}.")
-
- _, _, src_h, src_w = tensor.shape
-
- scale = max(height / src_h, width / src_w)
- # Use ceil to avoid floating-point rounding causing new_h/new_w to be
- # slightly smaller than target, which would result in negative crop offsets.
- new_h = math.ceil(src_h * scale)
- new_w = math.ceil(src_w * scale)
-
- tensor = torch.nn.functional.interpolate(tensor, size=(new_h, new_w), mode="bilinear", align_corners=False)
-
- crop_top = (new_h - height) // 2
- crop_left = (new_w - width) // 2
- tensor = tensor[:, :, crop_top : crop_top + height, crop_left : crop_left + width]
-
- tensor = rearrange(tensor, "f c h w -> 1 c f h w")
- return tensor
-
-
-def normalize_images(images: torch.Tensor, device: torch.device, dtype: torch.dtype) -> torch.Tensor:
- return (images / 127.5 - 1.0).to(device=device, dtype=dtype)
-
-
-def to_vae_range(x: torch.Tensor) -> torch.Tensor:
- """Map [0, 1] to [-1, 1] (VAE input convention)."""
- return torch.clamp(x, 0.0, 1.0) * 2.0 - 1.0
-
-
-def from_vae_range(z: torch.Tensor) -> torch.Tensor:
- """Map [-1, 1] (VAE output convention) to [0, 1]."""
- return torch.clamp((z + 1.0) / 2.0, 0.0, 1.0)
-
-
-def load_image_and_preprocess(
- image_path: str,
- height: int,
- width: int,
- dtype: torch.dtype,
- device: torch.device,
- crf: int = DEFAULT_IMAGE_CRF,
-) -> torch.Tensor:
- """
- Loads an image from a path and preprocesses it for conditioning.
- Note: The image is resized to the nearest multiple of 2 for compatibility with video codecs.
- """
- image = decode_image(image_path=image_path)
- image = preprocess(image=image, crf=crf)
- image = torch.tensor(image, dtype=torch.float32, device=device)
- image = resize_and_center_crop(image, height, width)
- image = normalize_images(image, device, dtype)
- return image
-
-
-def video_preprocess(
- frames: Generator[torch.Tensor],
- height: int,
- width: int,
- dtype: torch.dtype,
- device: torch.device,
-) -> torch.Tensor:
- """Preprocesses a video frame generator for conditioning.
- Args:
- frames: Generator of video frames as tensors of shape (1, H, W, C), dtype uint8.
- height: Target height in pixels.
- width: Target width in pixels.
- dtype: Target dtype for the output tensor.
- device: Target device for the output tensor.
- Returns:
- Tensor of shape (1, C, F, height, width) with values in [-1, 1].
- """
- result: torch.Tensor | None = None
- for f in frames:
- frame = resize_and_center_crop(f.to(torch.float32), height, width)
- frame = normalize_images(frame, device, dtype)
- result = frame if result is None else torch.cat([result, frame], dim=2)
- if result is None:
- raise ValueError("video_preprocess received an empty frame generator; no frames were decoded from the source.")
- return result
-
-
-def align_resolution(
- width: int,
- height: int,
- resize_mode: ResizeMode,
- divisor: int = 64,
-) -> tuple[int, int, int, int]:
- """Compute aligned generation dimensions and crop-back size.
- Args:
- width: Source video width (need not be aligned).
- height: Source video height (need not be aligned).
- resize_mode: CENTER_CROP rounds down; REFLECT_PAD rounds up.
- divisor: Alignment divisor (default 64 for two-stage pipelines).
- Returns:
- ``(gen_width, gen_height, crop_width, crop_height)`` where
- ``gen_*`` are multiples of *divisor* and ``crop_*`` are the
- original dimensions to trim back to after decoding. When no
- cropping is needed ``crop_*`` equals ``gen_*``.
- """
- if resize_mode is ResizeMode.REFLECT_PAD:
- gen_w = ((width + divisor - 1) // divisor) * divisor
- gen_h = ((height + divisor - 1) // divisor) * divisor
- else:
- gen_w = (width // divisor) * divisor
- gen_h = (height // divisor) * divisor
-
- crop_w = width if gen_w != width else gen_w
- crop_h = height if gen_h != height else gen_h
- return gen_w, gen_h, crop_w, crop_h
-
-
-def resize_and_reflect_pad(tensor: torch.Tensor, height: int, width: int) -> torch.Tensor:
- """Resize tensor to fit within target, then reflect-pad to exact dimensions.
- Unlike resize_and_center_crop which stretches and crops, this preserves the
- original aspect ratio and pads the shorter dimension with reflected pixels.
- When the target is already >= the source in both dimensions, interpolation
- is skipped entirely to preserve original pixels.
- Args:
- tensor: Input with shape (H, W, C) or (F, H, W, C)
- height: Target height
- width: Target width
- Returns:
- Tensor with shape (1, C, 1, height, width) for 3D or (1, C, F, height, width) for 4D
- """
- if tensor.ndim == 3:
- tensor = rearrange(tensor, "h w c -> 1 c h w")
- elif tensor.ndim == 4:
- tensor = rearrange(tensor, "f h w c -> f c h w")
- else:
- raise ValueError(f"Expected input with 3 or 4 dimensions; got shape {tensor.shape}.")
-
- _, _, src_h, src_w = tensor.shape
-
- if height >= src_h and width >= src_w:
- new_h, new_w = src_h, src_w
- else:
- scale = min(height / src_h, width / src_w)
- new_h = round(src_h * scale)
- new_w = round(src_w * scale)
- tensor = torch.nn.functional.interpolate(tensor, size=(new_h, new_w), mode="bilinear", align_corners=False)
-
- pad_bottom = height - new_h
- pad_right = width - new_w
- if pad_bottom > 0 or pad_right > 0:
- pad_mode = "reflect" if pad_bottom < new_h and pad_right < new_w else "replicate"
- tensor = torch.nn.functional.pad(tensor, (0, pad_right, 0, pad_bottom), mode=pad_mode)
-
- tensor = rearrange(tensor, "f c h w -> 1 c f h w")
- return tensor
-
-
-def load_video_conditioning_hdr(
- video_path: str,
- height: int,
- width: int,
- frame_cap: int,
- dtype: torch.dtype,
- device: torch.device,
- hdr_transform: str = "logc3",
- resize_mode: ResizeMode = ResizeMode.CENTER_CROP,
-) -> Iterator[torch.Tensor]:
- """Load a video and yield preprocessed frames for HDR IC-LoRA conditioning.
- Decodes through the standard path and applies the LDR compression that
- matches training. Callers are responsible for providing Rec.709 SDR
- input — the HDR IC-LoRA was trained on that color space.
- Args:
- hdr_transform: LDR-compression name (currently only ``logc3``).
- resize_mode: How to fit the video to the target resolution.
- Yields:
- Per-frame tensors of shape ``(1, C, 1, height, width)``.
- """
- if hdr_transform != "logc3":
- raise ValueError(f"Unsupported HDR transform: {hdr_transform}")
-
- resize_fn = resize_and_reflect_pad if resize_mode is ResizeMode.REFLECT_PAD else resize_and_center_crop
-
- for f in decode_video_by_frame(path=video_path, frame_cap=frame_cap, device=device):
- frame = resize_fn(f.to(torch.float32), height, width)
- ldr = (frame / 255.0).clamp(0.0, 1.0)
- compressed = LogC3().compress_ldr(ldr)
- yield to_vae_range(compressed).to(device=device, dtype=dtype)
-
-
-def decode_image(image_path: str) -> np.ndarray:
- image = Image.open(image_path)
- np_array = np.array(image)[..., :3]
- return np_array
-
-
-def _validate_audio_waveform(audio: Audio) -> None:
- """Raise ValueError if the waveform is empty or not stereo ``(2, N)`` / ``(N, 2)``."""
- samples = audio.waveform
- if samples.numel() == 0:
- raise ValueError("audio.waveform is empty; pass audio=None for no audio.")
- if samples.ndim != 2 or 2 not in samples.shape:
- raise ValueError(f"audio.waveform must be stereo (2, N) or (N, 2); got shape {tuple(samples.shape)}.")
-
-
-def _normalize_audio_waveform(samples: torch.Tensor) -> torch.Tensor:
- """Transpose a validated stereo waveform to channel-last ``(N, 2)``."""
- return samples.T if samples.shape[1] != 2 else samples
-
-
-def _write_audio(container: av.container.Container, audio_stream: av.audio.AudioStream, audio: Audio) -> None:
- samples = _normalize_audio_waveform(audio.waveform)
-
- # Convert to int16 packed for ingestion; resampler converts to encoder fmt.
- if samples.dtype != torch.int16:
- samples = torch.clip(samples, -1.0, 1.0)
- samples = (samples * 32767.0).to(torch.int16)
-
- frame_in = av.AudioFrame.from_ndarray(
- samples.contiguous().reshape(1, -1).cpu().numpy(),
- format="s16",
- layout="stereo",
- )
- frame_in.sample_rate = audio.sampling_rate
-
- _resample_audio(container, audio_stream, frame_in)
-
-
-def _prepare_audio_stream(container: av.container.Container, audio_sample_rate: int) -> av.audio.AudioStream:
- """
- Prepare the audio stream for writing.
- """
- audio_stream = container.add_stream("aac", rate=audio_sample_rate)
- audio_stream.codec_context.sample_rate = audio_sample_rate
- audio_stream.codec_context.layout = "stereo"
- audio_stream.codec_context.time_base = Fraction(1, audio_sample_rate)
- return audio_stream
-
-
-def _resample_audio(
- container: av.container.Container, audio_stream: av.audio.AudioStream, frame_in: av.AudioFrame
-) -> None:
- cc = audio_stream.codec_context
-
- # Use the encoder's format/layout/rate as the *target*
- target_format = cc.format or "fltp" # AAC → usually fltp
- target_layout = cc.layout or "stereo"
- target_rate = cc.sample_rate or frame_in.sample_rate
-
- audio_resampler = av.audio.resampler.AudioResampler(
- format=target_format,
- layout=target_layout,
- rate=target_rate,
- )
-
- audio_next_pts = 0
- for rframe in audio_resampler.resample(frame_in):
- if rframe.pts is None:
- rframe.pts = audio_next_pts
- audio_next_pts += rframe.samples
- rframe.sample_rate = frame_in.sample_rate
- container.mux(audio_stream.encode(rframe))
-
- # flush audio encoder
- for packet in audio_stream.encode():
- container.mux(packet)
-
-
-def encode_video(
- video: torch.Tensor | Iterator[torch.Tensor],
- fps: int,
- audio: Audio | None,
- output_path: str,
- video_chunks_number: int,
- frame_converter: FrameConverter = yuv420p_bt709_converter_,
- crf: int = 19,
- preset: str = "veryfast",
- thread_count: int = 0,
-) -> None:
- """Encode RGB frames to an H.264 file, optionally muxing an audio track.
- Args:
- video: RGB frames as a ``(F, H, W, C)`` float ``[0, 1]`` tensor, or an iterator of
- such per-chunk tensors (e.g. the VAE decoder output). An empty iterator raises.
- fps: Output frame rate.
- audio: Audio track to mux, or None for a video-only file. Waveform must be stereo
- ``(2, N)`` or ``(N, 2)``.
- output_path: Destination path. Partial output is removed if encoding fails.
- video_chunks_number: Number of chunks yielded by ``video``, for the progress bar.
- frame_converter: Float-to-pixel converter (default YUV420p BT.709).
- crf: libx264 constant rate factor; lower is higher quality (0-51).
- preset: libx264 speed/compression preset.
- thread_count: libx264 thread count (0 = auto).
- Raises:
- ValueError: On an empty ``video`` or a non-stereo ``audio.waveform``.
- """
- if audio is not None:
- _validate_audio_waveform(audio)
-
- if isinstance(video, torch.Tensor):
- video = iter([video])
-
- def convert(chunk: torch.Tensor) -> torch.Tensor:
- return frame_converter(chunk.movedim(-1, -3))
-
- first_raw_chunk = next(video, None)
- if first_raw_chunk is None:
- raise ValueError("video is empty; expected at least one frame chunk.")
- first_chunk = convert(first_raw_chunk)
-
- if frame_converter.pixel_format == PixelFormat.RGB24:
- height, width = first_chunk.shape[-3], first_chunk.shape[-2]
- else:
- height = first_chunk.shape[-2] * 2 // 3
- width = first_chunk.shape[-1]
-
- container = av.open(output_path, mode="w")
- success = False
- try:
- stream = container.add_stream("libx264", rate=int(fps), options={"crf": str(crf), "preset": preset})
- stream.width = width
- stream.height = height
- stream.pix_fmt = "yuv420p"
- stream.codec_context.thread_count = thread_count
- stream.codec_context.thread_type = "FRAME"
- if frame_converter.color_space is not None:
- stream.codec_context.colorspace = frame_converter.color_space.av_colorspace
- if frame_converter.color_range is not None:
- stream.codec_context.color_range = frame_converter.color_range.av_color_range
-
- if audio is not None:
- audio_stream = _prepare_audio_stream(container, audio.sampling_rate)
-
- av_format = frame_converter.pixel_format.av_format
-
- def cpu_chunks() -> Generator[np.ndarray, None, None]:
- yield first_chunk.to("cpu").numpy()
- for chunk in video:
- yield convert(chunk).to("cpu").numpy()
-
- _encode_chunks_threaded(
- container=container,
- stream=stream,
- av_format=av_format,
- chunks=cpu_chunks(),
- progress_total=video_chunks_number,
- )
-
- if audio is not None:
- _write_audio(container, audio_stream, audio)
- success = True
- finally:
- container.close()
- if not success:
- Path(output_path).unlink(missing_ok=True)
- logger.info(f"Video saved to {output_path}")
-
-
-def encode_audio(audio: Audio, output_path: str) -> None:
- """Save an audio waveform as a 16-bit PCM ``.wav`` file at the source sampling rate.
- Reuses :func:`_write_audio` (the same muxing path used by :func:`encode_video`);
- the only difference is a PCM (``pcm_s16le``) stream in a WAV container instead of
- the AAC stream used for muxed video.
- """
- _validate_audio_waveform(audio)
- container = av.open(output_path, mode="w")
- audio_stream = container.add_stream("pcm_s16le", rate=audio.sampling_rate)
- audio_stream.codec_context.sample_rate = audio.sampling_rate
- audio_stream.codec_context.layout = "stereo"
- audio_stream.codec_context.time_base = Fraction(1, audio.sampling_rate)
- try:
- _write_audio(container, audio_stream, audio)
- finally:
- container.close()
- logger.info(f"Audio saved to {output_path}")
-
-
-def _encode_chunks_threaded(
- container: av.container.Container,
- stream: av.video.stream.VideoStream,
- av_format: str,
- chunks: Iterator[np.ndarray],
- progress_total: int,
-) -> None:
- """Run libx264 frame.encode + container.mux on a background thread while
- the caller produces numpy chunks on the current thread. The 1-slot queue
- lets the producer get one chunk ahead (so the next VAE/gather chunk
- overlaps with libx264 encoding the previous chunk) without buffering more
- than one chunk in CPU memory.
- """
- chunk_queue: Queue[np.ndarray | None] = Queue(maxsize=1)
- encoder_error: list[BaseException] = []
-
- def encoder_worker() -> None:
- error: BaseException | None = None
- while True:
- arr = chunk_queue.get()
- if arr is None:
- break
- if error is not None:
- continue
- try:
- for frame_array in arr:
- frame = av.VideoFrame.from_ndarray(frame_array, format=av_format)
- for packet in stream.encode(frame):
- container.mux(packet)
- except Exception as e:
- error = e
- if error is None:
- try:
- for packet in stream.encode():
- container.mux(packet)
- except Exception as e:
- error = e
- if error is not None:
- encoder_error.append(error)
-
- encoder_thread = threading.Thread(target=encoder_worker, name="h264-encoder")
- encoder_thread.start()
- try:
- for arr in tqdm(chunks, total=progress_total):
- chunk_queue.put(arr)
- finally:
- chunk_queue.put(None)
- encoder_thread.join()
-
- if encoder_error:
- raise encoder_error[0]
-
-
-_INT_FORMAT_MAX: dict[str, float] = {
- "u8": 128.0,
- "u8p": 128.0,
- "s16": 32768.0,
- "s16p": 32768.0,
- "s32": 2147483648.0,
- "s32p": 2147483648.0,
-}
-
-
-def _audio_frame_to_float(frame: av.AudioFrame) -> np.ndarray:
- """Convert an audio frame to a float32 ndarray with values in [-1, 1] and shape (channels, samples)."""
- fmt = frame.format.name
- arr = frame.to_ndarray().astype(np.float32)
- if fmt in _INT_FORMAT_MAX:
- arr = arr / _INT_FORMAT_MAX[fmt]
- if not frame.format.is_planar:
- # Interleaved formats have shape (1, samples * channels) — reshape to (channels, samples).
- channels = len(frame.layout.channels)
- arr = arr.reshape(-1, channels).T
- return arr
-
-
-def get_videostream_fps(path: str) -> float:
- """Read video stream FPS."""
- container = av.open(path)
- try:
- video_stream = next(s for s in container.streams if s.type == "video")
- return float(video_stream.average_rate)
- finally:
- container.close()
-
-
-def get_videostream_metadata(path: str) -> VideoPixelShape:
- """Read video stream metadata as a VideoPixelShape with batch=1.
- If frame count is missing in the container, decodes the stream to count frames.
- Args:
- path: Path to the video file.
- Returns:
- VideoPixelShape with batch=1, frames, height, width, and fps populated from the stream.
- """
- container = av.open(path)
- try:
- video_stream = next(s for s in container.streams if s.type == "video")
- fps = float(video_stream.average_rate)
- num_frames = video_stream.frames or 0
- if num_frames == 0:
- num_frames = sum(1 for _ in container.decode(video_stream))
- width = video_stream.codec_context.width
- height = video_stream.codec_context.height
- return VideoPixelShape(batch=1, frames=num_frames, height=height, width=width, fps=fps)
- finally:
- container.close()
-
-
-def decode_audio_from_file(
- path: str, device: torch.device, start_time: float = 0.0, max_duration: float | None = None
-) -> Audio | None:
- """Decodes audio from a file, optionally seeking to a start time and limiting duration.
- Args:
- path: Path to the audio/video file containing an audio stream.
- device: Device to place the resulting tensor on.
- start_time: Start time in seconds to begin reading audio from.
- max_duration: Maximum audio duration in seconds. If None, reads to end of stream.
- Returns:
- An Audio object with waveform of shape (1, channels, samples), or None if no audio stream.
- """
- container = av.open(path)
- try:
- audio_stream = next(s for s in container.streams if s.type == "audio")
- except StopIteration:
- container.close()
- return None
-
- sample_rate = audio_stream.rate
- start_pts = int(start_time / audio_stream.time_base)
- end_time = start_time + max_duration if max_duration else audio_stream.duration * audio_stream.time_base
- container.seek(start_pts, stream=audio_stream)
-
- samples = []
- first_frame_time = None
- for frame in container.decode(audio=0):
- if frame.pts is None:
- continue
- frame_time = float(frame.pts * audio_stream.time_base)
- frame_end = frame_time + frame.samples / frame.sample_rate
- if frame_end < start_time:
- continue
- if frame_time > end_time:
- break
- if first_frame_time is None:
- first_frame_time = frame_time
- samples.append(_audio_frame_to_float(frame))
-
- container.close()
-
- if not samples:
- return None
-
- audio = np.concatenate(samples, axis=-1)
-
- # Trim samples that fall outside the requested [start_time, start_time + max_duration] window.
- # Audio codecs decode in fixed-size frames whose boundaries may not align with the requested
- # time range, so the first frame can start before start_time and the last frame can end after
- # start_time + max_duration.
- skip_samples = round((start_time - first_frame_time) * sample_rate)
- if skip_samples > 0:
- audio = audio[..., skip_samples:]
-
- if max_duration is not None:
- max_samples = round(max_duration * sample_rate)
- audio = audio[..., :max_samples]
-
- waveform = torch.from_numpy(audio).to(device).unsqueeze(0)
-
- return Audio(waveform=waveform, sampling_rate=sample_rate)
-
-
-def decode_video_by_frame(
- path: str,
- device: DeviceLikeType,
- starting_frame: int = 0,
- frame_cap: int | None = None,
-) -> Generator[torch.Tensor]:
- """Decodes video from a file by sequential frame index, without relying on pts.
- Args:
- path: Path to the video file.
- device: Device to place the resulting tensors on.
- starting_frame: Number of leading frames to skip (default 0).
- frame_cap: Maximum number of frames to yield. If None, no frame limit (default None).
- Yields:
- Frames as tensors of shape (1, H, W, C), dtype uint8.
- """
- container = av.open(path)
- try:
- video_stream = next(s for s in container.streams if s.type == "video")
- for index, frame in enumerate(container.decode(video_stream)):
- if index < starting_frame:
- continue
- tensor = torch.tensor(frame.to_rgb().to_ndarray(), dtype=torch.uint8, device=device).unsqueeze(0)
- yield tensor
- if frame_cap is not None:
- frame_cap -= 1
- if frame_cap == 0:
- break
- finally:
- container.close()
-
-
-def decode_video_from_file(
- path: str,
- device: DeviceLikeType,
- start_time: float = 0.0,
- max_duration: float | None = None,
-) -> Generator[torch.Tensor]:
- """Decodes video from a file using presentation timestamps for time-based trimming.
- If a frame with no pts is encountered, falls back to :func:`decode_video_by_frame`
- using FPS-derived frame indices.
- Args:
- path: Path to the video file.
- device: Device to place the resulting tensors on.
- start_time: Start time in seconds (default 0.0).
- max_duration: Maximum duration in seconds to decode. If None, reads to end of
- stream (default None).
- Yields:
- Frames as tensors of shape (1, H, W, C), dtype uint8.
- """
- container = av.open(path)
- try:
- video_stream = next(s for s in container.streams if s.type == "video")
- time_base = float(video_stream.time_base)
-
- if start_time > 0:
- container.seek(int(start_time / time_base), stream=video_stream)
-
- end_time = start_time + max_duration if max_duration is not None else None
-
- for frame in container.decode(video_stream):
- # PyAV may leave pts unset when the demuxer does not expose per-frame
- # timestamps (e.g. some raw/elementary streams, stripped or missing
- # metadata, or certain remux paths). Without pts we cannot map frames to
- # wall-clock time, so we fall back to sequential frame indices using the
- # stream's average frame rate.
- if frame.pts is None:
- fps = float(video_stream.average_rate)
- starting_frame = round(start_time * fps)
- frame_cap = round(max_duration * fps) if max_duration is not None else None
- yield from decode_video_by_frame(
- path=path, device=device, starting_frame=starting_frame, frame_cap=frame_cap
- )
- return
- frame_time = frame.pts * time_base
- if frame_time < start_time:
- continue
- if end_time is not None and frame_time >= end_time:
- break
- yield torch.tensor(frame.to_rgb().to_ndarray(), dtype=torch.uint8, device=device).unsqueeze(0)
- finally:
- container.close()
-
-
-def encode_single_frame(output_file: str, image_array: np.ndarray, crf: float) -> None:
- container = av.open(output_file, "w", format="mp4")
- try:
- stream = container.add_stream("libx264", rate=1, options={"crf": str(crf), "preset": "veryfast"})
- # Round to nearest multiple of 2 for compatibility with video codecs
- height = image_array.shape[0] // 2 * 2
- width = image_array.shape[1] // 2 * 2
- image_array = image_array[:height, :width]
- stream.height = height
- stream.width = width
- av_frame = av.VideoFrame.from_ndarray(image_array, format="rgb24").reformat(format="yuv420p")
- container.mux(stream.encode(av_frame))
- container.mux(stream.encode())
- finally:
- container.close()
-
-
-def decode_single_frame(video_file: str) -> np.array:
- container = av.open(video_file)
- try:
- stream = next(s for s in container.streams if s.type == "video")
- frame = next(container.decode(stream))
- finally:
- container.close()
- return frame.to_ndarray(format="rgb24")
-
-
-def preprocess(image: np.array, crf: float = DEFAULT_IMAGE_CRF) -> np.array:
- if crf == 0:
- return image
-
- with BytesIO() as output_file:
- encode_single_frame(output_file, image, crf)
- video_bytes = output_file.getvalue()
- with BytesIO(video_bytes) as video_file:
- image_array = decode_single_frame(video_file)
- return image_array
-
-
-def save_exr_tensor(tensor: torch.Tensor, file_path: str | Path, half: bool = False) -> None:
- """Save a single tensor frame as EXR with linear sRGB colorspace metadata.
- Args:
- tensor: ``[H, W, C]`` or ``[C, H, W]`` float tensor.
- file_path: Output path (e.g. ``frame_0000.exr``).
- half: Force float16 output with ZIP compression.
- """
- if tensor.dim() == 3 and tensor.shape[0] == 3:
- tensor = tensor.permute(1, 2, 0)
- use_half = half or tensor.dtype in (torch.float16, torch.half)
- img_np = np.ascontiguousarray(tensor.cpu().numpy().astype(np.float32))
- file_path = str(file_path)
-
- h, w = img_np.shape[:2]
- fmt = OpenImageIO.HALF if use_half else OpenImageIO.FLOAT
- spec = OpenImageIO.ImageSpec(w, h, 3, fmt)
- spec.channelnames = ("R", "G", "B")
- spec.attribute("compression", "zip")
- spec.attribute("chromaticities", "float[8]", (0.64, 0.33, 0.30, 0.60, 0.15, 0.06, 0.3127, 0.3290))
- spec.attribute("colorSpace", "sRGB")
-
- out = OpenImageIO.ImageOutput.create(file_path)
- if out is None:
- raise RuntimeError(
- f"Failed to create EXR writer for '{file_path}'. Ensure OpenImageIO is built with OpenEXR support."
- )
- try:
- if not out.open(file_path, spec):
- raise RuntimeError(f"Failed to open EXR file '{file_path}': {out.geterror()}")
- if not out.write_image(img_np):
- raise RuntimeError(f"Failed to write EXR image '{file_path}': {out.geterror()}")
- finally:
- out.close()
-
-
-def _linear_to_srgb(x: np.ndarray) -> np.ndarray:
- """Linear -> sRGB OETF per IEC 61966-2-1. Input assumed in [0, 1]."""
- x = np.clip(x, 0.0, 1.0)
- return np.where(x <= 0.0031308, x * 12.92, 1.055 * np.power(x, 1.0 / 2.4) - 0.055)
-
-
-def encode_exr_sequence_to_mp4(exr_dir: Path, output_mp4: Path, frame_rate: float) -> None:
- """Convert a linear EXR frame sequence to sRGB and encode to H.264 .mp4 via PyAV.
- Exposure is fixed at EV=0 (no gain). Each EXR frame is clamped to [0, 1],
- passed through the sRGB OETF, quantised to 8-bit BGR, and fed to a libx264
- stream (crf 18, yuv420p). ``frame_rate`` is the original source video's
- frame rate so playback matches the input timing.
- """
- import os # noqa: PLC0415
-
- os.environ["OPENCV_IO_ENABLE_OPENEXR"] = "1"
- import cv2 # noqa: PLC0415
-
- exr_files = sorted(exr_dir.glob("frame_*.exr"))
- if not exr_files:
- raise FileNotFoundError(f"No EXR frames found in {exr_dir}")
-
- container = av.open(str(output_mp4), mode="w")
- stream = container.add_stream("libx264", rate=Fraction(frame_rate).limit_denominator(1000))
- stream.pix_fmt = "yuv420p"
- stream.options = {"crf": "18", "movflags": "+faststart"}
-
- try:
- for i, exr_path in enumerate(exr_files):
- hdr = cv2.imread(str(exr_path), cv2.IMREAD_UNCHANGED).astype(np.float32)
- sdr = _linear_to_srgb(np.maximum(hdr, 0.0))
- bgr8 = (sdr * 255.0 + 0.5).astype(np.uint8)
-
- if i == 0:
- stream.height = bgr8.shape[0]
- stream.width = bgr8.shape[1]
-
- frame = av.VideoFrame.from_ndarray(bgr8, format="bgr24")
- for packet in stream.encode(frame):
- container.mux(packet)
-
- for packet in stream.encode():
- container.mux(packet)
- finally:
- container.close()
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/__init__.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/__init__.py
new file mode 100644
index 0000000..30bc3e6
--- /dev/null
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/__init__.py
@@ -0,0 +1,76 @@
+"""Media I/O: decode, encode, EXR, resize, and colour-config helpers."""
+
+from ltx_pipelines.utils.media_io.color_config import (
+ HDRColorSpace,
+ decode_hdr_video,
+ resolve_hdr_color_space,
+ vae_dtype_for_hdr,
+)
+from ltx_pipelines.utils.media_io.decode import (
+ decode_audio_from_file,
+ decode_image,
+ decode_single_frame,
+ decode_video_by_frame,
+ decode_video_from_file,
+ encode_single_frame,
+ get_videostream_fps,
+ get_videostream_metadata,
+ load_image_and_preprocess,
+ load_video_conditioning_hdr,
+ preprocess,
+ video_preprocess,
+)
+from ltx_pipelines.utils.media_io.encode import encode_audio, encode_video
+from ltx_pipelines.utils.media_io.exr import (
+ encode_exr_sequence_to_mp4,
+ is_exr_dir,
+ load_exr_conditioning_hdr,
+ load_exr_folder_conditioning_hdr,
+ load_exr_image_conditioning_hdr,
+ read_exr,
+ save_exr_tensor,
+)
+from ltx_pipelines.utils.media_io.range_map import from_vae_range, normalize_images, to_vae_range
+from ltx_pipelines.utils.media_io.resize import (
+ ResizeMode,
+ align_resolution,
+ resize_and_center_crop,
+ resize_and_reflect_pad,
+ resize_aspect_ratio_preserving,
+)
+
+__all__ = [
+ "HDRColorSpace",
+ "ResizeMode",
+ "align_resolution",
+ "decode_audio_from_file",
+ "decode_hdr_video",
+ "decode_image",
+ "decode_single_frame",
+ "decode_video_by_frame",
+ "decode_video_from_file",
+ "encode_audio",
+ "encode_exr_sequence_to_mp4",
+ "encode_single_frame",
+ "encode_video",
+ "from_vae_range",
+ "get_videostream_fps",
+ "get_videostream_metadata",
+ "is_exr_dir",
+ "load_exr_conditioning_hdr",
+ "load_exr_folder_conditioning_hdr",
+ "load_exr_image_conditioning_hdr",
+ "load_image_and_preprocess",
+ "load_video_conditioning_hdr",
+ "normalize_images",
+ "preprocess",
+ "read_exr",
+ "resize_and_center_crop",
+ "resize_and_reflect_pad",
+ "resize_aspect_ratio_preserving",
+ "resolve_hdr_color_space",
+ "save_exr_tensor",
+ "to_vae_range",
+ "vae_dtype_for_hdr",
+ "video_preprocess",
+]
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/color_config.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/color_config.py
new file mode 100644
index 0000000..52536c9
--- /dev/null
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/color_config.py
@@ -0,0 +1,103 @@
+"""HDR colour-space policy for pipelines (``HDRColorSpace`` + resolve helpers)."""
+
+from __future__ import annotations
+
+import enum
+from collections.abc import Iterable
+from pathlib import Path
+
+import torch
+
+from ltx_core.color.primaries import Primaries
+from ltx_core.hdr import HDRTransfer
+
+
+class HDRColorSpace(enum.Enum):
+ """Explicit HDR source / working colour space (CLI ``--hdr``).
+ ``None`` at call sites means SDR. Members:
+ * ``SRGB_LINEAR`` / ``ACESCG`` — scene-linear; compress via ACEScct on load.
+ * ``ACESCCT`` — already ACEScct log working codes; no load-time transfer.
+ """
+
+ SRGB_LINEAR = "srgb_linear"
+ ACESCG = "acescg"
+ ACESCCT = "acescct"
+
+ @property
+ def is_log_working(self) -> bool:
+ """True when the VAE signal is already ACEScct log (no load-time transfer)."""
+ return self is HDRColorSpace.ACESCCT
+
+ @property
+ def source_primaries(self) -> Primaries:
+ match self:
+ case HDRColorSpace.ACESCG | HDRColorSpace.ACESCCT:
+ return Primaries.ACESCG
+ case _:
+ return Primaries.REC709
+
+ @property
+ def transfer(self) -> HDRTransfer:
+ """Curve for the VAE working space (always defined; today always ACEScct).
+ Whether to *apply* it depends on the call site:
+ * load — compress only when not :attr:`is_log_working`
+ * EXR write — decompress only when writing linear EXR
+ * HLG — always decompress to Rec.709 linear
+ """
+ match self:
+ case HDRColorSpace.SRGB_LINEAR | HDRColorSpace.ACESCG | HDRColorSpace.ACESCCT:
+ return HDRTransfer.ACESCCT
+ case _:
+ raise ValueError(f"No transfer defined for {self!r}.")
+
+ def exr_output_tags(self) -> tuple[Primaries, str]:
+ """``(primaries, colorSpace_tag)`` for :func:`save_exr_tensor`."""
+ match self:
+ case HDRColorSpace.ACESCCT:
+ return Primaries.ACESCG, "ACEScct"
+ case HDRColorSpace.ACESCG:
+ return Primaries.ACESCG, "ACEScg"
+ case HDRColorSpace.SRGB_LINEAR:
+ return Primaries.REC709, "sRGB"
+
+
+def vae_dtype_for_hdr(hdr: HDRColorSpace | None, default: torch.dtype) -> torch.dtype:
+ """VAE decode dtype: float32 for HDR, else ``default`` (pipelines use bf16 today)."""
+ return torch.float32 if hdr is not None else default
+
+
+def _has_exr_input(
+ images: Iterable[object] = (),
+ video_paths: Iterable[str | Path] = (),
+) -> bool:
+ from ltx_pipelines.utils.media_io.exr import is_exr_dir # noqa: PLC0415
+
+ for img in images:
+ path = getattr(img, "path", img)
+ if str(path).lower().endswith(".exr"):
+ return True
+ return any(is_exr_dir(p) for p in video_paths)
+
+
+def resolve_hdr_color_space(
+ images: Iterable[object] = (),
+ video_paths: Iterable[str | Path] = (),
+ hdr: HDRColorSpace | None = None,
+) -> HDRColorSpace | None:
+ """Return the explicit ``--hdr`` value, or raise if EXR inputs lack it.
+ ``None`` means SDR.
+ """
+ if _has_exr_input(images, video_paths) and hdr is None:
+ raise ValueError("EXR input requires --hdr {SRGB_LINEAR,ACESCG,ACESCCT} to declare the source colour space.")
+ return hdr
+
+
+def decode_hdr_video(
+ decoded_video: torch.Tensor,
+ transfer: HDRTransfer,
+ out_primaries: Primaries = Primaries.REC709,
+) -> torch.Tensor:
+ """VAE decode ``[F,H,W,C]`` in ``[0,1]`` → scene-linear HDR float32."""
+ video = decoded_video.float().permute(3, 0, 1, 2).unsqueeze(0)
+ hdr = transfer.to_linear(video, out_primaries=out_primaries)
+ return hdr[0].permute(1, 2, 3, 0).contiguous()
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/decode.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/decode.py
new file mode 100644
index 0000000..561baca
--- /dev/null
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/decode.py
@@ -0,0 +1,435 @@
+"""Image/video/audio decode and SDR conditioning preprocess."""
+
+from __future__ import annotations
+
+import logging
+from collections.abc import Generator, Iterator
+from io import BytesIO
+from pathlib import Path
+
+import av
+import numpy as np
+import OpenImageIO
+import torch
+from PIL import ExifTags, Image, ImageCms
+from torch._prims_common import DeviceLikeType
+
+from ltx_core.hdr import HDRTransfer
+from ltx_core.types import Audio, VideoPixelShape
+from ltx_pipelines.utils.media_io.color_config import HDRColorSpace
+from ltx_pipelines.utils.media_io.exr import is_exr_dir, load_exr_image_conditioning_hdr
+from ltx_pipelines.utils.media_io.range_map import normalize_images, to_vae_range
+from ltx_pipelines.utils.media_io.resize import (
+ ResizeMode,
+ resize_and_center_crop,
+ resize_and_reflect_pad,
+)
+
+logger = logging.getLogger(__name__)
+
+_ORIENTATION_EXIF_KEY = next(key for key, value in ExifTags.TAGS.items() if value == "Orientation")
+
+_ORIENTATION_TO_ROTATION = {3: 180, 6: 270, 8: 90}
+
+_SRGB_PROFILE = ImageCms.createProfile("sRGB")
+
+_INT_FORMAT_MAX: dict[str, float] = {
+ "u8": 128.0,
+ "u8p": 128.0,
+ "s16": 32768.0,
+ "s16p": 32768.0,
+ "s32": 2147483648.0,
+ "s32p": 2147483648.0,
+}
+
+
+def load_image_and_preprocess(
+ image_path: str,
+ height: int,
+ width: int,
+ dtype: torch.dtype,
+ device: torch.device,
+ crf: int,
+ color_space: HDRColorSpace | None = None,
+) -> torch.Tensor:
+ """
+ Loads an image from a path and preprocesses it for conditioning.
+ Note: The image is resized to the nearest multiple of 2 for compatibility with video codecs.
+ An ``.exr`` still requires ``color_space`` (from ``--hdr``) and is loaded via the
+ HDR conditioning path instead of the SDR decode/normalize path.
+ """
+ if str(image_path).lower().endswith(".exr"):
+ if color_space is None:
+ raise ValueError(
+ "EXR input requires --hdr {SRGB_LINEAR,ACESCG,ACESCCT} to declare the source colour space."
+ )
+ return load_exr_image_conditioning_hdr(
+ exr_path=image_path,
+ height=height,
+ width=width,
+ dtype=dtype,
+ device=device,
+ color_space=color_space,
+ )
+ image = decode_image(image_path=image_path)
+ image = preprocess(image=image, crf=crf)
+ image = torch.tensor(image, dtype=torch.float32, device=device)
+ image = resize_and_center_crop(image, height, width)
+ image = normalize_images(image, device, dtype)
+ return image
+
+
+def video_preprocess(
+ frames: Generator[torch.Tensor],
+ height: int,
+ width: int,
+ dtype: torch.dtype,
+ device: torch.device,
+) -> torch.Tensor:
+ """Preprocesses a video frame generator for conditioning.
+ Args:
+ frames: Generator of video frames as tensors of shape (1, H, W, C), dtype uint8.
+ height: Target height in pixels.
+ width: Target width in pixels.
+ dtype: Target dtype for the output tensor.
+ device: Target device for the output tensor.
+ Returns:
+ Tensor of shape (1, C, F, height, width) with values in [-1, 1].
+ """
+ result: torch.Tensor | None = None
+ for f in frames:
+ frame = resize_and_center_crop(f.to(torch.float32), height, width)
+ frame = normalize_images(frame, device, dtype)
+ result = frame if result is None else torch.cat([result, frame], dim=2)
+ if result is None:
+ raise ValueError("video_preprocess received an empty frame generator; no frames were decoded from the source.")
+ return result
+
+
+def load_video_conditioning_hdr(
+ video_path: str,
+ height: int,
+ width: int,
+ frame_cap: int,
+ dtype: torch.dtype,
+ device: torch.device,
+ transfer: HDRTransfer = HDRTransfer.LOGC3,
+ resize_mode: ResizeMode = ResizeMode.CENTER_CROP,
+) -> Iterator[torch.Tensor]:
+ """Load a video and yield preprocessed frames for HDR IC-LoRA conditioning.
+ Decodes through the standard path and applies the LDR compression that
+ matches training. Callers are responsible for providing Rec.709 SDR
+ input — the HDR IC-LoRA was trained on that color space.
+ Args:
+ transfer: Working-space transfer; ``compress_ldr`` is identity clamp for
+ all cases (SDR display-range input).
+ resize_mode: How to fit the video to the target resolution.
+ Yields:
+ Per-frame tensors of shape ``(1, C, 1, height, width)``.
+ """
+ resize_fn = resize_and_reflect_pad if resize_mode is ResizeMode.REFLECT_PAD else resize_and_center_crop
+
+ for f in decode_video_by_frame(path=video_path, frame_cap=frame_cap, device=device):
+ frame = resize_fn(f.to(torch.float32), height, width)
+ ldr = (frame / 255.0).clamp(0.0, 1.0)
+ compressed = transfer.compress_ldr(ldr)
+ yield to_vae_range(compressed).to(device=device, dtype=dtype)
+
+
+def decode_image(image_path: str) -> np.ndarray:
+ """Load an image as an oriented, sRGB, three-channel uint8 RGB array."""
+ with Image.open(image_path) as source_image:
+ image = source_image
+ orientation = image.getexif().get(_ORIENTATION_EXIF_KEY)
+ if orientation in _ORIENTATION_TO_ROTATION:
+ image = image.rotate(_ORIENTATION_TO_ROTATION[orientation], expand=True)
+
+ icc_profile = image.info.get("icc_profile")
+
+ if image.mode == "RGBA":
+ image = image.convert("RGB")
+ elif image.mode == "LA":
+ image = image.convert("L")
+
+ if icc_profile:
+ try:
+ source_profile = ImageCms.ImageCmsProfile(BytesIO(icc_profile))
+ destination_profile = ImageCms.ImageCmsProfile(_SRGB_PROFILE)
+ image = ImageCms.profileToProfile(
+ image,
+ source_profile,
+ destination_profile,
+ outputMode="RGB",
+ )
+ except (ImageCms.PyCMSError, OSError, ValueError) as error:
+ logger.warning("Failed to convert image to sRGB: %s", error)
+ image = image.convert("RGB")
+ else:
+ image = image.convert("RGB")
+
+ return np.array(image, dtype=np.uint8)
+
+
+def _audio_frame_to_float(frame: av.AudioFrame) -> np.ndarray:
+ """Convert an audio frame to a float32 ndarray with values in [-1, 1] and shape (channels, samples)."""
+ fmt = frame.format.name
+ arr = frame.to_ndarray().astype(np.float32)
+ if fmt in _INT_FORMAT_MAX:
+ arr = arr / _INT_FORMAT_MAX[fmt]
+ if not frame.format.is_planar:
+ # Interleaved formats have shape (1, samples * channels) — reshape to (channels, samples).
+ channels = len(frame.layout.channels)
+ arr = arr.reshape(-1, channels).T
+ return arr
+
+
+def get_videostream_fps(path: str) -> float:
+ """Read video stream FPS.
+ EXR-frame folders have no embedded frame rate — callers must supply fps via
+ :func:`get_videostream_metadata` instead of calling this helper.
+ """
+ if is_exr_dir(path):
+ raise ValueError(
+ f"Path '{path}' is an EXR-frame folder and has no embedded FPS; pass fps explicitly (e.g. --frame-rate)."
+ )
+ container = av.open(path)
+ try:
+ video_stream = next(s for s in container.streams if s.type == "video")
+ return float(video_stream.average_rate)
+ finally:
+ container.close()
+
+
+def get_videostream_metadata(path: str, fps: float | None = None) -> VideoPixelShape:
+ """Read video stream (or EXR-folder) metadata as a VideoPixelShape with batch=1.
+ If frame count is missing in the container, decodes the stream to count frames.
+ Args:
+ path: Path to a video file, or a directory containing ``*.exr`` frames.
+ fps: Frame rate. Required for EXR-frame folders (no container metadata).
+ Ignored for regular video files (taken from the stream).
+ Returns:
+ VideoPixelShape with batch=1, frames, height, width, and fps populated.
+ """
+ if is_exr_dir(path):
+ if fps is None:
+ raise ValueError(f"Path '{path}' is an EXR-frame folder; fps must be provided (e.g. via --frame-rate).")
+ exr_files = sorted(Path(path).glob("*.exr"))
+ spec = OpenImageIO.ImageBuf(str(exr_files[0])).spec()
+ return VideoPixelShape(
+ batch=1,
+ frames=len(exr_files),
+ height=int(spec.height),
+ width=int(spec.width),
+ fps=float(fps),
+ )
+
+ container = av.open(path)
+ try:
+ video_stream = next(s for s in container.streams if s.type == "video")
+ stream_fps = float(video_stream.average_rate)
+ num_frames = video_stream.frames or 0
+ if num_frames == 0:
+ num_frames = sum(1 for _ in container.decode(video_stream))
+ width = video_stream.codec_context.width
+ height = video_stream.codec_context.height
+ return VideoPixelShape(batch=1, frames=num_frames, height=height, width=width, fps=stream_fps)
+ finally:
+ container.close()
+
+
+def decode_audio_from_file(
+ path: str, device: torch.device, start_time: float = 0.0, max_duration: float | None = None
+) -> Audio | None:
+ """Decodes audio from a file, optionally seeking to a start time and limiting duration.
+ Args:
+ path: Path to the audio/video file containing an audio stream.
+ device: Device to place the resulting tensor on.
+ start_time: Start time in seconds to begin reading audio from.
+ max_duration: Maximum audio duration in seconds. If None, reads to end of stream.
+ Returns:
+ An Audio object with waveform of shape (1, channels, samples), or None if no audio stream.
+ """
+ container = av.open(path)
+ try:
+ audio_stream = next(s for s in container.streams if s.type == "audio")
+ except StopIteration:
+ container.close()
+ return None
+
+ sample_rate = audio_stream.rate
+ start_pts = int(start_time / audio_stream.time_base)
+ end_time = start_time + max_duration if max_duration else audio_stream.duration * audio_stream.time_base
+ container.seek(start_pts, stream=audio_stream)
+
+ samples = []
+ first_frame_time = None
+ for frame in container.decode(audio=0):
+ if frame.pts is None:
+ continue
+ frame_time = float(frame.pts * audio_stream.time_base)
+ frame_end = frame_time + frame.samples / frame.sample_rate
+ if frame_end < start_time:
+ continue
+ if frame_time > end_time:
+ break
+ if first_frame_time is None:
+ first_frame_time = frame_time
+ samples.append(_audio_frame_to_float(frame))
+
+ container.close()
+
+ if not samples:
+ return None
+
+ audio = np.concatenate(samples, axis=-1)
+
+ # Trim samples that fall outside the requested [start_time, start_time + max_duration] window.
+ # Audio codecs decode in fixed-size frames whose boundaries may not align with the requested
+ # time range, so the first frame can start before start_time and the last frame can end after
+ # start_time + max_duration.
+ skip_samples = round((start_time - first_frame_time) * sample_rate)
+ if skip_samples > 0:
+ audio = audio[..., skip_samples:]
+
+ if max_duration is not None:
+ max_samples = round(max_duration * sample_rate)
+ audio = audio[..., :max_samples]
+
+ waveform = torch.from_numpy(audio).to(device).unsqueeze(0)
+
+ return Audio(waveform=waveform, sampling_rate=sample_rate)
+
+
+def decode_video_by_frame(
+ path: str,
+ device: DeviceLikeType,
+ starting_frame: int = 0,
+ frame_cap: int | None = None,
+) -> Generator[torch.Tensor]:
+ """Decodes video from a file by sequential frame index, without relying on pts.
+ Args:
+ path: Path to the video file.
+ device: Device to place the resulting tensors on.
+ starting_frame: Number of leading frames to skip (default 0).
+ frame_cap: Maximum number of frames to yield. If None, no frame limit (default None).
+ Yields:
+ Frames as tensors of shape (1, H, W, C), dtype uint8.
+ """
+ container = av.open(path)
+ try:
+ video_stream = next(s for s in container.streams if s.type == "video")
+ for index, frame in enumerate(container.decode(video_stream)):
+ if index < starting_frame:
+ continue
+ tensor = torch.tensor(frame.to_rgb().to_ndarray(), dtype=torch.uint8, device=device).unsqueeze(0)
+ yield tensor
+ if frame_cap is not None:
+ frame_cap -= 1
+ if frame_cap == 0:
+ break
+ finally:
+ container.close()
+
+
+def decode_video_from_file(
+ path: str,
+ device: DeviceLikeType,
+ start_time: float = 0.0,
+ max_duration: float | None = None,
+) -> Generator[torch.Tensor]:
+ """Decodes video from a file using presentation timestamps for time-based trimming.
+ If a frame with no pts is encountered, falls back to :func:`decode_video_by_frame`
+ using FPS-derived frame indices.
+ Args:
+ path: Path to the video file.
+ device: Device to place the resulting tensors on.
+ start_time: Start time in seconds (default 0.0).
+ max_duration: Maximum duration in seconds to decode. If None, reads to end of
+ stream (default None).
+ Yields:
+ Frames as tensors of shape (1, H, W, C), dtype uint8.
+ """
+ container = av.open(path)
+ try:
+ video_stream = next(s for s in container.streams if s.type == "video")
+ time_base = float(video_stream.time_base)
+
+ if start_time > 0:
+ container.seek(int(start_time / time_base), stream=video_stream)
+
+ end_time = start_time + max_duration if max_duration is not None else None
+
+ for frame in container.decode(video_stream):
+ # PyAV may leave pts unset when the demuxer does not expose per-frame
+ # timestamps (e.g. some raw/elementary streams, stripped or missing
+ # metadata, or certain remux paths). Without pts we cannot map frames to
+ # wall-clock time, so we fall back to sequential frame indices using the
+ # stream's average frame rate.
+ if frame.pts is None:
+ fps = float(video_stream.average_rate)
+ starting_frame = round(start_time * fps)
+ frame_cap = round(max_duration * fps) if max_duration is not None else None
+ yield from decode_video_by_frame(
+ path=path, device=device, starting_frame=starting_frame, frame_cap=frame_cap
+ )
+ return
+ frame_time = frame.pts * time_base
+ if frame_time < start_time:
+ continue
+ if end_time is not None and frame_time >= end_time:
+ break
+ yield torch.tensor(frame.to_rgb().to_ndarray(), dtype=torch.uint8, device=device).unsqueeze(0)
+ finally:
+ container.close()
+
+
+def encode_single_frame(output_file: str, image_array: np.ndarray, crf: float) -> None:
+ container = av.open(output_file, "w", format="mp4")
+ try:
+ stream = container.add_stream("libx264", rate=1, options={"crf": str(crf), "preset": "veryfast"})
+ # Round to nearest multiple of 2 for compatibility with video codecs
+ height = image_array.shape[0] // 2 * 2
+ width = image_array.shape[1] // 2 * 2
+ image_array = image_array[:height, :width]
+ stream.height = height
+ stream.width = width
+ av_frame = av.VideoFrame.from_ndarray(image_array, format="rgb24").reformat(format="yuv420p")
+ container.mux(stream.encode(av_frame))
+ container.mux(stream.encode())
+ finally:
+ container.close()
+
+
+def decode_single_frame(video_file: str) -> np.array:
+ container = av.open(video_file)
+ try:
+ stream = next(s for s in container.streams if s.type == "video")
+ frame = next(container.decode(stream))
+ finally:
+ container.close()
+ return frame.to_ndarray(format="rgb24")
+
+
+def preprocess(image: np.array, crf: int) -> np.array:
+ """Re-compress an image at ``crf`` to match the compression the model was trained on.
+ ``crf`` is required: the correct value is a property of the model generation, so a
+ code-level default here would silently condition on the wrong compression. Reaching this
+ with ``crf=None`` means a conditioning skipped resolution -- see
+ ``ImageConditioner.resolve_crf``, which every pipeline runs over its image inputs.
+ """
+ if crf is None:
+ raise ValueError(
+ "Image conditioning CRF is unresolved (crf=None). Resolve it against the checkpoint "
+ "first -- ImageConditioner.resolve_crf(images), or detect_params(checkpoint_path).default_image_crf."
+ )
+ if crf == 0:
+ return image
+ if min(image.shape[0], image.shape[1]) < 2:
+ return image
+
+ with BytesIO() as output_file:
+ encode_single_frame(output_file, image, crf)
+ video_bytes = output_file.getvalue()
+ with BytesIO(video_bytes) as video_file:
+ image_array = decode_single_frame(video_file)
+ return image_array
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/encode.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/encode.py
new file mode 100644
index 0000000..48d6931
--- /dev/null
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/encode.py
@@ -0,0 +1,302 @@
+"""Video/audio encode paths (SDR H.264 and HDR EXR+HLG)."""
+
+from __future__ import annotations
+
+import logging
+import threading
+from collections import deque
+from collections.abc import Generator, Iterator
+from concurrent.futures import Future, ThreadPoolExecutor
+from fractions import Fraction
+from pathlib import Path
+from queue import Queue
+
+import av
+import numpy as np
+import torch
+from tqdm import tqdm
+
+from ltx_core.color.audio_mux import prepare_audio_stream as _prepare_audio_stream
+from ltx_core.color.audio_mux import validate_audio_waveform as _validate_audio_waveform
+from ltx_core.color.audio_mux import write_audio as _write_audio
+from ltx_core.color.hlg import encode_linear_hdr_frames_to_hlg_mp4
+from ltx_core.color.primaries import Primaries
+from ltx_core.color.yuv import FrameConverter, PixelFormat, yuv420p_bt709_converter_
+from ltx_core.types import Audio
+from ltx_pipelines.utils.media_io.color_config import HDRColorSpace, decode_hdr_video
+from ltx_pipelines.utils.media_io.exr import save_exr_tensor
+
+logger = logging.getLogger(__name__)
+
+
+def _encode_hdr_video_outputs(
+ chunks: Iterator[torch.Tensor],
+ output_path: Path,
+ fps: float,
+ color_space: HDRColorSpace,
+ *,
+ max_workers: int = 8,
+ audio: Audio | None = None,
+ device: torch.device | None = None,
+) -> Path:
+ """Stream a VAE decode to half EXR frames plus a BT.2020/HLG master.
+ One pass over ``chunks`` feeds two independent sinks:
+ * **HLG** — always Rec.709 scene-linear (``decode_hdr_video`` default).
+ * **EXR** — matches ``color_space``: log codes when :attr:`~HDRColorSpace.is_log_working`,
+ else scene-linear in ``color_space.source_primaries`` (reuse the HLG tensor when that
+ is already Rec.709).
+ Peak memory stays proportional to one chunk rather than the whole clip.
+ Args:
+ chunks: Per-chunk VAE decode output, each ``[F, H, W, C]`` float in ``[0, 1]``
+ (the compressed working-space signal).
+ output_path: Destination of the HLG master. EXR frames go to ``<stem>_exr/``.
+ fps: Output frame rate.
+ color_space: HDR colour space for EXR tags / linear EXR primaries.
+ max_workers: Number of EXR writer threads.
+ audio: Optional stereo track muxed into the HLG master.
+ device: Device for the HLG colour conversion. Defaults to CUDA when available.
+ Returns:
+ The directory the EXR frames were written to.
+ Raises:
+ ValueError: If ``chunks`` yields nothing.
+ """
+ transfer = color_space.transfer
+ exr_dir = output_path.parent / f"{output_path.stem}_exr"
+ exr_dir.mkdir(parents=True, exist_ok=True)
+ exr_primaries, exr_color_space = color_space.exr_output_tags()
+ frames_written = 0
+
+ def hlg_chunks() -> Iterator[torch.Tensor]:
+ """Write EXR for each chunk, then yield Rec.709 linear for the HLG encoder."""
+ nonlocal frames_written
+ with ThreadPoolExecutor(max_workers=max_workers) as executor:
+ pending: deque[Future[None]] = deque()
+ for chunk in chunks:
+ # HLG sink: always Rec.709 scene-linear.
+ hlg_linear = decode_hdr_video(chunk, transfer)
+
+ # EXR sink: independent of HLG (reuse only when pixels already match).
+ if color_space.is_log_working:
+ exr_hdr = chunk.float()
+ elif color_space.source_primaries is Primaries.REC709:
+ exr_hdr = hlg_linear
+ else:
+ exr_hdr = decode_hdr_video(chunk, transfer, out_primaries=color_space.source_primaries)
+
+ for frame in exr_hdr:
+ path = exr_dir / f"frame_{frames_written:05d}.exr"
+ pending.append(
+ executor.submit(
+ save_exr_tensor, frame.cpu().clone(), str(path), True, exr_primaries, exr_color_space
+ )
+ )
+ frames_written += 1
+ # Bound the writer backlog so pinned CPU frames cannot grow to the whole clip.
+ while len(pending) > 2 * max_workers:
+ pending.popleft().result()
+ yield hlg_linear
+ while pending:
+ pending.popleft().result()
+
+ logger.info(
+ "Encoding BT.2020/HLG/10-bit master%s: %s",
+ " (with audio)" if audio is not None else "",
+ output_path,
+ )
+ # Empty ``chunks`` raises inside the HLG encoder (after EXR side effects are none).
+ encode_linear_hdr_frames_to_hlg_mp4(
+ hlg_chunks(), output_path, fps=fps, primaries=Primaries.REC709, audio=audio, device=device
+ )
+ logger.info(
+ "Wrote %d EXR frames (%s/%s) to %s",
+ frames_written,
+ exr_primaries.value,
+ exr_color_space,
+ exr_dir,
+ )
+ return exr_dir
+
+
+def encode_video(
+ video: torch.Tensor | Iterator[torch.Tensor],
+ fps: int,
+ audio: Audio | None,
+ output_path: str,
+ video_chunks_number: int,
+ frame_converter: FrameConverter = yuv420p_bt709_converter_,
+ crf: int = 19,
+ preset: str = "veryfast",
+ thread_count: int = 0,
+ *,
+ color_space: HDRColorSpace | None = None,
+) -> Path | None:
+ """Encode RGB frames to video; SDR H.264 or HDR EXR+HLG when ``color_space`` is set.
+ Args:
+ video: RGB frames as a ``(F, H, W, C)`` float ``[0, 1]`` tensor, or an iterator of
+ such per-chunk tensors (e.g. the VAE decoder output). An empty iterator raises.
+ For HDR this is the compressed working-space signal from VAE decode.
+ fps: Output frame rate.
+ audio: Audio track to mux, or None for a video-only file. Waveform must be stereo
+ ``(2, N)`` or ``(N, 2)``.
+ output_path: Destination path. Parent directories are created if missing.
+ Partial SDR output is removed if encoding fails. HDR writes EXR under
+ ``<stem>_exr/`` and an HLG master to this path.
+ video_chunks_number: Number of chunks yielded by ``video``, for the progress bar
+ (SDR path only).
+ frame_converter: Float-to-pixel converter (default YUV420p BT.709); SDR only.
+ crf: libx264 constant rate factor; lower is higher quality (0-51); SDR only.
+ preset: libx264 speed/compression preset; SDR only.
+ thread_count: libx264 thread count (0 = auto); SDR only.
+ color_space: HDR colour space for the encode sink. ``None`` (default) is SDR.
+ When set, writes half EXR frames + HLG master.
+ Returns:
+ EXR output directory when HDR, else ``None``.
+ Raises:
+ ValueError: On an empty ``video`` or a non-stereo ``audio.waveform``.
+ """
+ if audio is not None:
+ _validate_audio_waveform(audio)
+
+ if isinstance(video, torch.Tensor):
+ video = iter([video])
+
+ if color_space is not None:
+ return _encode_hdr_video_outputs(
+ video,
+ Path(output_path),
+ fps=float(fps),
+ color_space=color_space,
+ audio=audio,
+ )
+
+ def convert(chunk: torch.Tensor) -> torch.Tensor:
+ return frame_converter(chunk.movedim(-1, -3))
+
+ first_raw_chunk = next(video, None)
+ if first_raw_chunk is None:
+ raise ValueError("video is empty; expected at least one frame chunk.")
+ first_chunk = convert(first_raw_chunk)
+
+ if frame_converter.pixel_format == PixelFormat.RGB24:
+ height, width = first_chunk.shape[-3], first_chunk.shape[-2]
+ else:
+ height = first_chunk.shape[-2] * 2 // 3
+ width = first_chunk.shape[-1]
+
+ # PyAV/FFmpeg won't create missing parent directories; do it so a nested
+ # --output-path (e.g. /tmp/run/clip.mp4) doesn't fail at mux time.
+ Path(output_path).parent.mkdir(parents=True, exist_ok=True)
+ container = av.open(output_path, mode="w")
+ success = False
+ try:
+ stream = container.add_stream("libx264", rate=int(fps), options={"crf": str(crf), "preset": preset})
+ stream.width = width
+ stream.height = height
+ stream.pix_fmt = "yuv420p"
+ stream.codec_context.thread_count = thread_count
+ stream.codec_context.thread_type = "FRAME"
+ if frame_converter.color_space is not None:
+ stream.codec_context.colorspace = frame_converter.color_space.av_colorspace
+ if frame_converter.color_range is not None:
+ stream.codec_context.color_range = frame_converter.color_range.av_color_range
+
+ if audio is not None:
+ audio_stream = _prepare_audio_stream(container, audio.sampling_rate)
+
+ av_format = frame_converter.pixel_format.av_format
+
+ def cpu_chunks() -> Generator[np.ndarray, None, None]:
+ yield first_chunk.to("cpu").numpy()
+ for chunk in video:
+ yield convert(chunk).to("cpu").numpy()
+
+ _encode_chunks_threaded(
+ container=container,
+ stream=stream,
+ av_format=av_format,
+ chunks=cpu_chunks(),
+ progress_total=video_chunks_number,
+ )
+
+ if audio is not None:
+ _write_audio(container, audio_stream, audio)
+ success = True
+ finally:
+ container.close()
+ if not success:
+ Path(output_path).unlink(missing_ok=True)
+ logger.info(f"Video saved to {output_path}")
+ return None
+
+
+def encode_audio(audio: Audio, output_path: str) -> None:
+ """Save an audio waveform as a 16-bit PCM ``.wav`` file at the source sampling rate.
+ Reuses :func:`_write_audio` (the same muxing path used by :func:`encode_video`);
+ the only difference is a PCM (``pcm_s16le``) stream in a WAV container instead of
+ the AAC stream used for muxed video.
+ """
+ _validate_audio_waveform(audio)
+ Path(output_path).parent.mkdir(parents=True, exist_ok=True)
+ container = av.open(output_path, mode="w")
+ audio_stream = container.add_stream("pcm_s16le", rate=audio.sampling_rate)
+ audio_stream.codec_context.sample_rate = audio.sampling_rate
+ audio_stream.codec_context.layout = "stereo"
+ audio_stream.codec_context.time_base = Fraction(1, audio.sampling_rate)
+ try:
+ _write_audio(container, audio_stream, audio)
+ finally:
+ container.close()
+ logger.info(f"Audio saved to {output_path}")
+
+
+def _encode_chunks_threaded(
+ container: av.container.Container,
+ stream: av.video.stream.VideoStream,
+ av_format: str,
+ chunks: Iterator[np.ndarray],
+ progress_total: int,
+) -> None:
+ """Run libx264 frame.encode + container.mux on a background thread while
+ the caller produces numpy chunks on the current thread. The 1-slot queue
+ lets the producer get one chunk ahead (so the next VAE/gather chunk
+ overlaps with libx264 encoding the previous chunk) without buffering more
+ than one chunk in CPU memory.
+ """
+ chunk_queue: Queue[np.ndarray | None] = Queue(maxsize=1)
+ encoder_error: list[BaseException] = []
+
+ def encoder_worker() -> None:
+ error: BaseException | None = None
+ while True:
+ arr = chunk_queue.get()
+ if arr is None:
+ break
+ if error is not None:
+ continue
+ try:
+ for frame_array in arr:
+ frame = av.VideoFrame.from_ndarray(frame_array, format=av_format)
+ for packet in stream.encode(frame):
+ container.mux(packet)
+ except Exception as e:
+ error = e
+ if error is None:
+ try:
+ for packet in stream.encode():
+ container.mux(packet)
+ except Exception as e:
+ error = e
+ if error is not None:
+ encoder_error.append(error)
+
+ encoder_thread = threading.Thread(target=encoder_worker, name="h264-encoder")
+ encoder_thread.start()
+ try:
+ for arr in tqdm(chunks, total=progress_total):
+ chunk_queue.put(arr)
+ finally:
+ chunk_queue.put(None)
+ encoder_thread.join()
+
+ if encoder_error:
+ raise encoder_error[0]
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/exr.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/exr.py
new file mode 100644
index 0000000..48ad0ca
--- /dev/null
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/exr.py
@@ -0,0 +1,255 @@
+"""OpenEXR read/write and HDR EXR conditioning loaders."""
+
+from __future__ import annotations
+
+import logging
+from collections.abc import Iterator
+from fractions import Fraction
+from pathlib import Path
+
+import av
+import numpy as np
+import OpenImageIO
+import torch
+
+from ltx_core.color.primaries import Primaries
+from ltx_pipelines.utils.media_io.color_config import HDRColorSpace
+from ltx_pipelines.utils.media_io.range_map import to_vae_range
+from ltx_pipelines.utils.media_io.resize import ResizeMode, resize_and_center_crop, resize_and_reflect_pad
+
+logger = logging.getLogger(__name__)
+
+
+def is_exr_dir(path: str | Path) -> bool:
+ """Return True if *path* is a directory that directly contains ``*.exr`` files."""
+ p = Path(path)
+ return p.is_dir() and any(p.glob("*.exr"))
+
+
+def read_exr(path: str | Path) -> torch.Tensor:
+ """Read a scene-linear EXR frame as a float32 ``[H, W, 3]`` RGB tensor.
+ Uses OpenImageIO (the same backend as :func:`save_exr_tensor`), which returns
+ channels in file order (R, G, B). Alpha and extra channels are dropped; a
+ single-channel EXR is broadcast to three channels. Values are returned
+ unmodified (unbounded scene-linear, so highlights > 1.0 survive).
+ """
+ buf = OpenImageIO.ImageBuf(str(path))
+ pixels = buf.get_pixels(OpenImageIO.FLOAT)
+ if pixels is None or buf.has_error:
+ raise RuntimeError(f"Failed to read EXR '{path}': {buf.geterror()}")
+ arr = np.ascontiguousarray(np.asarray(pixels, dtype=np.float32))
+ if arr.ndim == 2:
+ arr = arr[..., None]
+ arr = np.repeat(arr, 3, axis=-1) if arr.shape[-1] == 1 else arr[..., :3]
+ return torch.from_numpy(np.ascontiguousarray(arr))
+
+
+def _exr_paths_for_conditioning(path: str | Path) -> list[Path]:
+ """Resolve a still ``.exr`` or an EXR folder to a sorted frame list."""
+ p = Path(path)
+ if p.is_file() and p.suffix.lower() == ".exr":
+ return [p]
+ if p.is_dir():
+ exr_files = sorted(p.glob("*.exr"))
+ if not exr_files:
+ raise RuntimeError(f"No EXR frames found in {path}")
+ return exr_files
+ raise ValueError(f"EXR conditioning path must be a .exr file or a directory of EXRs; got {path!r}")
+
+
+def load_exr_conditioning_hdr(
+ path: str | Path,
+ height: int,
+ width: int,
+ dtype: torch.dtype,
+ device: torch.device,
+ *,
+ frame_cap: int,
+ frame_start: int = 0,
+ color_space: HDRColorSpace,
+ resize_mode: ResizeMode = ResizeMode.REFLECT_PAD,
+) -> Iterator[torch.Tensor]:
+ """Load EXR still(s) as HDR conditioning for the VAE.
+ ``path`` may be a single ``.exr`` or a directory of ``*.exr`` frames (sorted
+ lexicographically). Colour handling follows ``color_space``:
+ * ``SRGB_LINEAR`` / ``ACESCG`` — compress via :meth:`HDRTransfer.to_working_space`
+ (ACEScct) from the matching source primaries.
+ * ``ACESCCT`` — already working-space log codes; clamp then :func:`to_vae_range`
+ (no transfer).
+ Yields:
+ Per-frame tensors of shape ``(1, C, 1, height, width)`` in VAE range.
+ """
+ exr_files = _exr_paths_for_conditioning(path)[frame_start:]
+ if not exr_files:
+ raise RuntimeError(f"No EXR frames left in {path!r} after frame_start={frame_start}")
+
+ resize_fn = resize_and_reflect_pad if resize_mode is ResizeMode.REFLECT_PAD else resize_and_center_crop
+
+ count = 0
+ for fp in exr_files:
+ if count >= frame_cap:
+ break
+ pixels = read_exr(fp).to(device=device, dtype=torch.float32) # [H, W, 3]
+ frame = resize_fn(pixels, height, width) # [1, 3, 1, H, W]
+ if color_space.is_log_working:
+ # Already working-space codes; clamp file noise into the legal range.
+ working = frame.clamp(0.0, 1.0)
+ else:
+ working = color_space.transfer.to_working_space(frame, source_primaries=color_space.source_primaries)
+ yield to_vae_range(working).to(device=device, dtype=dtype)
+ count += 1
+
+ if count < frame_cap:
+ logger.warning(
+ "load_exr_conditioning_hdr: requested %d frames from '%s' (frame_start=%d) "
+ "but only %d were available — conditioning is shorter than the generation length.",
+ frame_cap,
+ path,
+ frame_start,
+ count,
+ )
+
+
+def load_exr_folder_conditioning_hdr(
+ exr_dir: str | Path,
+ height: int,
+ width: int,
+ frame_cap: int,
+ dtype: torch.dtype,
+ device: torch.device,
+ color_space: HDRColorSpace,
+ resize_mode: ResizeMode = ResizeMode.REFLECT_PAD,
+ frame_start: int = 0,
+) -> Iterator[torch.Tensor]:
+ """Load a folder of EXR frames as HDR conditioning. See :func:`load_exr_conditioning_hdr`."""
+ return load_exr_conditioning_hdr(
+ exr_dir,
+ height,
+ width,
+ dtype,
+ device,
+ frame_cap=frame_cap,
+ frame_start=frame_start,
+ color_space=color_space,
+ resize_mode=resize_mode,
+ )
+
+
+def load_exr_image_conditioning_hdr(
+ exr_path: str | Path,
+ height: int,
+ width: int,
+ dtype: torch.dtype,
+ device: torch.device,
+ color_space: HDRColorSpace,
+ resize_mode: ResizeMode = ResizeMode.CENTER_CROP,
+) -> torch.Tensor:
+ """Load a single EXR still as HDR image conditioning for the VAE.
+ Thin wrapper over :func:`load_exr_conditioning_hdr` (default center-crop).
+ Returns:
+ Tensor ``(1, C, 1, height, width)`` in VAE range ``[-1, 1]``.
+ """
+ return next(
+ load_exr_conditioning_hdr(
+ exr_path,
+ height,
+ width,
+ dtype,
+ device,
+ frame_cap=1,
+ color_space=color_space,
+ resize_mode=resize_mode,
+ )
+ )
+
+
+def save_exr_tensor(
+ tensor: torch.Tensor,
+ file_path: str | Path,
+ half: bool = True,
+ primaries: Primaries = Primaries.REC709,
+ color_space: str = "sRGB",
+) -> None:
+ """Save a single tensor frame as EXR, tagged with its colour space.
+ Args:
+ tensor: ``[H, W, C]`` or ``[C, H, W]`` float tensor.
+ file_path: Output path (e.g. ``frame_0000.exr``).
+ half: Write float16 with ZIP compression (default True).
+ primaries: Colour gamut for the ``chromaticities`` tag.
+ color_space: Value for the ``colorSpace`` tag, describing the transfer
+ encoding (e.g. ``"sRGB"``/``"ACEScg"`` for linear, ``"ACEScct"``/
+ ``"LogC3"`` for log).
+ """
+ if tensor.dim() == 3 and tensor.shape[0] == 3:
+ tensor = tensor.permute(1, 2, 0)
+ use_half = half or tensor.dtype in (torch.float16, torch.half)
+ img_np = np.ascontiguousarray(tensor.cpu().numpy().astype(np.float32))
+ file_path = str(file_path)
+
+ h, w = img_np.shape[:2]
+ fmt = OpenImageIO.HALF if use_half else OpenImageIO.FLOAT
+ spec = OpenImageIO.ImageSpec(w, h, 3, fmt)
+ spec.channelnames = ("R", "G", "B")
+ spec.attribute("compression", "zip")
+ spec.attribute("chromaticities", "float[8]", primaries.exr_chromaticities)
+ spec.attribute("colorSpace", color_space)
+
+ out = OpenImageIO.ImageOutput.create(file_path)
+ if out is None:
+ raise RuntimeError(
+ f"Failed to create EXR writer for '{file_path}'. Ensure OpenImageIO is built with OpenEXR support."
+ )
+ try:
+ if not out.open(file_path, spec):
+ raise RuntimeError(f"Failed to open EXR file '{file_path}': {out.geterror()}")
+ if not out.write_image(img_np):
+ raise RuntimeError(f"Failed to write EXR image '{file_path}': {out.geterror()}")
+ finally:
+ out.close()
+
+
+def _linear_to_srgb(x: np.ndarray) -> np.ndarray:
+ """Linear -> sRGB OETF per IEC 61966-2-1. Input assumed in [0, 1]."""
+ x = np.clip(x, 0.0, 1.0)
+ return np.where(x <= 0.0031308, x * 12.92, 1.055 * np.power(x, 1.0 / 2.4) - 0.055)
+
+
+def encode_exr_sequence_to_mp4(exr_dir: Path, output_mp4: Path, frame_rate: float) -> None:
+ """Convert a linear EXR frame sequence to sRGB and encode to H.264 .mp4 via PyAV.
+ Exposure is fixed at EV=0 (no gain). Each EXR frame is clamped to [0, 1],
+ passed through the sRGB OETF, quantised to 8-bit BGR, and fed to a libx264
+ stream (crf 18, yuv420p). ``frame_rate`` is the original source video's
+ frame rate so playback matches the input timing.
+ """
+ import os # noqa: PLC0415
+
+ os.environ["OPENCV_IO_ENABLE_OPENEXR"] = "1"
+ import cv2 # noqa: PLC0415
+
+ exr_files = sorted(exr_dir.glob("frame_*.exr"))
+ if not exr_files:
+ raise FileNotFoundError(f"No EXR frames found in {exr_dir}")
+
+ container = av.open(str(output_mp4), mode="w")
+ stream = container.add_stream("libx264", rate=Fraction(frame_rate).limit_denominator(1000))
+ stream.pix_fmt = "yuv420p"
+ stream.options = {"crf": "18", "movflags": "+faststart"}
+
+ try:
+ for i, exr_path in enumerate(exr_files):
+ hdr = cv2.imread(str(exr_path), cv2.IMREAD_UNCHANGED).astype(np.float32)
+ sdr = _linear_to_srgb(np.maximum(hdr, 0.0))
+ bgr8 = (sdr * 255.0 + 0.5).astype(np.uint8)
+
+ if i == 0:
+ stream.height = bgr8.shape[0]
+ stream.width = bgr8.shape[1]
+
+ frame = av.VideoFrame.from_ndarray(bgr8, format="bgr24")
+ for packet in stream.encode(frame):
+ container.mux(packet)
+
+ for packet in stream.encode():
+ container.mux(packet)
+ finally:
+ container.close()
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/range_map.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/range_map.py
new file mode 100644
index 0000000..d6d1ded
--- /dev/null
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/range_map.py
@@ -0,0 +1,25 @@
+"""Map between display/working [0,1] and VAE [-1,1]."""
+
+from __future__ import annotations
+
+import torch
+
+
+def normalize_images(images: torch.Tensor, device: torch.device, dtype: torch.dtype) -> torch.Tensor:
+ return (images / 127.5 - 1.0).to(device=device, dtype=dtype)
+
+
+def to_vae_range(x: torch.Tensor) -> torch.Tensor:
+ """Map [0, 1] working-space codes to [-1, 1] (VAE input convention).
+ Raises:
+ ValueError: If ``x`` is outside ``[0, 1]`` (callers must compress or
+ already hold valid working-space codes — this does not clamp).
+ """
+ if bool((x < 0).any() or (x > 1).any()):
+ raise ValueError(f"to_vae_range expects values in [0, 1]; got min={float(x.min())}, max={float(x.max())}")
+ return x * 2.0 - 1.0
+
+
+def from_vae_range(z: torch.Tensor) -> torch.Tensor:
+ """Map [-1, 1] (VAE output convention) to [0, 1]."""
+ return torch.clamp((z + 1.0) / 2.0, 0.0, 1.0)
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/resize.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/resize.py
new file mode 100644
index 0000000..0a8c8e6
--- /dev/null
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/media_io/resize.py
@@ -0,0 +1,143 @@
+"""Spatial resize helpers for conditioning and encode."""
+
+from __future__ import annotations
+
+import enum
+import math
+
+import torch
+from einops import rearrange
+
+
+class ResizeMode(enum.Enum):
+ """How to fit a conditioning video to the target resolution."""
+
+ CENTER_CROP = "center_crop"
+ REFLECT_PAD = "reflect_pad"
+
+
+def resize_aspect_ratio_preserving(image: torch.Tensor, long_side: int) -> torch.Tensor:
+ """
+ Resize image preserving aspect ratio (filling target long side).
+ Preserves the input dimensions order.
+ Args:
+ image: Input image tensor with shape (F (optional), H, W, C)
+ long_side: Target long side size.
+ Returns:
+ Tensor with shape (F (optional), H, W, C) F = 1 if input is 3D, otherwise input shape[0]
+ """
+ height, width = image.shape[-3], image.shape[-2]
+ max_side = max(height, width)
+ scale = long_side / float(max_side)
+ target_height = int(height * scale)
+ target_width = int(width * scale)
+ resized = resize_and_center_crop(image, target_height, target_width)
+ # rearrange and remove batch dimension
+ result = rearrange(resized, "b c f h w -> b f h w c")[0]
+ # preserve input dimensions
+ return result[0] if result.shape[0] == 1 else result
+
+
+def resize_and_center_crop(tensor: torch.Tensor, height: int, width: int) -> torch.Tensor:
+ """
+ Resize tensor preserving aspect ratio (filling target), then center crop to exact dimensions.
+ Args:
+ latent: Input tensor with shape (H, W, C) or (F, H, W, C)
+ height: Target height
+ width: Target width
+ Returns:
+ Tensor with shape (1, C, 1, height, width) for 3D input or (1, C, F, height, width) for 4D input
+ """
+ if tensor.ndim == 3:
+ tensor = rearrange(tensor, "h w c -> 1 c h w")
+ elif tensor.ndim == 4:
+ tensor = rearrange(tensor, "f h w c -> f c h w")
+ else:
+ raise ValueError(f"Expected input with 3 or 4 dimensions; got shape {tensor.shape}.")
+
+ _, _, src_h, src_w = tensor.shape
+
+ scale = max(height / src_h, width / src_w)
+ # Use ceil to avoid floating-point rounding causing new_h/new_w to be
+ # slightly smaller than target, which would result in negative crop offsets.
+ new_h = math.ceil(src_h * scale)
+ new_w = math.ceil(src_w * scale)
+
+ tensor = torch.nn.functional.interpolate(tensor, size=(new_h, new_w), mode="bilinear", align_corners=False)
+
+ crop_top = (new_h - height) // 2
+ crop_left = (new_w - width) // 2
+ tensor = tensor[:, :, crop_top : crop_top + height, crop_left : crop_left + width]
+
+ tensor = rearrange(tensor, "f c h w -> 1 c f h w")
+ return tensor
+
+
+def align_resolution(
+ width: int,
+ height: int,
+ resize_mode: ResizeMode,
+ divisor: int = 64,
+) -> tuple[int, int, int, int]:
+ """Compute aligned generation dimensions and crop-back size.
+ Args:
+ width: Source video width (need not be aligned).
+ height: Source video height (need not be aligned).
+ resize_mode: CENTER_CROP rounds down; REFLECT_PAD rounds up.
+ divisor: Alignment divisor (default 64 for two-stage pipelines).
+ Returns:
+ ``(gen_width, gen_height, crop_width, crop_height)`` where
+ ``gen_*`` are multiples of *divisor* and ``crop_*`` are the
+ original dimensions to trim back to after decoding. When no
+ cropping is needed ``crop_*`` equals ``gen_*``.
+ """
+ if resize_mode is ResizeMode.REFLECT_PAD:
+ gen_w = ((width + divisor - 1) // divisor) * divisor
+ gen_h = ((height + divisor - 1) // divisor) * divisor
+ else:
+ gen_w = (width // divisor) * divisor
+ gen_h = (height // divisor) * divisor
+
+ crop_w = width if gen_w != width else gen_w
+ crop_h = height if gen_h != height else gen_h
+ return gen_w, gen_h, crop_w, crop_h
+
+
+def resize_and_reflect_pad(tensor: torch.Tensor, height: int, width: int) -> torch.Tensor:
+ """Resize tensor to fit within target, then reflect-pad to exact dimensions.
+ Unlike resize_and_center_crop which stretches and crops, this preserves the
+ original aspect ratio and pads the shorter dimension with reflected pixels.
+ When the target is already >= the source in both dimensions, interpolation
+ is skipped entirely to preserve original pixels.
+ Args:
+ tensor: Input with shape (H, W, C) or (F, H, W, C)
+ height: Target height
+ width: Target width
+ Returns:
+ Tensor with shape (1, C, 1, height, width) for 3D or (1, C, F, height, width) for 4D
+ """
+ if tensor.ndim == 3:
+ tensor = rearrange(tensor, "h w c -> 1 c h w")
+ elif tensor.ndim == 4:
+ tensor = rearrange(tensor, "f h w c -> f c h w")
+ else:
+ raise ValueError(f"Expected input with 3 or 4 dimensions; got shape {tensor.shape}.")
+
+ _, _, src_h, src_w = tensor.shape
+
+ if height >= src_h and width >= src_w:
+ new_h, new_w = src_h, src_w
+ else:
+ scale = min(height / src_h, width / src_w)
+ new_h = round(src_h * scale)
+ new_w = round(src_w * scale)
+ tensor = torch.nn.functional.interpolate(tensor, size=(new_h, new_w), mode="bilinear", align_corners=False)
+
+ pad_bottom = height - new_h
+ pad_right = width - new_w
+ if pad_bottom > 0 or pad_right > 0:
+ pad_mode = "reflect" if pad_bottom < new_h and pad_right < new_w else "replicate"
+ tensor = torch.nn.functional.pad(tensor, (0, pad_right, 0, pad_bottom), mode=pad_mode)
+
+ tensor = rearrange(tensor, "f c h w -> 1 c f h w")
+ return tensor
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/model_paths.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/model_paths.py
new file mode 100644
index 0000000..9489ec2
--- /dev/null
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/model_paths.py
@@ -0,0 +1,189 @@
+"""Normalized model-component paths for monolith and split checkpoint layouts.
+``ModelPaths`` is the post-parse contract for component locations. The CLI builds it
+(via :func:`model_paths_from_namespace` or an explicit factory); pipelines and blocks
+fetch the slots they need via typed accessors (``transformer()``, ``text_encoder()``, …)
+that return ``str`` or raise. Unused slots stay ``None`` — never filled with dummy paths.
+"""
+
+from __future__ import annotations
+
+import argparse
+from dataclasses import dataclass
+from typing import Literal
+
+
+@dataclass(frozen=True, slots=True)
+class ModelPaths:
+ """Resolved paths for LTX components.
+ Construct via :meth:`from_monolith` or :meth:`from_split` — those factories set
+ :attr:`embeddings_weight_paths` explicitly. ``mode`` is descriptive only; it is not
+ consulted when resolving embeddings sources.
+ Component slots other than those a given pipeline loads may be ``None``. Call the
+ typed accessors at the use site so a missing path fails where it is needed.
+ Two mutually exclusive modes:
+ * ``monolith`` — legacy fat checkpoint (+ optional ``gemma_root`` directory).
+ * ``split`` — Comfy-aligned layout with explicit per-component safetensors.
+ """
+
+ mode: Literal["monolith", "split"]
+ transformer_path: str | None
+ text_encoder_path: str | None
+ video_vae_path: str | None
+ audio_vae_path: str | None
+ duration_head_path: str | None
+ # Weight sources for EmbeddingsProcessor (config / gemma_source_checkpoint from first
+ # path). Monolith: (checkpoint,). Split with TE: (transformer, text_encoder).
+ embeddings_weight_paths: tuple[str, ...]
+
+ def transformer(self) -> str:
+ return self._require("transformer_path")
+
+ def text_encoder(self) -> str:
+ return self._require("text_encoder_path")
+
+ def video_vae(self) -> str:
+ return self._require("video_vae_path")
+
+ def audio_vae(self) -> str:
+ return self._require("audio_vae_path")
+
+ def duration_head(self) -> str:
+ return self._require("duration_head_path")
+
+ def _require(self, attr: str) -> str:
+ if attr not in _COMPONENT_ATTRS:
+ raise ValueError(f"Unknown ModelPaths component {attr!r}. Expected one of {_COMPONENT_ATTRS}.")
+ value = getattr(self, attr)
+ if value is None:
+ raise ValueError(
+ f"ModelPaths.{attr} is required but missing (mode={self.mode!r}). "
+ f"Pass the corresponding CLI flag or factory argument."
+ )
+ return value
+
+ @classmethod
+ def from_monolith(
+ cls,
+ checkpoint_path: str,
+ gemma_root: str | None = None,
+ *,
+ video_vae_path: str | None = None,
+ ) -> ModelPaths:
+ """Build paths for a fat checkpoint.
+ ``gemma_root`` may be ``None`` when the caller does not encode prompts (e.g. HDR
+ with precomputed embeddings). Other components point at the checkpoint file
+ itself (or ``video_vae_path`` for the video VAE override).
+ """
+ return cls(
+ mode="monolith",
+ transformer_path=checkpoint_path,
+ text_encoder_path=gemma_root,
+ video_vae_path=video_vae_path or checkpoint_path,
+ audio_vae_path=checkpoint_path,
+ duration_head_path=checkpoint_path,
+ embeddings_weight_paths=(checkpoint_path,),
+ )
+
+ @classmethod
+ def from_split(
+ cls,
+ *,
+ transformer_path: str | None = None,
+ text_encoder_path: str | None = None,
+ video_vae_path: str | None = None,
+ audio_vae_path: str | None = None,
+ duration_head_path: str | None = None,
+ ) -> ModelPaths:
+ """Build paths for an explicit split pack; omitted components stay ``None``."""
+ if transformer_path is not None and text_encoder_path is not None:
+ embeddings: tuple[str, ...] = (transformer_path, text_encoder_path)
+ elif transformer_path is not None:
+ embeddings = (transformer_path,)
+ else:
+ embeddings = ()
+ return cls(
+ mode="split",
+ transformer_path=transformer_path,
+ text_encoder_path=text_encoder_path,
+ video_vae_path=video_vae_path,
+ audio_vae_path=audio_vae_path,
+ duration_head_path=duration_head_path,
+ embeddings_weight_paths=embeddings,
+ )
+
+
+_COMPONENT_ATTRS = frozenset(
+ {
+ "transformer_path",
+ "text_encoder_path",
+ "video_vae_path",
+ "audio_vae_path",
+ "duration_head_path",
+ }
+)
+
+# Flags that select split pack mode. ``video_vae_path`` is intentionally omitted: it is
+# a shared slot (monolith DiffVAE override *and* split component) and must not flip XOR.
+_SPLIT_PACK_FLAGS = (
+ "transformer_path",
+ "text_encoder_path",
+ "audio_vae_path",
+ "duration_head_path",
+)
+
+_SPLIT_COMPONENT_FLAGS = (
+ "transformer_path",
+ "text_encoder_path",
+ "video_vae_path",
+ "audio_vae_path",
+ "duration_head_path",
+)
+
+
+def model_paths_from_namespace(namespace: argparse.Namespace) -> ModelPaths:
+ """Build :class:`ModelPaths` from a parsed CLI namespace.
+ Enforces monolith XOR split. Split mode is selected by any pack-identifying
+ flag (``--transformer-path``, ``--text-encoder-path``, ``--audio-vae-path``,
+ ``--duration-head-path``); ``--video-vae-path`` fills the shared video VAE
+ slot in either mode. Pipelines fetch components via typed accessors. Monolith
+ mode still needs a checkpoint plus ``--gemma-root`` (shared prompt-encoding CLIs).
+ """
+ split_values = {name: getattr(namespace, name, None) for name in _SPLIT_COMPONENT_FLAGS}
+ pack_set = {k: v for k, v in split_values.items() if k in _SPLIT_PACK_FLAGS and v is not None}
+ video_vae = split_values["video_vae_path"]
+
+ monolith_ckpt = getattr(namespace, "checkpoint_path", None) or getattr(namespace, "distilled_checkpoint_path", None)
+ gemma_root = getattr(namespace, "gemma_root", None)
+
+ if pack_set and (monolith_ckpt is not None or gemma_root is not None):
+ raise SystemExit(
+ "Split pack flags (--transformer-path, --text-encoder-path, "
+ "--audio-vae-path, --duration-head-path) cannot be combined with "
+ "--checkpoint-path / --distilled-checkpoint-path / --gemma-root. "
+ "--video-vae-path is allowed in either mode (shared video VAE slot)."
+ )
+
+ if pack_set:
+ return ModelPaths.from_split(
+ transformer_path=split_values["transformer_path"],
+ text_encoder_path=split_values["text_encoder_path"],
+ video_vae_path=video_vae,
+ audio_vae_path=split_values["audio_vae_path"],
+ duration_head_path=split_values["duration_head_path"],
+ )
+
+ if monolith_ckpt is None or gemma_root is None:
+ raise SystemExit(
+ "Provide either monolith args (--checkpoint-path or --distilled-checkpoint-path "
+ "+ --gemma-root) or one or more split pack flags "
+ "(--transformer-path, --text-encoder-path, --audio-vae-path, "
+ "--duration-head-path). --video-vae-path fills the video VAE slot in either mode."
+ )
+
+ # Monolith default for video VAE is the fat checkpoint; only pass an explicit override.
+ override = video_vae if video_vae is not None and video_vae != monolith_ckpt else None
+ return ModelPaths.from_monolith(
+ monolith_ckpt,
+ gemma_root,
+ video_vae_path=override,
+ )
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/quantization_factory.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/quantization_factory.py
index 1eeb1d7..e21f7e7 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/utils/quantization_factory.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/quantization_factory.py
@@ -12,25 +12,39 @@ from typing_extensions import assert_never
from ltx_core.quantization import QuantizationPolicy
from ltx_core.quantization.fp8_cast import build_policy as _build_fp8_cast_policy
from ltx_core.quantization.fp8_scaled_mm import build_policy as _build_fp8_scaled_mm_policy
+from ltx_core.quantization.nvfp4 import (
+ ActScale,
+ build_nvfp4_cast_policy,
+ build_nvfp4_prequant_policy,
+)
class QuantizationKind(str, Enum):
FP8_CAST = "fp8-cast"
FP8_SCALED_MM = "fp8-scaled-mm"
+ NVFP4_CAST = "nvfp4-cast"
+ NVFP4_PREQUANT = "nvfp4-prequant"
def to_policy(self, checkpoint_path: str | None = None) -> QuantizationPolicy:
"""Build the :class:`QuantizationPolicy` for this kind.
- ``checkpoint_path`` is required for both backends: ``FP8_SCALED_MM``
- uses it to discover the layer set from ``.weight_scale`` tensors,
- and ``FP8_CAST`` uses it to fold any prequant scales into the fp8
- weight at load time.
+ ``checkpoint_path`` is required for ``FP8_*`` and ``NVFP4_PREQUANT``.
+ ``NVFP4_CAST`` ignores it (online BF16→NVFP4); the CLI still asks for
+ a path so the missing-flag error stays uniform across kinds.
"""
- if checkpoint_path is None:
- raise ValueError(f"{self.value} quantization requires checkpoint_path.")
match self:
case QuantizationKind.FP8_CAST:
+ if checkpoint_path is None:
+ raise ValueError(f"{self.value} quantization requires checkpoint_path.")
return _build_fp8_cast_policy(checkpoint_path)
case QuantizationKind.FP8_SCALED_MM:
+ if checkpoint_path is None:
+ raise ValueError(f"{self.value} quantization requires checkpoint_path.")
return _build_fp8_scaled_mm_policy(checkpoint_path)
+ case QuantizationKind.NVFP4_CAST:
+ return build_nvfp4_cast_policy(act_scale=ActScale.FIXED_1)
+ case QuantizationKind.NVFP4_PREQUANT:
+ if checkpoint_path is None:
+ raise ValueError(f"{self.value} quantization requires checkpoint_path.")
+ return build_nvfp4_prequant_policy(checkpoint_path, act_scale=ActScale.STATIC)
case _:
assert_never(self)
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/samplers.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/samplers.py
index 1ff333f..8c477c4 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/utils/samplers.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/samplers.py
@@ -1,19 +1,23 @@
import logging
-from dataclasses import replace
+from dataclasses import dataclass, replace
from functools import partial
from typing import Callable
import torch
from tqdm import tqdm
-from ltx_core.components.diffusion_steps import EulerCfgPpDiffusionStep, Res2sDiffusionStep
+from ltx_core.components.diffusion_steps import (
+ EulerAncestralDiffusionStep,
+ EulerCfgPpDiffusionStep,
+ Res2sDiffusionStep,
+)
from ltx_core.components.protocols import DiffusionStepProtocol
from ltx_core.devices import highest_precision_float
from ltx_core.model.transformer import X0Model
from ltx_core.utils import to_denoised, to_velocity
from ltx_pipelines.utils.helpers import post_process_latent, timesteps_from_mask
from ltx_pipelines.utils.res2s import get_res2s_coefficients
-from ltx_pipelines.utils.types import Denoiser, LatentState
+from ltx_pipelines.utils.types import DenoisedLatentResult, Denoiser, LatentState
logger = logging.getLogger(__name__)
@@ -443,7 +447,192 @@ def res2s_audio_video_denoising_loop( # noqa: PLR0913,PLR0915,PLR0912
return video_state, audio_state
-def euler_cfg_pp_denoising_loop( # noqa: PLR0912
+@dataclass(frozen=True)
+class _ModalityStep:
+ """One modality's resolved inputs for a single ancestral-Euler step.
+ Attributes:
+ modality: ``"video"`` or ``"audio"``.
+ state: The modality's current latent state.
+ step_fn: The step callable for this modality, already bound to any
+ stepper-specific inputs.
+ denoised: Mask-corrected x_0 prediction in float32, or ``None`` when the
+ denoiser produced no prediction for this modality (in which case the
+ modality is passed through unchanged this step).
+ """
+
+ modality: str
+ state: LatentState
+ step_fn: Callable[..., torch.Tensor]
+ denoised: torch.Tensor | None
+
+ @classmethod
+ def from_modality_result(
+ cls,
+ modality: str,
+ state: LatentState,
+ result: DenoisedLatentResult | None,
+ make_step_fn: Callable[[DenoisedLatentResult | None, str], Callable[..., torch.Tensor]],
+ ) -> "_ModalityStep":
+ """Resolve one modality's step inputs from a denoiser result.
+ ``make_step_fn`` is invoked for every present modality, including one
+ whose result carries no denoised tensor, so that any validation it
+ performs fires in a stable order regardless of the denoiser's output.
+ """
+ step_fn = make_step_fn(result, modality)
+ denoised = None
+ if result is not None and result.denoised is not None:
+ denoised = post_process_latent(result.denoised.float(), state.denoise_mask, state.clean_latent)
+ return cls(modality=modality, state=state, step_fn=step_fn, denoised=denoised)
+
+
+def _ancestral_euler_denoising_loop(
+ sigmas: torch.Tensor,
+ video_state: LatentState | None,
+ audio_state: LatentState | None,
+ transformer: X0Model,
+ denoiser: Denoiser,
+ noise_seed: int,
+ new_noise_fn: Callable[[torch.Tensor, torch.Generator], torch.Tensor],
+ model_dtype: torch.dtype,
+ draw_noise: bool,
+ make_step_fn: Callable[[DenoisedLatentResult | None, str], Callable[..., torch.Tensor]],
+) -> tuple[LatentState | None, LatentState | None]:
+ """
+ Shared driver for the ancestral (noise-injecting) Euler denoising loops.
+ Steps each present modality in float32, re-applies the conditioning mask
+ after noise injection, and short-circuits to the denoised prediction on a
+ terminal zero sigma. When both modalities are present, noise is drawn from
+ the same seeded generator (video first, audio second) so the random
+ sequence is consistent.
+ ### Parameters
+ draw_noise:
+ Whether to draw a noise tensor per modality per step. When ``False``,
+ ``noise=None`` is passed to the stepper.
+ make_step_fn:
+ ``(result, modality) -> step_fn`` factory returning the step callable
+ for that modality, with any stepper-specific inputs already bound.
+ ``step_fn`` is invoked as
+ ``step_fn(sample=, denoised_sample=, sigmas=, step_index=, noise=)``.
+ Called once per present modality per step right after the denoiser
+ returns (before the terminal-sigma check), so it can also validate the
+ denoiser output. ``modality`` is ``"video"`` or ``"audio"``.
+ ### Returns
+ tuple[LatentState | None, LatentState | None]
+ Final ``(video_state, audio_state)`` after the denoising loop.
+ """
+ if video_state is None and audio_state is None:
+ raise ValueError("At least one of video_state or audio_state must be provided")
+
+ present_state = video_state if video_state is not None else audio_state
+ generator = torch.Generator(device=present_state.latent.device).manual_seed(noise_seed)
+ states: dict[str, LatentState | None] = {"video": video_state, "audio": audio_state}
+
+ for step_idx, _ in enumerate(tqdm(sigmas[:-1])):
+ video_result, audio_result = denoiser(transformer, states["video"], states["audio"], sigmas, step_idx)
+ pending = [
+ _ModalityStep.from_modality_result(modality, state, result, make_step_fn)
+ for modality, state, result in (
+ ("video", states["video"], video_result),
+ ("audio", states["audio"], audio_result),
+ )
+ if state is not None
+ ]
+
+ terminal_step = sigmas[step_idx + 1] == 0
+ for step in pending:
+ if step.denoised is None:
+ continue
+ if terminal_step:
+ states[step.modality] = replace(step.state, latent=step.denoised.to(model_dtype))
+ continue
+ noise = new_noise_fn(step.state.latent, generator) if draw_noise else None
+ x_next = step.step_fn(
+ sample=step.state.latent.float(),
+ denoised_sample=step.denoised,
+ sigmas=sigmas,
+ step_index=step_idx,
+ noise=noise,
+ )
+ if draw_noise:
+ x_next = post_process_latent(x_next, step.state.denoise_mask, step.state.clean_latent)
+ states[step.modality] = replace(step.state, latent=x_next.to(model_dtype))
+
+ if terminal_step:
+ break
+
+ return states["video"], states["audio"]
+
+
+def euler_ancestral_denoising_loop(
+ sigmas: torch.Tensor,
+ video_state: LatentState | None,
+ audio_state: LatentState | None,
+ stepper: EulerAncestralDiffusionStep,
+ transformer: X0Model,
+ denoiser: Denoiser,
+ noise_seed: int = -1,
+ new_noise_fn: Callable[[torch.Tensor, torch.Generator], torch.Tensor] = _get_plain_noise,
+ model_dtype: torch.dtype = torch.bfloat16,
+) -> tuple[LatentState | None, LatentState | None]:
+ """
+ Joint audio-video denoising loop using the ancestral (SDE) Euler sampler.
+ Each step takes a deterministic Euler step to an intermediate ``sigma_down``
+ and renoises back up to the next sigma; see
+ :class:`~ltx_core.components.diffusion_steps.EulerAncestralDiffusionStep`.
+ Works with any denoiser (no ``uncond`` prediction required). With
+ ``stepper=EulerAncestralDiffusionStep(eta=0.0)`` this reduces to
+ :func:`euler_denoising_loop`.
+ Either ``video_state`` or ``audio_state`` may be ``None`` for absent
+ modalities. When both are present, noise is drawn from the same seeded
+ generator (video first, audio second).
+ ### Parameters
+ sigmas:
+ 1-D tensor of noise levels defining the sampling schedule.
+ video_state:
+ Current video :class:`~ltx_core.types.LatentState`, or ``None``.
+ audio_state:
+ Current audio :class:`~ltx_core.types.LatentState`, or ``None``.
+ stepper:
+ :class:`~ltx_core.components.diffusion_steps.EulerAncestralDiffusionStep`
+ instance carrying ``eta`` and ``s_noise`` parameters.
+ transformer:
+ The diffusion model passed to the denoiser at each step.
+ denoiser:
+ Callable implementing :class:`~ltx_pipelines.utils.types.Denoiser`.
+ noise_seed:
+ Integer seed for the noise generator. Default ``-1``.
+ new_noise_fn:
+ ``(latent, generator) -> noise`` callable. Defaults to plain
+ ``torch.randn`` (no channel-wise normalization). Pass
+ :func:`_get_new_noise` for the normalized variant used in res2s.
+ model_dtype:
+ Dtype for latent state updates. Default ``bfloat16``. Pass
+ ``torch.float32`` to keep the sampling trajectory in full precision.
+ ### Returns
+ tuple[LatentState | None, LatentState | None]
+ Final ``(video_state, audio_state)`` after the denoising loop.
+ """
+ if not isinstance(stepper, EulerAncestralDiffusionStep):
+ raise ValueError(f"stepper must be an instance of EulerAncestralDiffusionStep, got {type(stepper).__name__}")
+
+ return _ancestral_euler_denoising_loop(
+ sigmas=sigmas,
+ video_state=video_state,
+ audio_state=audio_state,
+ transformer=transformer,
+ denoiser=denoiser,
+ noise_seed=noise_seed,
+ new_noise_fn=new_noise_fn,
+ model_dtype=model_dtype,
+ # Gated on eta alone: at s_noise=0 the step still applies its variance-preserving
+ # rescale, so it must not fall back to the noise-free branch.
+ draw_noise=stepper.eta > 0,
+ # The ancestral step needs nothing beyond the standard arguments.
+ make_step_fn=lambda _result, _modality: stepper.step,
+ )
+
+
+def euler_cfg_pp_denoising_loop(
sigmas: torch.Tensor,
video_state: LatentState | None,
audio_state: LatentState | None,
@@ -493,76 +682,26 @@ def euler_cfg_pp_denoising_loop( # noqa: PLR0912
if not isinstance(stepper, EulerCfgPpDiffusionStep):
raise ValueError(f"stepper must be an instance of EulerCfgPpDiffusionStep, got {type(stepper).__name__}")
- present_state = video_state or audio_state
- if present_state is None:
- raise ValueError("At least one of video_state or audio_state must be provided")
-
- generator = torch.Generator(device=present_state.latent.device).manual_seed(noise_seed)
- draw_noise = stepper.eta > 0 and stepper.s_noise > 0
-
- for step_idx, _ in enumerate(tqdm(sigmas[:-1])):
- video_result, audio_result = denoiser(transformer, video_state, audio_state, sigmas, step_idx)
- denoised_video = video_result.denoised if video_result is not None else None
- denoised_audio = audio_result.denoised if audio_result is not None else None
- uncond_video = video_result.uncond if video_result is not None else None
- uncond_audio = audio_result.uncond if audio_result is not None else None
-
- if video_state is not None and not isinstance(uncond_video, torch.Tensor):
- raise ValueError(
- "euler_cfg_pp_denoising_loop requires video DenoisedLatentResult.uncond to be a tensor. "
- "Use GuidedDenoiser or FactoryGuidedDenoiser with cfg_scale != 1 "
- "or force_uncond_pass=True and a negative_context."
- )
- if audio_state is not None and not isinstance(uncond_audio, torch.Tensor):
+ def make_step_fn(result: DenoisedLatentResult | None, modality: str) -> Callable[..., torch.Tensor]:
+ """Bind the modality's uncond prediction into the CFG++ step."""
+ uncond = result.uncond if result is not None else None
+ if not isinstance(uncond, torch.Tensor):
raise ValueError(
- "euler_cfg_pp_denoising_loop requires audio DenoisedLatentResult.uncond to be a tensor. "
+ f"euler_cfg_pp_denoising_loop requires {modality} DenoisedLatentResult.uncond to be a tensor. "
"Use GuidedDenoiser or FactoryGuidedDenoiser with cfg_scale != 1 "
"or force_uncond_pass=True and a negative_context."
)
+ return partial(stepper.step, uncond_denoised=uncond)
- if video_state is not None and denoised_video is not None:
- denoised_video = post_process_latent(
- denoised_video.float(), video_state.denoise_mask, video_state.clean_latent
- )
- noisy_video = video_state.latent.float()
- if audio_state is not None and denoised_audio is not None:
- denoised_audio = post_process_latent(
- denoised_audio.float(), audio_state.denoise_mask, audio_state.clean_latent
- )
- noisy_audio = audio_state.latent.float()
-
- if sigmas[step_idx + 1] == 0:
- if video_state is not None and denoised_video is not None:
- video_state = replace(video_state, latent=denoised_video.to(model_dtype))
- if audio_state is not None and denoised_audio is not None:
- audio_state = replace(audio_state, latent=denoised_audio.to(model_dtype))
- return video_state, audio_state
-
- if video_state is not None and denoised_video is not None:
- video_noise = new_noise_fn(video_state.latent, generator) if draw_noise else None
- x_next = stepper.step(
- sample=noisy_video,
- denoised_sample=denoised_video,
- sigmas=sigmas,
- step_index=step_idx,
- uncond_denoised=uncond_video,
- noise=video_noise,
- )
- if draw_noise:
- x_next = post_process_latent(x_next, video_state.denoise_mask, video_state.clean_latent)
- video_state = replace(video_state, latent=x_next.to(model_dtype))
-
- if audio_state is not None and denoised_audio is not None:
- audio_noise = new_noise_fn(audio_state.latent, generator) if draw_noise else None
- x_next = stepper.step(
- sample=noisy_audio,
- denoised_sample=denoised_audio,
- sigmas=sigmas,
- step_index=step_idx,
- uncond_denoised=uncond_audio,
- noise=audio_noise,
- )
- if draw_noise:
- x_next = post_process_latent(x_next, audio_state.denoise_mask, audio_state.clean_latent)
- audio_state = replace(audio_state, latent=x_next.to(model_dtype))
- return video_state, audio_state
+ return _ancestral_euler_denoising_loop(
+ sigmas=sigmas,
+ video_state=video_state,
+ audio_state=audio_state,
+ transformer=transformer,
+ denoiser=denoiser,
+ noise_seed=noise_seed,
+ new_noise_fn=new_noise_fn,
+ model_dtype=model_dtype,
+ draw_noise=stepper.eta > 0 and stepper.s_noise > 0,
+ make_step_fn=make_step_fn,
+ )
diff --git a/packages/ltx-pipelines/src/ltx_pipelines/utils/types.py b/packages/ltx-pipelines/src/ltx_pipelines/utils/types.py
index 8ea3727..6ac6c24 100644
--- a/packages/ltx-pipelines/src/ltx_pipelines/utils/types.py
+++ b/packages/ltx-pipelines/src/ltx_pipelines/utils/types.py
@@ -101,15 +101,31 @@ class ModalitySpec:
Carries everything needed to build the initial noised latent state
and run the denoising loop for a single modality (video or audio).
Tools are created by ``DiffusionStage`` from pixel-space dimensions.
+ ``frozen=True`` zeros the denoise mask and marks the resulting ``LatentState``
+ so ``Modality.sigma`` is forced to 0 (not only per-token timesteps).
"""
- context: torch.Tensor
+ context: torch.Tensor | None = None
conditionings: list[ConditioningItem] = field(default_factory=list)
noise_scale: float = 1.0
frozen: bool = False
initial_latent: torch.Tensor | None = None
+@dataclass(frozen=True)
+class AutoDuration:
+ """Request auto-predicted duration, clamped to ``[min_seconds, max_seconds]``.
+ The predicted duration is converted to a frame count snapped to the VAE's causal
+ temporal grid (``8k + 1``). Defaults: 1s and 20s.
+ """
+
+ min_seconds: float = 1.0
+ max_seconds: float = 20.0
+
+
+DEFAULT_AUTO_DURATION = AutoDuration()
+
+
class OffloadMode(Enum):
"""Weight offloading strategy.
Controls where model weights reside during inference:
diff --git a/packages/ltx-trainer/AGENTS.md b/packages/ltx-trainer/AGENTS.md
index fc0e234..be64409 100644
--- a/packages/ltx-trainer/AGENTS.md
+++ b/packages/ltx-trainer/AGENTS.md
@@ -27,9 +27,15 @@ All conditioning scenarios are expressed through the unified `FlexibleStrategy`
- **LTX-2** (19B, initial audio-video model)
- **LTX-2.3** (22B, improved text conditioning and audio quality)
+- **LTX 2.5** (22B, Gemma 4 text encoder)
Version detection is fully automatic — ltx-core reads the checkpoint config and selects the correct architecture
-components. The trainer does not need version-specific code paths.
+components. The trainer does not need version-specific code paths; use the checkpoint metadata supplied with the model.
+Do not add an explicit version flag.
+
+The checkpoint and Gemma text encoder are separate local paths. The Gemma root must match the checkpoint metadata:
+LTX 2.5 checkpoints require the LTX-specific fine-tuned Gemma 4 text encoder, not Google's vanilla Gemma 4 model;
+older checkpoints use Gemma 3.
**Key Dependencies:**
@@ -60,7 +66,7 @@ packages/ltx-trainer/
│ │ ├── text_to_video.py # TextToVideoStrategy, TextToVideoConfig [DEPRECATED]
│ │ └── video_to_video.py # VideoToVideoStrategy, VideoToVideoConfig [DEPRECATED]
│ ├── timestep_samplers.py # Flow matching timestep sampling
-│ ├── gemma_8bit.py # 8-bit Gemma text encoder loading (bitsandbytes)
+│ ├── gemma_8bit.py # 8-bit Gemma text encoder quantization (bitsandbytes)
│ ├── quantization.py # Transformer INT8/INT4/FP8 quantization
│ ├── captioning.py # Video captioning utilities
│ ├── video_utils.py # Video I/O and processing
@@ -126,9 +132,10 @@ The `configs/` directory is documented in two places that both contain a trainin
`load_text_encoder()`, `load_embeddings_processor()`, etc.
- Combined loader: `load_model()` returns `LtxModelComponents` dataclass
- Uses `SingleGPUModelBuilder` from ltx-core internally
-- Text encoder and embeddings processor are loaded separately (the text encoder only needs Gemma weights; the embeddings
- processor only needs the LTX checkpoint)
-- 8-bit text encoder loading via `gemma_8bit.py` (bitsandbytes)
+- Text encoder and embeddings processor are loaded separately (the text encoder only needs Gemma weights; the
+ embeddings processor needs the LTX checkpoint, plus the packed text-encoder file on a split pack)
+- Optional 8-bit quantization of the text encoder via `gemma_8bit.py` (bitsandbytes), applied after the standard
+ build rather than as a separate loading path
**Training Flow:**
@@ -173,8 +180,8 @@ video_pred, audio_pred = model(video=video, audio=audio, perturbations=None)
> **Note:** `Modality` is immutable (frozen dataclass). Use `dataclasses.replace()` to modify.
**`sigma` vs `timesteps`:** These serve different roles. `timesteps` is per-token (e.g. `sigma * denoise_mask` —
-conditioning tokens get 0, noisy tokens get sigma). `sigma` is per-batch and is used for prompt AdaLN conditioning (
-LTX-2.3) and cross-modality (video↔audio) attention conditioning (both versions).
+conditioning tokens get 0, noisy tokens get sigma). `sigma` is per-batch and is used for prompt AdaLN conditioning
+and cross-modality (video↔audio) attention conditioning. The exact behavior is selected from the checkpoint config for all supported model versions.
**Configuration System:**
@@ -190,26 +197,33 @@ LTX-2.3) and cross-modality (video↔audio) attention conditioning (both version
- Config uses `extra="forbid"` — unknown fields cause validation errors
- Config files in `configs/` directory
-## LTX-2 vs LTX-2.3: Differences
+## LTX-2 Family: Differences
-Both model versions share the same latent space interface (see [Latent Space Constants](#latent-space-constants)).
+All supported model versions share the same latent space interface (see [Latent Space Constants](#latent-space-constants)).
The differences lie in how text conditioning and audio generation work. Version detection is automatic via checkpoint
config — the trainer uses a unified API.
-| Component | LTX-2 (19B) | LTX-2.3 (22B) |
-|-----------------------|---------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|
-| Feature extractor | `FeatureExtractorV1`: single `aggregate_embed`, same output for video and audio | `FeatureExtractorV2`: separate `video_aggregate_embed` + `audio_aggregate_embed`, per-token RMSNorm |
-| Caption projection | Inside the transformer (`caption_projection`) | Inside the feature extractor (before connector) |
-| Embeddings connectors | Same dimensions for video and audio | Separate dimensions (`AudioEmbeddings1DConnectorConfigurator`) |
-| Prompt AdaLN | Not present (`cross_attention_adaln=False`) | Active — modulates cross-attention to text using `sigma` |
-| Vocoder | HiFi-GAN (`Vocoder`) | BigVGAN v2 + bandwidth extension (`VocoderWithBWE`) |
+| Component | LTX-2 (19B) | LTX-2.3 (22B) | LTX 2.5 (22B) |
+|-----------------------|---------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
+| Text encoder | Gemma 3 | Gemma 3 | LTX-specific fine-tuned Gemma 4; checkpoint-specific root, commonly `gemma4-12b-ltx-v1` |
+| Feature extractor | `FeatureExtractorV1`: single `aggregate_embed`, same output for video and audio | `FeatureExtractorV2`: separate `video_aggregate_embed` + `audio_aggregate_embed`, per-token RMSNorm | `FeatureExtractorV2`: separate video/audio features with Gemma 4 hidden states and per-token RMSNorm |
+| Caption projection | Inside the transformer (`caption_projection`) | Inside the feature extractor (before connector) | Inside the feature extractor (before connector) |
+| Embeddings connectors | Same dimensions for video and audio | Separate dimensions (`AudioEmbeddings1DConnectorConfigurator`) | Separate video/audio connectors; 4096/2048 output dimensions |
+| Prompt AdaLN | Not present (`cross_attention_adaln=False`) | Active — modulates cross-attention to text using `sigma` | Active — modulates text cross-attention using `sigma` |
+| Video FFN bias | Enabled by checkpoint config | Enabled by checkpoint config | Bias-free video FFN layers |
+| Vocoder | HiFi-GAN (`Vocoder`) | BigVGAN v2 + bandwidth extension (`VocoderWithBWE`) | BigVGAN v2 + bandwidth extension (`VocoderWithBWE`) |
**How version detection works in ltx-core:**
- **Feature extractor:** `_create_feature_extractor()` checks for V2 config keys (`caption_proj_before_connector`,
etc.). Present → V2; absent → V1.
-- **Vocoder:** `VocoderConfigurator` checks for `config["vocoder"]["bwe"]`. Present → `VocoderWithBWE`; absent →
- `Vocoder`.
+- **Gemma family:** `get_gemma_ops()` dispatches from the Gemma root's `model_type` (`gemma3`, `gemma4`, or
+ `gemma4_unified`). For LTX 2.5+, the embeddings processor also validates the checkpoint's
+ `gemma_source_checkpoint` metadata against the Gemma root.
+- **Vocoder:** LTX 2.5 uses `VocoderWithBWE` — BigVGAN v2 with bandwidth extension — loaded from the checkpoint.
+ Older LTX checkpoints without the `vocoder.bwe` setting use the legacy `Vocoder` implementation.
+- **Video decoder:** `load_video_vae_decoder()` selects the convolutional or diffusion decoder from checkpoint
+ metadata. Diffusion-decoder checkpoints require diffusion-compatible SDOps and tiled decoding.
- **Transformer:** `_build_caption_projections()` checks `caption_proj_before_connector`. True (V2) → no caption
projection in transformer; False (V1) → caption projection created in transformer.
- **Embeddings connectors:** `AudioEmbeddings1DConnectorConfigurator` reads `audio_connector_*` keys, falling back to
@@ -217,7 +231,7 @@ config — the trainer uses a unified API.
## Text Encoder Pipeline
-The `GemmaTextEncoder` implements a 3-block pipeline:
+The `LTXGemmaTextEncoder` implements a 3-block pipeline:
1. **Block 1 — Gemma LLM:** Tokenizes text → runs through Gemma → extracts hidden states
2. **Block 2 — Feature extractor:** Hidden states → normalized features (V1: single stream duplicated for video/audio;
@@ -237,6 +251,11 @@ the results. Block 3 (connectors) is applied during training via
The trainer handles both formats in `_training_step()`: if `video_prompt_embeds` is present, it uses the new format;
otherwise, it duplicates `prompt_embeds` for both modalities (mirroring V1 behavior).
+> **Cache compatibility:** Caption features are produced by the selected Gemma model and are not interchangeable
+> across model versions. When switching between LTX-2.3 and LTX 2.5, preprocess into a fresh `conditions/` directory
+> or pass `--overwrite` to `process_dataset.py`/`process_captions.py`. Existing `.pt` files are skipped by default.
+> The checkpoint/Gemma metadata check validates the loaded model pair, but it does not rewrite old precomputed data.
+
**After caching validation embeddings**, the trainer unloads heavy components to free VRAM:
```python
@@ -248,20 +267,27 @@ self._text_encoder.feature_extractor = None
## Latent Space Constants
-These values are shared across all supported model versions:
+Video latent channels are shared across all supported model versions. The video compression
+factors below are the **default** VAE's; the trainer derives the actual factors from the
+checkpoint's VAE config (`SpatioTemporalScaleFactors.from_model_config`), so a less-compressed
+VAE (e.g. 16x16x4) changes them. Geometry is enforced at runtime once the factors are known
+(`ValidationRunner._validate_sample_geometry`), not by config-time validators.
| Constant | Value | Where used |
|------------------------------|----------------------------------|-----------------------------------------------------------|
| Video latent channels | 128 | VAE encoder/decoder, patchifier, `VideoLatentShape` |
-| Spatial compression | 32× (H and W) | `SpatioTemporalScaleFactors.default()`, config validators |
-| Temporal compression | 8× | `SpatioTemporalScaleFactors.default()`, config validators |
-| Frame constraint | `frames % 8 == 1` | Config validators, validation runner |
-| Resolution constraint | Width and height divisible by 32 | Config validators, validation runner |
+| Spatial compression | 32× (H and W), default VAE | `SpatioTemporalScaleFactors`, runtime geometry check |
+| Temporal compression | 8×, default VAE | `SpatioTemporalScaleFactors`, runtime geometry check |
+| Frame constraint | `frames % T == 1` (T=8 default) | `ValidationRunner`, preprocessing scripts |
+| Resolution constraint | Divisible by spatial factor (32 default) | `ValidationRunner`, preprocessing scripts |
| Audio latent channels | 8 | `AudioLatentShape`, audio patchifier |
| Audio mel bins | 16 | `AudioLatentShape`, audio patchifier |
| Patchified token dim (video) | 128 (`128 × 1 × 1 × 1`) | Transformer `in_channels` |
| Patchified token dim (audio) | 128 (`8 × 16`) | Transformer `audio_in_channels` |
+LTX 2.5 RC checkpoints use the default 128-channel, 32× spatial, 8× temporal latent layout. The trainer still reads
+these factors from the checkpoint because alternate VAE layouts are supported.
+
## Development Commands
### Setup and Installation
@@ -429,13 +455,24 @@ Component loaders:
- `load_transformer()` → `LTXModel`
- `load_video_vae_encoder()` → `VideoEncoder`
-- `load_video_vae_decoder()` → `VideoDecoder`
+- `load_video_vae_decoder()` → `VideoDecoder` (convolutional or diffusion, selected from checkpoint metadata)
- `load_audio_vae_decoder()` → `AudioDecoder`
- `load_vocoder()` → `Vocoder` or `VocoderWithBWE` (auto-detected)
-- `load_text_encoder(gemma_model_path)` → `GemmaTextEncoder` (pure Gemma LLM, no checkpoint needed)
-- `load_embeddings_processor(checkpoint_path)` → `EmbeddingsProcessor` (feature extractor + connectors)
+- `load_text_encoder(gemma_model_path)` → `LTXGemmaTextEncoder` (pure Gemma LLM; a Gemma directory or a packed
+ single-file text encoder)
+- `load_embeddings_processor(checkpoint_path)` → `EmbeddingsProcessor` (feature extractor + connectors). Takes one
+ path for a unified checkpoint, or the `(transformer, text_encoder)` pair for a split pack — build it with
+ `embedding_weight_paths()`, never by hand. Metadata (including `gemma_source_checkpoint`) is read from the first
+ path, so the transformer must come first.
- `load_model()` → `LtxModelComponents` (convenience wrapper)
+Split/unified resolution helpers:
+
+- `is_split_transformer(path)` → `bool`, from the checkpoint's declared config sections
+- `resolve_video_vae_path(model_path, video_vae_path)` / `resolve_audio_vae_path(...)` → the component file, raising
+ rather than falling back to a split pack's transformer. Call these where the component is loaded, never up front:
+ resolving eagerly makes a video-only run demand an audio VAE it will never open.
+
**`src/ltx_trainer/validation_runner.py`** - Conditioned validation sampling
- Manages the full validation lifecycle: embedding caching, media encoding, denoising, decoding
@@ -453,10 +490,19 @@ Component loaders:
- Uniform fallback (10% of samples) to prevent distribution collapse
- Reflection around `eps` for numerical stability near zero
-**`src/ltx_trainer/gemma_8bit.py`** - 8-bit text encoder loading
+**`src/ltx_trainer/gemma_8bit.py`** - 8-bit text encoder quantization
+
+`quantize_gemma_to_8bit()` swaps the Gemma backbone's `nn.Linear` layers for bitsandbytes LLM.int8() equivalents and
+moves the result to the GPU, where bitsandbytes performs the actual quantization. `load_text_encoder(...,
+load_in_8bit=True)` builds the encoder on CPU through the normal ltx-core path and then calls it.
-Bypasses ltx-core's standard loading path to enable bitsandbytes 8-bit quantization of the Gemma backbone. Manually
-constructs the `GemmaTextEncoder` with quantized model, feature extractor, and embeddings processor.
+Quantizing *after* the standard build (rather than loading through `transformers`) is what makes it work for every
+supported model: LTX 2.5's text encoder is a `gemma4_unified`, a model type only ltx-core's builder can assemble, and
+it ships as a single packed `.safetensors` rather than a Hugging Face directory. The trade-off is that the
+full-precision weights are materialized first — on CPU, so the peak is host RAM rather than VRAM.
+
+The `lm_head` is left in full precision. Caption precompute never runs it (`LTXGemmaTextEncoder.encode` calls the
+inner model directly), so it only affects prompt enhancement.
### Data
@@ -570,20 +616,37 @@ video_embeds, audio_embeds, binary_mask = text_encoder.embeddings_processor.crea
### Frame Requirements
-Frames must satisfy `frames % 8 == 1`:
+Frames must satisfy `frames % T == 1`, where `T` is the VAE temporal factor read from the
+checkpoint. For the default VAE (`T = 8`):
- ✅ Valid: 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97, 121
- ❌ Invalid: 24, 32, 48, 64, 100
+A less-compressed VAE lowers `T` (e.g. 16x16x4 uses `T = 4`: 1, 5, 9, 13, ...).
+
### Resolution Requirements
-Width and height must be divisible by 32.
+Width and height must be divisible by the VAE spatial factor (32 for the default VAE).
### Model Paths
-- Must be local paths (URLs not supported)
-- `model_path`: Path to `.safetensors` checkpoint
-- `text_encoder_path`: Path to Gemma model directory
+Must be local paths (URLs not supported). Two checkpoint layouts are supported, and the trainer distinguishes
+them from checkpoint metadata rather than from a flag (`model_loader.is_split_transformer`):
+
+| Field | Unified checkpoint | Split pack |
+|---|---|---|
+| `model_path` | the whole `.safetensors` | the transformer `.safetensors` |
+| `text_encoder_path` | Gemma model directory | packed text-encoder `.safetensors` (Gemma weights + HF sidecars + text projections) |
+| `video_vae_path` | omit (defaults to `model_path`) | **required** — standalone video VAE |
+| `audio_vae_path` | omit (defaults to `model_path`) | **required when the run touches audio** — standalone audio VAE + vocoder |
+
+The split pack's transformer carries neither VAE config nor VAE weights, so falling back to it would build an
+uninitialized VAE and silently assume the default 32x32x8 scale factors. `resolve_video_vae_path` /
+`resolve_audio_vae_path` reject that fallback at the use site; `embedding_weight_paths` likewise rejects a Gemma
+directory paired with a split transformer, because the `text_embedding_projection.*` weights only exist in the
+packed text-encoder file.
+
+The preprocessing scripts expose the same components as `--video-vae-path` / `--audio-vae-path`.
### Platform Requirements
@@ -603,24 +666,24 @@ packages/ltx-core/src/ltx_core/
│ │ ├── model_configurator.py # LTXModelConfigurator (version-aware)
│ │ └── timestep_embedding.py # Timestep/sigma embedding
│ ├── video_vae/
-│ │ ├── video_vae.py # VideoEncoder, VideoDecoder
+│ │ ├── video_vae.py # VideoEncoder, VideoDecoder (protocol), ConvVideoDecoder, DiffusionVideoDecoder
│ │ └── model_configurator.py # VideoEncoderConfigurator, VideoDecoderConfigurator
│ ├── audio_vae/
│ │ ├── audio_vae.py # AudioEncoder, AudioDecoder
│ │ └── vocoder.py # Vocoder, VocoderWithBWE (output_sampling_rate)
│ └── common/ # Shared model components
├── text_encoders/gemma/
-│ ├── __init__.py # Exports: GemmaTextEncoder, GemmaTextEncoderConfigurator,
+│ ├── __init__.py # Exports: LTXGemmaTextEncoder, GemmaTextEncoderConfigurator,
│ │ # AV_GEMMA_TEXT_ENCODER_KEY_OPS, GEMMA_MODEL_OPS,
│ │ # module_ops_from_gemma_root
│ ├── encoders/
-│ │ ├── base_encoder.py # GemmaTextEncoder (unified 3-block pipeline)
+│ │ ├── base_encoder.py # LTXGemmaTextEncoder (unified 3-block pipeline)
│ │ └── encoder_configurator.py # GemmaTextEncoderConfigurator, _create_feature_extractor
│ ├── feature_extractor.py # FeatureExtractorV1 (19B), FeatureExtractorV2 (22B)
│ ├── embeddings_connector.py # Embeddings1DConnector, Embeddings1DConnectorConfigurator,
│ │ # AudioEmbeddings1DConnectorConfigurator
│ ├── embeddings_processor.py # EmbeddingsProcessor (wraps video + audio connectors)
-│ └── tokenizer.py # LTXVGemmaTokenizer
+│ └── tokenizer.py # LTXGemmaTokenizer
├── components/
│ ├── schedulers.py # LTX2Scheduler
│ ├── diffusion_steps.py # EulerDiffusionStep
diff --git a/packages/ltx-trainer/README.md b/packages/ltx-trainer/README.md
index 08c1198..9d4dee8 100644
--- a/packages/ltx-trainer/README.md
+++ b/packages/ltx-trainer/README.md
@@ -1,7 +1,7 @@
-# LTX-2 Trainer
+# LTX Trainer
This package provides tools and scripts for training and fine-tuning
-Lightricks' **LTX-2** audio-video generation model. It supports LoRA training, full
+Lightricks' **LTX family** of audio-video generation models. It supports LoRA training, full
fine-tuning, and a flexible conditioning framework covering text-to-video, text-to-audio, image-to-video,
video extension, audio extension, video inpainting, audio inpainting, video outpainting, IC-LoRA for video, audio, and joint
audio-video references, audio-to-video, and video-to-audio.
@@ -33,8 +33,13 @@ training, and monitors the job while using the docs above as the source of truth
## 🔧 Requirements
-- **LTX-2 Model Checkpoint** - Local `.safetensors` file
-- **Gemma Text Encoder** - Local Gemma model directory (required for LTX-2)
+- **LTX Model** - Local files, in either published layout:
+ - *Unified* (LTX-2, LTX-2.3, LTX-2.5) — one `.safetensors` holding the transformer, both VAEs and the vocoder,
+ plus a directory containing the matching Gemma text encoder.
+ - *Split* (LTX 2.5) — one file per component: transformer, packed text encoder, video VAE, audio VAE. Each is
+ named separately in the config; see [Configuration Reference](docs/configuration-reference.md#modelconfig).
+- **Matching text encoder** - LTX 2.5 requires the LTX-specific fine-tuned Gemma 4 text encoder; do not substitute
+ Google's vanilla Gemma 4 model. LTX-2/LTX-2.3 use Gemma 3.
- **Linux with CUDA** - CUDA 13+ recommended for optimal performance
- **Nvidia GPU with 80GB+ VRAM** - Recommended for the standard config. For GPUs with 32GB VRAM (e.g., RTX 5090),
use the [low VRAM config](configs/t2v_lora_low_vram.yaml) which enables INT8 quantization and other
diff --git a/packages/ltx-trainer/configs/README.md b/packages/ltx-trainer/configs/README.md
index 52dd414..79909d2 100644
--- a/packages/ltx-trainer/configs/README.md
+++ b/packages/ltx-trainer/configs/README.md
@@ -1,10 +1,16 @@
# Training Configs
-Example training configurations for the LTX-2 trainer. Each file is a ready-to-run config for one training mode,
+Example training configurations for the LTX 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).
+>
+> These configs support LTX-2, LTX-2.3, and LTX 2.5. Checkpoint architecture is detected automatically, but the
+> `model:` block depends on how your model was published: a unified checkpoint needs `model_path` plus a Gemma
+> directory in `text_encoder_path`, while a split pack (LTX 2.5) additionally needs `video_vae_path` and
+> `audio_vae_path`. Every config below has both forms in its `model:` block — see
+> [ModelConfig](../docs/configuration-reference.md#modelconfig).
## Training Modes
diff --git a/packages/ltx-trainer/configs/a2a_ic_lora.yaml b/packages/ltx-trainer/configs/a2a_ic_lora.yaml
index 300f54b..d0a1855 100644
--- a/packages/ltx-trainer/configs/a2a_ic_lora.yaml
+++ b/packages/ltx-trainer/configs/a2a_ic_lora.yaml
@@ -28,14 +28,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
training_mode: "lora"
@@ -225,15 +230,27 @@ validation:
audio: "/path/to/reference_audio_2.wav"
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Generation length control [width, height, frames]
# With generate_video=false, width/height are unused; frames and frame_rate set audio duration.
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
- video_dims: [ 512, 512, 81 ]
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
+ video_dims: [ 960, 544, 89 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -246,15 +263,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 3.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 7.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 1.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 1.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 3.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [29] # Recommended: single block 29
- stg_mode: "stg_av" # "stg_av" skips both audio and video self-attention (suited to audio validation)
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 1.0
# Whether to generate audio in validation samples
# Can be enabled even when not training the audio branch
diff --git a/packages/ltx-trainer/configs/a2v_lora.yaml b/packages/ltx-trainer/configs/a2v_lora.yaml
index 45c91bf..fdd8108 100644
--- a/packages/ltx-trainer/configs/a2v_lora.yaml
+++ b/packages/ltx-trainer/configs/a2v_lora.yaml
@@ -29,14 +29,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
# LoRA is recommended for most use cases (faster, less memory, prevents overfitting)
training_mode: "lora"
@@ -228,15 +233,27 @@ validation:
audio: "/path/to/conditioning_audio_2.wav"
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Output video dimensions [width, height, frames]
- # Width and height must be divisible by 32
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
- video_dims: [ 576, 576, 89 ]
+ # Width and height must be divisible by the VAE spatial factor (32 for the default VAE).
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
+ video_dims: [ 960, 544, 89 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -249,15 +266,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 3.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 1.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 1.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 0.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 3.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [29] # Recommended: single block 29
- stg_mode: "stg_v" # "stg_av" perturbs both audio and video, "stg_v" video only
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 1.0
# Whether to generate audio in validation samples
# Independent of training_strategy.audio.is_generated - you can generate audio
diff --git a/packages/ltx-trainer/configs/audio_extend_lora.yaml b/packages/ltx-trainer/configs/audio_extend_lora.yaml
index fd65588..b0af478 100644
--- a/packages/ltx-trainer/configs/audio_extend_lora.yaml
+++ b/packages/ltx-trainer/configs/audio_extend_lora.yaml
@@ -30,14 +30,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
# LoRA is recommended for most use cases (faster, less memory, prevents overfitting)
training_mode: "lora"
@@ -228,15 +233,27 @@ validation:
duration: 1.0
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Generation length control [width, height, frames]
# With generate_video=false, width/height are unused; frames and frame_rate set audio duration.
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
- video_dims: [ 512, 512, 81 ]
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
+ video_dims: [ 960, 544, 89 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -249,15 +266,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 3.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 7.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 1.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 1.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 3.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [29] # Recommended: single block 29
- stg_mode: "stg_av" # "stg_av" skips both audio and video self-attention (suited to audio validation)
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 1.0
# Whether to generate audio in validation samples
# Enabled because this audio-only config generates audio
diff --git a/packages/ltx-trainer/configs/audio_inpainting_lora.yaml b/packages/ltx-trainer/configs/audio_inpainting_lora.yaml
index e5c8361..15bac07 100644
--- a/packages/ltx-trainer/configs/audio_inpainting_lora.yaml
+++ b/packages/ltx-trainer/configs/audio_inpainting_lora.yaml
@@ -33,14 +33,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
# LoRA is recommended for most use cases (faster, less memory, prevents overfitting)
training_mode: "lora"
@@ -209,15 +214,27 @@ validation:
mask: "/path/to/inpainting_mask_2.pt"
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Generation length control [width, height, frames]
# With generate_video=false, width/height are unused; frames and frame_rate set audio duration.
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
- video_dims: [ 512, 512, 81 ]
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
+ video_dims: [ 960, 544, 89 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -230,15 +247,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 3.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 7.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 1.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 1.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 3.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [29] # Recommended: single block 29
- stg_mode: "stg_av" # "stg_av" skips both audio and video self-attention (suited to audio validation)
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 1.0
# Whether to generate audio in validation samples
# Enabled because this audio-only config generates audio
diff --git a/packages/ltx-trainer/configs/audio_suffix_lora.yaml b/packages/ltx-trainer/configs/audio_suffix_lora.yaml
index 9ef48a1..e590432 100644
--- a/packages/ltx-trainer/configs/audio_suffix_lora.yaml
+++ b/packages/ltx-trainer/configs/audio_suffix_lora.yaml
@@ -30,14 +30,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
# LoRA is recommended for most use cases (faster, less memory, prevents overfitting)
training_mode: "lora"
@@ -228,15 +233,27 @@ validation:
duration: 1.0
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Generation length control [width, height, frames]
# With generate_video=false, width/height are unused; frames and frame_rate set audio duration.
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
- video_dims: [ 512, 512, 81 ]
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
+ video_dims: [ 960, 544, 89 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -249,15 +266,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 3.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 7.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 1.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 1.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 3.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [29] # Recommended: single block 29
- stg_mode: "stg_av" # "stg_av" skips both audio and video self-attention (suited to audio validation)
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 1.0
# Whether to generate audio in validation samples
# Enabled because this audio-only config generates audio
diff --git a/packages/ltx-trainer/configs/av2av_ic_lora.yaml b/packages/ltx-trainer/configs/av2av_ic_lora.yaml
index 78d12c9..696d6e1 100644
--- a/packages/ltx-trainer/configs/av2av_ic_lora.yaml
+++ b/packages/ltx-trainer/configs/av2av_ic_lora.yaml
@@ -35,14 +35,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
# IC-LoRA reference conditioning is intended for LoRA adapter training.
training_mode: "lora"
@@ -231,15 +236,27 @@ validation:
audio: "/path/to/reference_audio_2.wav"
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Output video dimensions [width, height, frames]
- # Width and height must be divisible by 32
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
- video_dims: [ 512, 512, 81 ]
+ # Width and height must be divisible by the VAE spatial factor (32 for the default VAE).
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
+ video_dims: [ 960, 544, 89 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -252,15 +269,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 3.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 7.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 1.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 1.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 3.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [29] # Recommended: single block 29
- stg_mode: "stg_av" # Both video and audio modalities are trained
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 3.0
# Whether to generate audio in validation samples
# Can be enabled even when not training the audio branch
diff --git a/packages/ltx-trainer/configs/i2v_lora.yaml b/packages/ltx-trainer/configs/i2v_lora.yaml
index 373a791..c6e6f4c 100644
--- a/packages/ltx-trainer/configs/i2v_lora.yaml
+++ b/packages/ltx-trainer/configs/i2v_lora.yaml
@@ -29,14 +29,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
# LoRA is recommended for most use cases (faster, less memory, prevents overfitting)
training_mode: "lora"
@@ -236,15 +241,27 @@ validation:
image_or_video: "/path/to/conditioning_image_2.png"
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Output video dimensions [width, height, frames]
- # Width and height must be divisible by 32
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
- video_dims: [ 576, 576, 89 ]
+ # Width and height must be divisible by the VAE spatial factor (32 for the default VAE).
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
+ video_dims: [ 960, 544, 89 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -257,15 +274,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 3.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 7.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 1.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 1.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 3.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [29] # Recommended: single block 29
- stg_mode: "stg_av" # "stg_av" perturbs both audio and video, "stg_v" video only
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 3.0
# Whether to generate audio in validation samples
# Independent of training_strategy.audio.is_generated - you can generate audio
diff --git a/packages/ltx-trainer/configs/t2a_lora.yaml b/packages/ltx-trainer/configs/t2a_lora.yaml
index 641a9bc..62790b9 100644
--- a/packages/ltx-trainer/configs/t2a_lora.yaml
+++ b/packages/ltx-trainer/configs/t2a_lora.yaml
@@ -26,14 +26,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
# LoRA is recommended for most use cases (faster, less memory, prevents overfitting)
training_mode: "lora"
@@ -202,15 +207,27 @@ validation:
Deep bass tones provide a driving rhythm underneath bright melodic arpeggios.
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Generation length control [width, height, frames]
# With generate_video=false, width/height are unused; frames and frame_rate set audio duration.
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
- video_dims: [ 512, 512, 81 ]
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
+ video_dims: [ 960, 544, 89 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -223,15 +240,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 3.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 7.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 1.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 1.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 3.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [29] # Recommended: single block 29
- stg_mode: "stg_av" # "stg_av" skips both audio and video self-attention (suited to audio validation)
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 1.0
# Whether to generate audio in validation samples
# Enabled because this audio-only config generates audio
diff --git a/packages/ltx-trainer/configs/t2v_lora.yaml b/packages/ltx-trainer/configs/t2v_lora.yaml
index 5d8fdae..6fe3141 100644
--- a/packages/ltx-trainer/configs/t2v_lora.yaml
+++ b/packages/ltx-trainer/configs/t2v_lora.yaml
@@ -23,14 +23,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
# LoRA is recommended for most use cases (faster, less memory, prevents overfitting)
training_mode: "lora"
@@ -215,15 +220,27 @@ validation:
the clinking of utensils against plates, and the ambient hum of kitchen ventilation.
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Output video dimensions [width, height, frames]
- # Width and height must be divisible by 32
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
- video_dims: [ 576, 576, 89 ]
+ # Width and height must be divisible by the VAE spatial factor (32 for the default VAE).
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
+ video_dims: [ 960, 544, 89 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -236,15 +253,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 3.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 7.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 1.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 1.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 3.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [29] # Recommended: single block 29
- stg_mode: "stg_av" # "stg_av" perturbs both audio and video, "stg_v" video only
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 3.0
# Whether to generate audio in validation samples
# Independent of training_strategy.audio.is_generated - you can generate audio
diff --git a/packages/ltx-trainer/configs/t2v_lora_low_vram.yaml b/packages/ltx-trainer/configs/t2v_lora_low_vram.yaml
index 2d2b434..e17b22f 100644
--- a/packages/ltx-trainer/configs/t2v_lora_low_vram.yaml
+++ b/packages/ltx-trainer/configs/t2v_lora_low_vram.yaml
@@ -32,14 +32,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
# LoRA is recommended for most use cases (faster, less memory, prevents overfitting)
training_mode: "lora"
@@ -227,15 +232,27 @@ validation:
the clinking of utensils against plates, and the ambient hum of kitchen ventilation.
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Output video dimensions [width, height, frames]
- # Width and height must be divisible by 32
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
+ # Width and height must be divisible by the VAE spatial factor (32 for the default VAE).
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
video_dims: [ 576, 576, 49 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -248,15 +265,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 3.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 7.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 1.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 1.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 3.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [ 29 ] # Recommended: single block 29
- stg_mode: "stg_av" # "stg_av" perturbs both audio and video, "stg_v" video only
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 3.0
# Whether to generate audio in validation samples
# Independent of training_strategy audio modality settings — you can generate audio
diff --git a/packages/ltx-trainer/configs/v2a_lora.yaml b/packages/ltx-trainer/configs/v2a_lora.yaml
index cc7231f..defbec4 100644
--- a/packages/ltx-trainer/configs/v2a_lora.yaml
+++ b/packages/ltx-trainer/configs/v2a_lora.yaml
@@ -30,14 +30,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
# LoRA is recommended for most use cases (faster, less memory, prevents overfitting)
training_mode: "lora"
@@ -233,15 +238,27 @@ validation:
video: "/path/to/conditioning_video_2.mp4"
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Validation dimensions [width, height, frames]
# Width/height resize the frozen video condition; frames and frame_rate set audio duration.
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
- video_dims: [ 576, 576, 89 ]
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
+ video_dims: [ 960, 544, 89 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -254,15 +271,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 1.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 7.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 0.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 1.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 1.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [29] # Recommended: single block 29
- stg_mode: "stg_av" # "stg_av" perturbs both audio and video, "stg_v" video only
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 3.0
# Whether to generate audio in validation samples
# Independent of training_strategy.audio.is_generated - you can generate audio
diff --git a/packages/ltx-trainer/configs/v2v_ic_lora.yaml b/packages/ltx-trainer/configs/v2v_ic_lora.yaml
index 349e4b3..90880fe 100644
--- a/packages/ltx-trainer/configs/v2v_ic_lora.yaml
+++ b/packages/ltx-trainer/configs/v2v_ic_lora.yaml
@@ -27,14 +27,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
# IC-LoRA reference conditioning is intended for LoRA adapter training.
training_mode: "lora"
@@ -248,15 +253,27 @@ validation:
include_in_output: true
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Output video dimensions [width, height, frames]
- # Width and height must be divisible by 32
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
- video_dims: [ 512, 512, 81 ]
+ # Width and height must be divisible by the VAE spatial factor (32 for the default VAE).
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
+ video_dims: [ 960, 544, 89 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -269,15 +286,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 3.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 7.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 1.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 1.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 1.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [29] # Recommended: single block 29
- stg_mode: "stg_v" # "stg_v" for video-only (no audio training)
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 3.0
# Whether to generate audio in validation samples
# Can be enabled even when not training the audio branch
diff --git a/packages/ltx-trainer/configs/video_extend_lora.yaml b/packages/ltx-trainer/configs/video_extend_lora.yaml
index 39a2d4f..5b24e7f 100644
--- a/packages/ltx-trainer/configs/video_extend_lora.yaml
+++ b/packages/ltx-trainer/configs/video_extend_lora.yaml
@@ -29,14 +29,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
# LoRA is recommended for most use cases (faster, less memory, prevents overfitting)
training_mode: "lora"
@@ -243,15 +248,27 @@ validation:
num_frames: 57
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Output video dimensions [width, height, frames]
- # Width and height must be divisible by 32
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
- video_dims: [ 576, 576, 89 ]
+ # Width and height must be divisible by the VAE spatial factor (32 for the default VAE).
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
+ video_dims: [ 960, 544, 89 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -264,15 +281,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 3.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 7.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 1.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 1.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 3.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [29] # Recommended: single block 29
- stg_mode: "stg_av" # "stg_av" perturbs both audio and video, "stg_v" video only
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 3.0
# Whether to generate audio in validation samples
# Independent of training_strategy.audio.is_generated - you can generate audio
diff --git a/packages/ltx-trainer/configs/video_inpainting_lora.yaml b/packages/ltx-trainer/configs/video_inpainting_lora.yaml
index 46829b3..49aceae 100644
--- a/packages/ltx-trainer/configs/video_inpainting_lora.yaml
+++ b/packages/ltx-trainer/configs/video_inpainting_lora.yaml
@@ -31,14 +31,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
# LoRA is recommended for most use cases (faster, less memory, prevents overfitting)
training_mode: "lora"
@@ -233,15 +238,27 @@ validation:
mask: "/path/to/inpainting_mask_2.mp4"
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Output video dimensions [width, height, frames]
- # Width and height must be divisible by 32
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
- video_dims: [ 576, 576, 89 ]
+ # Width and height must be divisible by the VAE spatial factor (32 for the default VAE).
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
+ video_dims: [ 960, 544, 89 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -254,15 +271,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 3.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 7.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 1.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 1.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 1.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [29] # Recommended: single block 29
- stg_mode: "stg_v" # "stg_v" for video-only validation
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 3.0
# Video inpainting trains video only; do not generate validation audio.
generate_audio: false
diff --git a/packages/ltx-trainer/configs/video_outpainting_lora.yaml b/packages/ltx-trainer/configs/video_outpainting_lora.yaml
index e26518a..588eeb4 100644
--- a/packages/ltx-trainer/configs/video_outpainting_lora.yaml
+++ b/packages/ltx-trainer/configs/video_outpainting_lora.yaml
@@ -28,14 +28,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
# LoRA is recommended for most use cases (faster, less memory, prevents overfitting)
training_mode: "lora"
@@ -231,15 +236,27 @@ validation:
spatial_region: [0, 0, 288, 576]
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Output video dimensions [width, height, frames]
- # Width and height must be divisible by 32
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
- video_dims: [ 576, 576, 89 ]
+ # Width and height must be divisible by the VAE spatial factor (32 for the default VAE).
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
+ video_dims: [ 960, 544, 89 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -252,15 +269,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 3.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 7.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 1.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 1.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 1.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [29] # Recommended: single block 29
- stg_mode: "stg_v" # "stg_v" for video-only validation
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 3.0
# Video outpainting trains video only; do not generate validation audio.
generate_audio: false
diff --git a/packages/ltx-trainer/configs/video_suffix_lora.yaml b/packages/ltx-trainer/configs/video_suffix_lora.yaml
index b9617f1..7a4f4d2 100644
--- a/packages/ltx-trainer/configs/video_suffix_lora.yaml
+++ b/packages/ltx-trainer/configs/video_suffix_lora.yaml
@@ -29,14 +29,19 @@
# -----------------------------------------------------------------------------
# Specifies the base model to fine-tune and the training mode.
model:
- # Path to the LTX-2 model checkpoint (.safetensors file)
- # This should be a local path to your downloaded model
+ # The LTX model checkpoint. A unified checkpoint is one .safetensors holding every
+ # component; a split pack ships one file per component, and this names its transformer.
model_path: "path/to/ltx-2-model.safetensors"
- # Path to the text encoder model directory
- # For LTX-2, this is typically the Gemma-based text encoder
+ # The Gemma text encoder: a model directory for a unified checkpoint, or the packed
+ # text-encoder .safetensors for a split pack.
text_encoder_path: "path/to/gemma-text-encoder"
+ # VAE components. Leave these out for a unified checkpoint — they default to model_path.
+ # A split pack's transformer carries no VAE weights, so there they are required:
+ # video_vae_path: "path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ # audio_vae_path: "path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+
# Training mode: "lora" for efficient adapter training, "full" for full fine-tuning
# LoRA is recommended for most use cases (faster, less memory, prevents overfitting)
training_mode: "lora"
@@ -243,15 +248,27 @@ validation:
num_frames: 64
# Negative prompt to avoid unwanted artifacts
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted"
+ negative_prompt: >-
+ blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise,
+ grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones,
+ deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands,
+ wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of
+ field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent
+ lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny
+ valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction,
+ mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise,
+ off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward
+ pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting,
+ inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.
# Output video dimensions [width, height, frames]
- # Width and height must be divisible by 32
- # Frames must satisfy: frames % 8 == 1 (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, ...)
- video_dims: [ 576, 576, 89 ]
+ # Width and height must be divisible by the VAE spatial factor (32 for the default VAE).
+ # Frames must satisfy frames % T == 1, where T is the VAE temporal factor
+ # (8 for the default VAE, i.e. 1, 9, 17, 25, ...).
+ video_dims: [ 960, 544, 89 ]
# Frame rate for generated videos
- frame_rate: 25.0
+ frame_rate: 24.0
# Random seed for reproducible validation outputs
seed: 42
@@ -264,15 +281,29 @@ validation:
# Set to null to disable validation during training
interval: 100
- # Classifier-free guidance scale
- # Higher values = stronger adherence to prompt but may introduce artifacts
- guidance_scale: 4.0
+ # Video CFG scale for validation sampling
+ video_cfg_scale: 3.0
+
+ # Audio CFG scale for validation sampling
+ audio_cfg_scale: 7.0
+
+ # Video STG scale; set to 0.0 to disable video STG
+ video_stg_scale: 1.0
+
+ # Audio STG scale; set to 0.0 to disable audio STG
+ audio_stg_scale: 1.0
+
+ # Transformer blocks perturbed for STG
+ stg_blocks: [28]
+
+ # Guidance variance rescale; set to 0.0 to disable
+ guidance_rescale: 0.7
+
+ # Video modality guidance scale for audio-to-video isolation guidance
+ video_modality_guidance_scale: 3.0
- # STG (Spatio-Temporal Guidance) parameters for improved video quality
- # STG is combined with CFG for better temporal coherence
- stg_scale: 1.0 # Recommended: 1.0 (0.0 disables STG)
- stg_blocks: [29] # Recommended: single block 29
- stg_mode: "stg_av" # "stg_av" perturbs both audio and video, "stg_v" video only
+ # Audio modality guidance scale for video-to-audio isolation guidance
+ audio_modality_guidance_scale: 3.0
# Whether to generate audio in validation samples
# Independent of training_strategy.audio.is_generated - you can generate audio
diff --git a/packages/ltx-trainer/docs/configuration-reference.md b/packages/ltx-trainer/docs/configuration-reference.md
index e9d17be..52d81ed 100644
--- a/packages/ltx-trainer/docs/configuration-reference.md
+++ b/packages/ltx-trainer/docs/configuration-reference.md
@@ -47,29 +47,82 @@ Check out our example configurations in the `configs` directory:
> The YAML snippets below show **recommended starting values**, not necessarily the code defaults.
> Fields you omit from your config file will use the code defaults from [`config.py`](../src/ltx_trainer/config.py).
+## Supported Checkpoints and Text Encoders
+
+The same configuration schema supports LTX-2, LTX-2.3, and **LTX 2.5**.
+The trainer detects the architecture from checkpoint metadata; no model-version field is needed.
+
+All model paths must be local. Always use the text encoder that the checkpoint's own metadata asks for: LTX 2.5
+requires the LTX-specific fine-tuned Gemma 4 (for example `gemma4-12b-ltx-v1`), not Google's vanilla Gemma 4, and
+older checkpoints require their matching Gemma 3.
+
### ModelConfig
Controls the base model and training mode settings.
+#### Choosing your checkpoint layout
+
+LTX models are published in two layouts, and which fields you set depends on which one you downloaded. Look at what
+you have on disk:
+
+**A single `.safetensors` file plus a Gemma folder** — this is the *unified* layout, used by LTX-2, LTX-2.3, and
+LTX-2.5. One file holds the transformer, both VAEs, and the vocoder together.
+
```yaml
model:
- model_path: "/path/to/ltx-2-model.safetensors" # Local path to model checkpoint
- text_encoder_path: "/path/to/gemma-model" # Path to Gemma text encoder directory
- training_mode: "lora" # "lora" or "full"
- load_checkpoint: null # Path to checkpoint to resume from
+ # The one big checkpoint file. Everything except the text encoder lives inside it.
+ model_path: "/models/checkpoints/ltx-2.3-22b-dev.safetensors"
+ # The folder holding the matching Gemma model (config.json, tokenizer, weights).
+ text_encoder_path: "/models/text_encoders/gemma-3-12b-it/"
+ training_mode: "lora"
+ load_checkpoint: null
```
-**Key parameters:**
+Leave `video_vae_path` and `audio_vae_path` unset — the trainer reads both VAEs out of `model_path`.
+
+**A folder tree with one file per component** — this is the *split* layout, used by LTX 2.5. It matches the ComfyUI
+directory structure (`diffusion_models/`, `text_encoders/`, `vae/`), and every component must be named
+individually because no single file contains them all:
+
+```yaml
+model:
+ # The transformer only. It holds no VAE and no text encoder.
+ model_path: "/models/ltx-2.5/diffusion_models/ltx-2.5-22b-dev-transformer-bf16.safetensors"
+ # One file containing the Gemma weights, its tokenizer/config, and the text projections.
+ text_encoder_path: "/models/ltx-2.5/text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors"
+ # Required: the transformer above carries no VAE weights.
+ video_vae_path: "/models/ltx-2.5/vae/ltx-2.5-video-vae-bf16.safetensors"
+ audio_vae_path: "/models/ltx-2.5/vae/ltx-2.5-audio-vae-bf16.safetensors"
+ training_mode: "lora"
+ load_checkpoint: null
+```
+
+If you point `model_path` at a split transformer and forget a VAE path, training stops with an error naming the field
+to set. Each component is only demanded when it is actually loaded, so a video-only run never asks for the audio VAE.
+
+#### Key parameters
+
+Path fields, which differ per layout:
+
+| Parameter | Unified layout | Split layout |
+|---|---|---|
+| `model_path` | **Required.** The single checkpoint file. | **Required.** The transformer file. |
+| `text_encoder_path` | **Required.** The Gemma model directory. | **Required.** The packed text-encoder `.safetensors`. |
+| `video_vae_path` | Leave unset — read from `model_path`. | **Required.** The standalone video VAE. |
+| `audio_vae_path` | Leave unset — read from `model_path`. | **Required when the run touches audio** (audio latents, or validation that generates audio). The standalone audio VAE, which also holds the vocoder. A video-only run may omit it. |
+
+URLs are not supported for any of them.
+
+The remaining fields are the same in both layouts:
-| Parameter | Description |
-|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| `model_path` | **Required.** Local path to the LTX-2 model checkpoint (`.safetensors` file). URLs are not supported. |
-| `text_encoder_path` | **Required.** Path to the Gemma text encoder model directory. Download from [HuggingFace](https://huggingface.co/google/gemma-3-12b-it-qat-q4_0-unquantized/). |
-| `training_mode` | Training approach - `"lora"` for LoRA training or `"full"` for full-rank fine-tuning. |
-| `load_checkpoint` | Optional path to resume training from a checkpoint file or directory. |
+| Parameter | Description |
+|---|---|
+| `training_mode` | `"lora"` for LoRA training, `"full"` for full-rank fine-tuning. |
+| `load_checkpoint` | Optional path to resume training from a checkpoint file or directory. |
> [!NOTE]
-> LTX-2 requires both a model checkpoint and a Gemma text encoder. Both must be local paths.
+> The same distinction applies to the preprocessing scripts, which accept `--video-vae-path` and `--audio-vae-path`
+> alongside `--model-path` and `--text-encoder-path`.
### LoraConfig
@@ -266,7 +319,7 @@ acceleration:
|---------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `mixed_precision_mode` | Precision mode - `"bf16"` recommended for modern GPUs |
| `quantization` | Model quantization: `null`, `"int8-quanto"`, `"int4-quanto"`, `"int2-quanto"`, `"fp8-quanto"`, or `"fp8uz-quanto"` |
-| `load_text_encoder_in_8bit` | Load the Gemma text encoder in 8-bit to save GPU memory |
+| `load_text_encoder_in_8bit` | Quantize the Gemma text encoder to 8-bit, saving ~8 GiB of VRAM while caption embeddings are computed. Works with both checkpoint layouts. Requires `bitsandbytes` and a CUDA device, and materializes the full-precision weights in host RAM first (~26 GB for LTX 2.5). **This can potentially degrade the cached caption features.** |
| `offload_optimizer_during_validation` | Move optimizer state to CPU before validation video sampling and back afterwards. Useful when validation OOMs because VAE decoder + transformer + optimizer state can't coexist on the GPU (full fine-tune, high-rank LoRA). No effect for FSDP. |
### DataConfig
@@ -299,16 +352,20 @@ validation:
- type: first_frame
image_or_video: "/path/to/image.png"
- prompt: "A dog running in a field"
- video_dims: [576, 576, 89] # Output dimensions: [width, height, frames]
- negative_prompt: "worst quality, inconsistent motion, blurry, jittery, distorted" # Negative prompt for all samples
- frame_rate: 25.0 # Output video frame rate (fps)
+ video_dims: [960, 544, 89] # Output dimensions: [width, height, frames]
+ negative_prompt: "..." # Negative prompt for all samples (defaults to ltx-pipelines DEFAULT_NEGATIVE_PROMPT)
+ frame_rate: 24.0 # Output video frame rate (fps)
seed: 42 # Random seed for reproducibility
inference_steps: 30 # Number of denoising steps
interval: 100 # Run validation every N steps (null to disable)
- guidance_scale: 4.0 # CFG scale (higher = stronger prompt adherence)
- stg_scale: 1.0 # STG scale (0.0 to disable)
- stg_blocks: [29] # Transformer blocks to apply STG perturbation
- stg_mode: "stg_av" # STG mode: "stg_av" (audio+video) or "stg_v" (video only)
+ video_cfg_scale: 3.0 # Video CFG scale
+ audio_cfg_scale: 7.0 # Audio CFG scale
+ video_stg_scale: 1.0 # Video STG scale (0.0 to disable)
+ audio_stg_scale: 1.0 # Audio STG scale (0.0 to disable)
+ stg_blocks: [28] # Transformer blocks to apply STG perturbation
+ guidance_rescale: 0.7 # Guidance variance rescale factor (0.0 disables)
+ video_modality_guidance_scale: 3.0 # Video modality guidance scale
+ audio_modality_guidance_scale: 3.0 # Audio modality guidance scale
generate_audio: true # Whether to generate audio during validation
generate_video: true # Whether to generate video during validation
skip_initial_validation: false # Skip validation at step 0
@@ -319,12 +376,16 @@ validation:
| Parameter | Description |
|--------------------------|--------------------------------------------------------------------------------------------------------------------------|
| `samples` | List of `ValidationSample` objects (see below). Replaces the legacy `prompts`/`images`/`reference_videos` fields. |
-| `video_dims` | Output dimensions `[width, height, frames]`. Width/height must be divisible by 32, frames must satisfy `frames % 8 == 1` |
+| `video_dims` | Output dimensions `[width, height, frames]`. Width/height must be divisible by the VAE spatial factor (32 by default), frames must satisfy `frames % T == 1` where `T` is the VAE temporal factor (8 by default) |
| `interval` | Steps between validation runs (set to `null` to disable) |
-| `guidance_scale` | CFG (Classifier-Free Guidance) scale. Recommended: 4.0 |
-| `stg_scale` | STG (Spatio-Temporal Guidance) scale. 0.0 disables STG. Recommended: 1.0 |
-| `stg_blocks` | Transformer blocks to perturb for STG. Recommended: `[29]` (single block) |
-| `stg_mode` | STG mode: `"stg_av"` perturbs both audio and video, `"stg_v"` perturbs video only |
+| `video_cfg_scale` | Video CFG (Classifier-Free Guidance) scale. LTX 2.5 default: `3.0` |
+| `audio_cfg_scale` | Audio CFG (Classifier-Free Guidance) scale. LTX 2.5 default: `7.0` |
+| `video_stg_scale` | Video STG (Spatio-Temporal Guidance) scale. LTX 2.5 default: `1.0`; `0.0` disables STG |
+| `audio_stg_scale` | Audio STG (Spatio-Temporal Guidance) scale. LTX 2.5 default: `1.0`; `0.0` disables STG |
+| `stg_blocks` | Transformer blocks to perturb for STG. LTX 2.5 default: `[28]`; `None` perturbs all blocks |
+| `guidance_rescale` | Guidance variance rescale factor. LTX 2.5 default: `0.7`; `0.0` disables rescaling |
+| `video_modality_guidance_scale` | Video modality guidance scale for audio-to-video isolation guidance. LTX 2.5 default: `3.0` |
+| `audio_modality_guidance_scale` | Audio modality guidance scale for video-to-audio isolation guidance. LTX 2.5 default: `3.0` |
| `generate_audio` | Whether to generate audio in validation samples |
| `generate_video` | Whether to generate video in validation samples. Set to `false` for V2A (video-to-audio) validation. Default: `true` |
| `skip_initial_validation`| Skip validation video sampling at step 0 (beginning of training) |
diff --git a/packages/ltx-trainer/docs/custom-training-strategies.md b/packages/ltx-trainer/docs/custom-training-strategies.md
index e24d9a0..907eec9 100644
--- a/packages/ltx-trainer/docs/custom-training-strategies.md
+++ b/packages/ltx-trainer/docs/custom-training-strategies.md
@@ -374,8 +374,10 @@ Create an example config in `configs/`:
# configs/custom_inpainting_lora.yaml
model:
- model_path: "/path/to/ltx2.safetensors"
- text_encoder_path: "/path/to/gemma"
+ # Unified checkpoint shown here; a split pack also needs video_vae_path and
+ # audio_vae_path. See docs/configuration-reference.md#modelconfig.
+ model_path: "/path/to/ltx-checkpoint.safetensors"
+ text_encoder_path: "/path/to/gemma-root"
training_mode: "lora"
training_strategy:
diff --git a/packages/ltx-trainer/docs/dataset-preparation.md b/packages/ltx-trainer/docs/dataset-preparation.md
index 6cb0c40..5750dee 100644
--- a/packages/ltx-trainer/docs/dataset-preparation.md
+++ b/packages/ltx-trainer/docs/dataset-preparation.md
@@ -82,13 +82,34 @@ This step preprocesses your video dataset by:
### Basic Usage
+Which model flags you pass depends on how your checkpoint was published.
+
+**Unified checkpoint** (LTX-2, LTX-2.3, LTX-2.5) — one `.safetensors` holding every component, plus a Gemma folder:
+
```bash
uv run python scripts/process_dataset.py dataset.json \
--resolution-buckets "960x544x49" \
- --model-path /path/to/ltx-2-model.safetensors \
- --text-encoder-path /path/to/gemma-model
+ --model-path /path/to/ltx-2.3-22b-dev.safetensors \
+ --text-encoder-path /path/to/gemma-root
+```
+
+**Split pack** (LTX 2.5) — one file per component, so the VAEs must be named explicitly. Preprocessing needs the
+video VAE to encode video latents and the audio VAE to encode audio latents; neither lives in the transformer file:
+
+```bash
+uv run python scripts/process_dataset.py dataset.json \
+ --resolution-buckets "960x544x49" \
+ --model-path /path/to/diffusion_models/ltx-2.5-22b-dev-transformer-bf16.safetensors \
+ --text-encoder-path /path/to/text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors \
+ --video-vae-path /path/to/vae/ltx-2.5-video-vae-bf16.safetensors \
+ --audio-vae-path /path/to/vae/ltx-2.5-audio-vae-bf16.safetensors
```
+> [!IMPORTANT]
+> The remaining examples in this document are written for a unified checkpoint, to keep them readable. If you are on
+> a split pack, add `--video-vae-path` and `--audio-vae-path` to every one of them. Leaving them off is not silently
+> tolerated — the script stops with an error naming the missing flag.
+
Audio latents are automatically extracted from video files — no extra flag is needed. Use `--skip-audio`
to disable this. For standalone audio files (`.wav`), use the `audio` column in your dataset instead
(see [Convention-Based Column Detection](#convention-based-column-detection) below).
@@ -102,8 +123,8 @@ The same approach applies to `process_videos.py` and `process_captions.py` when
```bash
uv run accelerate launch --num_processes 4 scripts/process_dataset.py dataset.json \
--resolution-buckets "960x544x49" \
- --model-path /path/to/ltx-2-model.safetensors \
- --text-encoder-path /path/to/gemma-model
+ --model-path /path/to/ltx-2.x-checkpoint.safetensors \
+ --text-encoder-path /path/to/gemma-root
```
Outputs are written atomically (via a per-process temporary file, then renamed), so an interrupted run leaves no
@@ -116,11 +137,26 @@ corrupt files. By default a rerun **resumes** — items whose output `.pt` alrea
> ```bash
> uv run accelerate launch --num_processes 4 scripts/process_dataset.py dataset.json \
> --resolution-buckets "960x544x49" \
-> --model-path /path/to/ltx-2.3-model.safetensors \
-> --text-encoder-path /path/to/gemma-model \
+> --model-path /path/to/ltx-2.x-checkpoint.safetensors \
+> --text-encoder-path /path/to/gemma-root \
> --overwrite
> ```
+### Switching between LTX model versions
+
+The `conditions/` files contain features generated by the selected Gemma text encoder. They are not interchangeable
+between LTX-2.3 and LTX 2.5: LTX 2.5 uses Gemma 4 and its embeddings differ from those of the older Gemma 3 model.
+
+When changing the checkpoint, Gemma root, trigger word, or any other encoding-affecting option:
+
+1. Prefer a new `.precomputed/` output directory.
+2. If reusing an existing directory, pass `--overwrite` to `process_dataset.py`.
+3. When running `process_captions.py` or `process_videos.py` directly, pass `--overwrite` to each relevant script.
+
+The checkpoint metadata validates that the checkpoint and Gemma root are a compatible pair, but existing `.pt` files
+are skipped by default and are not automatically re-encoded. Use the checkpoint's supplied metadata rather than
+adding a version flag.
+
### 📊 Dataset Format
The trainer supports videos, single images, or a mix of both in the same dataset.
@@ -224,10 +260,14 @@ Each video is assigned to the nearest matching bucket.
You can preprocess with one or multiple resolution buckets.
When training with multiple resolution buckets, you must use a batch size of 1.
-The dimensions of each bucket must follow these constraints due to LTX-2's VAE architecture:
+The dimensions of each bucket must follow these constraints, set by the VAE's compression
+factors. The values below are the **default** VAE's factors (spatial 32, temporal 8); the
+preprocessing scripts derive the actual factors from the checkpoint, so a less-compressed VAE
+relaxes them (e.g. a 16x16x4 VAE allows multiples of 16 and `frames % 4 == 1`):
-- **Spatial dimensions** (width and height) must be multiples of 32
-- **Number of frames** must satisfy `frames % 8 == 1` (e.g., 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97, 121, etc.)
+- **Spatial dimensions** (width and height) must be multiples of the VAE spatial factor (32 by default)
+- **Number of frames** must satisfy `frames % T == 1`, where `T` is the VAE temporal factor
+ (8 by default, giving 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97, 121, etc.)
**Guidelines for choosing training resolution:**
@@ -263,7 +303,7 @@ uv run python scripts/process_dataset.py dataset.json \
> The sequence length processed by the transformer model can be calculated as:
>
> ```
-> sequence_length = (H/32) * (W/32) * ((F-1)/8 + 1)
+> sequence_length = (H/S) * (W/S) * ((F-1)/T + 1)
> ```
>
> Where:
@@ -271,10 +311,10 @@ uv run python scripts/process_dataset.py dataset.json \
> - H = Height of video
> - W = Width of video
> - F = Number of frames
-> - 32 = VAE's spatial downsampling factor
-> - 8 = VAE's temporal downsampling factor
+> - S = VAE's spatial downsampling factor (32 for the default VAE)
+> - T = VAE's temporal downsampling factor (8 for the default VAE)
>
-> For example, a 768×448×89 video would have sequence length:
+> For example, a 768×448×89 video through the default VAE (S=32, T=8) would have sequence length:
>
> ```
> (768/32) * (448/32) * ((89-1)/8 + 1) = 24 * 14 * 12 = 4,032
diff --git a/packages/ltx-trainer/docs/quick-start.md b/packages/ltx-trainer/docs/quick-start.md
index c81953a..06e28e2 100644
--- a/packages/ltx-trainer/docs/quick-start.md
+++ b/packages/ltx-trainer/docs/quick-start.md
@@ -1,17 +1,18 @@
# Quick Start Guide
-Get up and running with LTX-2 training in just a few steps!
+Get up and running with LTX family training in just a few steps.
## 📋 Prerequisites
Before you begin, ensure you have:
-1. **LTX-2 Model Checkpoint** - A local `.safetensors` file containing the LTX-2 model weights.
- Download `ltx-2.3-22b-dev.safetensors` from: [HuggingFace Hub](https://huggingface.co/Lightricks/LTX-2.3)
- The trainer supports LTX-2 and LTX-2.3 checkpoints through the same configuration API; version-specific components
- are detected from the checkpoint.
-2. **Gemma Text Encoder** - A local directory containing the Gemma model (required for LTX-2).
- Download from: [HuggingFace Hub](https://huggingface.co/google/gemma-3-12b-it-qat-q4_0-unquantized/)
+1. **LTX Model Checkpoint** - A local `.safetensors` file containing the model weights.
+ The trainer supports LTX-2, LTX-2.3, and **LTX 2.5** through the same configuration API;
+ version-specific components are detected from checkpoint metadata.
+2. **Matching Gemma Text Encoder** - A local directory containing the Gemma model.
+ LTX 2.5 requires the LTX-specific fine-tuned Gemma 4 root (for example, `gemma4-12b-ltx-v1`), not Google's
+ vanilla Gemma 4 model. Older LTX-2 and LTX-2.3 checkpoints use the Gemma version they declare; do not substitute
+ Gemma 3 for an LTX 2.5 checkpoint.
3. **Linux with CUDA** - The trainer requires `triton` which is Linux-only; CUDA 13+ is recommended
4. **GPU with sufficient VRAM** - 80GB recommended for the standard config. For GPUs with 32GB VRAM (e.g., RTX 5090),
use the [low VRAM config](../configs/t2v_lora_low_vram.yaml) which enables INT8 quantization and other
@@ -66,13 +67,18 @@ uv run python scripts/caption_videos.py scenes_output_dir/ --output dataset.json
# Preprocess the dataset (compute latents and embeddings)
uv run python scripts/process_dataset.py dataset.json \
--resolution-buckets "960x544x49" \
- --model-path /path/to/ltx-2-model.safetensors \
- --text-encoder-path /path/to/gemma-model
+ --model-path /path/to/ltx-2.x-checkpoint.safetensors \
+ --text-encoder-path /path/to/gemma-root
```
By default, preprocessing writes to `.precomputed/`. Use that directory as `data.preprocessed_data_root`
in your training config.
+> [!IMPORTANT]
+> Precomputed text features are specific to the checkpoint and Gemma pair. When switching from LTX-2.3 to
+> LTX 2.5, preprocess into a fresh output directory or add `--overwrite`; existing `.pt` files are skipped by
+> default. Use the checkpoint metadata supplied with the model; no version flag is required.
+
See [Dataset Preparation](dataset-preparation.md) for detailed instructions.
### 3. Configure Training
@@ -85,10 +91,12 @@ Create or modify a configuration YAML file. Start with one of the example config
Key settings to update:
+A unified (single-file) checkpoint needs two paths:
+
```yaml
model:
- model_path: "/path/to/ltx-2-model.safetensors"
- text_encoder_path: "/path/to/gemma-model"
+ model_path: "/path/to/ltx-2.x-checkpoint.safetensors"
+ text_encoder_path: "/path/to/gemma-root"
data:
preprocessed_data_root: "/path/to/preprocessed/data"
@@ -96,6 +104,16 @@ data:
output_dir: "outputs/my_training_run"
```
+A split pack ships one file per component, so name each of them instead:
+
+```yaml
+model:
+ model_path: "/path/to/diffusion_models/ltx-2.5-22b-dev-transformer-bf16.safetensors"
+ text_encoder_path: "/path/to/text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors"
+ video_vae_path: "/path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ audio_vae_path: "/path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+```
+
See [Configuration Reference](configuration-reference.md) for all available options.
### 4. Start Training
diff --git a/packages/ltx-trainer/docs/training-modes.md b/packages/ltx-trainer/docs/training-modes.md
index 2469c77..892be01 100644
--- a/packages/ltx-trainer/docs/training-modes.md
+++ b/packages/ltx-trainer/docs/training-modes.md
@@ -89,8 +89,8 @@ training_strategy:
## ⏩ Video Extension
Extend a video forward (or backward) in time. Prefix or suffix conditioning provides a span of existing latent frames
-as clean conditioning. The `temporal_boundary` sets the number of **latent frames** used as context (each latent frame
-= 8 pixel frames due to temporal compression).
+as clean conditioning. The `temporal_boundary` sets the number of **latent frames** used as context. For the default
+VAE, each latent frame represents 8 pixel frames; the trainer derives the actual factor from the checkpoint.
```yaml
training_strategy:
@@ -100,7 +100,7 @@ training_strategy:
latents_dir: "latents"
conditions:
- type: prefix # or "suffix" for backward extension
- temporal_boundary: 8 # 8 latent frames = 64 pixel frames
+ temporal_boundary: 8 # 8 latent frames = 64 pixel frames for the default VAE
probability: 1.0
audio:
is_generated: true
@@ -190,11 +190,15 @@ Preprocess with the `--reference-downscale-factor` option:
```bash
uv run python scripts/process_dataset.py dataset.json \
--resolution-buckets 768x768x25 \
- --model-path /path/to/ltx2.safetensors \
- --text-encoder-path /path/to/gemma \
+ --model-path /path/to/ltx-checkpoint.safetensors \
+ --text-encoder-path /path/to/gemma-root \
--reference-downscale-factor 2
```
+> [!NOTE]
+> This example uses a unified checkpoint. On a split pack (LTX 2.5) also pass `--video-vae-path` and
+> `--audio-vae-path` — see [Dataset Preparation](dataset-preparation.md#basic-usage).
+
> [!NOTE]
> The `reference_video` column is auto-detected by convention — no `--reference-column` flag needed.
@@ -214,8 +218,9 @@ validation:
```
> [!NOTE]
-> The scale factor must be a positive integer, and all dimensions must be divisible by 32.
-> Common values are 1 (no scaling), 2 (half resolution), or 4 (quarter resolution).
+> The scale factor must be a positive integer, and all dimensions must be divisible by the VAE
+> spatial factor (32 for the default VAE). Common values are 1 (no scaling), 2 (half resolution),
+> or 4 (quarter resolution).
---
diff --git a/packages/ltx-trainer/docs/troubleshooting.md b/packages/ltx-trainer/docs/troubleshooting.md
index ddf8c4a..c757a52 100644
--- a/packages/ltx-trainer/docs/troubleshooting.md
+++ b/packages/ltx-trainer/docs/troubleshooting.md
@@ -24,13 +24,17 @@ optimization:
#### 2. Enable 8-bit Text Encoder
-Load the Gemma text encoder in 8-bit precision to save GPU memory:
+Quantize the Gemma text encoder to 8-bit, roughly halving the VRAM it holds while caption embeddings are computed:
```yaml
acceleration:
load_text_encoder_in_8bit: true
```
+This works with both checkpoint layouts. It requires `bitsandbytes` and a CUDA device, and the full-precision
+weights pass through host RAM on the way to being quantized — budget around 26 GB of RAM for LTX 2.5.
+
+
#### 3. Reduce Batch Size
Lower the batch size if you encounter out-of-memory errors:
@@ -118,17 +122,62 @@ uv run python scripts/train.py configs/t2v_lora.yaml
> Always use `uv run` to execute Python scripts. This automatically uses the correct virtual environment
> without requiring manual activation.
-### Issue: "Gemma model path is not a directory" Error
+### Issue: Wrong `text_encoder_path` for the checkpoint layout
**Solution:**
-The `text_encoder_path` must point to a directory containing the Gemma model, not a file:
+`text_encoder_path` follows the layout of the model you are training on. With a unified checkpoint it is a
+directory holding the matching Gemma model; with a split pack it is the packed text-encoder `.safetensors`,
+which embeds the Gemma weights, the HF sidecars and the text projections in one file. LTX 2.5 requires the
+LTX-specific fine-tuned Gemma 4, not Google's vanilla Gemma 4 model; do not reuse the Gemma 3 root from an
+LTX-2.3 run.
```yaml
model:
- model_path: "/path/to/ltx-2-model.safetensors" # File path
- text_encoder_path: "/path/to/gemma-model/" # Directory path
+ model_path: "/path/to/ltx-2.x-checkpoint.safetensors" # Unified checkpoint
+ text_encoder_path: "/path/to/matching-gemma-root/" # Gemma directory
```
+### Issue: "is the transformer of a split checkpoint pack and carries no video VAE" Error
+
+**Solution:**
+`model_path` points at a split pack's transformer, which holds no VAE weights. Name the components explicitly:
+
+```yaml
+model:
+ model_path: "/path/to/diffusion_models/ltx-2.5-22b-dev-transformer-bf16.safetensors"
+ text_encoder_path: "/path/to/text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors"
+ video_vae_path: "/path/to/vae/ltx-2.5-video-vae-bf16.safetensors"
+ audio_vae_path: "/path/to/vae/ltx-2.5-audio-vae-bf16.safetensors"
+```
+
+The preprocessing scripts take the same components as `--video-vae-path` / `--audio-vae-path`.
+
+### Issue: "Gemma version mismatch" Error
+
+**Solution:**
+
+The checkpoint and Gemma root are incompatible. Use the LTX-specific fine-tuned Gemma 4 root named by the checkpoint's
+`gemma_source_checkpoint` metadata and do not mix LTX-2.3 caption features or Gemma weights with LTX 2.5.
+The checkpoint metadata supplied with the model is authoritative.
+
+### Issue: Training fails after switching from LTX-2.3 to LTX 2.5
+
+**Solution:**
+
+Recompute the preprocessed data. Caption feature files in `conditions/` are generated by the selected Gemma model
+and are not interchangeable across versions:
+
+```bash
+uv run python scripts/process_dataset.py dataset.json \
+ --resolution-buckets "960x544x49" \
+ --model-path /path/to/ltx-2.x-checkpoint.safetensors \
+ --text-encoder-path /path/to/gemma4-12b-ltx-v1 \
+ --overwrite
+```
+
+Use a fresh output directory when possible. `process_dataset.py`, `process_captions.py`, and `process_videos.py`
+skip existing `.pt` files unless `--overwrite` is passed.
+
### Issue: "Model path does not exist" Error
**Solution:**
@@ -144,14 +193,18 @@ model:
model_path: "https://huggingface.co/..."
```
-### Issue: "Frames must satisfy frames % 8 == 1" Error
+### Issue: "frames must satisfy (frames - 1) % T == 0" Error
**Solution:**
-LTX-2 requires the number of frames to satisfy `frames % 8 == 1`:
+The number of frames must be VAE-aligned: `frames % T == 1`, where `T` is the VAE temporal
+compression factor read from the checkpoint. For the **default** VAE, `T = 8`:
- ✅ Valid: 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97, 121
- ❌ Invalid: 24, 32, 48, 64, 100
+A less-compressed VAE lowers `T` (e.g. a 16x16x4 VAE uses `T = 4`, allowing 1, 5, 9, 13, ...).
+The spatial dimensions must likewise be divisible by the VAE spatial factor (32 by default).
+
### Issue: Slow Training Speed
**Optimizations:**
@@ -175,6 +228,11 @@ LTX-2 requires the number of frames to satisfy `frames % 8 == 1`:
**Solutions:**
+First confirm that the validation recipe matches the checkpoint. The trainer's validation runner is one-stage:
+for an LTX 2.5 distilled checkpoint, start with 8 steps, CFG scales of `1.0`, and STG scales of `0.0`. PT/SFT
+checkpoints need their own one-stage sampling recipe. The production two-stage distilled workflow is provided by
+[`ltx-pipelines`](../../ltx-pipelines/README.md), not this training-time validator.
+
1. **Use conditioned validation:** For more reliable validation, use image-to-video (first-frame conditioning) rather than pure text-to-video:
```yaml
@@ -197,14 +255,19 @@ LTX-2 requires the number of frames to satisfy `frames % 8 == 1`:
```yaml
validation:
- guidance_scale: 4.0 # CFG scale (recommended: 4.0)
- stg_scale: 1.0 # STG scale for temporal coherence (recommended: 1.0)
- stg_blocks: [29] # Transformer block to perturb
+ video_cfg_scale: 3.0
+ audio_cfg_scale: 7.0
+ video_stg_scale: 1.0
+ audio_stg_scale: 1.0
+ stg_blocks: [28]
+ guidance_rescale: 0.7
+ video_modality_guidance_scale: 3.0
+ audio_modality_guidance_scale: 3.0
```
4. **Check caption quality:**
Review and manually edit captions for accuracy if using auto-generated captions.
- LTX-2 prefers long, detailed captions that describe both visual content and audio (e.g., ambient sounds, speech,
+ LTX models prefer long, detailed captions that describe both visual content and audio (e.g., ambient sounds, speech,
music).
5. **Check target modules:**
diff --git a/packages/ltx-trainer/docs/utility-scripts.md b/packages/ltx-trainer/docs/utility-scripts.md
index 3364a83..d456b35 100644
--- a/packages/ltx-trainer/docs/utility-scripts.md
+++ b/packages/ltx-trainer/docs/utility-scripts.md
@@ -2,6 +2,9 @@
This guide covers the various utility scripts available for preprocessing, conversion, and debugging tasks.
+All model-processing scripts use the same automatic checkpoint detection as the trainer and support LTX-2, LTX-2.3, and LTX 2.5.
+The checkpoint and Gemma paths must refer to a compatible pair.
+
## 🎬 Dataset Processing Scripts
### Video Scene Splitting
@@ -87,18 +90,35 @@ For Gemini, keep `--num-workers` at 3-5 (higher values may hit API rate limits).
The `scripts/process_dataset.py` script processes videos and caches latents for training.
+> [!IMPORTANT]
+> The examples below use a **unified checkpoint** — one `.safetensors` holding every component, plus a Gemma folder.
+> On a **split pack** (LTX 2.5, one file per component) the transformer holds no VAE weights, so every command that
+> encodes latents also needs `--video-vae-path` and `--audio-vae-path`:
+>
+> ```bash
+> uv run python scripts/process_dataset.py dataset.json \
+> --resolution-buckets "960x544x49" \
+> --model-path /path/to/diffusion_models/ltx-2.5-22b-dev-transformer-bf16.safetensors \
+> --text-encoder-path /path/to/text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors \
+> --video-vae-path /path/to/vae/ltx-2.5-video-vae-bf16.safetensors \
+> --audio-vae-path /path/to/vae/ltx-2.5-audio-vae-bf16.safetensors
+> ```
+>
+> The same two flags apply to `process_videos.py` and `decode_latents.py`. `process_captions.py` does not need them:
+> it only runs the text encoder.
+
```bash
# Basic preprocessing
uv run python scripts/process_dataset.py dataset.json \
--resolution-buckets "960x544x49" \
- --model-path /path/to/ltx-2-model.safetensors \
- --text-encoder-path /path/to/gemma-model
+ --model-path /path/to/ltx-2.x-checkpoint.safetensors \
+ --text-encoder-path /path/to/gemma-root
# With video decoding for verification
uv run python scripts/process_dataset.py dataset.json \
--resolution-buckets "960x544x49" \
- --model-path /path/to/ltx-2-model.safetensors \
- --text-encoder-path /path/to/gemma-model \
+ --model-path /path/to/ltx-2.x-checkpoint.safetensors \
+ --text-encoder-path /path/to/gemma-root \
--decode
```
@@ -107,12 +127,14 @@ Multiple resolution buckets can be specified, separated by `;`:
```bash
uv run python scripts/process_dataset.py dataset.json \
--resolution-buckets "960x544x49;512x512x81" \
- --model-path /path/to/ltx-2-model.safetensors \
- --text-encoder-path /path/to/gemma-model
+ --model-path /path/to/ltx-2.x-checkpoint.safetensors \
+ --text-encoder-path /path/to/gemma-root
```
> [!NOTE]
> When training with multiple resolution buckets, set `optimization.batch_size: 1`.
+> When switching between LTX-2.3 and LTX 2.5, use a fresh output directory or `--overwrite`; existing text-feature
+> `.pt` files are skipped by default and are not interchangeable between Gemma versions.
**Multi-GPU preprocessing.** Launch with `accelerate launch` to shard the dataset across processes. Reruns resume
by default (existing `.pt` outputs are skipped); writes are atomic so interrupted runs are safe. Pass `--overwrite`
@@ -124,14 +146,14 @@ so stale outputs are replaced. Use the same `accelerate launch` pattern (and `--
# Multi-GPU preprocessing
uv run accelerate launch --num_processes 4 scripts/process_dataset.py dataset.json \
--resolution-buckets "960x544x49" \
- --model-path /path/to/ltx-2-model.safetensors \
- --text-encoder-path /path/to/gemma-model
+ --model-path /path/to/ltx-2.x-checkpoint.safetensors \
+ --text-encoder-path /path/to/gemma-root
# Force re-encoding of all items (e.g. after switching model or resolution)
uv run accelerate launch --num_processes 4 scripts/process_dataset.py dataset.json \
--resolution-buckets "960x544x49" \
- --model-path /path/to/ltx-2.3-model.safetensors \
- --text-encoder-path /path/to/gemma-model \
+ --model-path /path/to/ltx-2.x-checkpoint.safetensors \
+ --text-encoder-path /path/to/gemma-root \
--overwrite
```
@@ -169,20 +191,12 @@ The `scripts/decode_latents.py` script decodes precomputed video latents back in
```bash
# Basic usage
-uv run python scripts/decode_latents.py /path/to/latents/dir \
- --output-dir /path/to/output \
- --model-path /path/to/ltx-2-model.safetensors
-
-# With VAE tiling for large videos
-uv run python scripts/decode_latents.py /path/to/latents/dir \
- --output-dir /path/to/output \
- --model-path /path/to/ltx-2-model.safetensors \
- --vae-tiling
+uv run python scripts/decode_latents.py /path/to/latents/dir /path/to/output \
+ --model-path /path/to/ltx-2.x-checkpoint.safetensors
# Decode both video and audio latents
-uv run python scripts/decode_latents.py /path/to/latents/dir \
- --output-dir /path/to/output \
- --model-path /path/to/ltx-2-model.safetensors \
+uv run python scripts/decode_latents.py /path/to/latents/dir /path/to/output \
+ --model-path /path/to/ltx-2.x-checkpoint.safetensors \
--with-audio
```
diff --git a/packages/ltx-trainer/pyproject.toml b/packages/ltx-trainer/pyproject.toml
index ce956d6..d802680 100644
--- a/packages/ltx-trainer/pyproject.toml
+++ b/packages/ltx-trainer/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "ltx-trainer"
-version = "1.1.7"
+version = "1.2.0"
description = "LTX-2 training, democratized."
readme = "README.md"
authors = [
@@ -31,15 +31,29 @@ dependencies = [
"torch>=2.6.0",
"torchaudio>=2.7.0",
# torchcodec must match the torch version (it ships a torch-ABI C++ extension and declares
- # no torch pin of its own); the 0.9 line matches torch 2.9. torchaudio>=2.9 routes
+ # no torch pin of its own). With the natten extra (torch 2.13 + cu132), keep the upper
+ # bound open enough for matching torchcodec wheels. torchaudio>=2.9 routes
# torchaudio.load() through torchcodec, so audio preprocessing needs it installed.
- "torchcodec>=0.8.1,<0.10",
+ "torchcodec>=0.8.1,<1.0.0",
"torchvision>=0.21.0",
"typer>=0.15.1",
"wandb>=0.27.0",
"setuptools>=79.0.0",
]
+[tool.uv.sources]
+torchcodec = { index = "torch" }
+torchaudio = { index = "torch-test" }
+
+[[tool.uv.index]]
+name = "torch"
+url = "https://download.pytorch.org/whl/cu132"
+
+[[tool.uv.index]]
+name = "torch-test"
+url = "https://download.pytorch.org/whl/test/cu132/"
+explicit = true
+
[dependency-groups]
dev = [
"pre-commit>=4.0.1",
@@ -54,7 +68,7 @@ build-backend = "hatchling.build"
[tool.ruff]
-target-version = "1.1.7"
+target-version = "py311"
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.
diff --git a/packages/ltx-trainer/scripts/decode_latents.py b/packages/ltx-trainer/scripts/decode_latents.py
index f27ff4f..708669f 100755
--- a/packages/ltx-trainer/scripts/decode_latents.py
+++ b/packages/ltx-trainer/scripts/decode_latents.py
@@ -6,7 +6,7 @@ This script loads latent files saved during preprocessing and decodes them
back into video clips using the same VAE model.
Basic usage:
python scripts/decode_latents.py /path/to/latents/dir /path/to/output \
- --model-source /path/to/ltx2.safetensors
+ --model-path /path/to/ltx-checkpoint.safetensors
"""
from pathlib import Path
@@ -28,9 +28,15 @@ from rich.progress import (
)
from transformers.utils.logging import disable_progress_bar
-from ltx_core.model.video_vae import SpatialTilingConfig, TemporalTilingConfig, TilingConfig
+from ltx_core.model.video_vae import DimensionSizeConfig, TileSizeConfig
from ltx_trainer import logger
-from ltx_trainer.model_loader import load_audio_vae_decoder, load_video_vae_decoder, load_vocoder
+from ltx_trainer.model_loader import (
+ load_audio_vae_decoder,
+ load_video_vae_decoder,
+ load_vocoder,
+ resolve_audio_vae_path,
+ resolve_video_vae_path,
+)
from ltx_trainer.video_utils import save_video
DEFAULT_TILE_SIZE_PIXELS = 512 # Spatial tile size in pixels (must be ≥64 and divisible by 32)
@@ -54,13 +60,17 @@ class LatentsDecoder:
device: str = "cuda",
vae_tiling: bool = False,
with_audio: bool = False,
+ video_vae_path: str | None = None,
+ audio_vae_path: str | None = None,
):
"""Initialize the decoder with model configuration.
Args:
- model_path: Path to LTX-2 checkpoint (.safetensors)
+ model_path: Unified checkpoint, or the transformer of a split pack
device: Device to use for computation
vae_tiling: Whether to enable VAE tiling for larger video resolutions
with_audio: Whether to load audio VAE for audio decoding
+ video_vae_path: Standalone video VAE, required for a split pack
+ audio_vae_path: Standalone audio VAE, required for a split pack with audio
"""
self.device = torch.device(device)
self.model_path = model_path
@@ -69,19 +79,23 @@ class LatentsDecoder:
self.vocoder = None
self.vae_tiling = vae_tiling
- self._load_model(model_path, with_audio)
+ self._load_model(
+ resolve_video_vae_path(model_path, video_vae_path),
+ resolve_audio_vae_path(model_path, audio_vae_path) if with_audio else str(model_path),
+ with_audio,
+ )
- def _load_model(self, model_path: str, with_audio: bool = False) -> None:
+ def _load_model(self, video_vae_path: str, audio_vae_path: str, with_audio: bool = False) -> None:
"""Initialize and load the VAE model(s)."""
- with console.status(f"[bold]Loading video VAE decoder from {model_path}...", spinner="dots"):
- self.vae = load_video_vae_decoder(model_path, device=self.device, dtype=torch.bfloat16)
+ with console.status(f"[bold]Loading video VAE decoder from {video_vae_path}...", spinner="dots"):
+ self.vae = load_video_vae_decoder(video_vae_path, device=self.device, dtype=torch.bfloat16)
if with_audio:
- with console.status(f"[bold]Loading audio VAE decoder from {model_path}...", spinner="dots"):
- self.audio_vae = load_audio_vae_decoder(model_path, device=self.device, dtype=torch.bfloat16)
+ with console.status(f"[bold]Loading audio VAE decoder from {audio_vae_path}...", spinner="dots"):
+ self.audio_vae = load_audio_vae_decoder(audio_vae_path, device=self.device, dtype=torch.bfloat16)
- with console.status(f"[bold]Loading vocoder from {model_path}...", spinner="dots"):
- self.vocoder = load_vocoder(model_path, device=self.device)
+ with console.status(f"[bold]Loading vocoder from {audio_vae_path}...", spinner="dots"):
+ self.vocoder = load_vocoder(audio_vae_path, device=self.device)
@torch.inference_mode()
def decode(self, latents_dir: Path, output_dir: Path, seed: int | None = None) -> None:
@@ -228,14 +242,18 @@ class LatentsDecoder:
"""Decode latents to video frames."""
if self.vae_tiling:
# Use tiled decoding for reduced VRAM
- tiling_config = TilingConfig(
- spatial_config=SpatialTilingConfig(
- tile_size_in_pixels=DEFAULT_TILE_SIZE_PIXELS,
- tile_overlap_in_pixels=DEFAULT_TILE_OVERLAP_PIXELS,
+ tiling_config = TileSizeConfig(
+ height=DimensionSizeConfig(
+ tile_size=DEFAULT_TILE_SIZE_PIXELS,
+ overlap=DEFAULT_TILE_OVERLAP_PIXELS,
+ ),
+ width=DimensionSizeConfig(
+ tile_size=DEFAULT_TILE_SIZE_PIXELS,
+ overlap=DEFAULT_TILE_OVERLAP_PIXELS,
),
- temporal_config=TemporalTilingConfig(
- tile_size_in_frames=DEFAULT_TILE_SIZE_FRAMES,
- tile_overlap_in_frames=DEFAULT_TILE_OVERLAP_FRAMES,
+ frames=DimensionSizeConfig(
+ tile_size=DEFAULT_TILE_SIZE_FRAMES,
+ overlap=DEFAULT_TILE_OVERLAP_FRAMES,
),
)
chunks = list(
@@ -303,7 +321,15 @@ def main(
),
model_path: str = typer.Option(
...,
- help="Path to LTX-2 checkpoint (.safetensors file)",
+ help="Path to the unified checkpoint or split transformer safetensors",
+ ),
+ video_vae_path: str | None = typer.Option(
+ default=None,
+ help="Split-pack video VAE safetensors (defaults to --model-path for unified checkpoints)",
+ ),
+ audio_vae_path: str | None = typer.Option(
+ default=None,
+ help="Split-pack audio VAE safetensors (defaults to --model-path for unified checkpoints)",
),
device: str = typer.Option(
default="cuda",
@@ -332,13 +358,13 @@ def main(
Examples:
# Basic usage
python scripts/decode_latents.py /path/to/latents /path/to/videos \\
- --model-path /path/to/ltx2.safetensors
- # With VAE tiling for large videos
+ --model-path /path/to/ltx-checkpoint.safetensors
+ # Disable tiled decoding when comparing against a full decode
python scripts/decode_latents.py /path/to/latents /path/to/videos \\
- --model-path /path/to/ltx2.safetensors --vae-tiling
+ --model-path /path/to/ltx-checkpoint.safetensors --no-vae-tiling
# With audio decoding
python scripts/decode_latents.py /path/to/latents /path/to/videos \\
- --model-path /path/to/ltx2.safetensors --with-audio
+ --model-path /path/to/ltx-checkpoint.safetensors --with-audio
"""
latents_path = Path(latents_dir)
output_path = Path(output_dir)
@@ -348,6 +374,8 @@ def main(
decoder = LatentsDecoder(
model_path=model_path,
+ video_vae_path=video_vae_path,
+ audio_vae_path=audio_vae_path,
device=device,
vae_tiling=vae_tiling,
with_audio=with_audio,
diff --git a/packages/ltx-trainer/scripts/process_captions.py b/packages/ltx-trainer/scripts/process_captions.py
index 037848e..20fe76e 100755
--- a/packages/ltx-trainer/scripts/process_captions.py
+++ b/packages/ltx-trainer/scripts/process_captions.py
@@ -8,7 +8,7 @@ This module provides functionality for processing text captions, including:
- CaptionsDataset for caption-only preprocessing workflows
Can be used as a standalone script:
python scripts/process_captions.py dataset.json --output-dir /path/to/output \
- --model-source /path/to/ltx2.safetensors --text-encoder-path /path/to/gemma
+ --model-path /path/to/ltx-checkpoint.safetensors --text-encoder-path /path/to/gemma-root
"""
import json
@@ -36,7 +36,7 @@ from torch.utils.data import DataLoader, Dataset, Subset
from transformers.utils.logging import disable_progress_bar
from ltx_trainer import logger
-from ltx_trainer.model_loader import load_embeddings_processor, load_text_encoder
+from ltx_trainer.model_loader import embedding_weight_paths, load_embeddings_processor, load_text_encoder
# Disable tokenizers parallelism to avoid warnings
os.environ["TOKENIZERS_PARALLELISM"] = "false"
@@ -307,7 +307,8 @@ def compute_captions_embeddings( # noqa: PLR0913
load_in_8bit=load_in_8bit,
)
embeddings_processor = load_embeddings_processor(
- model_path,
+ embedding_weight_paths(model_path, text_encoder_path),
+ gemma_model_path=text_encoder_path,
device=device,
dtype=torch.bfloat16,
)
@@ -334,7 +335,7 @@ def compute_captions_embeddings( # noqa: PLR0913
# TODO(batch-tokenization): When tokenizer supports batching, encode all prompts at once.
# For now, process one at a time:
for i in range(len(batch["prompt"])):
- encoded = text_encoder.encode([batch["prompt"][i]], padding_side="left")
+ encoded = text_encoder.encode([batch["prompt"][i]])
hidden_states, prompt_attention_mask = encoded[0]
video_prompt_embeds, audio_prompt_embeds = embeddings_processor.feature_extractor(
hidden_states, prompt_attention_mask, "left"
@@ -453,19 +454,23 @@ def main( # noqa: PLR0913
This script processes captions from metadata files and saves text embeddings
that can be used for training video generation models. The output embeddings
will maintain the same folder structure and naming as the corresponding media files.
- Note: This script is designed for LTX-2 models which use the Gemma text encoder.
+ Note: This script supports the LTX family. Use the Gemma root that matches the
+ checkpoint; LTX 2.5 uses the LTX-specific fine-tuned Gemma 4 model, not Google's
+ vanilla Gemma 4 model.
Examples:
- # Process captions with LTX-2 model
+ # Process captions with an LTX checkpoint
python scripts/process_captions.py dataset.json --output-dir ./embeddings \\
- --model-path /path/to/ltx2_checkpoint.safetensors \\
- --text-encoder-path /path/to/gemma
+ --model-path /path/to/ltx-checkpoint.safetensors \\
+ --text-encoder-path /path/to/gemma-root
# Add a trigger word for LoRA training
python scripts/process_captions.py dataset.json --output-dir ./embeddings \\
- --model-path /path/to/ltx2.safetensors --text-encoder-path /path/to/gemma \\
+ --model-path /path/to/ltx-checkpoint.safetensors \\
+ --text-encoder-path /path/to/gemma-root \\
--lora-trigger "mytoken"
# Remove LLM-generated prefixes from captions
python scripts/process_captions.py dataset.json --output-dir ./embeddings \\
- --model-path /path/to/ltx2.safetensors --text-encoder-path /path/to/gemma \\
+ --model-path /path/to/ltx-checkpoint.safetensors \\
+ --text-encoder-path /path/to/gemma-root \\
--remove-llm-prefixes
"""
diff --git a/packages/ltx-trainer/scripts/process_dataset.py b/packages/ltx-trainer/scripts/process_dataset.py
index 74d3e39..57fc69c 100755
--- a/packages/ltx-trainer/scripts/process_dataset.py
+++ b/packages/ltx-trainer/scripts/process_dataset.py
@@ -15,7 +15,7 @@ Convention table:
Legacy aliases: media_path → video, ref_media_path → reference_video
Basic usage:
python scripts/process_dataset.py /path/to/dataset.json --resolution-buckets 768x768x49 \\
- --model-path /path/to/ltx2.safetensors --text-encoder-path /path/to/gemma
+ --model-path /path/to/ltx-checkpoint.safetensors --text-encoder-path /path/to/gemma-root
"""
from pathlib import Path
@@ -36,13 +36,14 @@ from rich.console import Console
from ltx_trainer import logger
from ltx_trainer.gpu_utils import free_gpu_memory_context
+from ltx_trainer.model_loader import read_video_scale_factors, resolve_video_vae_path
console = Console()
app = typer.Typer(
pretty_exceptions_enable=False,
no_args_is_help=True,
- help="Preprocess a media dataset for LTX-2 training. "
+ help="Preprocess a media dataset for LTX family training. "
"Automatically detects columns (video, audio, reference_video, reference_audio, caption) "
"and processes each with the appropriate encoder.",
)
@@ -57,6 +58,8 @@ def preprocess_dataset( # noqa: PLR0912, PLR0913, PLR0915
model_path: str,
text_encoder_path: str,
device: str,
+ video_vae_path: str | None = None,
+ audio_vae_path: str | None = None,
output_dir: str | None = None,
video_column: str | None = None,
caption_column: str | None = None,
@@ -75,6 +78,12 @@ def preprocess_dataset( # noqa: PLR0912, PLR0913, PLR0915
"""Run the preprocessing pipeline with convention-based column detection."""
_validate_dataset_file(dataset_file)
+ # Video VAE compression factors, derived from the checkpoint config (default 32x32x8).
+ # audio_vae_path stays unresolved and is passed through as-is: the phases below resolve it
+ # only when they actually encode audio, so a video-only run needs no audio VAE.
+ video_vae_path = resolve_video_vae_path(model_path, video_vae_path)
+ scale_factors = read_video_scale_factors(video_vae_path)
+
# Detect columns and resolve roles
dataset_columns = detect_dataset_columns(dataset_file)
roles = _resolve_columns(dataset_columns, video_column, caption_column)
@@ -142,6 +151,8 @@ def preprocess_dataset( # noqa: PLR0912, PLR0913, PLR0915
resolution_buckets=resolution_buckets,
output_dir=str(output_base / "latents"),
model_path=model_path,
+ video_vae_path=video_vae_path,
+ audio_vae_path=audio_vae_path,
batch_size=batch_size,
device=device,
vae_tiling=vae_tiling,
@@ -161,7 +172,9 @@ def preprocess_dataset( # noqa: PLR0912, PLR0913, PLR0915
"When using --reference-temporal-scale-factor > 1, only a single resolution bucket is supported."
)
- reference_buckets = compute_scaled_resolution_buckets(resolution_buckets, reference_downscale_factor)
+ reference_buckets = compute_scaled_resolution_buckets(
+ resolution_buckets, reference_downscale_factor, scale_factors
+ )
if reference_downscale_factor > 1:
logger.info(f"Processing reference videos at 1/{reference_downscale_factor} resolution...")
if reference_temporal_scale_factor > 1:
@@ -178,6 +191,8 @@ def preprocess_dataset( # noqa: PLR0912, PLR0913, PLR0915
resolution_buckets=reference_buckets,
output_dir=str(output_base / "reference_latents"),
model_path=model_path,
+ video_vae_path=video_vae_path,
+ audio_vae_path=audio_vae_path,
batch_size=batch_size,
device=device,
vae_tiling=vae_tiling,
@@ -193,6 +208,7 @@ def preprocess_dataset( # noqa: PLR0912, PLR0913, PLR0915
latents_dir=str(output_base / "latents"),
output_dir=str(output_base / "video_masks"),
main_media_column=roles["video"],
+ scale_factors=scale_factors,
)
# --- Phase 3: Audio VAE (audio, reference_audio) ---
@@ -218,6 +234,7 @@ def preprocess_dataset( # noqa: PLR0912, PLR0913, PLR0915
audio_column=roles[role],
output_dir=str(output_base / output_subdir),
model_path=model_path,
+ audio_vae_path=audio_vae_path,
main_media_column=roles.get("video"),
max_duration=max_audio_duration,
duration_buckets=audio_duration_buckets,
@@ -242,7 +259,14 @@ def preprocess_dataset( # noqa: PLR0912, PLR0913, PLR0915
# --- Decode for verification ---
if decode:
logger.info("Decoding latents for verification...")
- decoder = LatentsDecoder(model_path=model_path, device=device, vae_tiling=vae_tiling, with_audio=has_audio)
+ decoder = LatentsDecoder(
+ model_path=model_path,
+ video_vae_path=video_vae_path,
+ audio_vae_path=audio_vae_path,
+ device=device,
+ vae_tiling=vae_tiling,
+ with_audio=has_audio,
+ )
if has_video:
decoder.decode(output_base / "latents", output_base / "decoded_videos")
if "reference_video" in roles and (output_base / "reference_latents").exists():
@@ -300,11 +324,19 @@ def main( # noqa: PLR0913
),
model_path: str = typer.Option(
...,
- help="Path to LTX-2 checkpoint (.safetensors file)",
+ help="Path to the unified checkpoint or split transformer safetensors",
),
text_encoder_path: str = typer.Option(
...,
- help="Path to Gemma text encoder directory",
+ help="Path to the matching Gemma directory or packed text-encoder safetensors",
+ ),
+ video_vae_path: str | None = typer.Option(
+ default=None,
+ help="Split-pack video VAE safetensors (defaults to --model-path for unified checkpoints)",
+ ),
+ audio_vae_path: str | None = typer.Option(
+ default=None,
+ help="Split-pack audio VAE safetensors (defaults to --model-path for unified checkpoints)",
),
caption_column: str | None = typer.Option(
default=None,
@@ -376,9 +408,11 @@ def main( # noqa: PLR0913
"changed parameters (different model, resolution, etc.) so stale outputs are replaced.",
),
) -> None:
- """Preprocess a media dataset for LTX-2 training.
+ """Preprocess a media dataset for LTX family training.
See module docstring for the convention table. Audio is auto-extracted from
video files by default — use --skip-audio to disable.
+ Checkpoint architecture and VAE factors are detected automatically. When switching
+ checkpoint or Gemma versions, use a fresh output directory or --overwrite.
For multi-GPU preprocessing, invoke under ``accelerate launch`` -- each process
will handle an interleaved shard of the dataset.
"""
@@ -388,7 +422,8 @@ def main( # noqa: PLR0913
"--with-audio is deprecated. Audio extraction is now on by default. Use --skip-audio to disable."
)
- parsed_buckets = parse_resolution_buckets(resolution_buckets) if resolution_buckets else None
+ scale_factors = read_video_scale_factors(resolve_video_vae_path(model_path, video_vae_path))
+ parsed_buckets = parse_resolution_buckets(resolution_buckets, scale_factors) if resolution_buckets else None
if parsed_buckets and len(parsed_buckets) > 1:
logger.warning("Using multiple resolution buckets. Training batch size must be 1.")
@@ -411,6 +446,8 @@ def main( # noqa: PLR0913
model_path=model_path,
text_encoder_path=text_encoder_path,
device=device,
+ video_vae_path=video_vae_path,
+ audio_vae_path=audio_vae_path,
output_dir=output_dir,
video_column=video_column,
caption_column=caption_column,
diff --git a/packages/ltx-trainer/scripts/process_videos.py b/packages/ltx-trainer/scripts/process_videos.py
index 7d2f96c..1a7c94a 100755
--- a/packages/ltx-trainer/scripts/process_videos.py
+++ b/packages/ltx-trainer/scripts/process_videos.py
@@ -9,7 +9,7 @@ This module provides functionality for processing video and image files, includi
- BucketSampler for grouping videos by resolution
Can be used as a standalone script:
python scripts/process_videos.py dataset.csv --resolution-buckets 768x768x25 \
- --output-dir /path/to/output --model-source /path/to/ltx2.safetensors
+ --output-dir /path/to/output --model-path /path/to/ltx-checkpoint.safetensors
"""
import json
@@ -45,9 +45,15 @@ from torchvision.transforms.functional import resize as tv_resize
from transformers.utils.logging import disable_progress_bar
from ltx_core.model.audio_vae import AudioProcessor
-from ltx_core.types import Audio
+from ltx_core.types import VIDEO_SCALE_FACTORS, Audio, SpatioTemporalScaleFactors
from ltx_trainer import logger
-from ltx_trainer.model_loader import load_audio_vae_encoder, load_video_vae_encoder
+from ltx_trainer.model_loader import (
+ load_audio_vae_encoder,
+ load_video_vae_encoder,
+ read_video_scale_factors,
+ resolve_audio_vae_path,
+ resolve_video_vae_path,
+)
from ltx_trainer.utils import open_image_as_srgb
from ltx_trainer.video_utils import get_video_frame_count, read_video
@@ -56,10 +62,6 @@ disable_progress_bar()
# Register HEIF/HEIC support
register_heif_opener()
-# Constants for validation
-VAE_SPATIAL_FACTOR = 32
-VAE_TEMPORAL_FACTOR = 8
-
# Audio constants
AUDIO_LATENT_CHANNELS = 8
AUDIO_FREQUENCY_BINS = 16
@@ -397,6 +399,8 @@ def compute_latents( # noqa: PLR0912, PLR0913, PLR0915
resolution_buckets: list[tuple[int, int, int]],
output_dir: str,
model_path: str,
+ video_vae_path: str | None = None,
+ audio_vae_path: str | None = None,
main_media_column: str | None = None,
reshape_mode: str = "center",
batch_size: int = 1,
@@ -432,6 +436,10 @@ def compute_latents( # noqa: PLR0912, PLR0913, PLR0915
changed parameters (different model, resolution, etc.) so stale outputs are replaced.
temporal_subsample_factor: Factor for VAE-aligned temporal subsampling of reference videos
"""
+ video_vae_path = resolve_video_vae_path(model_path, video_vae_path)
+ # Video VAE compression factors, derived from the checkpoint config (default 32x32x8).
+ scale_factors = read_video_scale_factors(video_vae_path)
+
# Validate temporal subsampling compatibility with resolution buckets
if temporal_subsample_factor > 1:
for frames, _h, _w in resolution_buckets:
@@ -443,10 +451,10 @@ def compute_latents( # noqa: PLR0912, PLR0913, PLR0915
f"(frames - 1) must be divisible by the factor."
)
subsampled = 1 + pixel_frames_minus_one // temporal_subsample_factor
- if (subsampled - 1) % VAE_TEMPORAL_FACTOR != 0:
+ if (subsampled - 1) % scale_factors.time != 0:
raise ValueError(
f"After temporal subsampling {frames} → {subsampled} frames, "
- f"result does not satisfy (frames - 1) % {VAE_TEMPORAL_FACTOR} == 0."
+ f"result does not satisfy (frames - 1) % {scale_factors.time} == 0."
)
if with_audio and audio_output_dir is None:
@@ -497,15 +505,17 @@ def compute_latents( # noqa: PLR0912, PLR0913, PLR0915
if dataloader is None:
return
- with console.status(f"[bold]Loading video VAE encoder from [cyan]{model_path}[/]...", spinner="dots"):
- vae = load_video_vae_encoder(model_path, device=torch_device, dtype=torch.bfloat16)
+ with console.status(f"[bold]Loading video VAE encoder from [cyan]{video_vae_path}[/]...", spinner="dots"):
+ vae = load_video_vae_encoder(video_vae_path, device=torch_device, dtype=torch.bfloat16)
audio_vae_encoder = None
audio_processor = None
if with_audio:
- with console.status(f"[bold]Loading audio VAE encoder from [cyan]{model_path}[/]...", spinner="dots"):
+ # Resolved here so a video-only run never has to name a split pack's audio VAE.
+ audio_vae_path = resolve_audio_vae_path(model_path, audio_vae_path)
+ with console.status(f"[bold]Loading audio VAE encoder from [cyan]{audio_vae_path}[/]...", spinner="dots"):
audio_vae_encoder = load_audio_vae_encoder(
- checkpoint_path=model_path,
+ checkpoint_path=audio_vae_path,
device=torch_device,
dtype=torch.float32, # Audio VAE needs float32 for quality. TODO: re-test with bfloat16.
)
@@ -539,7 +549,9 @@ def compute_latents( # noqa: PLR0912, PLR0913, PLR0915
# Encode video
with torch.inference_mode():
- video_latent_data = _encode_video(vae=vae, video=video, use_tiling=vae_tiling)
+ video_latent_data = _encode_video(
+ vae=vae, video=video, use_tiling=vae_tiling, scale_factors=scale_factors
+ )
# Save latents for each item in batch
for i in range(len(batch["relative_path"])):
@@ -611,6 +623,7 @@ def _encode_video(
use_tiling: bool = False,
tile_size: int = DEFAULT_TILE_SIZE,
tile_overlap: int = DEFAULT_TILE_OVERLAP,
+ scale_factors: SpatioTemporalScaleFactors = VIDEO_SCALE_FACTORS,
) -> dict[str, torch.Tensor | int]:
"""Encode video into non-patchified latent representation.
Args:
@@ -619,8 +632,9 @@ def _encode_video(
This is the format expected by the VAE encoder.
dtype: Target dtype for output latents
use_tiling: Whether to use spatial tiling for memory efficiency
- tile_size: Tile size in pixels (must be divisible by 32)
- tile_overlap: Overlap between tiles in pixels (must be divisible by 32)
+ tile_size: Tile size in pixels (must be divisible by the VAE spatial factor)
+ tile_overlap: Overlap between tiles in pixels (must be divisible by the VAE spatial factor)
+ scale_factors: Video VAE spatiotemporal compression factors (default 32x32x8)
Returns:
Dict containing non-patchified latents and shape information:
{
@@ -646,6 +660,7 @@ def _encode_video(
video=video,
tile_size=tile_size,
tile_overlap=tile_overlap,
+ scale_factors=scale_factors,
)
else:
# Encode video - VAE expects [B, C, F, H, W], returns [B, C, F', H', W']
@@ -669,6 +684,7 @@ def _tiled_encode_video( # noqa: PLR0912, PLR0915
video: torch.Tensor,
tile_size: int = DEFAULT_TILE_SIZE,
tile_overlap: int = DEFAULT_TILE_OVERLAP,
+ scale_factors: SpatioTemporalScaleFactors = VIDEO_SCALE_FACTORS,
) -> torch.Tensor:
"""Encode video using spatial tiling for memory efficiency.
Splits the video into overlapping spatial tiles, encodes each tile separately,
@@ -685,11 +701,14 @@ def _tiled_encode_video( # noqa: PLR0912, PLR0915
device = video.device
dtype = video.dtype
+ # Spatial tiling assumes a square spatial compression (height factor == width factor).
+ spatial_factor = scale_factors.height
+
# Validate tile parameters
- if tile_size % VAE_SPATIAL_FACTOR != 0:
- raise ValueError(f"tile_size must be divisible by {VAE_SPATIAL_FACTOR}, got {tile_size}")
- if tile_overlap % VAE_SPATIAL_FACTOR != 0:
- raise ValueError(f"tile_overlap must be divisible by {VAE_SPATIAL_FACTOR}, got {tile_overlap}")
+ if tile_size % spatial_factor != 0:
+ raise ValueError(f"tile_size must be divisible by {spatial_factor}, got {tile_size}")
+ if tile_overlap % spatial_factor != 0:
+ raise ValueError(f"tile_overlap must be divisible by {spatial_factor}, got {tile_overlap}")
if tile_overlap >= tile_size:
raise ValueError(f"tile_overlap ({tile_overlap}) must be less than tile_size ({tile_size})")
@@ -697,14 +716,13 @@ def _tiled_encode_video( # noqa: PLR0912, PLR0915
if height <= tile_size and width <= tile_size:
return vae(video)
- # Calculate output dimensions
- # VAE compresses: H -> H/32, W -> W/32, F -> 1 + (F-1)/8
- output_height = height // VAE_SPATIAL_FACTOR
- output_width = width // VAE_SPATIAL_FACTOR
- output_frames = 1 + (frames - 1) // VAE_TEMPORAL_FACTOR
+ # Calculate output dimensions from the VAE compression factors
+ # (e.g. the default 32x32x8: H -> H/32, W -> W/32, F -> 1 + (F-1)/8)
+ output_height = height // scale_factors.height
+ output_width = width // scale_factors.width
+ output_frames = 1 + (frames - 1) // scale_factors.time
- # Latent channels (128 for LTX-2)
- # Get from a small test encode or assume 128
+ # Latent channels are 128 across all supported VAE variants.
latent_channels = 128
# Initialize output and weight tensors
@@ -738,8 +756,8 @@ def _tiled_encode_video( # noqa: PLR0912, PLR0915
w_positions = sorted(set(w_positions))
# Overlap in latent space
- overlap_out_h = tile_overlap // VAE_SPATIAL_FACTOR
- overlap_out_w = tile_overlap // VAE_SPATIAL_FACTOR
+ overlap_out_h = tile_overlap // scale_factors.height
+ overlap_out_w = tile_overlap // scale_factors.width
# Process each tile
for h_pos in h_positions:
@@ -750,11 +768,11 @@ def _tiled_encode_video( # noqa: PLR0912, PLR0915
h_end = min(h_start + tile_size, height)
w_end = min(w_start + tile_size, width)
- # Ensure tile dimensions are divisible by VAE_SPATIAL_FACTOR
- tile_h = ((h_end - h_start) // VAE_SPATIAL_FACTOR) * VAE_SPATIAL_FACTOR
- tile_w = ((w_end - w_start) // VAE_SPATIAL_FACTOR) * VAE_SPATIAL_FACTOR
+ # Ensure tile dimensions are divisible by the VAE spatial factor
+ tile_h = ((h_end - h_start) // scale_factors.height) * scale_factors.height
+ tile_w = ((w_end - w_start) // scale_factors.width) * scale_factors.width
- if tile_h < VAE_SPATIAL_FACTOR or tile_w < VAE_SPATIAL_FACTOR:
+ if tile_h < scale_factors.height or tile_w < scale_factors.width:
continue
# Adjust end positions
@@ -771,8 +789,8 @@ def _tiled_encode_video( # noqa: PLR0912, PLR0915
_, _, tile_out_frames, tile_out_height, tile_out_width = encoded_tile.shape
# Calculate output positions
- out_h_start = h_start // VAE_SPATIAL_FACTOR
- out_w_start = w_start // VAE_SPATIAL_FACTOR
+ out_h_start = h_start // scale_factors.height
+ out_w_start = w_start // scale_factors.width
out_h_end = min(out_h_start + tile_out_height, output_height)
out_w_end = min(out_w_start + tile_out_width, output_width)
@@ -909,6 +927,7 @@ def compute_video_masks(
output_dir: str,
main_media_column: str | None = None,
overwrite: bool = False,
+ scale_factors: SpatioTemporalScaleFactors = VIDEO_SCALE_FACTORS,
) -> None:
"""Preprocess video mask files to latent-space binary masks.
For each sample, loads the mask video/image, applies the same spatial
@@ -921,6 +940,8 @@ def compute_video_masks(
spatial/temporal metadata to ensure mask alignment).
output_dir: Directory to save mask .pt files.
main_media_column: Column for output file naming (defaults to mask_column).
+ scale_factors: Video VAE spatiotemporal compression factors (default 32x32x8),
+ used to map latent mask dimensions back to pixel space and downsample.
"""
dataset_path = Path(dataset_file)
data_root = dataset_path.parent
@@ -949,9 +970,9 @@ def compute_video_masks(
latent_f = target_meta["num_frames"]
latent_h = target_meta["height"]
latent_w = target_meta["width"]
- pixel_h = latent_h * VAE_SPATIAL_FACTOR
- pixel_w = latent_w * VAE_SPATIAL_FACTOR
- pixel_f = (latent_f - 1) * VAE_TEMPORAL_FACTOR + 1
+ pixel_h = latent_h * scale_factors.height
+ pixel_w = latent_w * scale_factors.width
+ pixel_f = (latent_f - 1) * scale_factors.time + 1
# Load mask as video or image
if mask_file.suffix.lower() in IMAGE_FILE_EXTENSIONS:
@@ -967,16 +988,16 @@ def compute_video_masks(
mask_pixels = frames
# Downsample to latent dims: [F, H, W] → [F', H', W']
- mask_latent = torch.nn.functional.avg_pool2d(mask_pixels.unsqueeze(1), kernel_size=VAE_SPATIAL_FACTOR).squeeze(
- 1
- ) # [F, H', W'] → spatial done
- # Temporal: max-pool over groups of VAE_TEMPORAL_FACTOR frames (any masked frame masks the group)
+ mask_latent = torch.nn.functional.avg_pool2d(
+ mask_pixels.unsqueeze(1), kernel_size=scale_factors.height
+ ).squeeze(1) # [F, H', W'] → spatial done
+ # Temporal: max-pool over groups of scale_factors.time frames (any masked frame masks the group)
f_spatial = mask_latent.shape[0]
- pad_f = (VAE_TEMPORAL_FACTOR - f_spatial % VAE_TEMPORAL_FACTOR) % VAE_TEMPORAL_FACTOR
+ pad_f = (scale_factors.time - f_spatial % scale_factors.time) % scale_factors.time
if pad_f > 0:
mask_latent = torch.nn.functional.pad(mask_latent, (0, 0, 0, 0, 0, pad_f))
h_prime, w_prime = mask_latent.shape[1], mask_latent.shape[2]
- mask_latent = mask_latent.reshape(-1, VAE_TEMPORAL_FACTOR, h_prime, w_prime).amax(dim=1)[:latent_f]
+ mask_latent = mask_latent.reshape(-1, scale_factors.time, h_prime, w_prime).amax(dim=1)[:latent_f]
# Binarize
mask_latent = (mask_latent > 0.5).float()
@@ -1065,6 +1086,7 @@ def compute_audio_latents( # noqa: PLR0915
audio_column: str,
output_dir: str,
model_path: str,
+ audio_vae_path: str | None = None,
main_media_column: str | None = None,
max_duration: float | None = None,
duration_buckets: list[float] | None = None,
@@ -1103,9 +1125,10 @@ def compute_audio_latents( # noqa: PLR0915
_load_paths_from_dataset(dataset_path, naming_column) if naming_column != audio_column else audio_paths
)
- with console.status(f"[bold]Loading audio VAE encoder from [cyan]{model_path}[/]...", spinner="dots"):
+ audio_vae_path = resolve_audio_vae_path(model_path, audio_vae_path)
+ with console.status(f"[bold]Loading audio VAE encoder from [cyan]{audio_vae_path}[/]...", spinner="dots"):
audio_vae_encoder = load_audio_vae_encoder(
- checkpoint_path=model_path,
+ checkpoint_path=audio_vae_path,
device=torch_device,
dtype=torch.float32,
)
@@ -1263,21 +1286,28 @@ def detect_dataset_columns(dataset_file: str | Path) -> set[str]:
return set()
-def parse_resolution_buckets(resolution_buckets_str: str) -> list[tuple[int, int, int]]:
- """Parse resolution buckets from string format to list of tuples (frames, height, width)"""
+def parse_resolution_buckets(
+ resolution_buckets_str: str,
+ scale_factors: SpatioTemporalScaleFactors = VIDEO_SCALE_FACTORS,
+) -> list[tuple[int, int, int]]:
+ """Parse resolution buckets from string format to list of tuples (frames, height, width).
+ ``scale_factors`` are the video VAE's spatiotemporal compression factors (default 32x32x8);
+ width/height must be multiples of the spatial factors and frames must satisfy
+ ``f % scale_factors.time == 1``.
+ """
resolution_buckets = []
for bucket_str in resolution_buckets_str.split(";"):
w, h, f = map(int, bucket_str.split("x"))
- if w % VAE_SPATIAL_FACTOR != 0 or h % VAE_SPATIAL_FACTOR != 0:
+ if w % scale_factors.width != 0 or h % scale_factors.height != 0:
raise typer.BadParameter(
- f"Width and height must be multiples of {VAE_SPATIAL_FACTOR}, got {w}x{h}",
+ f"Width and height must be multiples of {scale_factors.width}x{scale_factors.height}, got {w}x{h}",
param_hint="resolution-buckets",
)
- if f % VAE_TEMPORAL_FACTOR != 1:
+ if f % scale_factors.time != 1:
raise typer.BadParameter(
- f"Number of frames must be a multiple of {VAE_TEMPORAL_FACTOR} plus 1, got {f}",
+ f"Number of frames must be a multiple of {scale_factors.time} plus 1, got {f}",
param_hint="resolution-buckets",
)
@@ -1288,8 +1318,12 @@ def parse_resolution_buckets(resolution_buckets_str: str) -> list[tuple[int, int
def compute_scaled_resolution_buckets(
resolution_buckets: list[tuple[int, int, int]],
scale_factor: int,
+ scale_factors: SpatioTemporalScaleFactors = VIDEO_SCALE_FACTORS,
) -> list[tuple[int, int, int]]:
- """Compute scaled resolution buckets and validate the results."""
+ """Compute scaled resolution buckets and validate the results.
+ ``scale_factors`` are the video VAE's spatiotemporal compression factors (default 32x32x8),
+ used to check the post-scale dimensions are still VAE-aligned.
+ """
if scale_factor == 1:
return resolution_buckets
@@ -1311,16 +1345,16 @@ def compute_scaled_resolution_buckets(
scaled_width = width // scale_factor
# Validate scaled dimensions are divisible by VAE spatial factor
- if scaled_height % VAE_SPATIAL_FACTOR != 0:
+ if scaled_height % scale_factors.height != 0:
raise ValueError(
f"Scaled height {scaled_height} (from {height} / {scale_factor}) "
- f"is not divisible by {VAE_SPATIAL_FACTOR}. "
+ f"is not divisible by {scale_factors.height}. "
f"Choose a different scale factor or adjust your resolution buckets."
)
- if scaled_width % VAE_SPATIAL_FACTOR != 0:
+ if scaled_width % scale_factors.width != 0:
raise ValueError(
f"Scaled width {scaled_width} (from {width} / {scale_factor}) "
- f"is not divisible by {VAE_SPATIAL_FACTOR}. "
+ f"is not divisible by {scale_factors.width}. "
f"Choose a different scale factor or adjust your resolution buckets."
)
@@ -1378,7 +1412,15 @@ def main( # noqa: PLR0913
),
model_path: str = typer.Option(
...,
- help="Path to LTX-2 checkpoint (.safetensors file)",
+ help="Path to the unified checkpoint or split transformer safetensors",
+ ),
+ video_vae_path: str | None = typer.Option(
+ default=None,
+ help="Split-pack video VAE safetensors (defaults to --model-path for unified checkpoints)",
+ ),
+ audio_vae_path: str | None = typer.Option(
+ default=None,
+ help="Split-pack audio VAE safetensors (defaults to --model-path for unified checkpoints)",
),
video_column: str = typer.Option(
default="media_path",
@@ -1423,16 +1465,16 @@ def main( # noqa: PLR0913
Examples:
# Process videos from a CSV file
python scripts/process_videos.py dataset.csv --resolution-buckets 768x768x25 \\
- --output-dir ./latents --model-path /path/to/ltx2.safetensors
+ --output-dir ./latents --model-path /path/to/ltx-checkpoint.safetensors
# Process videos from a JSON file with custom video column
python scripts/process_videos.py dataset.json --resolution-buckets 768x768x25 \\
- --output-dir ./latents --model-path /path/to/ltx2.safetensors --video-column "video_path"
+ --output-dir ./latents --model-path /path/to/ltx-checkpoint.safetensors --video-column "video_path"
# Enable VAE tiling to save GPU VRAM
python scripts/process_videos.py dataset.csv --resolution-buckets 1024x1024x25 \\
- --output-dir ./latents --model-path /path/to/ltx2.safetensors --vae-tiling
+ --output-dir ./latents --model-path /path/to/ltx-checkpoint.safetensors --vae-tiling
# Process videos with audio
python scripts/process_videos.py dataset.csv --resolution-buckets 768x768x25 \\
- --output-dir ./latents --model-path /path/to/ltx2.safetensors \\
+ --output-dir ./latents --model-path /path/to/ltx-checkpoint.safetensors \\
--with-audio --audio-output-dir ./audio_latents
"""
@@ -1444,8 +1486,9 @@ def main( # noqa: PLR0913
if with_audio and audio_output_dir is None:
raise typer.BadParameter("--audio-output-dir is required when --with-audio is set")
- # Parse resolution buckets
- parsed_resolution_buckets = parse_resolution_buckets(resolution_buckets)
+ # Parse resolution buckets, validating against the checkpoint's VAE compression factors.
+ scale_factors = read_video_scale_factors(resolve_video_vae_path(model_path, video_vae_path))
+ parsed_resolution_buckets = parse_resolution_buckets(resolution_buckets, scale_factors)
if len(parsed_resolution_buckets) > 1:
logger.warning(
@@ -1460,6 +1503,8 @@ def main( # noqa: PLR0913
resolution_buckets=parsed_resolution_buckets,
output_dir=output_dir,
model_path=model_path,
+ video_vae_path=video_vae_path,
+ audio_vae_path=audio_vae_path,
reshape_mode=reshape_mode,
batch_size=batch_size,
device=device,
diff --git a/packages/ltx-trainer/scripts/train.py b/packages/ltx-trainer/scripts/train.py
index cd58e41..89413a3 100755
--- a/packages/ltx-trainer/scripts/train.py
+++ b/packages/ltx-trainer/scripts/train.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python
"""
-Train LTXV models using configuration from YAML files.
-This script provides a command-line interface for training LTXV models using
+Train LTX family models using configuration from YAML files.
+This script provides a command-line interface for training LTX family models using
either LoRA fine-tuning or full model fine-tuning. It loads configuration from
a YAML file and passes it to the trainer.
Basic usage:
@@ -27,7 +27,7 @@ console = Console()
app = typer.Typer(
pretty_exceptions_enable=False,
no_args_is_help=True,
- help="Train LTXV models using configuration from YAML files.",
+ help="Train LTX models using configuration from YAML files.",
)
diff --git a/packages/ltx-trainer/src/ltx_trainer/config.py b/packages/ltx-trainer/src/ltx_trainer/config.py
index c4d3009..dfb9ba0 100644
--- a/packages/ltx-trainer/src/ltx_trainer/config.py
+++ b/packages/ltx-trainer/src/ltx_trainer/config.py
@@ -9,6 +9,20 @@ from ltx_trainer.training_strategies.flexible import FlexibleStrategyConfig
from ltx_trainer.training_strategies.text_to_video import TextToVideoConfig
from ltx_trainer.training_strategies.video_to_video import VideoToVideoConfig
+DEFAULT_NEGATIVE_PROMPT = (
+ "blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise, "
+ "grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones, "
+ "deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands, "
+ "wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of "
+ "field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent "
+ "lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny "
+ "valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction, "
+ "mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise, "
+ "off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward "
+ "pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting, "
+ "inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts."
+)
+
class ConfigBaseModel(BaseModel):
model_config = ConfigDict(extra="forbid")
@@ -37,7 +51,8 @@ class PrefixConditionConfig(ConfigBaseModel):
num_frames: int | None = Field(
default=None,
ge=1,
- description="Number of pixel frames for video prefix. Must satisfy num_frames %% 8 == 1.",
+ description="Number of pixel frames for video prefix. Must be VAE-aligned: "
+ "num_frames %% T == 1, where T is the VAE temporal compression factor (8 by default).",
)
duration: float | None = Field(default=None, gt=0, description="Duration in seconds for audio prefix")
@@ -47,15 +62,6 @@ class PrefixConditionConfig(ConfigBaseModel):
raise ValueError("Exactly one of 'video' or 'audio' must be set for prefix condition")
return self
- @model_validator(mode="after")
- def validate_num_frames_constraint(self) -> "PrefixConditionConfig":
- if self.video is not None and self.num_frames is not None and self.num_frames % 8 != 1:
- raise ValueError(
- f"num_frames ({self.num_frames}) must satisfy num_frames % 8 == 1 "
- f"for video prefix (e.g., 1, 9, 17, 25, ...)"
- )
- return self
-
class SuffixConditionConfig(ConfigBaseModel):
"""Suffix conditioning for temporal extension (intrinsic). Exactly one of video/audio must be set."""
@@ -66,7 +72,8 @@ class SuffixConditionConfig(ConfigBaseModel):
num_frames: int | None = Field(
default=None,
ge=1,
- description="Number of pixel frames for video suffix. Must satisfy num_frames %% 8 == 0.",
+ description="Number of pixel frames for video suffix. Must be VAE-aligned: "
+ "num_frames %% T == 0, where T is the VAE temporal compression factor (8 by default).",
)
duration: float | None = Field(default=None, gt=0, description="Duration in seconds for audio suffix")
@@ -76,15 +83,6 @@ class SuffixConditionConfig(ConfigBaseModel):
raise ValueError("Exactly one of 'video' or 'audio' must be set for suffix condition")
return self
- @model_validator(mode="after")
- def validate_num_frames_constraint(self) -> "SuffixConditionConfig":
- if self.video is not None and self.num_frames is not None and self.num_frames % 8 != 0:
- raise ValueError(
- f"num_frames ({self.num_frames}) must satisfy num_frames % 8 == 0 "
- f"for video suffix (e.g., 8, 16, 24, 32, ...)"
- )
- return self
-
class SpatialCropConditionConfig(ConfigBaseModel):
"""Spatial crop conditioning for outpainting (intrinsic, video only)."""
@@ -194,20 +192,6 @@ class ValidationSample(ConfigBaseModel):
description="Per-sample override for random seed. None = inherit from ValidationConfig.",
)
- @field_validator("video_dims")
- @classmethod
- def validate_video_dims(cls, v: tuple[int, int, int] | None) -> tuple[int, int, int] | None:
- if v is None:
- return v
- width, height, frames = v
- if width % 32 != 0:
- raise ValueError(f"Width ({width}) must be divisible by 32")
- if height % 32 != 0:
- raise ValueError(f"Height ({height}) must be divisible by 32")
- if frames % 8 != 1:
- raise ValueError(f"Frames ({frames}) must satisfy frames % 8 == 1 for LTX-2 (e.g., 1, 9, 17, 25, ...)")
- return v
-
@model_validator(mode="after")
def validate_frozen_modality_conflicts(self) -> "ValidationSample":
frozen_types = {c.type for c in self.conditions if c.type in ("video_to_audio", "audio_to_video")}
@@ -239,12 +223,26 @@ class ModelConfig(ConfigBaseModel):
model_path: str | Path = Field(
...,
- description="Model path - local path to safetensors checkpoint file",
+ description="Path to a unified LTX checkpoint or the transformer safetensors in a split LTX-2.5 pack.",
)
text_encoder_path: str | Path | None = Field(
default=None,
- description="Path to text encoder (required for LTX-2/Gemma models, optional for LTXV/T5 models)",
+ description="Path to the matching Gemma directory, or the packed text-encoder safetensors of a split pack.",
+ )
+
+ video_vae_path: str | Path | None = Field(
+ default=None,
+ description=(
+ "Video VAE safetensors. Required for a split pack; defaults to model_path for a unified checkpoint."
+ ),
+ )
+
+ audio_vae_path: str | Path | None = Field(
+ default=None,
+ description=(
+ "Audio VAE/vocoder safetensors. Required for a split pack; defaults to model_path for a unified checkpoint."
+ ),
)
training_mode: Literal["lora", "full"] = Field(
@@ -272,6 +270,14 @@ class ModelConfig(ConfigBaseModel):
return v
+ @field_validator("video_vae_path", "audio_vae_path")
+ @classmethod
+ def validate_component_path(cls, v: str | Path | None) -> str | Path | None:
+ """Validate optional split-pack component paths."""
+ if v is not None and not Path(v).is_file():
+ raise ValueError(f"Model component path does not exist or is not a file: {v}")
+ return v
+
class LoraConfig(ConfigBaseModel):
"""Configuration for LoRA fine-tuning"""
@@ -443,7 +449,7 @@ class ValidationConfig(ConfigBaseModel):
)
negative_prompt: str = Field(
- default="worst quality, inconsistent motion, blurry, jittery, distorted",
+ default=DEFAULT_NEGATIVE_PROMPT,
description="Negative prompt to use for validation examples",
)
@@ -471,28 +477,14 @@ class ValidationConfig(ConfigBaseModel):
)
video_dims: tuple[int, int, int] = Field(
- default=(960, 544, 97),
+ default=(960, 544, 89),
description="Dimensions of validation videos (width, height, frames). "
- "Width and height must be divisible by 32. Frames must satisfy frames % 8 == 1 for LTX-2.",
+ "Width and height must be divisible by the VAE spatial factor (32 by default), and frames must "
+ "satisfy frames % T == 1, where T is the VAE temporal compression factor (8 by default).",
)
- @field_validator("video_dims")
- @classmethod
- def validate_video_dims(cls, v: tuple[int, int, int]) -> tuple[int, int, int]:
- """Validate video dimensions for LTX-2 compatibility."""
- width, height, frames = v
-
- if width % 32 != 0:
- raise ValueError(f"Width ({width}) must be divisible by 32")
- if height % 32 != 0:
- raise ValueError(f"Height ({height}) must be divisible by 32")
- if frames % 8 != 1:
- raise ValueError(f"Frames ({frames}) must satisfy frames % 8 == 1 for LTX-2 (e.g., 1, 9, 17, 25, ...)")
-
- return v
-
frame_rate: float = Field(
- default=25.0,
+ default=24.0,
description="Frame rate for validation videos",
gt=0,
)
@@ -503,7 +495,7 @@ class ValidationConfig(ConfigBaseModel):
)
inference_steps: int = Field(
- default=50,
+ default=30,
description="Number of inference steps for validation",
gt=0,
)
@@ -514,29 +506,53 @@ class ValidationConfig(ConfigBaseModel):
gt=0,
)
- guidance_scale: float = Field(
- default=4.0,
- description="CFG guidance scale to use during validation",
+ video_cfg_scale: float = Field(
+ default=3.0,
+ description="Video CFG guidance scale to use during validation",
+ ge=1.0,
+ )
+
+ audio_cfg_scale: float = Field(
+ default=7.0,
+ description="Audio CFG guidance scale to use during validation",
ge=1.0,
)
- stg_scale: float = Field(
+ video_stg_scale: float = Field(
+ default=1.0,
+ description="Video STG (Spatio-Temporal Guidance) scale. 0.0 disables video STG.",
+ ge=0.0,
+ )
+
+ audio_stg_scale: float = Field(
default=1.0,
- description="STG (Spatio-Temporal Guidance) scale. 0.0 disables STG. "
- "Recommended value is 1.0. STG is combined with CFG for improved video quality.",
+ description="Audio STG (Spatio-Temporal Guidance) scale. 0.0 disables audio STG.",
ge=0.0,
)
stg_blocks: list[int] | None = Field(
- default=[29],
- description="Which transformer blocks to perturb for STG. "
- "None means all blocks are perturbed. Recommended for LTX-2: [29].",
+ default_factory=lambda: [28],
+ description="Which transformer blocks to perturb for STG. None means all blocks are perturbed.",
)
- stg_mode: Literal["stg_av", "stg_v"] = Field(
- default="stg_av",
- description="STG mode: 'stg_av' skips both audio and video self-attention, "
- "'stg_v' skips only video self-attention.",
+ guidance_rescale: float = Field(
+ default=0.7,
+ description="Guidance rescale factor used after CFG/STG/modality guidance. "
+ "Interpolates between the computed variance factor and 1.0. 0.0 disables rescaling.",
+ ge=0.0,
+ le=1.0,
+ )
+
+ video_modality_guidance_scale: float = Field(
+ default=3.0,
+ description="Video modality guidance scale for audio-to-video isolation guidance.",
+ ge=1.0,
+ )
+
+ audio_modality_guidance_scale: float = Field(
+ default=3.0,
+ description="Audio modality guidance scale for video-to-audio isolation guidance.",
+ ge=1.0,
)
generate_audio: bool = Field(
@@ -565,6 +581,43 @@ class ValidationConfig(ConfigBaseModel):
"with the generated output. The reference comes from the input video, not from the model's output.",
)
+ @model_validator(mode="before")
+ @classmethod
+ def migrate_deprecated_guidance_fields(cls, data: object) -> object:
+ """Map deprecated scalar guidance fields to explicit per-modality fields."""
+ if not isinstance(data, dict):
+ return data
+
+ values = dict(data)
+
+ if "guidance_scale" in values:
+ new_cfg_fields = {"video_cfg_scale", "audio_cfg_scale"} & values.keys()
+ if new_cfg_fields:
+ raise ValueError(
+ "guidance_scale is deprecated; use video_cfg_scale and audio_cfg_scale instead, "
+ "and do not combine old and new CFG fields."
+ )
+ guidance_scale = values.pop("guidance_scale")
+ values["video_cfg_scale"] = guidance_scale
+ values["audio_cfg_scale"] = guidance_scale
+
+ legacy_stg_fields = {"stg_scale", "stg_mode"} & values.keys()
+ if legacy_stg_fields:
+ new_stg_fields = {"video_stg_scale", "audio_stg_scale"} & values.keys()
+ if new_stg_fields:
+ raise ValueError(
+ "stg_scale and stg_mode are deprecated; use video_stg_scale and audio_stg_scale instead, "
+ "and do not combine old and new STG fields."
+ )
+ stg_scale = values.pop("stg_scale", 1.0)
+ stg_mode = values.pop("stg_mode", "stg_av")
+ if stg_mode not in {"stg_av", "stg_v"}:
+ raise ValueError("stg_mode must be either 'stg_av' or 'stg_v'")
+ values["video_stg_scale"] = stg_scale
+ values["audio_stg_scale"] = stg_scale if stg_mode == "stg_av" else 0.0
+
+ return values
+
@field_validator("images")
@classmethod
def validate_images(cls, v: list[str] | None, info: ValidationInfo) -> list[str] | None:
@@ -620,39 +673,6 @@ class ValidationConfig(ConfigBaseModel):
self.samples = samples
return self
- @model_validator(mode="after")
- def validate_scaled_reference_dimensions(self) -> "ValidationConfig":
- """Validate that scaled reference dimensions are valid when reference_downscale_factor > 1."""
- if self.reference_downscale_factor > 1:
- width, height, _frames = self.video_dims
-
- if width % self.reference_downscale_factor != 0:
- raise ValueError(
- f"Width {width} is not evenly divisible by reference_downscale_factor "
- f"{self.reference_downscale_factor}. Choose a downscale factor that divides {width} evenly."
- )
- if height % self.reference_downscale_factor != 0:
- raise ValueError(
- f"Height {height} is not evenly divisible by reference_downscale_factor "
- f"{self.reference_downscale_factor}. Choose a downscale factor that divides {height} evenly."
- )
-
- scaled_width = width // self.reference_downscale_factor
- scaled_height = height // self.reference_downscale_factor
-
- if scaled_width % 32 != 0:
- raise ValueError(
- f"Scaled reference width {scaled_width} (from {width} / {self.reference_downscale_factor}) "
- f"is not divisible by 32. Choose a different downscale factor or adjust video_dims."
- )
- if scaled_height % 32 != 0:
- raise ValueError(
- f"Scaled reference height {scaled_height} (from {height} / {self.reference_downscale_factor}) "
- f"is not divisible by 32. Choose a different downscale factor or adjust video_dims."
- )
-
- return self
-
@model_validator(mode="after")
def validate_output_modality_requirements(self) -> "ValidationConfig":
"""Validate output modality settings when validation is configured."""
@@ -760,7 +780,7 @@ class FlowMatchingConfig(ConfigBaseModel):
class LtxTrainerConfig(ConfigBaseModel):
- """Unified configuration for LTXV training"""
+ """Unified configuration for LTX family training."""
# Sub-configurations
model: ModelConfig = Field(default_factory=ModelConfig)
diff --git a/packages/ltx-trainer/src/ltx_trainer/config_display.py b/packages/ltx-trainer/src/ltx_trainer/config_display.py
index c9ddb20..db21508 100644
--- a/packages/ltx-trainer/src/ltx_trainer/config_display.py
+++ b/packages/ltx-trainer/src/ltx_trainer/config_display.py
@@ -96,13 +96,18 @@ def print_config(config: LtxTrainerConfig) -> None:
("Video Dims", f"{val.video_dims[0]}x{val.video_dims[1]}, {val.video_dims[2]} frames"),
("Frame Rate", f"{val.frame_rate} fps"),
("Inference Steps", str(val.inference_steps)),
- ("CFG Scale", str(val.guidance_scale)),
+ ("CFG Scale", f"video={val.video_cfg_scale}; audio={val.audio_cfg_scale}"),
(
- "STG",
- f"scale={val.stg_scale}; blocks={fmt(val.stg_blocks)}; mode={val.stg_mode}"
- if val.stg_scale > 0
+ "STG Scale",
+ f"video={val.video_stg_scale}; audio={val.audio_stg_scale}; blocks={fmt(val.stg_blocks)}"
+ if val.video_stg_scale > 0 or val.audio_stg_scale > 0
else "[dim]Disabled[/]",
),
+ ("Guidance Rescale", str(val.guidance_rescale)),
+ (
+ "Modality Guidance",
+ f"video={val.video_modality_guidance_scale}; audio={val.audio_modality_guidance_scale}",
+ ),
("Seed", str(val.seed)),
],
),
diff --git a/packages/ltx-trainer/src/ltx_trainer/datasets.py b/packages/ltx-trainer/src/ltx_trainer/datasets.py
index 2d8f59c..8cd52ab 100644
--- a/packages/ltx-trainer/src/ltx_trainer/datasets.py
+++ b/packages/ltx-trainer/src/ltx_trainer/datasets.py
@@ -190,10 +190,6 @@ class PrecomputedDataset(Dataset):
raise ValueError(f"No data files found in {data_path}")
data_files.sort()
- # Log source sizes
- for dir_name, (paths, _) in glob_results.items():
- logger.debug(f"Source {dir_name}: {len(paths)} files")
-
# Build path sets for non-primary sources
other_path_sets = {
dir_name: path_set for dir_name, (_, path_set) in glob_results.items() if dir_name != data_key
@@ -221,9 +217,7 @@ class PrecomputedDataset(Dataset):
skipped = len(data_files) - valid_count
if skipped > 0:
- logger.info(f"Fast index: {valid_count} valid samples from {len(data_files)} total ({skipped} skipped)")
- else:
- logger.debug(f"Fast index: {valid_count} valid samples from {len(data_files)} total")
+ logger.info(f"Skipped {skipped} invalid samples from {len(data_files)} total")
return sample_files
diff --git a/packages/ltx-trainer/src/ltx_trainer/gemma_8bit.py b/packages/ltx-trainer/src/ltx_trainer/gemma_8bit.py
index 8372790..4b4e755 100644
--- a/packages/ltx-trainer/src/ltx_trainer/gemma_8bit.py
+++ b/packages/ltx-trainer/src/ltx_trainer/gemma_8bit.py
@@ -1,12 +1,21 @@
# ruff: noqa: PLC0415
"""
-8-bit Gemma text encoder loading utilities.
-This module provides functionality for loading the Gemma text encoder in 8-bit precision
-using bitsandbytes, which significantly reduces GPU memory usage.
+8-bit quantization for the Gemma text encoder.
+Quantizing the Gemma backbone to LLM.int8() roughly halves the VRAM it occupies, which
+matters because the encoder only runs long enough to precompute caption embeddings and
+then competes with the transformer and optimizer state for the same GPU.
+The encoder is built first through ltx-core's normal loading path and quantized here,
+rather than being loaded by ``transformers`` directly. Going through ltx-core is what
+makes every supported model work: LTX 2.5 ships a ``gemma4_unified`` text encoder, a
+model type that only ltx-core's builder knows how to assemble, and it ships it as a
+single packed ``.safetensors`` rather than a Hugging Face directory. Both are invisible
+to ``AutoModelForImageTextToText.from_pretrained``.
+The cost of that ordering is that the full-precision weights are materialized before
+being quantized. They are materialized on CPU, so the peak is host RAM, not VRAM.
Example usage:
- from ltx_trainer.gemma_8bit import load_8bit_gemma
- text_encoder = load_8bit_gemma(gemma_model_path="/path/to/gemma")
+ from ltx_trainer.model_loader import load_text_encoder
+ text_encoder = load_text_encoder("/path/to/gemma", device="cuda", load_in_8bit=True)
"""
from __future__ import annotations
@@ -15,81 +24,113 @@ import logging
import os
from collections.abc import Generator
from contextlib import contextmanager
-from pathlib import Path
import torch
-from ltx_core.text_encoders.gemma.encoders.base_encoder import GemmaTextEncoder
-from ltx_core.text_encoders.gemma.tokenizer import LTXVGemmaTokenizer
+from ltx_core.text_encoders.gemma.encoders.base_encoder import LTXGemmaTextEncoder
+from ltx_trainer import logger
+# Outlier threshold from the LLM.int8() paper: columns whose activations exceed it are
+# kept in fp16 and the rest go through the int8 matmul. Matches the default that
+# ``BitsAndBytesConfig(load_in_8bit=True)`` applies as ``llm_int8_threshold``.
+_LLM_INT8_THRESHOLD = 6.0
-def load_8bit_gemma(
- gemma_model_path: str | Path,
- dtype: torch.dtype = torch.bfloat16,
+# The LM head is left in full precision, as it is everywhere else in the ecosystem: it is
+# a single wide layer whose quantization error lands directly on output logits. Caption
+# precompute does not run it at all (``LTXGemmaTextEncoder.encode`` calls the inner model),
+# so this only affects prompt enhancement.
+_KEEP_IN_FULL_PRECISION = frozenset({"lm_head"})
+
+
+def resolve_8bit_device(device: torch.device | str | int | None) -> torch.device:
+ """Pick the device an 8-bit encoder should be quantized onto.
+ Defaults to this process's ``LOCAL_RANK`` so that a multi-process launch puts each
+ rank's encoder on its own GPU rather than colliding on ``cuda:0``.
+ """
+ if device is not None:
+ return torch.device(device) if not isinstance(device, torch.device) else device
+ if torch.cuda.is_available():
+ return torch.device(f"cuda:{int(os.environ.get('LOCAL_RANK', '0'))}")
+ return torch.device("cpu")
+
+
+def quantize_gemma_to_8bit(
+ text_encoder: LTXGemmaTextEncoder,
device: torch.device | str | int | None = None,
-) -> GemmaTextEncoder:
- """Load the Gemma text encoder in 8-bit precision using bitsandbytes.
- Only the Gemma LLM backbone is loaded here. The embeddings processor
- (feature extractor + connectors) should be loaded separately via
- :func:`ltx_trainer.model_loader.load_embeddings_processor`.
+) -> LTXGemmaTextEncoder:
+ """Quantize a built text encoder's Gemma backbone to 8-bit and move it to ``device``.
Args:
- gemma_model_path: Path to Gemma model directory
- dtype: Data type for non-quantized model weights
- device: Device to place the quantized model on. When ``None`` (default),
- the device is inferred from ``LOCAL_RANK`` if CUDA is available, so
- multi-process launches put each rank's encoder on its own GPU
- instead of all colliding on ``cuda:0``.
+ text_encoder: Encoder built by :func:`ltx_trainer.model_loader.load_text_encoder`,
+ expected to still be on CPU.
+ device: Target device. Defaults to this rank's GPU.
Returns:
- GemmaTextEncoder with 8-bit quantized Gemma backbone
+ The same encoder, with its Linear layers replaced by 8-bit equivalents.
Raises:
- ImportError: If bitsandbytes is not installed
- FileNotFoundError: If required model files are not found
+ ImportError: If bitsandbytes is not installed or its CUDA binary is unusable.
"""
try:
- from transformers import BitsAndBytesConfig, Gemma3ForConditionalGeneration
+ import bitsandbytes as bnb
except ImportError as e:
raise ImportError(
"8-bit text encoder loading requires bitsandbytes. Install it with: uv pip install bitsandbytes"
) from e
- gemma_path = _find_gemma_subpath(gemma_model_path, "model*.safetensors")
- tokenizer_path = _find_gemma_subpath(gemma_model_path, "tokenizer.model")
-
- # Pin the entire model to a single device. `device_map="auto"` collides on cuda:0
- # in multi-process launches because every rank picks the same default device.
- device_map: str | dict[str, int | str | torch.device]
- if device is not None:
- device_map = {"": device}
- elif torch.cuda.is_available():
- device_map = {"": int(os.environ.get("LOCAL_RANK", "0"))}
- else:
- device_map = "auto"
+ if text_encoder.model is None:
+ raise ValueError("Cannot quantize a text encoder whose Gemma backbone has not been loaded.")
- quantization_config = BitsAndBytesConfig(load_in_8bit=True)
- with _suppress_accelerate_memory_warnings():
- gemma_model = Gemma3ForConditionalGeneration.from_pretrained(
- gemma_path,
- quantization_config=quantization_config,
- torch_dtype=torch.bfloat16,
- device_map=device_map,
- local_files_only=True,
+ target_device = resolve_8bit_device(device)
+ if target_device.type != "cuda":
+ raise ValueError(
+ f"8-bit Gemma quantization requires a CUDA device, got {target_device}. "
+ "Disable load_text_encoder_in_8bit when training on CPU."
)
- tokenizer = LTXVGemmaTokenizer(tokenizer_path, 1024)
+ replaced = _replace_linear_with_8bit(text_encoder.model, bnb)
+ logger.debug(f"Quantized {replaced} Gemma Linear layers to 8-bit")
- return GemmaTextEncoder(
- tokenizer=tokenizer,
- model=gemma_model,
- dtype=dtype,
- )
+ # bitsandbytes quantizes lazily: Int8Params holds the full-precision weights until it
+ # is moved onto CUDA, and does the int8 conversion during that move.
+ with _suppress_accelerate_memory_warnings():
+ text_encoder.model.to(target_device)
+
+ return text_encoder
-def _find_gemma_subpath(root_path: str | Path, pattern: str) -> str:
- """Find a file matching a glob pattern and return its parent directory."""
- matches = list(Path(root_path).rglob(pattern))
- if not matches:
- raise FileNotFoundError(f"No files matching pattern '{pattern}' found under {root_path}")
- return str(matches[0].parent)
+def _replace_linear_with_8bit(module: torch.nn.Module, bnb: object, prefix: str = "") -> int:
+ """Swap every ``nn.Linear`` under ``module`` for its 8-bit counterpart, in place.
+ Returns the number of layers replaced.
+ """
+ replaced = 0
+ for name, child in list(module.named_children()):
+ qualified = f"{prefix}.{name}" if prefix else name
+ if name in _KEEP_IN_FULL_PRECISION:
+ continue
+ if type(child) is torch.nn.Linear:
+ setattr(module, name, _to_8bit_linear(child, bnb))
+ replaced += 1
+ else:
+ replaced += _replace_linear_with_8bit(child, bnb, qualified)
+ return replaced
+
+
+def _to_8bit_linear(linear: torch.nn.Linear, bnb: object) -> torch.nn.Module:
+ """Build an 8-bit Linear carrying ``linear``'s weights, still unquantized."""
+ replacement = bnb.nn.Linear8bitLt( # type: ignore[attr-defined]
+ linear.in_features,
+ linear.out_features,
+ bias=linear.bias is not None,
+ has_fp16_weights=False,
+ threshold=_LLM_INT8_THRESHOLD,
+ )
+ # int8_vectorwise_quant, which runs on the move to CUDA, expects fp16 input.
+ replacement.weight = bnb.nn.Int8Params( # type: ignore[attr-defined]
+ linear.weight.data.to(torch.float16),
+ requires_grad=False,
+ has_fp16_weights=False,
+ )
+ if linear.bias is not None:
+ replacement.bias = torch.nn.Parameter(linear.bias.data.to(torch.float16), requires_grad=False)
+ return replacement
@contextmanager
diff --git a/packages/ltx-trainer/src/ltx_trainer/model_loader.py b/packages/ltx-trainer/src/ltx_trainer/model_loader.py
index f6aeba6..4aeb07a 100644
--- a/packages/ltx-trainer/src/ltx_trainer/model_loader.py
+++ b/packages/ltx-trainer/src/ltx_trainer/model_loader.py
@@ -9,7 +9,7 @@ Example usage:
vae_encoder = load_video_vae_encoder("/path/to/checkpoint.safetensors", device="cuda")
vae_decoder = load_video_vae_decoder("/path/to/checkpoint.safetensors", device="cuda")
text_encoder = load_text_encoder("/path/to/gemma", device="cuda")
- # Load all components at once
+ # Load all components from a monolith (or pass component paths for a split pack)
components = load_model("/path/to/checkpoint.safetensors", text_encoder_path="/path/to/gemma")
"""
@@ -17,9 +17,10 @@ from __future__ import annotations
from dataclasses import dataclass
from pathlib import Path
-from typing import TYPE_CHECKING
+from typing import TYPE_CHECKING, Sequence
import torch
+from safetensors import SafetensorError
from ltx_trainer import logger
@@ -32,8 +33,9 @@ if TYPE_CHECKING:
from ltx_core.model.audio_vae import AudioDecoder, AudioEncoder, Vocoder
from ltx_core.model.transformer import LTXModel
from ltx_core.model.video_vae import VideoDecoder, VideoEncoder
- from ltx_core.text_encoders.gemma import GemmaTextEncoder
+ from ltx_core.text_encoders.gemma import LTXGemmaTextEncoder
from ltx_core.text_encoders.gemma.embeddings_processor import EmbeddingsProcessor
+ from ltx_core.types import SpatioTemporalScaleFactors
def _to_torch_device(device: Device) -> torch.device:
@@ -41,6 +43,100 @@ def _to_torch_device(device: Device) -> torch.device:
return torch.device(device) if isinstance(device, str) else device
+def read_video_scale_factors(model_path: str | Path) -> "SpatioTemporalScaleFactors":
+ """Read the video VAE compression factors from a checkpoint's embedded config.
+ The VAE is not always loaded where these factors are needed (during training the
+ latents are precomputed), so they are derived from the checkpoint metadata via
+ ``SpatioTemporalScaleFactors.from_model_config``, which yields the default 32x32x8
+ layout for checkpoints whose config carries no VAE block list (e.g. audio-only).
+ A failure to *read* the metadata is deliberately not swallowed: it means the
+ checkpoint path is wrong or the file is corrupt, and silently falling back to the
+ default layout would train a non-default VAE (e.g. 16x16x4) on the wrong RoPE
+ positions without ever surfacing the error. Fail loudly instead.
+ """
+ from ltx_core.loader import SafetensorsModelStateDictLoader
+ from ltx_core.types import SpatioTemporalScaleFactors
+
+ metadata = SafetensorsModelStateDictLoader().metadata(str(model_path))
+ return SpatioTemporalScaleFactors.from_model_config(metadata.get("config", {}))
+
+
+def is_split_transformer(checkpoint_path: str | Path) -> bool:
+ """Whether ``checkpoint_path`` is the transformer file of a split checkpoint pack.
+ A split pack ships one safetensors per component, and the transformer's metadata
+ declares only ``transformer``/``scheduler``. Every monolith declares at least one
+ VAE section — including audio-only checkpoints, which have ``audio_vae`` but no
+ ``vae`` — so the absence of all of them is what identifies the split layout.
+ Answers ``False`` for a checkpoint whose metadata cannot be read at all: that is not
+ a layout question, and the caller is about to open the same file for real and raise
+ with the actual reason.
+ """
+ from ltx_core.loader import SafetensorsModelStateDictLoader
+
+ try:
+ metadata = SafetensorsModelStateDictLoader().metadata(str(checkpoint_path))
+ except (OSError, SafetensorError):
+ return False
+ config = metadata.get("config", {})
+ sections = set(config) if isinstance(config, dict) else set()
+ return "transformer" in sections and not sections & {"vae", "audio_vae", "vocoder"}
+
+
+def resolve_video_vae_path(model_path: str | Path, video_vae_path: str | Path | None = None) -> str:
+ """Return the file holding the video VAE (encoder, decoder and its scale factors)."""
+ return _resolve_component_path(model_path, video_vae_path, "video VAE", "video_vae_path")
+
+
+def resolve_audio_vae_path(model_path: str | Path, audio_vae_path: str | Path | None = None) -> str:
+ """Return the file holding the audio VAE and vocoder."""
+ return _resolve_component_path(model_path, audio_vae_path, "audio VAE", "audio_vae_path")
+
+
+def embedding_weight_paths(
+ transformer_path: str | Path,
+ text_encoder_path: str | Path | None,
+) -> str | tuple[str, str]:
+ """Return the files that contain the embeddings-processor weights.
+ Legacy monoliths store connectors and feature-extractor weights with the
+ transformer. LTX-2.5 split packs move the text projections into the packed
+ text-encoder safetensors, so both files must be read.
+ """
+ from ltx_core.text_encoders.gemma.gemma_assets import is_safetensors_file
+
+ transformer_path = str(transformer_path)
+ if text_encoder_path is not None and is_safetensors_file(text_encoder_path):
+ return transformer_path, str(text_encoder_path)
+ if is_split_transformer(transformer_path):
+ raise ValueError(
+ f"{transformer_path} is the transformer of a split checkpoint pack, whose "
+ f"text_embedding_projection weights live in the packed text-encoder file. "
+ f"Set text_encoder_path to that .safetensors instead of a Gemma directory."
+ )
+ return transformer_path
+
+
+def _resolve_component_path(
+ model_path: str | Path,
+ component_path: str | Path | None,
+ component: str,
+ flag: str,
+) -> str:
+ """Resolve a component file, refusing to fall back to a split pack's transformer.
+ Falling back would build the component from a checkpoint that holds neither its
+ config nor its weights. That is not a hard failure downstream — the loader logs an
+ "Uninitialized parameters" warning and hands back a model still on the meta device —
+ so it has to be rejected here, where the cause is still visible.
+ """
+ if component_path is not None:
+ return str(component_path)
+ if is_split_transformer(model_path):
+ raise ValueError(
+ f"{model_path} is the transformer of a split checkpoint pack and carries no "
+ f"{component}. Pass the standalone {component} safetensors via {flag}."
+ )
+ return str(model_path)
+
+
# =============================================================================
# Individual Component Loaders
# =============================================================================
@@ -109,12 +205,28 @@ def load_video_vae_decoder(
Loaded VideoDecoder
"""
from ltx_core.loader.single_gpu_model_builder import SingleGPUModelBuilder
- from ltx_core.model.video_vae import VAE_DECODER_COMFY_KEYS_FILTER, VideoDecoderConfigurator
+ from ltx_core.model.video_vae import (
+ VideoDecoderConfigurator,
+ is_diffusion_video_vae,
+ video_decoder_sd_ops_for_checkpoint,
+ )
+ from ltx_core.model.video_vae.transformer import build_cutlass_fna_diffusion_decoder_op
+
+ checkpoint_path = str(checkpoint_path)
+
+ # ChunkedEager ModuleOps: deferred stage-4 + W-chunking + cutlass-fna; lower
+ # peak VRAM than CombinedCompile during validation decode.
+ diffusion_vae = is_diffusion_video_vae(checkpoint_path)
+ module_ops = (build_cutlass_fna_diffusion_decoder_op(),) if diffusion_vae else ()
return SingleGPUModelBuilder(
- model_path=str(checkpoint_path),
+ model_path=checkpoint_path,
model_class_configurator=VideoDecoderConfigurator,
- model_sd_ops=VAE_DECODER_COMFY_KEYS_FILTER,
+ model_sd_ops=video_decoder_sd_ops_for_checkpoint(
+ checkpoint_path,
+ diffusion_vae=diffusion_vae,
+ ),
+ module_ops=module_ops,
).build(device=_to_torch_device(device), dtype=dtype)
@@ -192,58 +304,64 @@ def load_text_encoder(
device: Device = "cpu",
dtype: torch.dtype = torch.bfloat16,
load_in_8bit: bool = False,
-) -> "GemmaTextEncoder":
+) -> "LTXGemmaTextEncoder":
"""Load the Gemma text encoder.
Args:
- gemma_model_path: Path to Gemma model directory
+ gemma_model_path: Gemma model directory, or the packed text-encoder safetensors
+ of a split pack
device: Device to load model on
dtype: Data type for model weights
- load_in_8bit: Whether to load the Gemma model in 8-bit precision using bitsandbytes.
+ load_in_8bit: Whether to quantize the Gemma backbone to 8-bit with bitsandbytes.
+ The full-precision weights are materialized on CPU first, so this trades host
+ RAM for roughly half the VRAM.
Returns:
- Loaded GemmaTextEncoder
+ Loaded LTXGemmaTextEncoder
"""
- if not Path(gemma_model_path).is_dir():
- raise ValueError(f"Gemma model path is not a directory: {gemma_model_path}")
-
- # Use 8-bit loading path if requested
- if load_in_8bit:
- from ltx_trainer.gemma_8bit import load_8bit_gemma
-
- return load_8bit_gemma(gemma_model_path, dtype, device=device)
-
- # Standard loading path
from ltx_core.loader.single_gpu_model_builder import SingleGPUModelBuilder
from ltx_core.text_encoders.gemma import (
- GEMMA_LLM_KEY_OPS,
- GEMMA_MODEL_OPS,
GemmaTextEncoderConfigurator,
- module_ops_from_gemma_root,
+ get_gemma_ops,
)
- from ltx_core.utils import find_matching_file
+ from ltx_core.text_encoders.gemma.gemma_assets import resolve_gemma_weight_paths
torch_device = _to_torch_device(device)
- gemma_model_folder = find_matching_file(str(gemma_model_path), "model*.safetensors").parent
- gemma_weight_paths = [str(p) for p in gemma_model_folder.rglob("*.safetensors")]
+ gemma_weight_paths = resolve_gemma_weight_paths(str(gemma_model_path))
+ gemma_sd_ops, gemma_module_ops = get_gemma_ops(str(gemma_model_path))
+
+ # Quantization needs the weights materialized before it can convert them, and doing
+ # that on the target GPU would defeat the point of asking for 8-bit.
+ build_device = torch.device("cpu") if load_in_8bit else torch_device
text_encoder = SingleGPUModelBuilder(
model_path=tuple(gemma_weight_paths),
- model_class_configurator=GemmaTextEncoderConfigurator,
- model_sd_ops=GEMMA_LLM_KEY_OPS,
- module_ops=(GEMMA_MODEL_OPS, *module_ops_from_gemma_root(str(gemma_model_path))),
- ).build(device=torch_device, dtype=dtype)
+ model_class_configurator=GemmaTextEncoderConfigurator.with_gemma_model_path(str(gemma_model_path)),
+ model_sd_ops=gemma_sd_ops,
+ module_ops=gemma_module_ops,
+ ).build(device=build_device, dtype=dtype)
+
+ if load_in_8bit:
+ from ltx_trainer.gemma_8bit import quantize_gemma_to_8bit
+
+ return quantize_gemma_to_8bit(text_encoder, device=torch_device)
return text_encoder
def load_embeddings_processor(
- checkpoint_path: str | Path,
+ checkpoint_path: str | Path | Sequence[str | Path],
+ gemma_model_path: str | Path,
device: Device = "cpu",
dtype: torch.dtype = torch.bfloat16,
) -> "EmbeddingsProcessor":
"""Load the embeddings processor (feature extractor + video/audio connectors).
Args:
- checkpoint_path: Path to the LTX-2 safetensors checkpoint file
+ checkpoint_path: LTX transformer checkpoint, or transformer + packed
+ text-encoder files for a split pack.
+ gemma_model_path: Path to the Gemma model directory or packed
+ text-encoder safetensors. Used to read the
+ text encoder's hidden_size / num_hidden_layers when sizing the
+ feature-extractor projections.
device: Device to load model on
dtype: Data type for model weights
Returns:
@@ -257,9 +375,14 @@ def load_embeddings_processor(
torch_device = _to_torch_device(device)
+ paths = (
+ tuple(str(path) for path in checkpoint_path)
+ if isinstance(checkpoint_path, (list, tuple))
+ else str(checkpoint_path)
+ )
return SingleGPUModelBuilder(
- model_path=str(checkpoint_path),
- model_class_configurator=EmbeddingsProcessorConfigurator,
+ model_path=paths,
+ model_class_configurator=EmbeddingsProcessorConfigurator.with_gemma_model_path(str(gemma_model_path)),
model_sd_ops=EMBEDDINGS_PROCESSOR_KEY_OPS,
).build(device=torch_device, dtype=dtype)
@@ -278,13 +401,15 @@ class LtxModelComponents:
video_vae_decoder: "VideoDecoder | None" = None
audio_vae_decoder: "AudioDecoder | None" = None
vocoder: "Vocoder | None" = None
- text_encoder: "GemmaTextEncoder | None" = None
+ text_encoder: "LTXGemmaTextEncoder | None" = None
scheduler: "LTX2Scheduler | None" = None
-def load_model(
+def load_model( # noqa: PLR0913
checkpoint_path: str | Path,
text_encoder_path: str | Path | None = None,
+ video_vae_path: str | Path | None = None,
+ audio_vae_path: str | Path | None = None,
device: Device = "cpu",
dtype: torch.dtype = torch.bfloat16,
with_video_vae_encoder: bool = False,
@@ -304,8 +429,13 @@ def load_model(
- load_vocoder()
- load_text_encoder()
Args:
- checkpoint_path: Path to the safetensors checkpoint file
- text_encoder_path: Path to Gemma model directory (required if with_text_encoder=True)
+ checkpoint_path: Unified checkpoint or split transformer safetensors.
+ text_encoder_path: Gemma directory or packed text-encoder safetensors
+ (required if with_text_encoder=True).
+ video_vae_path: Video VAE safetensors for a split pack. Defaults to
+ ``checkpoint_path`` for a monolith.
+ audio_vae_path: Audio VAE/vocoder safetensors for a split pack. Defaults
+ to ``checkpoint_path`` for a monolith.
device: Device to load models on ("cuda", "cpu", etc.)
dtype: Data type for model weights
with_video_vae_encoder: Whether to load the video VAE encoder (for preprocessing)
@@ -324,6 +454,13 @@ def load_model(
if not checkpoint_path.exists():
raise FileNotFoundError(f"Checkpoint not found: {checkpoint_path}")
+ needs_video_vae = with_video_vae_encoder or with_video_vae_decoder
+ needs_audio_vae = with_audio_vae_decoder or with_vocoder
+ if needs_video_vae:
+ video_vae_path = resolve_video_vae_path(checkpoint_path, video_vae_path)
+ if needs_audio_vae:
+ audio_vae_path = resolve_audio_vae_path(checkpoint_path, audio_vae_path)
+
logger.info(f"Loading LTX-2 model from {checkpoint_path}")
torch_device = _to_torch_device(device)
@@ -336,25 +473,25 @@ def load_model(
video_vae_encoder = None
if with_video_vae_encoder:
logger.debug("Loading video VAE encoder...")
- video_vae_encoder = load_video_vae_encoder(checkpoint_path, torch_device, dtype)
+ video_vae_encoder = load_video_vae_encoder(video_vae_path, torch_device, dtype)
# Load video VAE decoder
video_vae_decoder = None
if with_video_vae_decoder:
logger.debug("Loading video VAE decoder...")
- video_vae_decoder = load_video_vae_decoder(checkpoint_path, torch_device, dtype)
+ video_vae_decoder = load_video_vae_decoder(video_vae_path, torch_device, dtype)
# Load audio VAE decoder
audio_vae_decoder = None
if with_audio_vae_decoder:
logger.debug("Loading audio VAE decoder...")
- audio_vae_decoder = load_audio_vae_decoder(checkpoint_path, torch_device, dtype)
+ audio_vae_decoder = load_audio_vae_decoder(audio_vae_path, torch_device, dtype)
# Load vocoder
vocoder = None
if with_vocoder:
logger.debug("Loading vocoder...")
- vocoder = load_vocoder(checkpoint_path, torch_device, dtype)
+ vocoder = load_vocoder(audio_vae_path, torch_device, dtype)
# Load text encoder
text_encoder = None
diff --git a/packages/ltx-trainer/src/ltx_trainer/trainer.py b/packages/ltx-trainer/src/ltx_trainer/trainer.py
index 8eb3fbc..372d060 100644
--- a/packages/ltx-trainer/src/ltx_trainer/trainer.py
+++ b/packages/ltx-trainer/src/ltx_trainer/trainer.py
@@ -38,7 +38,13 @@ from ltx_trainer.config_display import print_config
from ltx_trainer.datasets import PrecomputedDataset
from ltx_trainer.gpu_utils import free_gpu_memory, get_gpu_memory_gb
from ltx_trainer.hf_hub_utils import push_to_hub
-from ltx_trainer.model_loader import load_embeddings_processor, load_transformer
+from ltx_trainer.model_loader import (
+ embedding_weight_paths,
+ load_embeddings_processor,
+ load_transformer,
+ read_video_scale_factors,
+ resolve_video_vae_path,
+)
from ltx_trainer.progress import TrainingProgress
from ltx_trainer.quantization import quantize_model
from ltx_trainer.sigma_tracker import SigmaBucketTracker
@@ -92,6 +98,13 @@ class LtxvTrainer:
if IS_MAIN_PROCESS:
print_config(trainer_config)
self._training_strategy = get_training_strategy(self._config.training_strategy)
+ # The VAE isn't loaded during training (latents are precomputed), so source the
+ # video compression factors from the checkpoint's embedded VAE config. This keeps
+ # the RoPE positions consistent with the VAE that produced the latents (and with
+ # inference), instead of assuming the default 32x32x8 layout.
+ self._training_strategy.video_scale_factors = read_video_scale_factors(
+ resolve_video_vae_path(self._config.model.model_path, self._config.model.video_vae_path)
+ )
# ValidationRunner loads its own models (text encoder, VAE encoder/decoder, etc.),
# caches prompt embeddings and conditioning media, then unloads encoders.
@@ -99,6 +112,8 @@ class LtxvTrainer:
config=self._config.validation,
model_path=self._config.model.model_path,
text_encoder_path=self._config.model.text_encoder_path,
+ video_vae_path=self._config.model.video_vae_path,
+ audio_vae_path=self._config.model.audio_vae_path,
load_text_encoder_in_8bit=self._config.acceleration.load_text_encoder_in_8bit,
)
@@ -408,7 +423,11 @@ class LtxvTrainer:
logger.debug("Loading embeddings processor...")
self._embeddings_processor = load_embeddings_processor(
- checkpoint_path=self._config.model.model_path,
+ checkpoint_path=embedding_weight_paths(
+ self._config.model.model_path,
+ self._config.model.text_encoder_path,
+ ),
+ gemma_model_path=self._config.model.text_encoder_path,
device=init_device,
dtype=torch.bfloat16,
)
@@ -928,21 +947,19 @@ class LtxvTrainer:
# Get state dict (collective operation - all processes must participate)
self._accelerator.wait_for_everyone()
- full_state_dict = self._accelerator.get_state_dict(self._transformer)
+ state_dict = self._accelerator.get_state_dict(self._transformer)
- if not IS_MAIN_PROCESS:
+ # Only the main process saves the checkpoint
+ if not self._accelerator.is_main_process:
return None
save_dir.mkdir(exist_ok=True, parents=True)
- # Determine save precision
- save_dtype = torch.bfloat16 if self._config.checkpoints.precision == "bfloat16" else torch.float32
-
# For LoRA: extract only adapter weights; for full: use as-is
if is_lora:
unwrapped = self._accelerator.unwrap_model(self._transformer, keep_torch_compile=False)
- # For FSDP, pass full_state_dict since model params aren't directly accessible
- state_dict = get_peft_model_state_dict(unwrapped, state_dict=full_state_dict if is_fsdp else None)
+ # For FSDP, pass the gathered state dict since model params aren't directly accessible
+ state_dict = get_peft_model_state_dict(unwrapped, state_dict=state_dict if is_fsdp else None)
# Remove "base_model.model." prefix added by PEFT
state_dict = {k.replace("base_model.model.", "", 1): v for k, v in state_dict.items()}
@@ -950,20 +967,15 @@ class LtxvTrainer:
# Convert to ComfyUI-compatible format (add "diffusion_model." prefix)
state_dict = {f"diffusion_model.{k}": v for k, v in state_dict.items()}
- # Cast to configured precision
- state_dict = {k: v.to(save_dtype) if isinstance(v, Tensor) else v for k, v in state_dict.items()}
-
- # Build metadata for safetensors file
- metadata = self._build_checkpoint_metadata()
+ # Determine save precision
+ save_dtype = torch.bfloat16 if self._config.checkpoints.precision == "bfloat16" else torch.float32
- # Save to disk with metadata
- save_file(state_dict, saved_weights_path, metadata=metadata)
- else:
- # Cast to configured precision
- full_state_dict = {k: v.to(save_dtype) if isinstance(v, Tensor) else v for k, v in full_state_dict.items()}
+ # Cast to configured precision. safetensors rejects non-contiguous tensors, and casting
+ # a non-contiguous parameter keeps it non-contiguous.
+ state_dict = {k: v.to(save_dtype).contiguous() if isinstance(v, Tensor) else v for k, v in state_dict.items()}
- # Save to disk
- self._accelerator.save(full_state_dict, saved_weights_path)
+ # Save to disk with metadata
+ save_file(state_dict, saved_weights_path, metadata=self._build_checkpoint_metadata())
rel_path = saved_weights_path.relative_to(self._config.output_dir)
logger.info(f"💾 {prefix.capitalize()} weights for step {self._global_step} saved in {rel_path}")
diff --git a/packages/ltx-trainer/src/ltx_trainer/training_strategies/__init__.py b/packages/ltx-trainer/src/ltx_trainer/training_strategies/__init__.py
index 71857c7..87ea71a 100644
--- a/packages/ltx-trainer/src/ltx_trainer/training_strategies/__init__.py
+++ b/packages/ltx-trainer/src/ltx_trainer/training_strategies/__init__.py
@@ -11,7 +11,6 @@ import warnings
from ltx_trainer import logger
from ltx_trainer.training_strategies.base_strategy import (
DEFAULT_FPS,
- VIDEO_SCALE_FACTORS,
ModelInputs,
TrainingStrategy,
TrainingStrategyConfigBase,
@@ -25,7 +24,6 @@ TrainingStrategyConfig = TextToVideoConfig | VideoToVideoConfig | FlexibleStrate
__all__ = [
"DEFAULT_FPS",
- "VIDEO_SCALE_FACTORS",
"FlexibleStrategy",
"FlexibleStrategyConfig",
"ModelInputs",
diff --git a/packages/ltx-trainer/src/ltx_trainer/training_strategies/base_strategy.py b/packages/ltx-trainer/src/ltx_trainer/training_strategies/base_strategy.py
index d74083f..a3db64f 100644
--- a/packages/ltx-trainer/src/ltx_trainer/training_strategies/base_strategy.py
+++ b/packages/ltx-trainer/src/ltx_trainer/training_strategies/base_strategy.py
@@ -23,9 +23,6 @@ from ltx_trainer.timestep_samplers import TimestepSampler
# Default frames per second for video missing in the FPS metadata
DEFAULT_FPS = 24
-# VAE scale factors for LTX-2
-VIDEO_SCALE_FACTORS = SpatioTemporalScaleFactors.default()
-
class TrainingStrategyConfigBase(BaseModel):
"""Base configuration class for training strategies.
@@ -79,6 +76,7 @@ class TrainingStrategy(ABC):
self.config = config
self._video_patchifier = VideoLatentPatchifier(patch_size=1)
self._audio_patchifier = AudioPatchifier(patch_size=1)
+ self.video_scale_factors = SpatioTemporalScaleFactors.default()
@abstractmethod
def prepare_training_inputs(
@@ -160,7 +158,7 @@ class TrainingStrategy(ABC):
# Convert latent coords to pixel coords with causal fix
pixel_coords = get_pixel_coords(
latent_coords=latent_coords,
- scale_factors=VIDEO_SCALE_FACTORS,
+ scale_factors=self.video_scale_factors,
causal_fix=True,
).float()
diff --git a/packages/ltx-trainer/src/ltx_trainer/training_strategies/flexible.py b/packages/ltx-trainer/src/ltx_trainer/training_strategies/flexible.py
index 82d0d9a..0afd6e0 100644
--- a/packages/ltx-trainer/src/ltx_trainer/training_strategies/flexible.py
+++ b/packages/ltx-trainer/src/ltx_trainer/training_strategies/flexible.py
@@ -16,10 +16,10 @@ from pydantic import BaseModel, ConfigDict, Field, model_validator
from torch import Tensor
from ltx_core.model.transformer.modality import Modality
+from ltx_core.types import SpatioTemporalScaleFactors
from ltx_trainer.timestep_samplers import TimestepSampler
from ltx_trainer.training_strategies.base_strategy import (
DEFAULT_FPS,
- VIDEO_SCALE_FACTORS,
ModelInputs,
TrainingStrategy,
TrainingStrategyConfigBase,
@@ -499,7 +499,9 @@ class FlexibleStrategy(TrainingStrategy):
batch_size, seq_len, height, width, config.temporal_boundary, True, device
)
elif isinstance(config, SpatialCropConditionConfig):
- mask = self._compute_spatial_crop_mask(batch_size, seq_len, height, width, config.spatial_region, device)
+ mask = self._compute_spatial_crop_mask(
+ batch_size, seq_len, height, width, config.spatial_region, device, self.video_scale_factors
+ )
elif isinstance(config, MaskConditionConfig):
# Binarize to match inference, which thresholds masks at load time
# (validation_runner._load_and_downsample_mask / _load_audio_mask).
@@ -546,6 +548,7 @@ class FlexibleStrategy(TrainingStrategy):
width: int,
region: tuple[int, int, int, int],
device: torch.device,
+ scale_factors: SpatioTemporalScaleFactors,
) -> Tensor:
"""Compute float mask for spatial crop region (y1, x1, y2, x2) in pixel coords.
Returns [B, seq_len] in {0, 1}.
@@ -557,10 +560,10 @@ class FlexibleStrategy(TrainingStrategy):
def to_latent(v: int, scale: int, max_v: int) -> int:
return max(0, min(v // scale, max_v))
- ly1 = to_latent(y1, VIDEO_SCALE_FACTORS.height, height)
- ly2 = to_latent(y2, VIDEO_SCALE_FACTORS.height, height)
- lx1 = to_latent(x1, VIDEO_SCALE_FACTORS.width, width)
- lx2 = to_latent(x2, VIDEO_SCALE_FACTORS.width, width)
+ ly1 = to_latent(y1, scale_factors.height, height)
+ ly2 = to_latent(y2, scale_factors.height, height)
+ lx1 = to_latent(x1, scale_factors.width, width)
+ lx2 = to_latent(x2, scale_factors.width, width)
# Create spatial mask and tile across frames
spatial_mask = torch.zeros(height, width, device=device)
diff --git a/packages/ltx-trainer/src/ltx_trainer/validation_runner.py b/packages/ltx-trainer/src/ltx_trainer/validation_runner.py
index 8f54a75..8573d40 100644
--- a/packages/ltx-trainer/src/ltx_trainer/validation_runner.py
+++ b/packages/ltx-trainer/src/ltx_trainer/validation_runner.py
@@ -9,7 +9,7 @@ import os
from collections.abc import Callable
from dataclasses import dataclass, field, replace
from pathlib import Path
-from typing import TYPE_CHECKING, Literal
+from typing import TYPE_CHECKING
import torch
from einops import rearrange
@@ -19,23 +19,33 @@ from torchvision.transforms import functional as TF # noqa: N812
from torchvision.transforms.functional import to_tensor
from ltx_core.components.diffusion_steps import EulerDiffusionStep
-from ltx_core.components.guiders import CFGGuider, STGGuider
+from ltx_core.components.guiders import MultiModalGuider, MultiModalGuiderParams
from ltx_core.components.noisers import GaussianNoiser
from ltx_core.components.patchifiers import AudioPatchifier, VideoLatentPatchifier
from ltx_core.components.schedulers import LTX2Scheduler
+from ltx_core.conditioning.mask_utils import extend_keyframes_mask
from ltx_core.conditioning.types.latent_cond import VideoConditionByLatentIndex
from ltx_core.conditioning.types.mask_cond import VideoConditionByMask
from ltx_core.conditioning.types.reference_video_cond import VideoConditionByReferenceLatent
+from ltx_core.devices import cuda_activation_budget_bytes
from ltx_core.guidance.perturbations import (
BatchedPerturbationConfig,
Perturbation,
PerturbationConfig,
PerturbationType,
)
+from ltx_core.loader import SafetensorsModelStateDictLoader
from ltx_core.model.audio_vae.audio_vae import encode_audio as ltx_encode_audio
from ltx_core.model.transformer.modality import Modality
from ltx_core.model.transformer.model import X0Model
-from ltx_core.model.video_vae import SpatialTilingConfig, TemporalTilingConfig, TilingConfig
+from ltx_core.model.video_vae import DimensionSizeConfig, TileSizeConfig
+from ltx_core.model.video_vae.diffusion_tiling import recommended_decode_tiling_config
+from ltx_core.model.video_vae.diffusion_video_decoder import DiffusionVideoDecoder
+from ltx_core.model.video_vae.model_configurator import (
+ diffvae_tiling_geometry_from_vae_config,
+ estimate_diffusion_decoder_weight_bytes,
+)
+from ltx_core.model.video_vae.transformer.config import DiffVAEMode
from ltx_core.tools import AudioLatentTools, VideoLatentTools
from ltx_core.types import (
Audio,
@@ -49,6 +59,7 @@ from ltx_trainer import logger
from ltx_trainer.config import ValidationConfig, ValidationSample
from ltx_trainer.gpu_utils import free_gpu_memory_context
from ltx_trainer.model_loader import (
+ embedding_weight_paths,
load_audio_vae_decoder,
load_audio_vae_encoder,
load_embeddings_processor,
@@ -56,6 +67,9 @@ from ltx_trainer.model_loader import (
load_video_vae_decoder,
load_video_vae_encoder,
load_vocoder,
+ read_video_scale_factors,
+ resolve_audio_vae_path,
+ resolve_video_vae_path,
)
from ltx_trainer.progress import SamplingContext, TrainingProgress
from ltx_trainer.utils import open_image_as_srgb, save_image
@@ -64,10 +78,13 @@ from ltx_trainer.video_utils import read_video, save_video
if TYPE_CHECKING:
from ltx_core.model.transformer import LTXModel
-VIDEO_SCALE_FACTORS = SpatioTemporalScaleFactors.default()
-_DEFAULT_TILING = TilingConfig(
- spatial_config=SpatialTilingConfig(tile_size_in_pixels=192, tile_overlap_in_pixels=64),
- temporal_config=TemporalTilingConfig(tile_size_in_frames=48, tile_overlap_in_frames=24),
+# Convolutional decoder only; the diffusion decoder recommends its own layout (see
+# ``ValidationRunner._decode_tiling_config``). These overlaps sit below the decoder's recommended
+# receptive-field halo, so tile edges can diverge slightly from an untiled decode.
+_DEFAULT_TILING = TileSizeConfig(
+ height=DimensionSizeConfig(tile_size=384, overlap=192),
+ width=DimensionSizeConfig(tile_size=384, overlap=192),
+ frames=DimensionSizeConfig(tile_size=48, overlap=24),
)
@@ -135,10 +152,23 @@ class ValidationRunner:
config: ValidationConfig,
model_path: str | Path,
text_encoder_path: str | Path | None,
+ video_vae_path: str | Path | None = None,
+ audio_vae_path: str | Path | None = None,
load_text_encoder_in_8bit: bool = False,
):
self._config = config
self._model_path = Path(model_path)
+ self._video_vae_path = Path(resolve_video_vae_path(self._model_path, video_vae_path))
+ # Resolved on demand: a video-only validation never touches the audio VAE, and on a
+ # split pack resolving it eagerly would demand an audio_vae_path that is never used.
+ self._audio_vae_path_override = audio_vae_path
+ # Video VAE compression factors, derived from the checkpoint's embedded VAE config
+ # (defaults to 32x32x8 when absent), used for frame/resolution snapping and the
+ # latent/pixel coordinate math below.
+ self._video_scale_factors = read_video_scale_factors(self._video_vae_path)
+ # The config-level dim validators are VAE-agnostic (they can't know the compression
+ # factors), so the geometry is checked here, once the factors are known.
+ self._validate_sample_geometry()
self._video_patchifier = VideoLatentPatchifier(patch_size=1)
self._audio_patchifier = AudioPatchifier(patch_size=1)
@@ -147,6 +177,47 @@ class ValidationRunner:
self._cached_media = self._encode_conditioning_media()
self._load_decoder_components()
+ def _audio_vae_path(self) -> str:
+ """Resolve the file holding the audio VAE and vocoder, at the point one is needed."""
+ return resolve_audio_vae_path(self._model_path, self._audio_vae_path_override)
+
+ def _validate_sample_geometry(self) -> None:
+ """Assert every validation sample's geometry is compatible with the VAE compression.
+ This replaces the config-level dim validators, which run before the checkpoint (and
+ therefore its scale factors) is known and so had to assume the default 32x32x8 layout.
+ Width/height must be divisible by the spatial factors and frame counts must be
+ VAE-aligned; otherwise the generated geometry would be silently cropped to fit.
+ """
+ sf = self._video_scale_factors
+ for i, sample in enumerate(self._config.samples):
+ width, height, frames = sample.video_dims or self._config.video_dims
+ if width % sf.width != 0 or height % sf.height != 0:
+ raise ValueError(
+ f"Validation sample {i}: dimensions {width}x{height} must be divisible by the VAE "
+ f"spatial factors ({sf.width}x{sf.height})."
+ )
+ if (frames - 1) % sf.time != 0:
+ raise ValueError(
+ f"Validation sample {i}: frames ({frames}) must satisfy (frames - 1) % {sf.time} == 0 "
+ "for the VAE temporal factor."
+ )
+ for cond in sample.conditions:
+ if getattr(cond, "video", None) is None:
+ continue # audio prefix/suffix use duration, not num_frames
+ num_frames = getattr(cond, "num_frames", None)
+ if num_frames is None:
+ continue
+ if cond.type == "prefix" and (num_frames - 1) % sf.time != 0:
+ raise ValueError(
+ f"Validation sample {i}: prefix num_frames ({num_frames}) must satisfy "
+ f"(num_frames - 1) % {sf.time} == 0 for the VAE temporal factor."
+ )
+ if cond.type == "suffix" and num_frames % sf.time != 0:
+ raise ValueError(
+ f"Validation sample {i}: suffix num_frames ({num_frames}) must satisfy "
+ f"num_frames % {sf.time} == 0 for the VAE temporal factor."
+ )
+
# ------------------------------------------------------------------
# Public API
# ------------------------------------------------------------------
@@ -266,7 +337,10 @@ class ValidationRunner:
logger.debug("Loading embeddings processor for validation embedding caching...")
embeddings_processor = load_embeddings_processor(
- checkpoint_path=self._model_path, device=init_device, dtype=torch.bfloat16
+ checkpoint_path=embedding_weight_paths(self._model_path, text_encoder_path),
+ gemma_model_path=text_encoder_path,
+ device=init_device,
+ dtype=torch.bfloat16,
)
logger.info(f"Pre-computing embeddings for {len(prompts)} validation prompts...")
@@ -325,10 +399,10 @@ class ValidationRunner:
if needs_video_encoder:
logger.debug("Loading VAE encoder for validation media encoding...")
- vae_encoder = load_video_vae_encoder(self._model_path, device="cpu", dtype=torch.bfloat16)
+ vae_encoder = load_video_vae_encoder(self._video_vae_path, device="cpu", dtype=torch.bfloat16)
if needs_audio_encoder:
logger.debug("Loading audio VAE encoder for validation media encoding...")
- audio_encoder = load_audio_vae_encoder(self._model_path, device="cpu", dtype=torch.bfloat16)
+ audio_encoder = load_audio_vae_encoder(self._audio_vae_path(), device="cpu", dtype=torch.bfloat16)
logger.info(f"Pre-encoding conditioning media for {len(samples)} validation samples...")
cached: list[CachedSampleMedia] = []
@@ -362,7 +436,12 @@ class ValidationRunner:
elif cond.type == "reference" and cond.video is not None:
ref_video, _ = read_video(cond.video, max_frames=s_num_frames)
preprocessed, pixels = self._preprocess_reference(
- ref_video, s_height, s_width, cond.downscale_factor, cond.temporal_scale_factor
+ ref_video,
+ s_height,
+ s_width,
+ self._video_scale_factors,
+ cond.downscale_factor,
+ cond.temporal_scale_factor,
)
latent = self._encode_video(preprocessed, vae_encoder, device)
sample_media.conditions[cond_idx] = CachedConditionMedia(
@@ -403,14 +482,25 @@ class ValidationRunner:
def _load_decoder_components(self) -> None:
"""Load VAE decoder, audio decoder, and vocoder. Kept on CPU until generation."""
self._vae_decoder = None
+ # Resolved once here rather than per decode, since it comes from the checkpoint header.
+ # None marks a convolutional decoder, which uses the static _DEFAULT_TILING instead.
+ self._diffvae_tiling_kwargs: dict | None = None
needs_video_decoder = self._config.generate_video or any(
c.type == "video_to_audio" for s in self._config.samples for c in s.conditions
)
if needs_video_decoder:
logger.debug("Loading video VAE decoder for validation...")
- self._vae_decoder = load_video_vae_decoder(self._model_path, device="cpu", dtype=torch.bfloat16)
+ self._vae_decoder = load_video_vae_decoder(self._video_vae_path, device="cpu", dtype=torch.bfloat16)
if self._vae_decoder is not None:
self._vae_decoder.requires_grad_(False)
+ # Keyed off the built decoder rather than the checkpoint, so this stays quiet for
+ # the convolutional decoder and for tests that supply a stand-in.
+ if isinstance(self._vae_decoder, DiffusionVideoDecoder):
+ metadata = SafetensorsModelStateDictLoader().metadata(str(self._video_vae_path))
+ self._diffvae_tiling_kwargs = {
+ **diffvae_tiling_geometry_from_vae_config(metadata.get("config", {}).get("vae", {})),
+ "model_bytes": estimate_diffusion_decoder_weight_bytes(str(self._video_vae_path)),
+ }
self._audio_decoder = None
self._vocoder = None
@@ -419,10 +509,11 @@ class ValidationRunner:
)
if needs_audio_decoder:
logger.debug("Loading audio decoder and vocoder for validation...")
- self._audio_decoder = load_audio_vae_decoder(self._model_path, device="cpu", dtype=torch.bfloat16)
+ audio_vae_path = self._audio_vae_path()
+ self._audio_decoder = load_audio_vae_decoder(audio_vae_path, device="cpu", dtype=torch.bfloat16)
if self._audio_decoder is not None:
self._audio_decoder.requires_grad_(False)
- self._vocoder = load_vocoder(self._model_path, device="cpu", dtype=torch.bfloat16)
+ self._vocoder = load_vocoder(audio_vae_path, device="cpu", dtype=torch.bfloat16)
if self._vocoder is not None:
self._vocoder.requires_grad_(False)
@@ -458,22 +549,23 @@ class ValidationRunner:
video = self._resize_and_center_crop(video, target_height, target_width)
requested_frames = getattr(cond, "num_frames", None)
+ temporal_factor = self._video_scale_factors.time
if cond.type == "suffix" and requested_frames is not None:
# The VAE encoder has temporal receptive fields, so encoding a short
# suffix clip independently produces different latents than encoding the
# full video. Encode the full clip and extract the last N latent frames.
video = rearrange(video, "f c h w -> 1 c f h w")
- valid_frames = (video.shape[2] - 1) // 8 * 8 + 1
+ valid_frames = (video.shape[2] - 1) // temporal_factor * temporal_factor + 1
video = video[:, :, :valid_frames]
latent = self._encode_video(video * 2.0 - 1.0, vae_encoder, device)
- num_suffix_latent_frames = requested_frames // 8
+ num_suffix_latent_frames = requested_frames // temporal_factor
return latent[:, :, -num_suffix_latent_frames:]
if requested_frames is not None:
requested_frames = min(requested_frames, video.shape[0])
video = video[:requested_frames]
video = rearrange(video, "f c h w -> 1 c f h w")
- valid_frames = (video.shape[2] - 1) // 8 * 8 + 1
+ valid_frames = (video.shape[2] - 1) // temporal_factor * temporal_factor + 1
video = video[:, :, :valid_frames]
return self._encode_video(video * 2.0 - 1.0, vae_encoder, device)
@@ -520,7 +612,11 @@ class ValidationRunner:
video_state = video_tools.create_initial_state(
device=device, dtype=torch.bfloat16, initial_latent=frozen_media.latent.to(device)
)
- video_state = replace(video_state, denoise_mask=torch.zeros_like(video_state.denoise_mask))
+ video_state = replace(
+ video_state,
+ denoise_mask=torch.zeros_like(video_state.denoise_mask),
+ frozen=True,
+ )
video_clean = video_state
else:
video_state = video_tools.create_initial_state(device=device, dtype=torch.bfloat16)
@@ -544,7 +640,11 @@ class ValidationRunner:
audio_state = audio_tools.create_initial_state(
device=device, dtype=torch.bfloat16, initial_latent=frozen_latent
)
- audio_state = replace(audio_state, denoise_mask=torch.zeros_like(audio_state.denoise_mask))
+ audio_state = replace(
+ audio_state,
+ denoise_mask=torch.zeros_like(audio_state.denoise_mask),
+ frozen=True,
+ )
audio_clean = audio_state
else:
audio_tools = self._create_audio_tools(num_frames, self._config.frame_rate)
@@ -624,7 +724,7 @@ class ValidationRunner:
state = VideoConditionByMask(latent=latent, mask=mask, strength=1.0).apply_to(state, tools)
elif cond.type == "spatial_crop":
- mask = _build_spatial_crop_mask(cond.spatial_region, tools.target_shape, device)
+ mask = _build_spatial_crop_mask(cond.spatial_region, tools.target_shape, device, tools.scale_factors)
state = VideoConditionByMask(latent=latent, mask=mask, strength=1.0).apply_to(state, tools)
return state
@@ -678,6 +778,9 @@ class ValidationRunner:
positions=torch.cat([state.positions, positions], dim=2),
clean_latent=torch.cat([state.clean_latent, tokens], dim=1),
attention_mask=None,
+ # Appended reference tokens are not keyframes; extending rather than dropping
+ # keeps the per-token marker aligned with the sequence for keyframe checkpoints.
+ keyframes_mask=extend_keyframes_mask(state, tokens.shape[1], marked=False),
)
elif cond.type == "mask" and getattr(cond, "audio", None) is not None:
@@ -703,6 +806,7 @@ class ValidationRunner:
positions=state.positions,
clean_latent=state.clean_latent * inv + tokens * m,
attention_mask=state.attention_mask,
+ keyframes_mask=state.keyframes_mask,
)
return state
@@ -770,16 +874,23 @@ class ValidationRunner:
scheduler = LTX2Scheduler()
sigmas = scheduler.execute(steps=cfg.inference_steps).to(device).float()
stepper = EulerDiffusionStep()
- cfg_guider = CFGGuider(cfg.guidance_scale)
- stg_guider = STGGuider(cfg.stg_scale)
-
- stg_perturbation_config = (
- self._build_stg_perturbation_config(
- cfg.stg_blocks, cfg.stg_mode, transformer.num_blocks, device, next(transformer.parameters()).dtype
+ video_present = video_state is not None
+ audio_present = audio_state is not None
+ video_guider = MultiModalGuider(
+ self._resolve_video_guider_params(
+ cfg,
+ video_frozen=video_frozen,
+ audio_present=audio_present,
+ )
+ )
+ audio_guider = MultiModalGuider(
+ self._resolve_audio_guider_params(
+ cfg,
+ audio_frozen=audio_frozen,
+ video_present=video_present,
)
- if stg_guider.enabled()
- else None
)
+ transformer_dtype = next(transformer.parameters()).dtype
x0_model = X0Model(transformer)
@@ -799,26 +910,46 @@ class ValidationRunner:
)
pos_video, pos_audio = x0_model(video=video, audio=audio, perturbations=None)
- denoised_video, denoised_audio = pos_video, pos_audio
+ neg_video, neg_audio = 0.0, 0.0
+ ptb_video, ptb_audio = 0.0, 0.0
+ mod_video, mod_audio = 0.0, 0.0
# CFG
- if cfg_guider.enabled() and v_ctx_neg is not None:
- video_neg = replace(video, context=v_ctx_neg) if video is not None else None
- audio_neg = replace(audio, context=a_ctx_neg) if audio is not None else None
+ video_needs_neg = video is not None and video_guider.do_unconditional_generation()
+ audio_needs_neg = audio is not None and audio_guider.do_unconditional_generation()
+ if video_needs_neg or audio_needs_neg:
+ video_neg_ctx = v_ctx_neg if video_needs_neg and v_ctx_neg is not None else v_ctx_pos
+ audio_neg_ctx = a_ctx_neg if audio_needs_neg and a_ctx_neg is not None else a_ctx_pos
+ video_neg = replace(video, context=video_neg_ctx) if video is not None else None
+ audio_neg = replace(audio, context=audio_neg_ctx) if audio is not None else None
neg_video, neg_audio = x0_model(video=video_neg, audio=audio_neg, perturbations=None)
- if not video_frozen and denoised_video is not None:
- denoised_video = denoised_video + cfg_guider.delta(pos_video, neg_video)
- if not audio_frozen and denoised_audio is not None:
- denoised_audio = denoised_audio + cfg_guider.delta(pos_audio, neg_audio)
-
# STG
+ stg_perturbation_config = self._build_stg_perturbation_config(
+ video_enabled=video is not None and video_guider.do_perturbed_generation(),
+ audio_enabled=audio is not None and audio_guider.do_perturbed_generation(),
+ stg_blocks=cfg.stg_blocks,
+ num_blocks=transformer.num_blocks,
+ device=device,
+ dtype=transformer_dtype,
+ )
if stg_perturbation_config is not None:
ptb_video, ptb_audio = x0_model(video=video, audio=audio, perturbations=stg_perturbation_config)
- if not video_frozen and denoised_video is not None:
- denoised_video = denoised_video + stg_guider.delta(pos_video, ptb_video)
- if not audio_frozen and denoised_audio is not None and ptb_audio is not None:
- denoised_audio = denoised_audio + stg_guider.delta(pos_audio, ptb_audio)
+
+ # Modality guidance
+ if (video is not None and video_guider.do_isolated_modality_generation()) or (
+ audio is not None and audio_guider.do_isolated_modality_generation()
+ ):
+ mod_perturbation_config = self._build_modality_perturbation_config(
+ transformer.num_blocks, device, transformer_dtype
+ )
+ mod_video, mod_audio = x0_model(video=video, audio=audio, perturbations=mod_perturbation_config)
+
+ denoised_video, denoised_audio = pos_video, pos_audio
+ if not video_frozen and pos_video is not None:
+ denoised_video = video_guider.calculate(pos_video, neg_video, ptb_video, mod_video)
+ if not audio_frozen and pos_audio is not None:
+ denoised_audio = audio_guider.calculate(pos_audio, neg_audio, ptb_audio, mod_audio)
# Re-apply conditioning mask
if denoised_video is not None and video_clean is not None:
@@ -871,13 +1002,36 @@ class ValidationRunner:
self._vae_decoder.to(device)
latent = video_state.latent.to(dtype=torch.bfloat16)
- chunks = list(self._vae_decoder.tiled_decode(latent, tiling_config=_DEFAULT_TILING))
+ tiling_config = self._decode_tiling_config(latent, device)
+ chunks = list(self._vae_decoder.tiled_decode(latent, tiling_config=tiling_config))
decoded_video = torch.cat(chunks, dim=2)
decoded_video = ((decoded_video + 1.0) / 2.0).clamp(0.0, 1.0)
self._vae_decoder.to("cpu")
return decoded_video[0].float().cpu()
+ def _decode_tiling_config(self, latent: Tensor, device: torch.device) -> TileSizeConfig:
+ """Pick the tile layout for decoding ``latent``; the decoder family decides how.
+ The diffusion decoder derives its overlaps from its stage-4/5 receptive fields and sizes
+ tiles against free VRAM, and it *rejects* any config whose overlaps fall below that halo.
+ ``_DEFAULT_TILING``'s do, so it only applies to the convolutional decoder. This mirrors
+ what the inference pipelines do, so validation decodes the way inference will.
+ """
+ if self._diffvae_tiling_kwargs is None:
+ return _DEFAULT_TILING
+
+ scale = self._video_scale_factors
+ _, _, latent_frames, latent_height, latent_width = latent.shape
+ return recommended_decode_tiling_config(
+ **self._diffvae_tiling_kwargs,
+ height=latent_height * scale.height,
+ width=latent_width * scale.width,
+ num_frames=(latent_frames - 1) * scale.time + 1,
+ # Matches the ModuleOps that load_video_vae_decoder applies to the diffusion decoder.
+ mode=DiffVAEMode.CHUNKED_EAGER,
+ free_bytes=cuda_activation_budget_bytes(device) if device.type == "cuda" else 0,
+ )
+
def _decode_audio(self, audio_state: LatentState, device: torch.device) -> Tensor:
"""Decode audio latents to waveform via audio VAE + vocoder."""
self._audio_decoder.to(device)
@@ -932,8 +1086,8 @@ class ValidationRunner:
audio_encoder.to("cpu")
return latent.cpu()
- @staticmethod
def _load_and_downsample_mask(
+ self,
mask_path: str | Path,
target_width: int,
target_height: int,
@@ -943,9 +1097,7 @@ class ValidationRunner:
Returns a binary float tensor of shape [1, F', H', W'] where F', H', W' are
the latent-space dimensions corresponding to the target video dims.
"""
- from ltx_core.types import SpatioTemporalScaleFactors # noqa: PLC0415
-
- sf = SpatioTemporalScaleFactors.default()
+ sf = self._video_scale_factors
latent_f = (target_num_frames - 1) // sf.time + 1
mask_path = Path(mask_path)
@@ -1015,9 +1167,9 @@ class ValidationRunner:
)
return VideoLatentTools(
patchifier=self._video_patchifier,
- target_shape=VideoLatentShape.from_pixel_shape(shape=pixel_shape),
+ target_shape=VideoLatentShape.from_pixel_shape(shape=pixel_shape, scale_factors=self._video_scale_factors),
fps=self._config.frame_rate,
- scale_factors=VIDEO_SCALE_FACTORS,
+ scale_factors=self._video_scale_factors,
causal_fix=True,
)
@@ -1061,9 +1213,55 @@ class ValidationRunner:
"""Blend denoised output with clean latent according to the denoise mask."""
return (denoised * denoise_mask + clean_latent.float() * (1 - denoise_mask)).to(denoised.dtype)
+ @staticmethod
+ def _resolve_video_guider_params(
+ cfg: ValidationConfig,
+ *,
+ video_frozen: bool,
+ audio_present: bool,
+ ) -> MultiModalGuiderParams:
+ """Resolve video guider params for the current validation sample.
+ Frozen conditioning video (V2A) and video-only runs without an audio branch use a
+ neutral guider, matching ``a2vid_two_stage`` / ``t2a_one_stage`` pipeline call-site patterns.
+ """
+ if video_frozen:
+ return MultiModalGuiderParams()
+ modality_scale = cfg.video_modality_guidance_scale if audio_present else 1.0
+ return MultiModalGuiderParams(
+ cfg_scale=cfg.video_cfg_scale,
+ stg_scale=cfg.video_stg_scale,
+ stg_blocks=cfg.stg_blocks,
+ rescale_scale=cfg.guidance_rescale,
+ modality_scale=modality_scale,
+ )
+
+ @staticmethod
+ def _resolve_audio_guider_params(
+ cfg: ValidationConfig,
+ *,
+ audio_frozen: bool,
+ video_present: bool,
+ ) -> MultiModalGuiderParams:
+ """Resolve audio guider params for the current validation sample.
+ Frozen conditioning audio (A2V) uses a neutral guider, matching ``a2vid_two_stage``.
+ Audio-only runs without a video branch disable cross-modal guidance (``t2a_one_stage``).
+ """
+ if audio_frozen:
+ return MultiModalGuiderParams()
+ modality_scale = cfg.audio_modality_guidance_scale if video_present else 1.0
+ return MultiModalGuiderParams(
+ cfg_scale=cfg.audio_cfg_scale,
+ stg_scale=cfg.audio_stg_scale,
+ stg_blocks=cfg.stg_blocks,
+ rescale_scale=cfg.guidance_rescale,
+ modality_scale=modality_scale,
+ )
+
@staticmethod
def _modality_from_latent_state(state: LatentState, context: Tensor, sigma: Tensor) -> Modality:
"""Build a Modality object from a LatentState, text context, and sigma."""
+ if state.frozen:
+ sigma = torch.zeros_like(sigma)
return Modality(
enabled=True,
latent=state.latent,
@@ -1072,22 +1270,39 @@ class ValidationRunner:
positions=state.positions,
context=context,
context_mask=None,
+ keyframes_mask=state.keyframes_mask,
)
@staticmethod
def _build_stg_perturbation_config(
+ video_enabled: bool,
+ audio_enabled: bool,
stg_blocks: list[int] | None,
- stg_mode: Literal["stg_av", "stg_v"],
num_blocks: int,
device: torch.device,
dtype: torch.dtype,
- ) -> BatchedPerturbationConfig:
+ ) -> BatchedPerturbationConfig | None:
"""Build STG perturbation config that skips self-attention in the specified blocks."""
+ perturbations: list[Perturbation] = []
+ if video_enabled:
+ perturbations.append(Perturbation(type=PerturbationType.SKIP_VIDEO_SELF_ATTN, blocks=stg_blocks))
+ if audio_enabled:
+ perturbations.append(Perturbation(type=PerturbationType.SKIP_AUDIO_SELF_ATTN, blocks=stg_blocks))
+ if not perturbations:
+ return None
+ return BatchedPerturbationConfig([PerturbationConfig(perturbations=perturbations)], num_blocks, device, dtype)
+
+ @staticmethod
+ def _build_modality_perturbation_config(
+ num_blocks: int,
+ device: torch.device,
+ dtype: torch.dtype,
+ ) -> BatchedPerturbationConfig:
+ """Build modality guidance perturbations that isolate cross-modal attention."""
perturbations: list[Perturbation] = [
- Perturbation(type=PerturbationType.SKIP_VIDEO_SELF_ATTN, blocks=stg_blocks)
+ Perturbation(type=PerturbationType.SKIP_A2V_CROSS_ATTN, blocks=None),
+ Perturbation(type=PerturbationType.SKIP_V2A_CROSS_ATTN, blocks=None),
]
- if stg_mode == "stg_av":
- perturbations.append(Perturbation(type=PerturbationType.SKIP_AUDIO_SELF_ATTN, blocks=stg_blocks))
return BatchedPerturbationConfig([PerturbationConfig(perturbations=perturbations)], num_blocks, device, dtype)
@staticmethod
@@ -1138,21 +1353,28 @@ class ValidationRunner:
video: Tensor,
target_height: int,
target_width: int,
+ scale_factors: SpatioTemporalScaleFactors,
downscale_factor: int = 1,
temporal_scale_factor: int = 1,
) -> tuple[Tensor, Tensor]:
"""Preprocess reference video. Returns (preprocessed [-1,1], pixels [0,1])."""
+ if target_height % downscale_factor != 0 or target_width % downscale_factor != 0:
+ raise ValueError(
+ f"Reference target dimensions ({target_height}x{target_width}) must be evenly divisible by "
+ f"downscale_factor ({downscale_factor})."
+ )
ref_height = target_height // downscale_factor
ref_width = target_width // downscale_factor
- if ref_height % 32 != 0 or ref_width % 32 != 0:
+ if ref_height % scale_factors.height != 0 or ref_width % scale_factors.width != 0:
raise ValueError(
- f"Scaled reference dimensions ({ref_height}x{ref_width}) must be divisible by 32. "
- f"Original: {target_height}x{target_width}, downscale_factor: {downscale_factor}"
+ f"Scaled reference dimensions ({ref_height}x{ref_width}) must be divisible by the VAE "
+ f"spatial factor ({scale_factors.height}). Original: {target_height}x{target_width}, "
+ f"downscale_factor: {downscale_factor}"
)
video = ValidationRunner._resize_and_center_crop(video, ref_height, ref_width)
video = rearrange(video, "f c h w -> 1 c f h w")
- valid_frames = (video.shape[2] - 1) // 8 * 8 + 1
+ valid_frames = (video.shape[2] - 1) // scale_factors.time * scale_factors.time + 1
video = video[:, :, :valid_frames]
# VAE-aligned temporal subsampling: keep frame 0, then every Nth frame
@@ -1168,13 +1390,16 @@ class ValidationRunner:
def _encode_video(video: Tensor, vae_encoder: torch.nn.Module, device: torch.device) -> Tensor:
"""Encode a [B, C, F, H, W] video tensor through the VAE. Returns latent on CPU."""
vae_encoder.to(device)
- latent = vae_encoder.tiled_encode(video.to(dtype=torch.bfloat16), TilingConfig.default())
+ latent = vae_encoder.tiled_encode(video.to(dtype=torch.bfloat16), TileSizeConfig.default())
vae_encoder.to("cpu")
return latent.cpu()
def _build_spatial_crop_mask(
- region: tuple[int, int, int, int], target_shape: VideoLatentShape, device: torch.device
+ region: tuple[int, int, int, int],
+ target_shape: VideoLatentShape,
+ device: torch.device,
+ scale_factors: SpatioTemporalScaleFactors,
) -> Tensor:
"""Build a binary mask from a pixel-space spatial region (y1, x1, y2, x2)."""
y1, x1, y2, x2 = region
@@ -1183,10 +1408,10 @@ def _build_spatial_crop_mask(
def to_latent(v: int, scale: int, max_v: int) -> int:
return max(0, min(v // scale, max_v))
- ly1 = to_latent(y1, VIDEO_SCALE_FACTORS.height, height)
- ly2 = to_latent(y2, VIDEO_SCALE_FACTORS.height, height)
- lx1 = to_latent(x1, VIDEO_SCALE_FACTORS.width, width)
- lx2 = to_latent(x2, VIDEO_SCALE_FACTORS.width, width)
+ ly1 = to_latent(y1, scale_factors.height, height)
+ ly2 = to_latent(y2, scale_factors.height, height)
+ lx1 = to_latent(x1, scale_factors.width, width)
+ lx2 = to_latent(x2, scale_factors.width, width)
spatial_mask = torch.zeros(height, width, dtype=torch.float32, device=device)
spatial_mask[ly1:ly2, lx1:lx2] = 1.0
diff --git a/packages/ltx-trainer/templates/model_card.md b/packages/ltx-trainer/templates/model_card.md
index accb8c4..d949569 100644
--- a/packages/ltx-trainer/templates/model_card.md
+++ b/packages/ltx-trainer/templates/model_card.md
@@ -32,7 +32,7 @@ This is a fine-tuned version of [`{base_model}`]({base_model_link}) trained on c
## Usage
-This model is designed to be used with the LTX-2 (Lightricks Audio-Video) pipeline.
+This model is designed to be used with the matching LTX family pipeline.
### 🔌 Using Trained LoRAs in ComfyUI
@@ -56,4 +56,4 @@ This model inherits the license of the base model ([`{base_model}`]({base_model_
## Acknowledgments
- Base model: [Lightricks](https://huggingface.co/Lightricks/LTX-2)
-- Trainer: [LTX-2](https://github.com/Lightricks/LTX-2)
+- Trainer: [LTX Trainer](https://github.com/Lightricks/LTX-2/tree/main/packages/ltx-trainer)
diff --git a/pyproject.toml b/pyproject.toml
index 85210f5..817a864 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,6 +5,11 @@ ltx-kernels = { path = "packages/ltx-kernels", editable = true }
[tool.uv]
no-build-isolation-package = ["ltx-kernels"]
+# torch 2.13+cu132 pins nvidia-cudnn-cu13==9.20.0.48, which omits
+# libcudnn_engines_tensor_ir; the system/apt cuDNN is 9.21.1 and that soname
+# then resolves from /usr/lib, causing CUDNN_STATUS_SUBLIBRARY_VERSION_MISMATCH.
+# Force a wheel that ships tensor_ir and matches the host cuDNN series.
+override-dependencies = ["nvidia-cudnn-cu13==9.21.1.3"]
[tool.uv.workspace]
members = ["packages/*"]
@@ -23,6 +28,12 @@ dev = [
"pre-commit>=4.3.0",
"ruff>=0.14.3",
"pytest~=9.0",
+ # Match torch's cu132 index (see packages/ltx-core pyproject): kernel builds must use
+ # the venv nvcc, not a mismatched system toolkit (CI runners often ship CUDA 12.8).
+ # `cccl` provides <nv/target> (pulled by cuda_fp16.h); `nvcc` alone is not enough.
+ "cuda-toolkit[nvcc,cccl]==13.2.*; sys_platform == 'linux'",
+ "nvidia-cuda-nvcc==13.2.*; sys_platform == 'linux'",
+ "nvidia-cuda-cccl==13.2.*; sys_platform == 'linux'",
]
# Opt-in compiled CUDA kernels (blockwise FP8/FP6 GEMM + multi-GPU all2all), built
# editable from packages/ltx-kernels without build isolation (torch must already be
@@ -77,6 +88,35 @@ ignore = [
# CI gates: stand-alone CLIs whose whole job is printing a report / GitHub annotations.
".github/actions/test-collection-completeness/check_test_collection.py" = ["T201"]
".github/actions/golden-pairing-gate/check_golden_pairing.py" = ["T201"]
+# Emits `export …` lines for eval by kernels-build.
+".github/actions/kernels-build/export_cuda_home.py" = ["T201"]
+# setup.py must set CUDA_HOME before importing torch.utils.cpp_extension.
+"packages/ltx-kernels/setup.py" = ["E402"]
+# Tests for the CuTe DSL kernels. ltx-kernels is an optional, CUDA-host-only install,
+# so importing it at module level would turn "skipped" into a collection error wherever
+# it is absent -- which is most of CI.
+"packages/ltx-kernels/tests/test_vae_*.py" = ["PLC0415"]
+"packages/ltx-core/tests/**/test_dsl_kernels.py" = ["PLC0415"]
+# NVFP4 tests ``importorskip("ltx_kernels")`` before importing convert/linear/fuse
+# (which import the extension at module top level).
+"packages/ltx-core/tests/ltx_core/quantization/nvfp4/test_*.py" = ["E402"]
+# CuTe DSL kernels. Device-side code written in CUTLASS's own idiom: tensor-algebra
+# names are conventionally uppercase (M, T, H, W, NH, TILER_N128), a `@cute.kernel`
+# entry point takes one parameter per compile-time constant, and its arguments are
+# DSL handles with no meaningful Python annotation. Formatting and everything else
+# is still enforced.
+"packages/ltx-kernels/src/ltx_kernels/vae/*.py" = [
+ "ANN001", # Missing type annotation for function argument
+ "ANN201", # Missing return type annotation for public function
+ "ANN202", # Missing return type annotation for private function
+ "N803", # Argument name should be lowercase
+ "N806", # Variable in function should be lowercase
+ "PLR0402", # `import cutlass.cute as cute` -- the conventional CuTe spelling
+ "PLR0912", # Too many branches
+ "PLR0913", # Too many arguments
+ "PLR0915", # Too many statements
+ "PLR1730", # `if a > b: a = b` -- a device-value clamp, not a Python min()
+]
[tool.ruff.lint.pylint]
max-args = 10
diff --git a/uv.lock b/uv.lock
deleted file mode 100644
index 6f66517..0000000
--- a/uv.lock
+++ /dev/null
@@ -1,3975 +0,0 @@
-version = 1
-revision = 3
-requires-python = ">=3.10"
-resolution-markers = [
- "python_full_version >= '3.13' and sys_platform == 'linux'",
- "python_full_version == '3.12.*' and sys_platform == 'linux'",
- "python_full_version == '3.11.*' and sys_platform == 'linux'",
- "python_full_version < '3.11' and sys_platform == 'linux'",
- "python_full_version >= '3.13' and sys_platform != 'linux'",
- "python_full_version == '3.12.*' and sys_platform != 'linux'",
- "python_full_version == '3.11.*' and sys_platform != 'linux'",
- "python_full_version < '3.11' and sys_platform != 'linux'",
-]
-
-[manifest]
-members = [
- "ltx-core",
- "ltx-pipelines",
- "ltx-trainer",
-]
-
-[manifest.dependency-groups]
-dev = [
- { name = "google-cloud-storage", specifier = ">=2.0" },
- { name = "matplotlib", specifier = ">=3.7" },
- { name = "pre-commit", specifier = ">=4.3.0" },
- { name = "pytest", specifier = "~=9.0" },
- { name = "ruff", specifier = ">=0.14.3" },
-]
-kernels = [{ name = "ltx-kernels", editable = "packages/ltx-kernels" }]
-
-[[package]]
-name = "accelerate"
-version = "1.12.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "huggingface-hub" },
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "packaging" },
- { name = "psutil" },
- { name = "pyyaml" },
- { name = "safetensors" },
- { name = "torch", version = "2.9.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
- { name = "torch", version = "2.12.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/4a/8e/ac2a9566747a93f8be36ee08532eb0160558b07630a081a6056a9f89bf1d/accelerate-1.12.0.tar.gz", hash = "sha256:70988c352feb481887077d2ab845125024b2a137a5090d6d7a32b57d03a45df6", size = 398399, upload-time = "2025-11-21T11:27:46.973Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/9f/d2/c581486aa6c4fbd7394c23c47b83fa1a919d34194e16944241daf9e762dd/accelerate-1.12.0-py3-none-any.whl", hash = "sha256:3e2091cd341423207e2f084a6654b1efcd250dc326f2a37d6dde446e07cabb11", size = 380935, upload-time = "2025-11-21T11:27:44.522Z" },
-]
-
-[[package]]
-name = "annotated-types"
-version = "0.7.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081, upload-time = "2024-05-20T21:33:25.928Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" },
-]
-
-[[package]]
-name = "anyio"
-version = "4.12.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "exceptiongroup", marker = "python_full_version < '3.11'" },
- { name = "idna" },
- { name = "typing-extensions", marker = "python_full_version < '3.13'" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/96/f0/5eb65b2bb0d09ac6776f2eb54adee6abe8228ea05b20a5ad0e4945de8aac/anyio-4.12.1.tar.gz", hash = "sha256:41cfcc3a4c85d3f05c932da7c26d0201ac36f72abd4435ba90d0464a3ffed703", size = 228685, upload-time = "2026-01-06T11:45:21.246Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/38/0e/27be9fdef66e72d64c0cdc3cc2823101b80585f8119b5c112c2e8f5f7dab/anyio-4.12.1-py3-none-any.whl", hash = "sha256:d405828884fc140aa80a3c667b8beed277f1dfedec42ba031bd6ac3db606ab6c", size = 113592, upload-time = "2026-01-06T11:45:19.497Z" },
-]
-
-[[package]]
-name = "av"
-version = "16.1.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/78/cd/3a83ffbc3cc25b39721d174487fb0d51a76582f4a1703f98e46170ce83d4/av-16.1.0.tar.gz", hash = "sha256:a094b4fd87a3721dacf02794d3d2c82b8d712c85b9534437e82a8a978c175ffd", size = 4285203, upload-time = "2026-01-11T07:31:33.772Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/97/51/2217a9249409d2e88e16e3f16f7c0def9fd3e7ffc4238b2ec211f9935bdb/av-16.1.0-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:2395748b0c34fe3a150a1721e4f3d4487b939520991b13e7b36f8926b3b12295", size = 26942590, upload-time = "2026-01-09T20:17:58.588Z" },
- { url = "https://files.pythonhosted.org/packages/bf/cd/a7070f4febc76a327c38808e01e2ff6b94531fe0b321af54ea3915165338/av-16.1.0-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:72d7ac832710a158eeb7a93242370aa024a7646516291c562ee7f14a7ea881fd", size = 21507910, upload-time = "2026-01-09T20:18:02.309Z" },
- { url = "https://files.pythonhosted.org/packages/ae/30/ec812418cd9b297f0238fe20eb0747d8a8b68d82c5f73c56fe519a274143/av-16.1.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:6cbac833092e66b6b0ac4d81ab077970b8ca874951e9c3974d41d922aaa653ed", size = 38738309, upload-time = "2026-01-09T20:18:04.701Z" },
- { url = "https://files.pythonhosted.org/packages/3a/b8/6c5795bf1f05f45c5261f8bce6154e0e5e86b158a6676650ddd77c28805e/av-16.1.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:eb990672d97c18f99c02f31c8d5750236f770ffe354b5a52c5f4d16c5e65f619", size = 40293006, upload-time = "2026-01-09T20:18:07.238Z" },
- { url = "https://files.pythonhosted.org/packages/a7/44/5e183bcb9333fc3372ee6e683be8b0c9b515a506894b2d32ff465430c074/av-16.1.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:05ad70933ac3b8ef896a820ea64b33b6cca91a5fac5259cb9ba7fa010435be15", size = 40123516, upload-time = "2026-01-09T20:18:09.955Z" },
- { url = "https://files.pythonhosted.org/packages/12/1d/b5346d582a3c3d958b4d26a2cc63ce607233582d956121eb20d2bbe55c2e/av-16.1.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:d831a1062a3c47520bf99de6ec682bd1d64a40dfa958e5457bb613c5270e7ce3", size = 41463289, upload-time = "2026-01-09T20:18:12.459Z" },
- { url = "https://files.pythonhosted.org/packages/fa/31/acc946c0545f72b8d0d74584cb2a0ade9b7dfe2190af3ef9aa52a2e3c0b1/av-16.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:358ab910fef3c5a806c55176f2b27e5663b33c4d0a692dafeb049c6ed71f8aff", size = 31754959, upload-time = "2026-01-09T20:18:14.718Z" },
- { url = "https://files.pythonhosted.org/packages/48/d0/b71b65d1b36520dcb8291a2307d98b7fc12329a45614a303ff92ada4d723/av-16.1.0-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:e88ad64ee9d2b9c4c5d891f16c22ae78e725188b8926eb88187538d9dd0b232f", size = 26927747, upload-time = "2026-01-09T20:18:16.976Z" },
- { url = "https://files.pythonhosted.org/packages/2f/79/720a5a6ccdee06eafa211b945b0a450e3a0b8fc3d12922f0f3c454d870d2/av-16.1.0-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:cb296073fa6935724de72593800ba86ae49ed48af03960a4aee34f8a611f442b", size = 21492232, upload-time = "2026-01-09T20:18:19.266Z" },
- { url = "https://files.pythonhosted.org/packages/8e/4f/a1ba8d922f2f6d1a3d52419463ef26dd6c4d43ee364164a71b424b5ae204/av-16.1.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:720edd4d25aa73723c1532bb0597806d7b9af5ee34fc02358782c358cfe2f879", size = 39291737, upload-time = "2026-01-09T20:18:21.513Z" },
- { url = "https://files.pythonhosted.org/packages/1a/31/fc62b9fe8738d2693e18d99f040b219e26e8df894c10d065f27c6b4f07e3/av-16.1.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:c7f2bc703d0df260a1fdf4de4253c7f5500ca9fc57772ea241b0cb241bcf972e", size = 40846822, upload-time = "2026-01-09T20:18:24.275Z" },
- { url = "https://files.pythonhosted.org/packages/53/10/ab446583dbce730000e8e6beec6ec3c2753e628c7f78f334a35cad0317f4/av-16.1.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d69c393809babada7d54964d56099e4b30a3e1f8b5736ca5e27bd7be0e0f3c83", size = 40675604, upload-time = "2026-01-09T20:18:26.866Z" },
- { url = "https://files.pythonhosted.org/packages/31/d7/1003be685277005f6d63fd9e64904ee222fe1f7a0ea70af313468bb597db/av-16.1.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:441892be28582356d53f282873c5a951592daaf71642c7f20165e3ddcb0b4c63", size = 42015955, upload-time = "2026-01-09T20:18:29.461Z" },
- { url = "https://files.pythonhosted.org/packages/2f/4a/fa2a38ee9306bf4579f556f94ecbc757520652eb91294d2a99c7cf7623b9/av-16.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:273a3e32de64819e4a1cd96341824299fe06f70c46f2288b5dc4173944f0fd62", size = 31750339, upload-time = "2026-01-09T20:18:32.249Z" },
- { url = "https://files.pythonhosted.org/packages/9c/84/2535f55edcd426cebec02eb37b811b1b0c163f26b8d3f53b059e2ec32665/av-16.1.0-cp312-cp312-macosx_11_0_x86_64.whl", hash = "sha256:640f57b93f927fba8689f6966c956737ee95388a91bd0b8c8b5e0481f73513d6", size = 26945785, upload-time = "2026-01-09T20:18:34.486Z" },
- { url = "https://files.pythonhosted.org/packages/b6/17/ffb940c9e490bf42e86db4db1ff426ee1559cd355a69609ec1efe4d3a9eb/av-16.1.0-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:ae3fb658eec00852ebd7412fdc141f17f3ddce8afee2d2e1cf366263ad2a3b35", size = 21481147, upload-time = "2026-01-09T20:18:36.716Z" },
- { url = "https://files.pythonhosted.org/packages/15/c1/e0d58003d2d83c3921887d5c8c9b8f5f7de9b58dc2194356a2656a45cfdc/av-16.1.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:27ee558d9c02a142eebcbe55578a6d817fedfde42ff5676275504e16d07a7f86", size = 39517197, upload-time = "2026-01-11T09:57:31.937Z" },
- { url = "https://files.pythonhosted.org/packages/32/77/787797b43475d1b90626af76f80bfb0c12cfec5e11eafcfc4151b8c80218/av-16.1.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:7ae547f6d5fa31763f73900d43901e8c5fa6367bb9a9840978d57b5a7ae14ed2", size = 41174337, upload-time = "2026-01-11T09:57:35.792Z" },
- { url = "https://files.pythonhosted.org/packages/8e/ac/d90df7f1e3b97fc5554cf45076df5045f1e0a6adf13899e10121229b826c/av-16.1.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8cf065f9d438e1921dc31fc7aa045790b58aee71736897866420d80b5450f62a", size = 40817720, upload-time = "2026-01-11T09:57:39.039Z" },
- { url = "https://files.pythonhosted.org/packages/80/6f/13c3a35f9dbcebafd03fe0c4cbd075d71ac8968ec849a3cfce406c35a9d2/av-16.1.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a345877a9d3cc0f08e2bc4ec163ee83176864b92587afb9d08dff50f37a9a829", size = 42267396, upload-time = "2026-01-11T09:57:42.115Z" },
- { url = "https://files.pythonhosted.org/packages/c8/b9/275df9607f7fb44317ccb1d4be74827185c0d410f52b6e2cd770fe209118/av-16.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:f49243b1d27c91cd8c66fdba90a674e344eb8eb917264f36117bf2b6879118fd", size = 31752045, upload-time = "2026-01-11T09:57:45.106Z" },
- { url = "https://files.pythonhosted.org/packages/75/2a/63797a4dde34283dd8054219fcb29294ba1c25d68ba8c8c8a6ae53c62c45/av-16.1.0-cp313-cp313-macosx_11_0_x86_64.whl", hash = "sha256:ce2a1b3d8bf619f6c47a9f28cfa7518ff75ddd516c234a4ee351037b05e6a587", size = 26916715, upload-time = "2026-01-11T09:57:47.682Z" },
- { url = "https://files.pythonhosted.org/packages/d2/c4/0b49cf730d0ae8cda925402f18ae814aef351f5772d14da72dd87ff66448/av-16.1.0-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:408dbe6a2573ca58a855eb8cd854112b33ea598651902c36709f5f84c991ed8e", size = 21452167, upload-time = "2026-01-11T09:57:50.606Z" },
- { url = "https://files.pythonhosted.org/packages/51/23/408806503e8d5d840975aad5699b153aaa21eb6de41ade75248a79b7a37f/av-16.1.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:57f657f86652a160a8a01887aaab82282f9e629abf94c780bbdbb01595d6f0f7", size = 39215659, upload-time = "2026-01-11T09:57:53.757Z" },
- { url = "https://files.pythonhosted.org/packages/c4/19/a8528d5bba592b3903f44c28dab9cc653c95fcf7393f382d2751a1d1523e/av-16.1.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:adbad2b355c2ee4552cac59762809d791bda90586d134a33c6f13727fb86cb3a", size = 40874970, upload-time = "2026-01-11T09:57:56.802Z" },
- { url = "https://files.pythonhosted.org/packages/e8/24/2dbcdf0e929ad56b7df078e514e7bd4ca0d45cba798aff3c8caac097d2f7/av-16.1.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f42e1a68ec2aebd21f7eb6895be69efa6aa27eec1670536876399725bbda4b99", size = 40530345, upload-time = "2026-01-11T09:58:00.421Z" },
- { url = "https://files.pythonhosted.org/packages/54/27/ae91b41207f34e99602d1c72ab6ffd9c51d7c67e3fbcd4e3a6c0e54f882c/av-16.1.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:58fe47aeaef0f100c40ec8a5de9abbd37f118d3ca03829a1009cf288e9aef67c", size = 41972163, upload-time = "2026-01-11T09:58:03.756Z" },
- { url = "https://files.pythonhosted.org/packages/fc/7a/22158fb923b2a9a00dfab0e96ef2e8a1763a94dd89e666a5858412383d46/av-16.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:565093ebc93b2f4b76782589564869dadfa83af5b852edebedd8fee746457d06", size = 31729230, upload-time = "2026-01-11T09:58:07.254Z" },
- { url = "https://files.pythonhosted.org/packages/7f/f1/878f8687d801d6c4565d57ebec08449c46f75126ebca8e0fed6986599627/av-16.1.0-cp313-cp313t-macosx_11_0_x86_64.whl", hash = "sha256:574081a24edb98343fd9f473e21ae155bf61443d4ec9d7708987fa597d6b04b2", size = 27008769, upload-time = "2026-01-11T09:58:10.266Z" },
- { url = "https://files.pythonhosted.org/packages/30/f1/bd4ce8c8b5cbf1d43e27048e436cbc9de628d48ede088a1d0a993768eb86/av-16.1.0-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:9ab00ea29c25ebf2ea1d1e928d7babb3532d562481c5d96c0829212b70756ad0", size = 21590588, upload-time = "2026-01-11T09:58:12.629Z" },
- { url = "https://files.pythonhosted.org/packages/1d/dd/c81f6f9209201ff0b5d5bed6da6c6e641eef52d8fbc930d738c3f4f6f75d/av-16.1.0-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:a84a91188c1071f238a9523fd42dbe567fb2e2607b22b779851b2ce0eac1b560", size = 40638029, upload-time = "2026-01-11T09:58:15.399Z" },
- { url = "https://files.pythonhosted.org/packages/15/4d/07edff82b78d0459a6e807e01cd280d3180ce832efc1543de80d77676722/av-16.1.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:c2cd0de4dd022a7225ff224fde8e7971496d700be41c50adaaa26c07bb50bf97", size = 41970776, upload-time = "2026-01-11T09:58:19.075Z" },
- { url = "https://files.pythonhosted.org/packages/da/9d/1f48b354b82fa135d388477cd1b11b81bdd4384bd6a42a60808e2ec2d66b/av-16.1.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:0816143530624a5a93bc5494f8c6eeaf77549b9366709c2ac8566c1e9bff6df5", size = 41764751, upload-time = "2026-01-11T09:58:22.788Z" },
- { url = "https://files.pythonhosted.org/packages/2f/c7/a509801e98db35ec552dd79da7bdbcff7104044bfeb4c7d196c1ce121593/av-16.1.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:e3a28053af29644696d0c007e897d19b1197585834660a54773e12a40b16974c", size = 43034355, upload-time = "2026-01-11T09:58:26.125Z" },
- { url = "https://files.pythonhosted.org/packages/36/8b/e5f530d9e8f640da5f5c5f681a424c65f9dd171c871cd255d8a861785a6e/av-16.1.0-cp313-cp313t-win_amd64.whl", hash = "sha256:2e3e67144a202b95ed299d165232533989390a9ea3119d37eccec697dc6dbb0c", size = 31947047, upload-time = "2026-01-11T09:58:31.867Z" },
- { url = "https://files.pythonhosted.org/packages/df/18/8812221108c27d19f7e5f486a82c827923061edf55f906824ee0fcaadf50/av-16.1.0-cp314-cp314-macosx_11_0_x86_64.whl", hash = "sha256:39a634d8e5a87e78ea80772774bfd20c0721f0d633837ff185f36c9d14ffede4", size = 26916179, upload-time = "2026-01-11T09:58:36.506Z" },
- { url = "https://files.pythonhosted.org/packages/38/ef/49d128a9ddce42a2766fe2b6595bd9c49e067ad8937a560f7838a541464e/av-16.1.0-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:0ba32fb9e9300948a7fa9f8a3fc686e6f7f77599a665c71eb2118fdfd2c743f9", size = 21460168, upload-time = "2026-01-11T09:58:39.231Z" },
- { url = "https://files.pythonhosted.org/packages/e6/a9/b310d390844656fa74eeb8c2750e98030877c75b97551a23a77d3f982741/av-16.1.0-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:ca04d17815182d34ce3edc53cbda78a4f36e956c0fd73e3bab249872a831c4d7", size = 39210194, upload-time = "2026-01-11T09:58:42.138Z" },
- { url = "https://files.pythonhosted.org/packages/0c/7b/e65aae179929d0f173af6e474ad1489b5b5ad4c968a62c42758d619e54cf/av-16.1.0-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:ee0e8de2e124a9ef53c955fe2add6ee7c56cc8fd83318265549e44057db77142", size = 40811675, upload-time = "2026-01-11T09:58:45.871Z" },
- { url = "https://files.pythonhosted.org/packages/54/3f/5d7edefd26b6a5187d6fac0f5065ee286109934f3dea607ef05e53f05b31/av-16.1.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:22bf77a2f658827043a1e184b479c3bf25c4c43ab32353677df2d119f080e28f", size = 40543942, upload-time = "2026-01-11T09:58:49.759Z" },
- { url = "https://files.pythonhosted.org/packages/1b/24/f8b17897b67be0900a211142f5646a99d896168f54d57c81f3e018853796/av-16.1.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2dd419d262e6a71cab206d80bbf28e0a10d0f227b671cdf5e854c028faa2d043", size = 41924336, upload-time = "2026-01-11T09:58:53.344Z" },
- { url = "https://files.pythonhosted.org/packages/1c/cf/d32bc6bbbcf60b65f6510c54690ed3ae1c4ca5d9fafbce835b6056858686/av-16.1.0-cp314-cp314-win_amd64.whl", hash = "sha256:53585986fd431cd436f290fba662cfb44d9494fbc2949a183de00acc5b33fa88", size = 31735077, upload-time = "2026-01-11T09:58:56.684Z" },
- { url = "https://files.pythonhosted.org/packages/53/f4/9b63dc70af8636399bd933e9df4f3025a0294609510239782c1b746fc796/av-16.1.0-cp314-cp314t-macosx_11_0_x86_64.whl", hash = "sha256:76f5ed8495cf41e1209a5775d3699dc63fdc1740b94a095e2485f13586593205", size = 27014423, upload-time = "2026-01-11T09:58:59.703Z" },
- { url = "https://files.pythonhosted.org/packages/d1/da/787a07a0d6ed35a0888d7e5cfb8c2ffa202f38b7ad2c657299fac08eb046/av-16.1.0-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:8d55397190f12a1a3ae7538be58c356cceb2bf50df1b33523817587748ce89e5", size = 21595536, upload-time = "2026-01-11T09:59:02.508Z" },
- { url = "https://files.pythonhosted.org/packages/d8/f4/9a7d8651a611be6e7e3ab7b30bb43779899c8cac5f7293b9fb634c44a3f3/av-16.1.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:9d51d9037437218261b4bbf9df78a95e216f83d7774fbfe8d289230b5b2e28e2", size = 40642490, upload-time = "2026-01-11T09:59:05.842Z" },
- { url = "https://files.pythonhosted.org/packages/6b/e4/eb79bc538a94b4ff93cd4237d00939cba797579f3272490dd0144c165a21/av-16.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:0ce07a89c15644407f49d942111ca046e323bbab0a9078ff43ee57c9b4a50dad", size = 41976905, upload-time = "2026-01-11T09:59:09.169Z" },
- { url = "https://files.pythonhosted.org/packages/5e/f5/f6db0dd86b70167a4d55ee0d9d9640983c570d25504f2bde42599f38241e/av-16.1.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:cac0c074892ea97113b53556ff41c99562db7b9f09f098adac1f08318c2acad5", size = 41770481, upload-time = "2026-01-11T09:59:12.74Z" },
- { url = "https://files.pythonhosted.org/packages/9e/8b/33651d658e45e16ab7671ea5fcf3d20980ea7983234f4d8d0c63c65581a5/av-16.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:7dec3dcbc35a187ce450f65a2e0dda820d5a9e6553eea8344a1459af11c98649", size = 43036824, upload-time = "2026-01-11T09:59:16.507Z" },
- { url = "https://files.pythonhosted.org/packages/83/41/7f13361db54d7e02f11552575c0384dadaf0918138f4eaa82ea03a9f9580/av-16.1.0-cp314-cp314t-win_amd64.whl", hash = "sha256:6f90dc082ff2068ddbe77618400b44d698d25d9c4edac57459e250c16b33d700", size = 31948164, upload-time = "2026-01-11T09:59:19.501Z" },
-]
-
-[[package]]
-name = "bitsandbytes"
-version = "0.49.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "packaging" },
- { name = "torch", version = "2.9.1", source = { registry = "https://pypi.org/simple" } },
-]
-wheels = [
- { url = "https://files.pythonhosted.org/packages/11/dd/5820e09213a3f7c0ee5aff20fce8b362ce935f9dd9958827274de4eaeec6/bitsandbytes-0.49.1-py3-none-manylinux_2_24_aarch64.whl", hash = "sha256:acd4730a0db3762d286707f4a3bc1d013d21dd5f0e441900da57ec4198578d4e", size = 31065659, upload-time = "2026-01-08T14:31:28.676Z" },
- { url = "https://files.pythonhosted.org/packages/1d/4f/02d3cb62a1b0b5a1ca7ff03dce3606be1bf3ead4744f47eb762dbf471069/bitsandbytes-0.49.1-py3-none-manylinux_2_24_x86_64.whl", hash = "sha256:e7940bf32457dc2e553685285b2a86e82f5ec10b2ae39776c408714f9ae6983c", size = 59054193, upload-time = "2026-01-08T14:31:31.743Z" },
-]
-
-[[package]]
-name = "certifi"
-version = "2026.1.4"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/e0/2d/a891ca51311197f6ad14a7ef42e2399f36cf2f9bd44752b3dc4eab60fdc5/certifi-2026.1.4.tar.gz", hash = "sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120", size = 154268, upload-time = "2026-01-04T02:42:41.825Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/e6/ad/3cc14f097111b4de0040c83a525973216457bbeeb63739ef1ed275c1c021/certifi-2026.1.4-py3-none-any.whl", hash = "sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c", size = 152900, upload-time = "2026-01-04T02:42:40.15Z" },
-]
-
-[[package]]
-name = "cffi"
-version = "2.0.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "pycparser", marker = "implementation_name != 'PyPy'" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz", hash = "sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529", size = 523588, upload-time = "2025-09-08T23:24:04.541Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/93/d7/516d984057745a6cd96575eea814fe1edd6646ee6efd552fb7b0921dec83/cffi-2.0.0-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:0cf2d91ecc3fcc0625c2c530fe004f82c110405f101548512cce44322fa8ac44", size = 184283, upload-time = "2025-09-08T23:22:08.01Z" },
- { url = "https://files.pythonhosted.org/packages/9e/84/ad6a0b408daa859246f57c03efd28e5dd1b33c21737c2db84cae8c237aa5/cffi-2.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f73b96c41e3b2adedc34a7356e64c8eb96e03a3782b535e043a986276ce12a49", size = 180504, upload-time = "2025-09-08T23:22:10.637Z" },
- { url = "https://files.pythonhosted.org/packages/50/bd/b1a6362b80628111e6653c961f987faa55262b4002fcec42308cad1db680/cffi-2.0.0-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:53f77cbe57044e88bbd5ed26ac1d0514d2acf0591dd6bb02a3ae37f76811b80c", size = 208811, upload-time = "2025-09-08T23:22:12.267Z" },
- { url = "https://files.pythonhosted.org/packages/4f/27/6933a8b2562d7bd1fb595074cf99cc81fc3789f6a6c05cdabb46284a3188/cffi-2.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3e837e369566884707ddaf85fc1744b47575005c0a229de3327f8f9a20f4efeb", size = 216402, upload-time = "2025-09-08T23:22:13.455Z" },
- { url = "https://files.pythonhosted.org/packages/05/eb/b86f2a2645b62adcfff53b0dd97e8dfafb5c8aa864bd0d9a2c2049a0d551/cffi-2.0.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5eda85d6d1879e692d546a078b44251cdd08dd1cfb98dfb77b670c97cee49ea0", size = 203217, upload-time = "2025-09-08T23:22:14.596Z" },
- { url = "https://files.pythonhosted.org/packages/9f/e0/6cbe77a53acf5acc7c08cc186c9928864bd7c005f9efd0d126884858a5fe/cffi-2.0.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9332088d75dc3241c702d852d4671613136d90fa6881da7d770a483fd05248b4", size = 203079, upload-time = "2025-09-08T23:22:15.769Z" },
- { url = "https://files.pythonhosted.org/packages/98/29/9b366e70e243eb3d14a5cb488dfd3a0b6b2f1fb001a203f653b93ccfac88/cffi-2.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc7de24befaeae77ba923797c7c87834c73648a05a4bde34b3b7e5588973a453", size = 216475, upload-time = "2025-09-08T23:22:17.427Z" },
- { url = "https://files.pythonhosted.org/packages/21/7a/13b24e70d2f90a322f2900c5d8e1f14fa7e2a6b3332b7309ba7b2ba51a5a/cffi-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cf364028c016c03078a23b503f02058f1814320a56ad535686f90565636a9495", size = 218829, upload-time = "2025-09-08T23:22:19.069Z" },
- { url = "https://files.pythonhosted.org/packages/60/99/c9dc110974c59cc981b1f5b66e1d8af8af764e00f0293266824d9c4254bc/cffi-2.0.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e11e82b744887154b182fd3e7e8512418446501191994dbf9c9fc1f32cc8efd5", size = 211211, upload-time = "2025-09-08T23:22:20.588Z" },
- { url = "https://files.pythonhosted.org/packages/49/72/ff2d12dbf21aca1b32a40ed792ee6b40f6dc3a9cf1644bd7ef6e95e0ac5e/cffi-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8ea985900c5c95ce9db1745f7933eeef5d314f0565b27625d9a10ec9881e1bfb", size = 218036, upload-time = "2025-09-08T23:22:22.143Z" },
- { url = "https://files.pythonhosted.org/packages/e2/cc/027d7fb82e58c48ea717149b03bcadcbdc293553edb283af792bd4bcbb3f/cffi-2.0.0-cp310-cp310-win32.whl", hash = "sha256:1f72fb8906754ac8a2cc3f9f5aaa298070652a0ffae577e0ea9bd480dc3c931a", size = 172184, upload-time = "2025-09-08T23:22:23.328Z" },
- { url = "https://files.pythonhosted.org/packages/33/fa/072dd15ae27fbb4e06b437eb6e944e75b068deb09e2a2826039e49ee2045/cffi-2.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:b18a3ed7d5b3bd8d9ef7a8cb226502c6bf8308df1525e1cc676c3680e7176739", size = 182790, upload-time = "2025-09-08T23:22:24.752Z" },
- { url = "https://files.pythonhosted.org/packages/12/4a/3dfd5f7850cbf0d06dc84ba9aa00db766b52ca38d8b86e3a38314d52498c/cffi-2.0.0-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:b4c854ef3adc177950a8dfc81a86f5115d2abd545751a304c5bcf2c2c7283cfe", size = 184344, upload-time = "2025-09-08T23:22:26.456Z" },
- { url = "https://files.pythonhosted.org/packages/4f/8b/f0e4c441227ba756aafbe78f117485b25bb26b1c059d01f137fa6d14896b/cffi-2.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2de9a304e27f7596cd03d16f1b7c72219bd944e99cc52b84d0145aefb07cbd3c", size = 180560, upload-time = "2025-09-08T23:22:28.197Z" },
- { url = "https://files.pythonhosted.org/packages/b1/b7/1200d354378ef52ec227395d95c2576330fd22a869f7a70e88e1447eb234/cffi-2.0.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:baf5215e0ab74c16e2dd324e8ec067ef59e41125d3eade2b863d294fd5035c92", size = 209613, upload-time = "2025-09-08T23:22:29.475Z" },
- { url = "https://files.pythonhosted.org/packages/b8/56/6033f5e86e8cc9bb629f0077ba71679508bdf54a9a5e112a3c0b91870332/cffi-2.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:730cacb21e1bdff3ce90babf007d0a0917cc3e6492f336c2f0134101e0944f93", size = 216476, upload-time = "2025-09-08T23:22:31.063Z" },
- { url = "https://files.pythonhosted.org/packages/dc/7f/55fecd70f7ece178db2f26128ec41430d8720f2d12ca97bf8f0a628207d5/cffi-2.0.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6824f87845e3396029f3820c206e459ccc91760e8fa24422f8b0c3d1731cbec5", size = 203374, upload-time = "2025-09-08T23:22:32.507Z" },
- { url = "https://files.pythonhosted.org/packages/84/ef/a7b77c8bdc0f77adc3b46888f1ad54be8f3b7821697a7b89126e829e676a/cffi-2.0.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9de40a7b0323d889cf8d23d1ef214f565ab154443c42737dfe52ff82cf857664", size = 202597, upload-time = "2025-09-08T23:22:34.132Z" },
- { url = "https://files.pythonhosted.org/packages/d7/91/500d892b2bf36529a75b77958edfcd5ad8e2ce4064ce2ecfeab2125d72d1/cffi-2.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8941aaadaf67246224cee8c3803777eed332a19d909b47e29c9842ef1e79ac26", size = 215574, upload-time = "2025-09-08T23:22:35.443Z" },
- { url = "https://files.pythonhosted.org/packages/44/64/58f6255b62b101093d5df22dcb752596066c7e89dd725e0afaed242a61be/cffi-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a05d0c237b3349096d3981b727493e22147f934b20f6f125a3eba8f994bec4a9", size = 218971, upload-time = "2025-09-08T23:22:36.805Z" },
- { url = "https://files.pythonhosted.org/packages/ab/49/fa72cebe2fd8a55fbe14956f9970fe8eb1ac59e5df042f603ef7c8ba0adc/cffi-2.0.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:94698a9c5f91f9d138526b48fe26a199609544591f859c870d477351dc7b2414", size = 211972, upload-time = "2025-09-08T23:22:38.436Z" },
- { url = "https://files.pythonhosted.org/packages/0b/28/dd0967a76aab36731b6ebfe64dec4e981aff7e0608f60c2d46b46982607d/cffi-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:5fed36fccc0612a53f1d4d9a816b50a36702c28a2aa880cb8a122b3466638743", size = 217078, upload-time = "2025-09-08T23:22:39.776Z" },
- { url = "https://files.pythonhosted.org/packages/2b/c0/015b25184413d7ab0a410775fdb4a50fca20f5589b5dab1dbbfa3baad8ce/cffi-2.0.0-cp311-cp311-win32.whl", hash = "sha256:c649e3a33450ec82378822b3dad03cc228b8f5963c0c12fc3b1e0ab940f768a5", size = 172076, upload-time = "2025-09-08T23:22:40.95Z" },
- { url = "https://files.pythonhosted.org/packages/ae/8f/dc5531155e7070361eb1b7e4c1a9d896d0cb21c49f807a6c03fd63fc877e/cffi-2.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:66f011380d0e49ed280c789fbd08ff0d40968ee7b665575489afa95c98196ab5", size = 182820, upload-time = "2025-09-08T23:22:42.463Z" },
- { url = "https://files.pythonhosted.org/packages/95/5c/1b493356429f9aecfd56bc171285a4c4ac8697f76e9bbbbb105e537853a1/cffi-2.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:c6638687455baf640e37344fe26d37c404db8b80d037c3d29f58fe8d1c3b194d", size = 177635, upload-time = "2025-09-08T23:22:43.623Z" },
- { url = "https://files.pythonhosted.org/packages/ea/47/4f61023ea636104d4f16ab488e268b93008c3d0bb76893b1b31db1f96802/cffi-2.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d02d6655b0e54f54c4ef0b94eb6be0607b70853c45ce98bd278dc7de718be5d", size = 185271, upload-time = "2025-09-08T23:22:44.795Z" },
- { url = "https://files.pythonhosted.org/packages/df/a2/781b623f57358e360d62cdd7a8c681f074a71d445418a776eef0aadb4ab4/cffi-2.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8eca2a813c1cb7ad4fb74d368c2ffbbb4789d377ee5bb8df98373c2cc0dee76c", size = 181048, upload-time = "2025-09-08T23:22:45.938Z" },
- { url = "https://files.pythonhosted.org/packages/ff/df/a4f0fbd47331ceeba3d37c2e51e9dfc9722498becbeec2bd8bc856c9538a/cffi-2.0.0-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:21d1152871b019407d8ac3985f6775c079416c282e431a4da6afe7aefd2bccbe", size = 212529, upload-time = "2025-09-08T23:22:47.349Z" },
- { url = "https://files.pythonhosted.org/packages/d5/72/12b5f8d3865bf0f87cf1404d8c374e7487dcf097a1c91c436e72e6badd83/cffi-2.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b21e08af67b8a103c71a250401c78d5e0893beff75e28c53c98f4de42f774062", size = 220097, upload-time = "2025-09-08T23:22:48.677Z" },
- { url = "https://files.pythonhosted.org/packages/c2/95/7a135d52a50dfa7c882ab0ac17e8dc11cec9d55d2c18dda414c051c5e69e/cffi-2.0.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:1e3a615586f05fc4065a8b22b8152f0c1b00cdbc60596d187c2a74f9e3036e4e", size = 207983, upload-time = "2025-09-08T23:22:50.06Z" },
- { url = "https://files.pythonhosted.org/packages/3a/c8/15cb9ada8895957ea171c62dc78ff3e99159ee7adb13c0123c001a2546c1/cffi-2.0.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:81afed14892743bbe14dacb9e36d9e0e504cd204e0b165062c488942b9718037", size = 206519, upload-time = "2025-09-08T23:22:51.364Z" },
- { url = "https://files.pythonhosted.org/packages/78/2d/7fa73dfa841b5ac06c7b8855cfc18622132e365f5b81d02230333ff26e9e/cffi-2.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3e17ed538242334bf70832644a32a7aae3d83b57567f9fd60a26257e992b79ba", size = 219572, upload-time = "2025-09-08T23:22:52.902Z" },
- { url = "https://files.pythonhosted.org/packages/07/e0/267e57e387b4ca276b90f0434ff88b2c2241ad72b16d31836adddfd6031b/cffi-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3925dd22fa2b7699ed2617149842d2e6adde22b262fcbfada50e3d195e4b3a94", size = 222963, upload-time = "2025-09-08T23:22:54.518Z" },
- { url = "https://files.pythonhosted.org/packages/b6/75/1f2747525e06f53efbd878f4d03bac5b859cbc11c633d0fb81432d98a795/cffi-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2c8f814d84194c9ea681642fd164267891702542f028a15fc97d4674b6206187", size = 221361, upload-time = "2025-09-08T23:22:55.867Z" },
- { url = "https://files.pythonhosted.org/packages/7b/2b/2b6435f76bfeb6bbf055596976da087377ede68df465419d192acf00c437/cffi-2.0.0-cp312-cp312-win32.whl", hash = "sha256:da902562c3e9c550df360bfa53c035b2f241fed6d9aef119048073680ace4a18", size = 172932, upload-time = "2025-09-08T23:22:57.188Z" },
- { url = "https://files.pythonhosted.org/packages/f8/ed/13bd4418627013bec4ed6e54283b1959cf6db888048c7cf4b4c3b5b36002/cffi-2.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:da68248800ad6320861f129cd9c1bf96ca849a2771a59e0344e88681905916f5", size = 183557, upload-time = "2025-09-08T23:22:58.351Z" },
- { url = "https://files.pythonhosted.org/packages/95/31/9f7f93ad2f8eff1dbc1c3656d7ca5bfd8fb52c9d786b4dcf19b2d02217fa/cffi-2.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:4671d9dd5ec934cb9a73e7ee9676f9362aba54f7f34910956b84d727b0d73fb6", size = 177762, upload-time = "2025-09-08T23:22:59.668Z" },
- { url = "https://files.pythonhosted.org/packages/4b/8d/a0a47a0c9e413a658623d014e91e74a50cdd2c423f7ccfd44086ef767f90/cffi-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:00bdf7acc5f795150faa6957054fbbca2439db2f775ce831222b66f192f03beb", size = 185230, upload-time = "2025-09-08T23:23:00.879Z" },
- { url = "https://files.pythonhosted.org/packages/4a/d2/a6c0296814556c68ee32009d9c2ad4f85f2707cdecfd7727951ec228005d/cffi-2.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:45d5e886156860dc35862657e1494b9bae8dfa63bf56796f2fb56e1679fc0bca", size = 181043, upload-time = "2025-09-08T23:23:02.231Z" },
- { url = "https://files.pythonhosted.org/packages/b0/1e/d22cc63332bd59b06481ceaac49d6c507598642e2230f201649058a7e704/cffi-2.0.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b", size = 212446, upload-time = "2025-09-08T23:23:03.472Z" },
- { url = "https://files.pythonhosted.org/packages/a9/f5/a2c23eb03b61a0b8747f211eb716446c826ad66818ddc7810cc2cc19b3f2/cffi-2.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d48a880098c96020b02d5a1f7d9251308510ce8858940e6fa99ece33f610838b", size = 220101, upload-time = "2025-09-08T23:23:04.792Z" },
- { url = "https://files.pythonhosted.org/packages/f2/7f/e6647792fc5850d634695bc0e6ab4111ae88e89981d35ac269956605feba/cffi-2.0.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f93fd8e5c8c0a4aa1f424d6173f14a892044054871c771f8566e4008eaa359d2", size = 207948, upload-time = "2025-09-08T23:23:06.127Z" },
- { url = "https://files.pythonhosted.org/packages/cb/1e/a5a1bd6f1fb30f22573f76533de12a00bf274abcdc55c8edab639078abb6/cffi-2.0.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:dd4f05f54a52fb558f1ba9f528228066954fee3ebe629fc1660d874d040ae5a3", size = 206422, upload-time = "2025-09-08T23:23:07.753Z" },
- { url = "https://files.pythonhosted.org/packages/98/df/0a1755e750013a2081e863e7cd37e0cdd02664372c754e5560099eb7aa44/cffi-2.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c8d3b5532fc71b7a77c09192b4a5a200ea992702734a2e9279a37f2478236f26", size = 219499, upload-time = "2025-09-08T23:23:09.648Z" },
- { url = "https://files.pythonhosted.org/packages/50/e1/a969e687fcf9ea58e6e2a928ad5e2dd88cc12f6f0ab477e9971f2309b57c/cffi-2.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d9b29c1f0ae438d5ee9acb31cadee00a58c46cc9c0b2f9038c6b0b3470877a8c", size = 222928, upload-time = "2025-09-08T23:23:10.928Z" },
- { url = "https://files.pythonhosted.org/packages/36/54/0362578dd2c9e557a28ac77698ed67323ed5b9775ca9d3fe73fe191bb5d8/cffi-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6d50360be4546678fc1b79ffe7a66265e28667840010348dd69a314145807a1b", size = 221302, upload-time = "2025-09-08T23:23:12.42Z" },
- { url = "https://files.pythonhosted.org/packages/eb/6d/bf9bda840d5f1dfdbf0feca87fbdb64a918a69bca42cfa0ba7b137c48cb8/cffi-2.0.0-cp313-cp313-win32.whl", hash = "sha256:74a03b9698e198d47562765773b4a8309919089150a0bb17d829ad7b44b60d27", size = 172909, upload-time = "2025-09-08T23:23:14.32Z" },
- { url = "https://files.pythonhosted.org/packages/37/18/6519e1ee6f5a1e579e04b9ddb6f1676c17368a7aba48299c3759bbc3c8b3/cffi-2.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:19f705ada2530c1167abacb171925dd886168931e0a7b78f5bffcae5c6b5be75", size = 183402, upload-time = "2025-09-08T23:23:15.535Z" },
- { url = "https://files.pythonhosted.org/packages/cb/0e/02ceeec9a7d6ee63bb596121c2c8e9b3a9e150936f4fbef6ca1943e6137c/cffi-2.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:256f80b80ca3853f90c21b23ee78cd008713787b1b1e93eae9f3d6a7134abd91", size = 177780, upload-time = "2025-09-08T23:23:16.761Z" },
- { url = "https://files.pythonhosted.org/packages/92/c4/3ce07396253a83250ee98564f8d7e9789fab8e58858f35d07a9a2c78de9f/cffi-2.0.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:fc33c5141b55ed366cfaad382df24fe7dcbc686de5be719b207bb248e3053dc5", size = 185320, upload-time = "2025-09-08T23:23:18.087Z" },
- { url = "https://files.pythonhosted.org/packages/59/dd/27e9fa567a23931c838c6b02d0764611c62290062a6d4e8ff7863daf9730/cffi-2.0.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c654de545946e0db659b3400168c9ad31b5d29593291482c43e3564effbcee13", size = 181487, upload-time = "2025-09-08T23:23:19.622Z" },
- { url = "https://files.pythonhosted.org/packages/d6/43/0e822876f87ea8a4ef95442c3d766a06a51fc5298823f884ef87aaad168c/cffi-2.0.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:24b6f81f1983e6df8db3adc38562c83f7d4a0c36162885ec7f7b77c7dcbec97b", size = 220049, upload-time = "2025-09-08T23:23:20.853Z" },
- { url = "https://files.pythonhosted.org/packages/b4/89/76799151d9c2d2d1ead63c2429da9ea9d7aac304603de0c6e8764e6e8e70/cffi-2.0.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:12873ca6cb9b0f0d3a0da705d6086fe911591737a59f28b7936bdfed27c0d47c", size = 207793, upload-time = "2025-09-08T23:23:22.08Z" },
- { url = "https://files.pythonhosted.org/packages/bb/dd/3465b14bb9e24ee24cb88c9e3730f6de63111fffe513492bf8c808a3547e/cffi-2.0.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:d9b97165e8aed9272a6bb17c01e3cc5871a594a446ebedc996e2397a1c1ea8ef", size = 206300, upload-time = "2025-09-08T23:23:23.314Z" },
- { url = "https://files.pythonhosted.org/packages/47/d9/d83e293854571c877a92da46fdec39158f8d7e68da75bf73581225d28e90/cffi-2.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:afb8db5439b81cf9c9d0c80404b60c3cc9c3add93e114dcae767f1477cb53775", size = 219244, upload-time = "2025-09-08T23:23:24.541Z" },
- { url = "https://files.pythonhosted.org/packages/2b/0f/1f177e3683aead2bb00f7679a16451d302c436b5cbf2505f0ea8146ef59e/cffi-2.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:737fe7d37e1a1bffe70bd5754ea763a62a066dc5913ca57e957824b72a85e205", size = 222828, upload-time = "2025-09-08T23:23:26.143Z" },
- { url = "https://files.pythonhosted.org/packages/c6/0f/cafacebd4b040e3119dcb32fed8bdef8dfe94da653155f9d0b9dc660166e/cffi-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:38100abb9d1b1435bc4cc340bb4489635dc2f0da7456590877030c9b3d40b0c1", size = 220926, upload-time = "2025-09-08T23:23:27.873Z" },
- { url = "https://files.pythonhosted.org/packages/3e/aa/df335faa45b395396fcbc03de2dfcab242cd61a9900e914fe682a59170b1/cffi-2.0.0-cp314-cp314-win32.whl", hash = "sha256:087067fa8953339c723661eda6b54bc98c5625757ea62e95eb4898ad5e776e9f", size = 175328, upload-time = "2025-09-08T23:23:44.61Z" },
- { url = "https://files.pythonhosted.org/packages/bb/92/882c2d30831744296ce713f0feb4c1cd30f346ef747b530b5318715cc367/cffi-2.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:203a48d1fb583fc7d78a4c6655692963b860a417c0528492a6bc21f1aaefab25", size = 185650, upload-time = "2025-09-08T23:23:45.848Z" },
- { url = "https://files.pythonhosted.org/packages/9f/2c/98ece204b9d35a7366b5b2c6539c350313ca13932143e79dc133ba757104/cffi-2.0.0-cp314-cp314-win_arm64.whl", hash = "sha256:dbd5c7a25a7cb98f5ca55d258b103a2054f859a46ae11aaf23134f9cc0d356ad", size = 180687, upload-time = "2025-09-08T23:23:47.105Z" },
- { url = "https://files.pythonhosted.org/packages/3e/61/c768e4d548bfa607abcda77423448df8c471f25dbe64fb2ef6d555eae006/cffi-2.0.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:9a67fc9e8eb39039280526379fb3a70023d77caec1852002b4da7e8b270c4dd9", size = 188773, upload-time = "2025-09-08T23:23:29.347Z" },
- { url = "https://files.pythonhosted.org/packages/2c/ea/5f76bce7cf6fcd0ab1a1058b5af899bfbef198bea4d5686da88471ea0336/cffi-2.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7a66c7204d8869299919db4d5069a82f1561581af12b11b3c9f48c584eb8743d", size = 185013, upload-time = "2025-09-08T23:23:30.63Z" },
- { url = "https://files.pythonhosted.org/packages/be/b4/c56878d0d1755cf9caa54ba71e5d049479c52f9e4afc230f06822162ab2f/cffi-2.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7cc09976e8b56f8cebd752f7113ad07752461f48a58cbba644139015ac24954c", size = 221593, upload-time = "2025-09-08T23:23:31.91Z" },
- { url = "https://files.pythonhosted.org/packages/e0/0d/eb704606dfe8033e7128df5e90fee946bbcb64a04fcdaa97321309004000/cffi-2.0.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:92b68146a71df78564e4ef48af17551a5ddd142e5190cdf2c5624d0c3ff5b2e8", size = 209354, upload-time = "2025-09-08T23:23:33.214Z" },
- { url = "https://files.pythonhosted.org/packages/d8/19/3c435d727b368ca475fb8742ab97c9cb13a0de600ce86f62eab7fa3eea60/cffi-2.0.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b1e74d11748e7e98e2f426ab176d4ed720a64412b6a15054378afdb71e0f37dc", size = 208480, upload-time = "2025-09-08T23:23:34.495Z" },
- { url = "https://files.pythonhosted.org/packages/d0/44/681604464ed9541673e486521497406fadcc15b5217c3e326b061696899a/cffi-2.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:28a3a209b96630bca57cce802da70c266eb08c6e97e5afd61a75611ee6c64592", size = 221584, upload-time = "2025-09-08T23:23:36.096Z" },
- { url = "https://files.pythonhosted.org/packages/25/8e/342a504ff018a2825d395d44d63a767dd8ebc927ebda557fecdaca3ac33a/cffi-2.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7553fb2090d71822f02c629afe6042c299edf91ba1bf94951165613553984512", size = 224443, upload-time = "2025-09-08T23:23:37.328Z" },
- { url = "https://files.pythonhosted.org/packages/e1/5e/b666bacbbc60fbf415ba9988324a132c9a7a0448a9a8f125074671c0f2c3/cffi-2.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6c6c373cfc5c83a975506110d17457138c8c63016b563cc9ed6e056a82f13ce4", size = 223437, upload-time = "2025-09-08T23:23:38.945Z" },
- { url = "https://files.pythonhosted.org/packages/a0/1d/ec1a60bd1a10daa292d3cd6bb0b359a81607154fb8165f3ec95fe003b85c/cffi-2.0.0-cp314-cp314t-win32.whl", hash = "sha256:1fc9ea04857caf665289b7a75923f2c6ed559b8298a1b8c49e59f7dd95c8481e", size = 180487, upload-time = "2025-09-08T23:23:40.423Z" },
- { url = "https://files.pythonhosted.org/packages/bf/41/4c1168c74fac325c0c8156f04b6749c8b6a8f405bbf91413ba088359f60d/cffi-2.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:d68b6cef7827e8641e8ef16f4494edda8b36104d79773a334beaa1e3521430f6", size = 191726, upload-time = "2025-09-08T23:23:41.742Z" },
- { url = "https://files.pythonhosted.org/packages/ae/3a/dbeec9d1ee0844c679f6bb5d6ad4e9f198b1224f4e7a32825f47f6192b0c/cffi-2.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9", size = 184195, upload-time = "2025-09-08T23:23:43.004Z" },
-]
-
-[[package]]
-name = "cfgv"
-version = "3.5.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/4e/b5/721b8799b04bf9afe054a3899c6cf4e880fcf8563cc71c15610242490a0c/cfgv-3.5.0.tar.gz", hash = "sha256:d5b1034354820651caa73ede66a6294d6e95c1b00acc5e9b098e917404669132", size = 7334, upload-time = "2025-11-19T20:55:51.612Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/db/3c/33bac158f8ab7f89b2e59426d5fe2e4f63f7ed25df84c036890172b412b5/cfgv-3.5.0-py2.py3-none-any.whl", hash = "sha256:a8dc6b26ad22ff227d2634a65cb388215ce6cc96bbcc5cfde7641ae87e8dacc0", size = 7445, upload-time = "2025-11-19T20:55:50.744Z" },
-]
-
-[[package]]
-name = "charset-normalizer"
-version = "3.4.4"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz", hash = "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a", size = 129418, upload-time = "2025-10-14T04:42:32.879Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/1f/b8/6d51fc1d52cbd52cd4ccedd5b5b2f0f6a11bbf6765c782298b0f3e808541/charset_normalizer-3.4.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e824f1492727fa856dd6eda4f7cee25f8518a12f3c4a56a74e8095695089cf6d", size = 209709, upload-time = "2025-10-14T04:40:11.385Z" },
- { url = "https://files.pythonhosted.org/packages/5c/af/1f9d7f7faafe2ddfb6f72a2e07a548a629c61ad510fe60f9630309908fef/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4bd5d4137d500351a30687c2d3971758aac9a19208fc110ccb9d7188fbe709e8", size = 148814, upload-time = "2025-10-14T04:40:13.135Z" },
- { url = "https://files.pythonhosted.org/packages/79/3d/f2e3ac2bbc056ca0c204298ea4e3d9db9b4afe437812638759db2c976b5f/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:027f6de494925c0ab2a55eab46ae5129951638a49a34d87f4c3eda90f696b4ad", size = 144467, upload-time = "2025-10-14T04:40:14.728Z" },
- { url = "https://files.pythonhosted.org/packages/ec/85/1bf997003815e60d57de7bd972c57dc6950446a3e4ccac43bc3070721856/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f820802628d2694cb7e56db99213f930856014862f3fd943d290ea8438d07ca8", size = 162280, upload-time = "2025-10-14T04:40:16.14Z" },
- { url = "https://files.pythonhosted.org/packages/3e/8e/6aa1952f56b192f54921c436b87f2aaf7c7a7c3d0d1a765547d64fd83c13/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:798d75d81754988d2565bff1b97ba5a44411867c0cf32b77a7e8f8d84796b10d", size = 159454, upload-time = "2025-10-14T04:40:17.567Z" },
- { url = "https://files.pythonhosted.org/packages/36/3b/60cbd1f8e93aa25d1c669c649b7a655b0b5fb4c571858910ea9332678558/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d1bb833febdff5c8927f922386db610b49db6e0d4f4ee29601d71e7c2694313", size = 153609, upload-time = "2025-10-14T04:40:19.08Z" },
- { url = "https://files.pythonhosted.org/packages/64/91/6a13396948b8fd3c4b4fd5bc74d045f5637d78c9675585e8e9fbe5636554/charset_normalizer-3.4.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9cd98cdc06614a2f768d2b7286d66805f94c48cde050acdbbb7db2600ab3197e", size = 151849, upload-time = "2025-10-14T04:40:20.607Z" },
- { url = "https://files.pythonhosted.org/packages/b7/7a/59482e28b9981d105691e968c544cc0df3b7d6133152fb3dcdc8f135da7a/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:077fbb858e903c73f6c9db43374fd213b0b6a778106bc7032446a8e8b5b38b93", size = 151586, upload-time = "2025-10-14T04:40:21.719Z" },
- { url = "https://files.pythonhosted.org/packages/92/59/f64ef6a1c4bdd2baf892b04cd78792ed8684fbc48d4c2afe467d96b4df57/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:244bfb999c71b35de57821b8ea746b24e863398194a4014e4c76adc2bbdfeff0", size = 145290, upload-time = "2025-10-14T04:40:23.069Z" },
- { url = "https://files.pythonhosted.org/packages/6b/63/3bf9f279ddfa641ffa1962b0db6a57a9c294361cc2f5fcac997049a00e9c/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:64b55f9dce520635f018f907ff1b0df1fdc31f2795a922fb49dd14fbcdf48c84", size = 163663, upload-time = "2025-10-14T04:40:24.17Z" },
- { url = "https://files.pythonhosted.org/packages/ed/09/c9e38fc8fa9e0849b172b581fd9803bdf6e694041127933934184e19f8c3/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:faa3a41b2b66b6e50f84ae4a68c64fcd0c44355741c6374813a800cd6695db9e", size = 151964, upload-time = "2025-10-14T04:40:25.368Z" },
- { url = "https://files.pythonhosted.org/packages/d2/d1/d28b747e512d0da79d8b6a1ac18b7ab2ecfd81b2944c4c710e166d8dd09c/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:6515f3182dbe4ea06ced2d9e8666d97b46ef4c75e326b79bb624110f122551db", size = 161064, upload-time = "2025-10-14T04:40:26.806Z" },
- { url = "https://files.pythonhosted.org/packages/bb/9a/31d62b611d901c3b9e5500c36aab0ff5eb442043fb3a1c254200d3d397d9/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cc00f04ed596e9dc0da42ed17ac5e596c6ccba999ba6bd92b0e0aef2f170f2d6", size = 155015, upload-time = "2025-10-14T04:40:28.284Z" },
- { url = "https://files.pythonhosted.org/packages/1f/f3/107e008fa2bff0c8b9319584174418e5e5285fef32f79d8ee6a430d0039c/charset_normalizer-3.4.4-cp310-cp310-win32.whl", hash = "sha256:f34be2938726fc13801220747472850852fe6b1ea75869a048d6f896838c896f", size = 99792, upload-time = "2025-10-14T04:40:29.613Z" },
- { url = "https://files.pythonhosted.org/packages/eb/66/e396e8a408843337d7315bab30dbf106c38966f1819f123257f5520f8a96/charset_normalizer-3.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:a61900df84c667873b292c3de315a786dd8dac506704dea57bc957bd31e22c7d", size = 107198, upload-time = "2025-10-14T04:40:30.644Z" },
- { url = "https://files.pythonhosted.org/packages/b5/58/01b4f815bf0312704c267f2ccb6e5d42bcc7752340cd487bc9f8c3710597/charset_normalizer-3.4.4-cp310-cp310-win_arm64.whl", hash = "sha256:cead0978fc57397645f12578bfd2d5ea9138ea0fac82b2f63f7f7c6877986a69", size = 100262, upload-time = "2025-10-14T04:40:32.108Z" },
- { url = "https://files.pythonhosted.org/packages/ed/27/c6491ff4954e58a10f69ad90aca8a1b6fe9c5d3c6f380907af3c37435b59/charset_normalizer-3.4.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6e1fcf0720908f200cd21aa4e6750a48ff6ce4afe7ff5a79a90d5ed8a08296f8", size = 206988, upload-time = "2025-10-14T04:40:33.79Z" },
- { url = "https://files.pythonhosted.org/packages/94/59/2e87300fe67ab820b5428580a53cad894272dbb97f38a7a814a2a1ac1011/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f819d5fe9234f9f82d75bdfa9aef3a3d72c4d24a6e57aeaebba32a704553aa0", size = 147324, upload-time = "2025-10-14T04:40:34.961Z" },
- { url = "https://files.pythonhosted.org/packages/07/fb/0cf61dc84b2b088391830f6274cb57c82e4da8bbc2efeac8c025edb88772/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a59cb51917aa591b1c4e6a43c132f0cdc3c76dbad6155df4e28ee626cc77a0a3", size = 142742, upload-time = "2025-10-14T04:40:36.105Z" },
- { url = "https://files.pythonhosted.org/packages/62/8b/171935adf2312cd745d290ed93cf16cf0dfe320863ab7cbeeae1dcd6535f/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8ef3c867360f88ac904fd3f5e1f902f13307af9052646963ee08ff4f131adafc", size = 160863, upload-time = "2025-10-14T04:40:37.188Z" },
- { url = "https://files.pythonhosted.org/packages/09/73/ad875b192bda14f2173bfc1bc9a55e009808484a4b256748d931b6948442/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d9e45d7faa48ee908174d8fe84854479ef838fc6a705c9315372eacbc2f02897", size = 157837, upload-time = "2025-10-14T04:40:38.435Z" },
- { url = "https://files.pythonhosted.org/packages/6d/fc/de9cce525b2c5b94b47c70a4b4fb19f871b24995c728e957ee68ab1671ea/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:840c25fb618a231545cbab0564a799f101b63b9901f2569faecd6b222ac72381", size = 151550, upload-time = "2025-10-14T04:40:40.053Z" },
- { url = "https://files.pythonhosted.org/packages/55/c2/43edd615fdfba8c6f2dfbd459b25a6b3b551f24ea21981e23fb768503ce1/charset_normalizer-3.4.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ca5862d5b3928c4940729dacc329aa9102900382fea192fc5e52eb69d6093815", size = 149162, upload-time = "2025-10-14T04:40:41.163Z" },
- { url = "https://files.pythonhosted.org/packages/03/86/bde4ad8b4d0e9429a4e82c1e8f5c659993a9a863ad62c7df05cf7b678d75/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9c7f57c3d666a53421049053eaacdd14bbd0a528e2186fcb2e672effd053bb0", size = 150019, upload-time = "2025-10-14T04:40:42.276Z" },
- { url = "https://files.pythonhosted.org/packages/1f/86/a151eb2af293a7e7bac3a739b81072585ce36ccfb4493039f49f1d3cae8c/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:277e970e750505ed74c832b4bf75dac7476262ee2a013f5574dd49075879e161", size = 143310, upload-time = "2025-10-14T04:40:43.439Z" },
- { url = "https://files.pythonhosted.org/packages/b5/fe/43dae6144a7e07b87478fdfc4dbe9efd5defb0e7ec29f5f58a55aeef7bf7/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:31fd66405eaf47bb62e8cd575dc621c56c668f27d46a61d975a249930dd5e2a4", size = 162022, upload-time = "2025-10-14T04:40:44.547Z" },
- { url = "https://files.pythonhosted.org/packages/80/e6/7aab83774f5d2bca81f42ac58d04caf44f0cc2b65fc6db2b3b2e8a05f3b3/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:0d3d8f15c07f86e9ff82319b3d9ef6f4bf907608f53fe9d92b28ea9ae3d1fd89", size = 149383, upload-time = "2025-10-14T04:40:46.018Z" },
- { url = "https://files.pythonhosted.org/packages/4f/e8/b289173b4edae05c0dde07f69f8db476a0b511eac556dfe0d6bda3c43384/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9f7fcd74d410a36883701fafa2482a6af2ff5ba96b9a620e9e0721e28ead5569", size = 159098, upload-time = "2025-10-14T04:40:47.081Z" },
- { url = "https://files.pythonhosted.org/packages/d8/df/fe699727754cae3f8478493c7f45f777b17c3ef0600e28abfec8619eb49c/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ebf3e58c7ec8a8bed6d66a75d7fb37b55e5015b03ceae72a8e7c74495551e224", size = 152991, upload-time = "2025-10-14T04:40:48.246Z" },
- { url = "https://files.pythonhosted.org/packages/1a/86/584869fe4ddb6ffa3bd9f491b87a01568797fb9bd8933f557dba9771beaf/charset_normalizer-3.4.4-cp311-cp311-win32.whl", hash = "sha256:eecbc200c7fd5ddb9a7f16c7decb07b566c29fa2161a16cf67b8d068bd21690a", size = 99456, upload-time = "2025-10-14T04:40:49.376Z" },
- { url = "https://files.pythonhosted.org/packages/65/f6/62fdd5feb60530f50f7e38b4f6a1d5203f4d16ff4f9f0952962c044e919a/charset_normalizer-3.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:5ae497466c7901d54b639cf42d5b8c1b6a4fead55215500d2f486d34db48d016", size = 106978, upload-time = "2025-10-14T04:40:50.844Z" },
- { url = "https://files.pythonhosted.org/packages/7a/9d/0710916e6c82948b3be62d9d398cb4fcf4e97b56d6a6aeccd66c4b2f2bd5/charset_normalizer-3.4.4-cp311-cp311-win_arm64.whl", hash = "sha256:65e2befcd84bc6f37095f5961e68a6f077bf44946771354a28ad434c2cce0ae1", size = 99969, upload-time = "2025-10-14T04:40:52.272Z" },
- { url = "https://files.pythonhosted.org/packages/f3/85/1637cd4af66fa687396e757dec650f28025f2a2f5a5531a3208dc0ec43f2/charset_normalizer-3.4.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0a98e6759f854bd25a58a73fa88833fba3b7c491169f86ce1180c948ab3fd394", size = 208425, upload-time = "2025-10-14T04:40:53.353Z" },
- { url = "https://files.pythonhosted.org/packages/9d/6a/04130023fef2a0d9c62d0bae2649b69f7b7d8d24ea5536feef50551029df/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b5b290ccc2a263e8d185130284f8501e3e36c5e02750fc6b6bdeb2e9e96f1e25", size = 148162, upload-time = "2025-10-14T04:40:54.558Z" },
- { url = "https://files.pythonhosted.org/packages/78/29/62328d79aa60da22c9e0b9a66539feae06ca0f5a4171ac4f7dc285b83688/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74bb723680f9f7a6234dcf67aea57e708ec1fbdf5699fb91dfd6f511b0a320ef", size = 144558, upload-time = "2025-10-14T04:40:55.677Z" },
- { url = "https://files.pythonhosted.org/packages/86/bb/b32194a4bf15b88403537c2e120b817c61cd4ecffa9b6876e941c3ee38fe/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1e34719c6ed0b92f418c7c780480b26b5d9c50349e9a9af7d76bf757530350d", size = 161497, upload-time = "2025-10-14T04:40:57.217Z" },
- { url = "https://files.pythonhosted.org/packages/19/89/a54c82b253d5b9b111dc74aca196ba5ccfcca8242d0fb64146d4d3183ff1/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2437418e20515acec67d86e12bf70056a33abdacb5cb1655042f6538d6b085a8", size = 159240, upload-time = "2025-10-14T04:40:58.358Z" },
- { url = "https://files.pythonhosted.org/packages/c0/10/d20b513afe03acc89ec33948320a5544d31f21b05368436d580dec4e234d/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11d694519d7f29d6cd09f6ac70028dba10f92f6cdd059096db198c283794ac86", size = 153471, upload-time = "2025-10-14T04:40:59.468Z" },
- { url = "https://files.pythonhosted.org/packages/61/fa/fbf177b55bdd727010f9c0a3c49eefa1d10f960e5f09d1d887bf93c2e698/charset_normalizer-3.4.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ac1c4a689edcc530fc9d9aa11f5774b9e2f33f9a0c6a57864e90908f5208d30a", size = 150864, upload-time = "2025-10-14T04:41:00.623Z" },
- { url = "https://files.pythonhosted.org/packages/05/12/9fbc6a4d39c0198adeebbde20b619790e9236557ca59fc40e0e3cebe6f40/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:21d142cc6c0ec30d2efee5068ca36c128a30b0f2c53c1c07bd78cb6bc1d3be5f", size = 150647, upload-time = "2025-10-14T04:41:01.754Z" },
- { url = "https://files.pythonhosted.org/packages/ad/1f/6a9a593d52e3e8c5d2b167daf8c6b968808efb57ef4c210acb907c365bc4/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:5dbe56a36425d26d6cfb40ce79c314a2e4dd6211d51d6d2191c00bed34f354cc", size = 145110, upload-time = "2025-10-14T04:41:03.231Z" },
- { url = "https://files.pythonhosted.org/packages/30/42/9a52c609e72471b0fc54386dc63c3781a387bb4fe61c20231a4ebcd58bdd/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5bfbb1b9acf3334612667b61bd3002196fe2a1eb4dd74d247e0f2a4d50ec9bbf", size = 162839, upload-time = "2025-10-14T04:41:04.715Z" },
- { url = "https://files.pythonhosted.org/packages/c4/5b/c0682bbf9f11597073052628ddd38344a3d673fda35a36773f7d19344b23/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d055ec1e26e441f6187acf818b73564e6e6282709e9bcb5b63f5b23068356a15", size = 150667, upload-time = "2025-10-14T04:41:05.827Z" },
- { url = "https://files.pythonhosted.org/packages/e4/24/a41afeab6f990cf2daf6cb8c67419b63b48cf518e4f56022230840c9bfb2/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:af2d8c67d8e573d6de5bc30cdb27e9b95e49115cd9baad5ddbd1a6207aaa82a9", size = 160535, upload-time = "2025-10-14T04:41:06.938Z" },
- { url = "https://files.pythonhosted.org/packages/2a/e5/6a4ce77ed243c4a50a1fecca6aaaab419628c818a49434be428fe24c9957/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:780236ac706e66881f3b7f2f32dfe90507a09e67d1d454c762cf642e6e1586e0", size = 154816, upload-time = "2025-10-14T04:41:08.101Z" },
- { url = "https://files.pythonhosted.org/packages/a8/ef/89297262b8092b312d29cdb2517cb1237e51db8ecef2e9af5edbe7b683b1/charset_normalizer-3.4.4-cp312-cp312-win32.whl", hash = "sha256:5833d2c39d8896e4e19b689ffc198f08ea58116bee26dea51e362ecc7cd3ed26", size = 99694, upload-time = "2025-10-14T04:41:09.23Z" },
- { url = "https://files.pythonhosted.org/packages/3d/2d/1e5ed9dd3b3803994c155cd9aacb60c82c331bad84daf75bcb9c91b3295e/charset_normalizer-3.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:a79cfe37875f822425b89a82333404539ae63dbdddf97f84dcbc3d339aae9525", size = 107131, upload-time = "2025-10-14T04:41:10.467Z" },
- { url = "https://files.pythonhosted.org/packages/d0/d9/0ed4c7098a861482a7b6a95603edce4c0d9db2311af23da1fb2b75ec26fc/charset_normalizer-3.4.4-cp312-cp312-win_arm64.whl", hash = "sha256:376bec83a63b8021bb5c8ea75e21c4ccb86e7e45ca4eb81146091b56599b80c3", size = 100390, upload-time = "2025-10-14T04:41:11.915Z" },
- { url = "https://files.pythonhosted.org/packages/97/45/4b3a1239bbacd321068ea6e7ac28875b03ab8bc0aa0966452db17cd36714/charset_normalizer-3.4.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e1f185f86a6f3403aa2420e815904c67b2f9ebc443f045edd0de921108345794", size = 208091, upload-time = "2025-10-14T04:41:13.346Z" },
- { url = "https://files.pythonhosted.org/packages/7d/62/73a6d7450829655a35bb88a88fca7d736f9882a27eacdca2c6d505b57e2e/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b39f987ae8ccdf0d2642338faf2abb1862340facc796048b604ef14919e55ed", size = 147936, upload-time = "2025-10-14T04:41:14.461Z" },
- { url = "https://files.pythonhosted.org/packages/89/c5/adb8c8b3d6625bef6d88b251bbb0d95f8205831b987631ab0c8bb5d937c2/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3162d5d8ce1bb98dd51af660f2121c55d0fa541b46dff7bb9b9f86ea1d87de72", size = 144180, upload-time = "2025-10-14T04:41:15.588Z" },
- { url = "https://files.pythonhosted.org/packages/91/ed/9706e4070682d1cc219050b6048bfd293ccf67b3d4f5a4f39207453d4b99/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:81d5eb2a312700f4ecaa977a8235b634ce853200e828fbadf3a9c50bab278328", size = 161346, upload-time = "2025-10-14T04:41:16.738Z" },
- { url = "https://files.pythonhosted.org/packages/d5/0d/031f0d95e4972901a2f6f09ef055751805ff541511dc1252ba3ca1f80cf5/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5bd2293095d766545ec1a8f612559f6b40abc0eb18bb2f5d1171872d34036ede", size = 158874, upload-time = "2025-10-14T04:41:17.923Z" },
- { url = "https://files.pythonhosted.org/packages/f5/83/6ab5883f57c9c801ce5e5677242328aa45592be8a00644310a008d04f922/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a8a8b89589086a25749f471e6a900d3f662d1d3b6e2e59dcecf787b1cc3a1894", size = 153076, upload-time = "2025-10-14T04:41:19.106Z" },
- { url = "https://files.pythonhosted.org/packages/75/1e/5ff781ddf5260e387d6419959ee89ef13878229732732ee73cdae01800f2/charset_normalizer-3.4.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc7637e2f80d8530ee4a78e878bce464f70087ce73cf7c1caf142416923b98f1", size = 150601, upload-time = "2025-10-14T04:41:20.245Z" },
- { url = "https://files.pythonhosted.org/packages/d7/57/71be810965493d3510a6ca79b90c19e48696fb1ff964da319334b12677f0/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f8bf04158c6b607d747e93949aa60618b61312fe647a6369f88ce2ff16043490", size = 150376, upload-time = "2025-10-14T04:41:21.398Z" },
- { url = "https://files.pythonhosted.org/packages/e5/d5/c3d057a78c181d007014feb7e9f2e65905a6c4ef182c0ddf0de2924edd65/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:554af85e960429cf30784dd47447d5125aaa3b99a6f0683589dbd27e2f45da44", size = 144825, upload-time = "2025-10-14T04:41:22.583Z" },
- { url = "https://files.pythonhosted.org/packages/e6/8c/d0406294828d4976f275ffbe66f00266c4b3136b7506941d87c00cab5272/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:74018750915ee7ad843a774364e13a3db91682f26142baddf775342c3f5b1133", size = 162583, upload-time = "2025-10-14T04:41:23.754Z" },
- { url = "https://files.pythonhosted.org/packages/d7/24/e2aa1f18c8f15c4c0e932d9287b8609dd30ad56dbe41d926bd846e22fb8d/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c0463276121fdee9c49b98908b3a89c39be45d86d1dbaa22957e38f6321d4ce3", size = 150366, upload-time = "2025-10-14T04:41:25.27Z" },
- { url = "https://files.pythonhosted.org/packages/e4/5b/1e6160c7739aad1e2df054300cc618b06bf784a7a164b0f238360721ab86/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:362d61fd13843997c1c446760ef36f240cf81d3ebf74ac62652aebaf7838561e", size = 160300, upload-time = "2025-10-14T04:41:26.725Z" },
- { url = "https://files.pythonhosted.org/packages/7a/10/f882167cd207fbdd743e55534d5d9620e095089d176d55cb22d5322f2afd/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a26f18905b8dd5d685d6d07b0cdf98a79f3c7a918906af7cc143ea2e164c8bc", size = 154465, upload-time = "2025-10-14T04:41:28.322Z" },
- { url = "https://files.pythonhosted.org/packages/89/66/c7a9e1b7429be72123441bfdbaf2bc13faab3f90b933f664db506dea5915/charset_normalizer-3.4.4-cp313-cp313-win32.whl", hash = "sha256:9b35f4c90079ff2e2edc5b26c0c77925e5d2d255c42c74fdb70fb49b172726ac", size = 99404, upload-time = "2025-10-14T04:41:29.95Z" },
- { url = "https://files.pythonhosted.org/packages/c4/26/b9924fa27db384bdcd97ab83b4f0a8058d96ad9626ead570674d5e737d90/charset_normalizer-3.4.4-cp313-cp313-win_amd64.whl", hash = "sha256:b435cba5f4f750aa6c0a0d92c541fb79f69a387c91e61f1795227e4ed9cece14", size = 107092, upload-time = "2025-10-14T04:41:31.188Z" },
- { url = "https://files.pythonhosted.org/packages/af/8f/3ed4bfa0c0c72a7ca17f0380cd9e4dd842b09f664e780c13cff1dcf2ef1b/charset_normalizer-3.4.4-cp313-cp313-win_arm64.whl", hash = "sha256:542d2cee80be6f80247095cc36c418f7bddd14f4a6de45af91dfad36d817bba2", size = 100408, upload-time = "2025-10-14T04:41:32.624Z" },
- { url = "https://files.pythonhosted.org/packages/2a/35/7051599bd493e62411d6ede36fd5af83a38f37c4767b92884df7301db25d/charset_normalizer-3.4.4-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:da3326d9e65ef63a817ecbcc0df6e94463713b754fe293eaa03da99befb9a5bd", size = 207746, upload-time = "2025-10-14T04:41:33.773Z" },
- { url = "https://files.pythonhosted.org/packages/10/9a/97c8d48ef10d6cd4fcead2415523221624bf58bcf68a802721a6bc807c8f/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8af65f14dc14a79b924524b1e7fffe304517b2bff5a58bf64f30b98bbc5079eb", size = 147889, upload-time = "2025-10-14T04:41:34.897Z" },
- { url = "https://files.pythonhosted.org/packages/10/bf/979224a919a1b606c82bd2c5fa49b5c6d5727aa47b4312bb27b1734f53cd/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74664978bb272435107de04e36db5a9735e78232b85b77d45cfb38f758efd33e", size = 143641, upload-time = "2025-10-14T04:41:36.116Z" },
- { url = "https://files.pythonhosted.org/packages/ba/33/0ad65587441fc730dc7bd90e9716b30b4702dc7b617e6ba4997dc8651495/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:752944c7ffbfdd10c074dc58ec2d5a8a4cd9493b314d367c14d24c17684ddd14", size = 160779, upload-time = "2025-10-14T04:41:37.229Z" },
- { url = "https://files.pythonhosted.org/packages/67/ed/331d6b249259ee71ddea93f6f2f0a56cfebd46938bde6fcc6f7b9a3d0e09/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1f13550535ad8cff21b8d757a3257963e951d96e20ec82ab44bc64aeb62a191", size = 159035, upload-time = "2025-10-14T04:41:38.368Z" },
- { url = "https://files.pythonhosted.org/packages/67/ff/f6b948ca32e4f2a4576aa129d8bed61f2e0543bf9f5f2b7fc3758ed005c9/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ecaae4149d99b1c9e7b88bb03e3221956f68fd6d50be2ef061b2381b61d20838", size = 152542, upload-time = "2025-10-14T04:41:39.862Z" },
- { url = "https://files.pythonhosted.org/packages/16/85/276033dcbcc369eb176594de22728541a925b2632f9716428c851b149e83/charset_normalizer-3.4.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cb6254dc36b47a990e59e1068afacdcd02958bdcce30bb50cc1700a8b9d624a6", size = 149524, upload-time = "2025-10-14T04:41:41.319Z" },
- { url = "https://files.pythonhosted.org/packages/9e/f2/6a2a1f722b6aba37050e626530a46a68f74e63683947a8acff92569f979a/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c8ae8a0f02f57a6e61203a31428fa1d677cbe50c93622b4149d5c0f319c1d19e", size = 150395, upload-time = "2025-10-14T04:41:42.539Z" },
- { url = "https://files.pythonhosted.org/packages/60/bb/2186cb2f2bbaea6338cad15ce23a67f9b0672929744381e28b0592676824/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:47cc91b2f4dd2833fddaedd2893006b0106129d4b94fdb6af1f4ce5a9965577c", size = 143680, upload-time = "2025-10-14T04:41:43.661Z" },
- { url = "https://files.pythonhosted.org/packages/7d/a5/bf6f13b772fbb2a90360eb620d52ed8f796f3c5caee8398c3b2eb7b1c60d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:82004af6c302b5d3ab2cfc4cc5f29db16123b1a8417f2e25f9066f91d4411090", size = 162045, upload-time = "2025-10-14T04:41:44.821Z" },
- { url = "https://files.pythonhosted.org/packages/df/c5/d1be898bf0dc3ef9030c3825e5d3b83f2c528d207d246cbabe245966808d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7d8f6c26245217bd2ad053761201e9f9680f8ce52f0fcd8d0755aeae5b2152", size = 149687, upload-time = "2025-10-14T04:41:46.442Z" },
- { url = "https://files.pythonhosted.org/packages/a5/42/90c1f7b9341eef50c8a1cb3f098ac43b0508413f33affd762855f67a410e/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:799a7a5e4fb2d5898c60b640fd4981d6a25f1c11790935a44ce38c54e985f828", size = 160014, upload-time = "2025-10-14T04:41:47.631Z" },
- { url = "https://files.pythonhosted.org/packages/76/be/4d3ee471e8145d12795ab655ece37baed0929462a86e72372fd25859047c/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:99ae2cffebb06e6c22bdc25801d7b30f503cc87dbd283479e7b606f70aff57ec", size = 154044, upload-time = "2025-10-14T04:41:48.81Z" },
- { url = "https://files.pythonhosted.org/packages/b0/6f/8f7af07237c34a1defe7defc565a9bc1807762f672c0fde711a4b22bf9c0/charset_normalizer-3.4.4-cp314-cp314-win32.whl", hash = "sha256:f9d332f8c2a2fcbffe1378594431458ddbef721c1769d78e2cbc06280d8155f9", size = 99940, upload-time = "2025-10-14T04:41:49.946Z" },
- { url = "https://files.pythonhosted.org/packages/4b/51/8ade005e5ca5b0d80fb4aff72a3775b325bdc3d27408c8113811a7cbe640/charset_normalizer-3.4.4-cp314-cp314-win_amd64.whl", hash = "sha256:8a6562c3700cce886c5be75ade4a5db4214fda19fede41d9792d100288d8f94c", size = 107104, upload-time = "2025-10-14T04:41:51.051Z" },
- { url = "https://files.pythonhosted.org/packages/da/5f/6b8f83a55bb8278772c5ae54a577f3099025f9ade59d0136ac24a0df4bde/charset_normalizer-3.4.4-cp314-cp314-win_arm64.whl", hash = "sha256:de00632ca48df9daf77a2c65a484531649261ec9f25489917f09e455cb09ddb2", size = 100743, upload-time = "2025-10-14T04:41:52.122Z" },
- { url = "https://files.pythonhosted.org/packages/0a/4c/925909008ed5a988ccbb72dcc897407e5d6d3bd72410d69e051fc0c14647/charset_normalizer-3.4.4-py3-none-any.whl", hash = "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f", size = 53402, upload-time = "2025-10-14T04:42:31.76Z" },
-]
-
-[[package]]
-name = "click"
-version = "8.2.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "colorama", marker = "sys_platform == 'win32'" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/60/6c/8ca2efa64cf75a977a0d7fac081354553ebe483345c734fb6b6515d96bbc/click-8.2.1.tar.gz", hash = "sha256:27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202", size = 286342, upload-time = "2025-05-20T23:19:49.832Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/85/32/10bb5764d90a8eee674e9dc6f4db6a0ab47c8c4d0d83c27f7c39ac415a4d/click-8.2.1-py3-none-any.whl", hash = "sha256:61a3265b914e850b85317d0b3109c7f8cd35a670f963866005d6ef1d5175a12b", size = 102215, upload-time = "2025-05-20T23:19:47.796Z" },
-]
-
-[[package]]
-name = "cloudpickle"
-version = "3.1.2"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/27/fb/576f067976d320f5f0114a8d9fa1215425441bb35627b1993e5afd8111e5/cloudpickle-3.1.2.tar.gz", hash = "sha256:7fda9eb655c9c230dab534f1983763de5835249750e85fbcef43aaa30a9a2414", size = 22330, upload-time = "2025-11-03T09:25:26.604Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/88/39/799be3f2f0f38cc727ee3b4f1445fe6d5e4133064ec2e4115069418a5bb6/cloudpickle-3.1.2-py3-none-any.whl", hash = "sha256:9acb47f6afd73f60dc1df93bb801b472f05ff42fa6c84167d25cb206be1fbf4a", size = 22228, upload-time = "2025-11-03T09:25:25.534Z" },
-]
-
-[[package]]
-name = "colorama"
-version = "0.4.6"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },
-]
-
-[[package]]
-name = "contourpy"
-version = "1.3.2"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version < '3.11' and sys_platform == 'linux'",
- "python_full_version < '3.11' and sys_platform != 'linux'",
-]
-dependencies = [
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" } },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/66/54/eb9bfc647b19f2009dd5c7f5ec51c4e6ca831725f1aea7a993034f483147/contourpy-1.3.2.tar.gz", hash = "sha256:b6945942715a034c671b7fc54f9588126b0b8bf23db2696e3ca8328f3ff0ab54", size = 13466130, upload-time = "2025-04-15T17:47:53.79Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/12/a3/da4153ec8fe25d263aa48c1a4cbde7f49b59af86f0b6f7862788c60da737/contourpy-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ba38e3f9f330af820c4b27ceb4b9c7feee5fe0493ea53a8720f4792667465934", size = 268551, upload-time = "2025-04-15T17:34:46.581Z" },
- { url = "https://files.pythonhosted.org/packages/2f/6c/330de89ae1087eb622bfca0177d32a7ece50c3ef07b28002de4757d9d875/contourpy-1.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dc41ba0714aa2968d1f8674ec97504a8f7e334f48eeacebcaa6256213acb0989", size = 253399, upload-time = "2025-04-15T17:34:51.427Z" },
- { url = "https://files.pythonhosted.org/packages/c1/bd/20c6726b1b7f81a8bee5271bed5c165f0a8e1f572578a9d27e2ccb763cb2/contourpy-1.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9be002b31c558d1ddf1b9b415b162c603405414bacd6932d031c5b5a8b757f0d", size = 312061, upload-time = "2025-04-15T17:34:55.961Z" },
- { url = "https://files.pythonhosted.org/packages/22/fc/a9665c88f8a2473f823cf1ec601de9e5375050f1958cbb356cdf06ef1ab6/contourpy-1.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8d2e74acbcba3bfdb6d9d8384cdc4f9260cae86ed9beee8bd5f54fee49a430b9", size = 351956, upload-time = "2025-04-15T17:35:00.992Z" },
- { url = "https://files.pythonhosted.org/packages/25/eb/9f0a0238f305ad8fb7ef42481020d6e20cf15e46be99a1fcf939546a177e/contourpy-1.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e259bced5549ac64410162adc973c5e2fb77f04df4a439d00b478e57a0e65512", size = 320872, upload-time = "2025-04-15T17:35:06.177Z" },
- { url = "https://files.pythonhosted.org/packages/32/5c/1ee32d1c7956923202f00cf8d2a14a62ed7517bdc0ee1e55301227fc273c/contourpy-1.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad687a04bc802cbe8b9c399c07162a3c35e227e2daccf1668eb1f278cb698631", size = 325027, upload-time = "2025-04-15T17:35:11.244Z" },
- { url = "https://files.pythonhosted.org/packages/83/bf/9baed89785ba743ef329c2b07fd0611d12bfecbedbdd3eeecf929d8d3b52/contourpy-1.3.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cdd22595308f53ef2f891040ab2b93d79192513ffccbd7fe19be7aa773a5e09f", size = 1306641, upload-time = "2025-04-15T17:35:26.701Z" },
- { url = "https://files.pythonhosted.org/packages/d4/cc/74e5e83d1e35de2d28bd97033426b450bc4fd96e092a1f7a63dc7369b55d/contourpy-1.3.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b4f54d6a2defe9f257327b0f243612dd051cc43825587520b1bf74a31e2f6ef2", size = 1374075, upload-time = "2025-04-15T17:35:43.204Z" },
- { url = "https://files.pythonhosted.org/packages/0c/42/17f3b798fd5e033b46a16f8d9fcb39f1aba051307f5ebf441bad1ecf78f8/contourpy-1.3.2-cp310-cp310-win32.whl", hash = "sha256:f939a054192ddc596e031e50bb13b657ce318cf13d264f095ce9db7dc6ae81c0", size = 177534, upload-time = "2025-04-15T17:35:46.554Z" },
- { url = "https://files.pythonhosted.org/packages/54/ec/5162b8582f2c994721018d0c9ece9dc6ff769d298a8ac6b6a652c307e7df/contourpy-1.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:c440093bbc8fc21c637c03bafcbef95ccd963bc6e0514ad887932c18ca2a759a", size = 221188, upload-time = "2025-04-15T17:35:50.064Z" },
- { url = "https://files.pythonhosted.org/packages/b3/b9/ede788a0b56fc5b071639d06c33cb893f68b1178938f3425debebe2dab78/contourpy-1.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6a37a2fb93d4df3fc4c0e363ea4d16f83195fc09c891bc8ce072b9d084853445", size = 269636, upload-time = "2025-04-15T17:35:54.473Z" },
- { url = "https://files.pythonhosted.org/packages/e6/75/3469f011d64b8bbfa04f709bfc23e1dd71be54d05b1b083be9f5b22750d1/contourpy-1.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b7cd50c38f500bbcc9b6a46643a40e0913673f869315d8e70de0438817cb7773", size = 254636, upload-time = "2025-04-15T17:35:58.283Z" },
- { url = "https://files.pythonhosted.org/packages/8d/2f/95adb8dae08ce0ebca4fd8e7ad653159565d9739128b2d5977806656fcd2/contourpy-1.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6658ccc7251a4433eebd89ed2672c2ed96fba367fd25ca9512aa92a4b46c4f1", size = 313053, upload-time = "2025-04-15T17:36:03.235Z" },
- { url = "https://files.pythonhosted.org/packages/c3/a6/8ccf97a50f31adfa36917707fe39c9a0cbc24b3bbb58185577f119736cc9/contourpy-1.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:70771a461aaeb335df14deb6c97439973d253ae70660ca085eec25241137ef43", size = 352985, upload-time = "2025-04-15T17:36:08.275Z" },
- { url = "https://files.pythonhosted.org/packages/1d/b6/7925ab9b77386143f39d9c3243fdd101621b4532eb126743201160ffa7e6/contourpy-1.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65a887a6e8c4cd0897507d814b14c54a8c2e2aa4ac9f7686292f9769fcf9a6ab", size = 323750, upload-time = "2025-04-15T17:36:13.29Z" },
- { url = "https://files.pythonhosted.org/packages/c2/f3/20c5d1ef4f4748e52d60771b8560cf00b69d5c6368b5c2e9311bcfa2a08b/contourpy-1.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3859783aefa2b8355697f16642695a5b9792e7a46ab86da1118a4a23a51a33d7", size = 326246, upload-time = "2025-04-15T17:36:18.329Z" },
- { url = "https://files.pythonhosted.org/packages/8c/e5/9dae809e7e0b2d9d70c52b3d24cba134dd3dad979eb3e5e71f5df22ed1f5/contourpy-1.3.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:eab0f6db315fa4d70f1d8ab514e527f0366ec021ff853d7ed6a2d33605cf4b83", size = 1308728, upload-time = "2025-04-15T17:36:33.878Z" },
- { url = "https://files.pythonhosted.org/packages/e2/4a/0058ba34aeea35c0b442ae61a4f4d4ca84d6df8f91309bc2d43bb8dd248f/contourpy-1.3.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d91a3ccc7fea94ca0acab82ceb77f396d50a1f67412efe4c526f5d20264e6ecd", size = 1375762, upload-time = "2025-04-15T17:36:51.295Z" },
- { url = "https://files.pythonhosted.org/packages/09/33/7174bdfc8b7767ef2c08ed81244762d93d5c579336fc0b51ca57b33d1b80/contourpy-1.3.2-cp311-cp311-win32.whl", hash = "sha256:1c48188778d4d2f3d48e4643fb15d8608b1d01e4b4d6b0548d9b336c28fc9b6f", size = 178196, upload-time = "2025-04-15T17:36:55.002Z" },
- { url = "https://files.pythonhosted.org/packages/5e/fe/4029038b4e1c4485cef18e480b0e2cd2d755448bb071eb9977caac80b77b/contourpy-1.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:5ebac872ba09cb8f2131c46b8739a7ff71de28a24c869bcad554477eb089a878", size = 222017, upload-time = "2025-04-15T17:36:58.576Z" },
- { url = "https://files.pythonhosted.org/packages/34/f7/44785876384eff370c251d58fd65f6ad7f39adce4a093c934d4a67a7c6b6/contourpy-1.3.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4caf2bcd2969402bf77edc4cb6034c7dd7c0803213b3523f111eb7460a51b8d2", size = 271580, upload-time = "2025-04-15T17:37:03.105Z" },
- { url = "https://files.pythonhosted.org/packages/93/3b/0004767622a9826ea3d95f0e9d98cd8729015768075d61f9fea8eeca42a8/contourpy-1.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:82199cb78276249796419fe36b7386bd8d2cc3f28b3bc19fe2454fe2e26c4c15", size = 255530, upload-time = "2025-04-15T17:37:07.026Z" },
- { url = "https://files.pythonhosted.org/packages/e7/bb/7bd49e1f4fa805772d9fd130e0d375554ebc771ed7172f48dfcd4ca61549/contourpy-1.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:106fab697af11456fcba3e352ad50effe493a90f893fca6c2ca5c033820cea92", size = 307688, upload-time = "2025-04-15T17:37:11.481Z" },
- { url = "https://files.pythonhosted.org/packages/fc/97/e1d5dbbfa170725ef78357a9a0edc996b09ae4af170927ba8ce977e60a5f/contourpy-1.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d14f12932a8d620e307f715857107b1d1845cc44fdb5da2bc8e850f5ceba9f87", size = 347331, upload-time = "2025-04-15T17:37:18.212Z" },
- { url = "https://files.pythonhosted.org/packages/6f/66/e69e6e904f5ecf6901be3dd16e7e54d41b6ec6ae3405a535286d4418ffb4/contourpy-1.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:532fd26e715560721bb0d5fc7610fce279b3699b018600ab999d1be895b09415", size = 318963, upload-time = "2025-04-15T17:37:22.76Z" },
- { url = "https://files.pythonhosted.org/packages/a8/32/b8a1c8965e4f72482ff2d1ac2cd670ce0b542f203c8e1d34e7c3e6925da7/contourpy-1.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f26b383144cf2d2c29f01a1e8170f50dacf0eac02d64139dcd709a8ac4eb3cfe", size = 323681, upload-time = "2025-04-15T17:37:33.001Z" },
- { url = "https://files.pythonhosted.org/packages/30/c6/12a7e6811d08757c7162a541ca4c5c6a34c0f4e98ef2b338791093518e40/contourpy-1.3.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c49f73e61f1f774650a55d221803b101d966ca0c5a2d6d5e4320ec3997489441", size = 1308674, upload-time = "2025-04-15T17:37:48.64Z" },
- { url = "https://files.pythonhosted.org/packages/2a/8a/bebe5a3f68b484d3a2b8ffaf84704b3e343ef1addea528132ef148e22b3b/contourpy-1.3.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3d80b2c0300583228ac98d0a927a1ba6a2ba6b8a742463c564f1d419ee5b211e", size = 1380480, upload-time = "2025-04-15T17:38:06.7Z" },
- { url = "https://files.pythonhosted.org/packages/34/db/fcd325f19b5978fb509a7d55e06d99f5f856294c1991097534360b307cf1/contourpy-1.3.2-cp312-cp312-win32.whl", hash = "sha256:90df94c89a91b7362e1142cbee7568f86514412ab8a2c0d0fca72d7e91b62912", size = 178489, upload-time = "2025-04-15T17:38:10.338Z" },
- { url = "https://files.pythonhosted.org/packages/01/c8/fadd0b92ffa7b5eb5949bf340a63a4a496a6930a6c37a7ba0f12acb076d6/contourpy-1.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:8c942a01d9163e2e5cfb05cb66110121b8d07ad438a17f9e766317bcb62abf73", size = 223042, upload-time = "2025-04-15T17:38:14.239Z" },
- { url = "https://files.pythonhosted.org/packages/2e/61/5673f7e364b31e4e7ef6f61a4b5121c5f170f941895912f773d95270f3a2/contourpy-1.3.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:de39db2604ae755316cb5967728f4bea92685884b1e767b7c24e983ef5f771cb", size = 271630, upload-time = "2025-04-15T17:38:19.142Z" },
- { url = "https://files.pythonhosted.org/packages/ff/66/a40badddd1223822c95798c55292844b7e871e50f6bfd9f158cb25e0bd39/contourpy-1.3.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3f9e896f447c5c8618f1edb2bafa9a4030f22a575ec418ad70611450720b5b08", size = 255670, upload-time = "2025-04-15T17:38:23.688Z" },
- { url = "https://files.pythonhosted.org/packages/1e/c7/cf9fdee8200805c9bc3b148f49cb9482a4e3ea2719e772602a425c9b09f8/contourpy-1.3.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71e2bd4a1c4188f5c2b8d274da78faab884b59df20df63c34f74aa1813c4427c", size = 306694, upload-time = "2025-04-15T17:38:28.238Z" },
- { url = "https://files.pythonhosted.org/packages/dd/e7/ccb9bec80e1ba121efbffad7f38021021cda5be87532ec16fd96533bb2e0/contourpy-1.3.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de425af81b6cea33101ae95ece1f696af39446db9682a0b56daaa48cfc29f38f", size = 345986, upload-time = "2025-04-15T17:38:33.502Z" },
- { url = "https://files.pythonhosted.org/packages/dc/49/ca13bb2da90391fa4219fdb23b078d6065ada886658ac7818e5441448b78/contourpy-1.3.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:977e98a0e0480d3fe292246417239d2d45435904afd6d7332d8455981c408b85", size = 318060, upload-time = "2025-04-15T17:38:38.672Z" },
- { url = "https://files.pythonhosted.org/packages/c8/65/5245ce8c548a8422236c13ffcdcdada6a2a812c361e9e0c70548bb40b661/contourpy-1.3.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:434f0adf84911c924519d2b08fc10491dd282b20bdd3fa8f60fd816ea0b48841", size = 322747, upload-time = "2025-04-15T17:38:43.712Z" },
- { url = "https://files.pythonhosted.org/packages/72/30/669b8eb48e0a01c660ead3752a25b44fdb2e5ebc13a55782f639170772f9/contourpy-1.3.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c66c4906cdbc50e9cba65978823e6e00b45682eb09adbb78c9775b74eb222422", size = 1308895, upload-time = "2025-04-15T17:39:00.224Z" },
- { url = "https://files.pythonhosted.org/packages/05/5a/b569f4250decee6e8d54498be7bdf29021a4c256e77fe8138c8319ef8eb3/contourpy-1.3.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8b7fc0cd78ba2f4695fd0a6ad81a19e7e3ab825c31b577f384aa9d7817dc3bef", size = 1379098, upload-time = "2025-04-15T17:43:29.649Z" },
- { url = "https://files.pythonhosted.org/packages/19/ba/b227c3886d120e60e41b28740ac3617b2f2b971b9f601c835661194579f1/contourpy-1.3.2-cp313-cp313-win32.whl", hash = "sha256:15ce6ab60957ca74cff444fe66d9045c1fd3e92c8936894ebd1f3eef2fff075f", size = 178535, upload-time = "2025-04-15T17:44:44.532Z" },
- { url = "https://files.pythonhosted.org/packages/12/6e/2fed56cd47ca739b43e892707ae9a13790a486a3173be063681ca67d2262/contourpy-1.3.2-cp313-cp313-win_amd64.whl", hash = "sha256:e1578f7eafce927b168752ed7e22646dad6cd9bca673c60bff55889fa236ebf9", size = 223096, upload-time = "2025-04-15T17:44:48.194Z" },
- { url = "https://files.pythonhosted.org/packages/54/4c/e76fe2a03014a7c767d79ea35c86a747e9325537a8b7627e0e5b3ba266b4/contourpy-1.3.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0475b1f6604896bc7c53bb070e355e9321e1bc0d381735421a2d2068ec56531f", size = 285090, upload-time = "2025-04-15T17:43:34.084Z" },
- { url = "https://files.pythonhosted.org/packages/7b/e2/5aba47debd55d668e00baf9651b721e7733975dc9fc27264a62b0dd26eb8/contourpy-1.3.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:c85bb486e9be652314bb5b9e2e3b0d1b2e643d5eec4992c0fbe8ac71775da739", size = 268643, upload-time = "2025-04-15T17:43:38.626Z" },
- { url = "https://files.pythonhosted.org/packages/a1/37/cd45f1f051fe6230f751cc5cdd2728bb3a203f5619510ef11e732109593c/contourpy-1.3.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:745b57db7758f3ffc05a10254edd3182a2a83402a89c00957a8e8a22f5582823", size = 310443, upload-time = "2025-04-15T17:43:44.522Z" },
- { url = "https://files.pythonhosted.org/packages/8b/a2/36ea6140c306c9ff6dd38e3bcec80b3b018474ef4d17eb68ceecd26675f4/contourpy-1.3.2-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:970e9173dbd7eba9b4e01aab19215a48ee5dd3f43cef736eebde064a171f89a5", size = 349865, upload-time = "2025-04-15T17:43:49.545Z" },
- { url = "https://files.pythonhosted.org/packages/95/b7/2fc76bc539693180488f7b6cc518da7acbbb9e3b931fd9280504128bf956/contourpy-1.3.2-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6c4639a9c22230276b7bffb6a850dfc8258a2521305e1faefe804d006b2e532", size = 321162, upload-time = "2025-04-15T17:43:54.203Z" },
- { url = "https://files.pythonhosted.org/packages/f4/10/76d4f778458b0aa83f96e59d65ece72a060bacb20cfbee46cf6cd5ceba41/contourpy-1.3.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc829960f34ba36aad4302e78eabf3ef16a3a100863f0d4eeddf30e8a485a03b", size = 327355, upload-time = "2025-04-15T17:44:01.025Z" },
- { url = "https://files.pythonhosted.org/packages/43/a3/10cf483ea683f9f8ab096c24bad3cce20e0d1dd9a4baa0e2093c1c962d9d/contourpy-1.3.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:d32530b534e986374fc19eaa77fcb87e8a99e5431499949b828312bdcd20ac52", size = 1307935, upload-time = "2025-04-15T17:44:17.322Z" },
- { url = "https://files.pythonhosted.org/packages/78/73/69dd9a024444489e22d86108e7b913f3528f56cfc312b5c5727a44188471/contourpy-1.3.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:e298e7e70cf4eb179cc1077be1c725b5fd131ebc81181bf0c03525c8abc297fd", size = 1372168, upload-time = "2025-04-15T17:44:33.43Z" },
- { url = "https://files.pythonhosted.org/packages/0f/1b/96d586ccf1b1a9d2004dd519b25fbf104a11589abfd05484ff12199cca21/contourpy-1.3.2-cp313-cp313t-win32.whl", hash = "sha256:d0e589ae0d55204991450bb5c23f571c64fe43adaa53f93fc902a84c96f52fe1", size = 189550, upload-time = "2025-04-15T17:44:37.092Z" },
- { url = "https://files.pythonhosted.org/packages/b0/e6/6000d0094e8a5e32ad62591c8609e269febb6e4db83a1c75ff8868b42731/contourpy-1.3.2-cp313-cp313t-win_amd64.whl", hash = "sha256:78e9253c3de756b3f6a5174d024c4835acd59eb3f8e2ca13e775dbffe1558f69", size = 238214, upload-time = "2025-04-15T17:44:40.827Z" },
- { url = "https://files.pythonhosted.org/packages/33/05/b26e3c6ecc05f349ee0013f0bb850a761016d89cec528a98193a48c34033/contourpy-1.3.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:fd93cc7f3139b6dd7aab2f26a90dde0aa9fc264dbf70f6740d498a70b860b82c", size = 265681, upload-time = "2025-04-15T17:44:59.314Z" },
- { url = "https://files.pythonhosted.org/packages/2b/25/ac07d6ad12affa7d1ffed11b77417d0a6308170f44ff20fa1d5aa6333f03/contourpy-1.3.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:107ba8a6a7eec58bb475329e6d3b95deba9440667c4d62b9b6063942b61d7f16", size = 315101, upload-time = "2025-04-15T17:45:04.165Z" },
- { url = "https://files.pythonhosted.org/packages/8f/4d/5bb3192bbe9d3f27e3061a6a8e7733c9120e203cb8515767d30973f71030/contourpy-1.3.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ded1706ed0c1049224531b81128efbd5084598f18d8a2d9efae833edbd2b40ad", size = 220599, upload-time = "2025-04-15T17:45:08.456Z" },
- { url = "https://files.pythonhosted.org/packages/ff/c0/91f1215d0d9f9f343e4773ba6c9b89e8c0cc7a64a6263f21139da639d848/contourpy-1.3.2-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:5f5964cdad279256c084b69c3f412b7801e15356b16efa9d78aa974041903da0", size = 266807, upload-time = "2025-04-15T17:45:15.535Z" },
- { url = "https://files.pythonhosted.org/packages/d4/79/6be7e90c955c0487e7712660d6cead01fa17bff98e0ea275737cc2bc8e71/contourpy-1.3.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49b65a95d642d4efa8f64ba12558fcb83407e58a2dfba9d796d77b63ccfcaff5", size = 318729, upload-time = "2025-04-15T17:45:20.166Z" },
- { url = "https://files.pythonhosted.org/packages/87/68/7f46fb537958e87427d98a4074bcde4b67a70b04900cfc5ce29bc2f556c1/contourpy-1.3.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:8c5acb8dddb0752bf252e01a3035b21443158910ac16a3b0d20e7fed7d534ce5", size = 221791, upload-time = "2025-04-15T17:45:24.794Z" },
-]
-
-[[package]]
-name = "contourpy"
-version = "1.3.3"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version >= '3.13' and sys_platform == 'linux'",
- "python_full_version == '3.12.*' and sys_platform == 'linux'",
- "python_full_version == '3.11.*' and sys_platform == 'linux'",
- "python_full_version >= '3.13' and sys_platform != 'linux'",
- "python_full_version == '3.12.*' and sys_platform != 'linux'",
- "python_full_version == '3.11.*' and sys_platform != 'linux'",
-]
-dependencies = [
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" } },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/58/01/1253e6698a07380cd31a736d248a3f2a50a7c88779a1813da27503cadc2a/contourpy-1.3.3.tar.gz", hash = "sha256:083e12155b210502d0bca491432bb04d56dc3432f95a979b429f2848c3dbe880", size = 13466174, upload-time = "2025-07-26T12:03:12.549Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/91/2e/c4390a31919d8a78b90e8ecf87cd4b4c4f05a5b48d05ec17db8e5404c6f4/contourpy-1.3.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:709a48ef9a690e1343202916450bc48b9e51c049b089c7f79a267b46cffcdaa1", size = 288773, upload-time = "2025-07-26T12:01:02.277Z" },
- { url = "https://files.pythonhosted.org/packages/0d/44/c4b0b6095fef4dc9c420e041799591e3b63e9619e3044f7f4f6c21c0ab24/contourpy-1.3.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:23416f38bfd74d5d28ab8429cc4d63fa67d5068bd711a85edb1c3fb0c3e2f381", size = 270149, upload-time = "2025-07-26T12:01:04.072Z" },
- { url = "https://files.pythonhosted.org/packages/30/2e/dd4ced42fefac8470661d7cb7e264808425e6c5d56d175291e93890cce09/contourpy-1.3.3-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:929ddf8c4c7f348e4c0a5a3a714b5c8542ffaa8c22954862a46ca1813b667ee7", size = 329222, upload-time = "2025-07-26T12:01:05.688Z" },
- { url = "https://files.pythonhosted.org/packages/f2/74/cc6ec2548e3d276c71389ea4802a774b7aa3558223b7bade3f25787fafc2/contourpy-1.3.3-cp311-cp311-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9e999574eddae35f1312c2b4b717b7885d4edd6cb46700e04f7f02db454e67c1", size = 377234, upload-time = "2025-07-26T12:01:07.054Z" },
- { url = "https://files.pythonhosted.org/packages/03/b3/64ef723029f917410f75c09da54254c5f9ea90ef89b143ccadb09df14c15/contourpy-1.3.3-cp311-cp311-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0bf67e0e3f482cb69779dd3061b534eb35ac9b17f163d851e2a547d56dba0a3a", size = 380555, upload-time = "2025-07-26T12:01:08.801Z" },
- { url = "https://files.pythonhosted.org/packages/5f/4b/6157f24ca425b89fe2eb7e7be642375711ab671135be21e6faa100f7448c/contourpy-1.3.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:51e79c1f7470158e838808d4a996fa9bac72c498e93d8ebe5119bc1e6becb0db", size = 355238, upload-time = "2025-07-26T12:01:10.319Z" },
- { url = "https://files.pythonhosted.org/packages/98/56/f914f0dd678480708a04cfd2206e7c382533249bc5001eb9f58aa693e200/contourpy-1.3.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:598c3aaece21c503615fd59c92a3598b428b2f01bfb4b8ca9c4edeecc2438620", size = 1326218, upload-time = "2025-07-26T12:01:12.659Z" },
- { url = "https://files.pythonhosted.org/packages/fb/d7/4a972334a0c971acd5172389671113ae82aa7527073980c38d5868ff1161/contourpy-1.3.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:322ab1c99b008dad206d406bb61d014cf0174df491ae9d9d0fac6a6fda4f977f", size = 1392867, upload-time = "2025-07-26T12:01:15.533Z" },
- { url = "https://files.pythonhosted.org/packages/75/3e/f2cc6cd56dc8cff46b1a56232eabc6feea52720083ea71ab15523daab796/contourpy-1.3.3-cp311-cp311-win32.whl", hash = "sha256:fd907ae12cd483cd83e414b12941c632a969171bf90fc937d0c9f268a31cafff", size = 183677, upload-time = "2025-07-26T12:01:17.088Z" },
- { url = "https://files.pythonhosted.org/packages/98/4b/9bd370b004b5c9d8045c6c33cf65bae018b27aca550a3f657cdc99acdbd8/contourpy-1.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:3519428f6be58431c56581f1694ba8e50626f2dd550af225f82fb5f5814d2a42", size = 225234, upload-time = "2025-07-26T12:01:18.256Z" },
- { url = "https://files.pythonhosted.org/packages/d9/b6/71771e02c2e004450c12b1120a5f488cad2e4d5b590b1af8bad060360fe4/contourpy-1.3.3-cp311-cp311-win_arm64.whl", hash = "sha256:15ff10bfada4bf92ec8b31c62bf7c1834c244019b4a33095a68000d7075df470", size = 193123, upload-time = "2025-07-26T12:01:19.848Z" },
- { url = "https://files.pythonhosted.org/packages/be/45/adfee365d9ea3d853550b2e735f9d66366701c65db7855cd07621732ccfc/contourpy-1.3.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b08a32ea2f8e42cf1d4be3169a98dd4be32bafe4f22b6c4cb4ba810fa9e5d2cb", size = 293419, upload-time = "2025-07-26T12:01:21.16Z" },
- { url = "https://files.pythonhosted.org/packages/53/3e/405b59cfa13021a56bba395a6b3aca8cec012b45bf177b0eaf7a202cde2c/contourpy-1.3.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:556dba8fb6f5d8742f2923fe9457dbdd51e1049c4a43fd3986a0b14a1d815fc6", size = 273979, upload-time = "2025-07-26T12:01:22.448Z" },
- { url = "https://files.pythonhosted.org/packages/d4/1c/a12359b9b2ca3a845e8f7f9ac08bdf776114eb931392fcad91743e2ea17b/contourpy-1.3.3-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:92d9abc807cf7d0e047b95ca5d957cf4792fcd04e920ca70d48add15c1a90ea7", size = 332653, upload-time = "2025-07-26T12:01:24.155Z" },
- { url = "https://files.pythonhosted.org/packages/63/12/897aeebfb475b7748ea67b61e045accdfcf0d971f8a588b67108ed7f5512/contourpy-1.3.3-cp312-cp312-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b2e8faa0ed68cb29af51edd8e24798bb661eac3bd9f65420c1887b6ca89987c8", size = 379536, upload-time = "2025-07-26T12:01:25.91Z" },
- { url = "https://files.pythonhosted.org/packages/43/8a/a8c584b82deb248930ce069e71576fc09bd7174bbd35183b7943fb1064fd/contourpy-1.3.3-cp312-cp312-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:626d60935cf668e70a5ce6ff184fd713e9683fb458898e4249b63be9e28286ea", size = 384397, upload-time = "2025-07-26T12:01:27.152Z" },
- { url = "https://files.pythonhosted.org/packages/cc/8f/ec6289987824b29529d0dfda0d74a07cec60e54b9c92f3c9da4c0ac732de/contourpy-1.3.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4d00e655fcef08aba35ec9610536bfe90267d7ab5ba944f7032549c55a146da1", size = 362601, upload-time = "2025-07-26T12:01:28.808Z" },
- { url = "https://files.pythonhosted.org/packages/05/0a/a3fe3be3ee2dceb3e615ebb4df97ae6f3828aa915d3e10549ce016302bd1/contourpy-1.3.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:451e71b5a7d597379ef572de31eeb909a87246974d960049a9848c3bc6c41bf7", size = 1331288, upload-time = "2025-07-26T12:01:31.198Z" },
- { url = "https://files.pythonhosted.org/packages/33/1d/acad9bd4e97f13f3e2b18a3977fe1b4a37ecf3d38d815333980c6c72e963/contourpy-1.3.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:459c1f020cd59fcfe6650180678a9993932d80d44ccde1fa1868977438f0b411", size = 1403386, upload-time = "2025-07-26T12:01:33.947Z" },
- { url = "https://files.pythonhosted.org/packages/cf/8f/5847f44a7fddf859704217a99a23a4f6417b10e5ab1256a179264561540e/contourpy-1.3.3-cp312-cp312-win32.whl", hash = "sha256:023b44101dfe49d7d53932be418477dba359649246075c996866106da069af69", size = 185018, upload-time = "2025-07-26T12:01:35.64Z" },
- { url = "https://files.pythonhosted.org/packages/19/e8/6026ed58a64563186a9ee3f29f41261fd1828f527dd93d33b60feca63352/contourpy-1.3.3-cp312-cp312-win_amd64.whl", hash = "sha256:8153b8bfc11e1e4d75bcb0bff1db232f9e10b274e0929de9d608027e0d34ff8b", size = 226567, upload-time = "2025-07-26T12:01:36.804Z" },
- { url = "https://files.pythonhosted.org/packages/d1/e2/f05240d2c39a1ed228d8328a78b6f44cd695f7ef47beb3e684cf93604f86/contourpy-1.3.3-cp312-cp312-win_arm64.whl", hash = "sha256:07ce5ed73ecdc4a03ffe3e1b3e3c1166db35ae7584be76f65dbbe28a7791b0cc", size = 193655, upload-time = "2025-07-26T12:01:37.999Z" },
- { url = "https://files.pythonhosted.org/packages/68/35/0167aad910bbdb9599272bd96d01a9ec6852f36b9455cf2ca67bd4cc2d23/contourpy-1.3.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:177fb367556747a686509d6fef71d221a4b198a3905fe824430e5ea0fda54eb5", size = 293257, upload-time = "2025-07-26T12:01:39.367Z" },
- { url = "https://files.pythonhosted.org/packages/96/e4/7adcd9c8362745b2210728f209bfbcf7d91ba868a2c5f40d8b58f54c509b/contourpy-1.3.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d002b6f00d73d69333dac9d0b8d5e84d9724ff9ef044fd63c5986e62b7c9e1b1", size = 274034, upload-time = "2025-07-26T12:01:40.645Z" },
- { url = "https://files.pythonhosted.org/packages/73/23/90e31ceeed1de63058a02cb04b12f2de4b40e3bef5e082a7c18d9c8ae281/contourpy-1.3.3-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:348ac1f5d4f1d66d3322420f01d42e43122f43616e0f194fc1c9f5d830c5b286", size = 334672, upload-time = "2025-07-26T12:01:41.942Z" },
- { url = "https://files.pythonhosted.org/packages/ed/93/b43d8acbe67392e659e1d984700e79eb67e2acb2bd7f62012b583a7f1b55/contourpy-1.3.3-cp313-cp313-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:655456777ff65c2c548b7c454af9c6f33f16c8884f11083244b5819cc214f1b5", size = 381234, upload-time = "2025-07-26T12:01:43.499Z" },
- { url = "https://files.pythonhosted.org/packages/46/3b/bec82a3ea06f66711520f75a40c8fc0b113b2a75edb36aa633eb11c4f50f/contourpy-1.3.3-cp313-cp313-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:644a6853d15b2512d67881586bd03f462c7ab755db95f16f14d7e238f2852c67", size = 385169, upload-time = "2025-07-26T12:01:45.219Z" },
- { url = "https://files.pythonhosted.org/packages/4b/32/e0f13a1c5b0f8572d0ec6ae2f6c677b7991fafd95da523159c19eff0696a/contourpy-1.3.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4debd64f124ca62069f313a9cb86656ff087786016d76927ae2cf37846b006c9", size = 362859, upload-time = "2025-07-26T12:01:46.519Z" },
- { url = "https://files.pythonhosted.org/packages/33/71/e2a7945b7de4e58af42d708a219f3b2f4cff7386e6b6ab0a0fa0033c49a9/contourpy-1.3.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a15459b0f4615b00bbd1e91f1b9e19b7e63aea7483d03d804186f278c0af2659", size = 1332062, upload-time = "2025-07-26T12:01:48.964Z" },
- { url = "https://files.pythonhosted.org/packages/12/fc/4e87ac754220ccc0e807284f88e943d6d43b43843614f0a8afa469801db0/contourpy-1.3.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ca0fdcd73925568ca027e0b17ab07aad764be4706d0a925b89227e447d9737b7", size = 1403932, upload-time = "2025-07-26T12:01:51.979Z" },
- { url = "https://files.pythonhosted.org/packages/a6/2e/adc197a37443f934594112222ac1aa7dc9a98faf9c3842884df9a9d8751d/contourpy-1.3.3-cp313-cp313-win32.whl", hash = "sha256:b20c7c9a3bf701366556e1b1984ed2d0cedf999903c51311417cf5f591d8c78d", size = 185024, upload-time = "2025-07-26T12:01:53.245Z" },
- { url = "https://files.pythonhosted.org/packages/18/0b/0098c214843213759692cc638fce7de5c289200a830e5035d1791d7a2338/contourpy-1.3.3-cp313-cp313-win_amd64.whl", hash = "sha256:1cadd8b8969f060ba45ed7c1b714fe69185812ab43bd6b86a9123fe8f99c3263", size = 226578, upload-time = "2025-07-26T12:01:54.422Z" },
- { url = "https://files.pythonhosted.org/packages/8a/9a/2f6024a0c5995243cd63afdeb3651c984f0d2bc727fd98066d40e141ad73/contourpy-1.3.3-cp313-cp313-win_arm64.whl", hash = "sha256:fd914713266421b7536de2bfa8181aa8c699432b6763a0ea64195ebe28bff6a9", size = 193524, upload-time = "2025-07-26T12:01:55.73Z" },
- { url = "https://files.pythonhosted.org/packages/c0/b3/f8a1a86bd3298513f500e5b1f5fd92b69896449f6cab6a146a5d52715479/contourpy-1.3.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:88df9880d507169449d434c293467418b9f6cbe82edd19284aa0409e7fdb933d", size = 306730, upload-time = "2025-07-26T12:01:57.051Z" },
- { url = "https://files.pythonhosted.org/packages/3f/11/4780db94ae62fc0c2053909b65dc3246bd7cecfc4f8a20d957ad43aa4ad8/contourpy-1.3.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:d06bb1f751ba5d417047db62bca3c8fde202b8c11fb50742ab3ab962c81e8216", size = 287897, upload-time = "2025-07-26T12:01:58.663Z" },
- { url = "https://files.pythonhosted.org/packages/ae/15/e59f5f3ffdd6f3d4daa3e47114c53daabcb18574a26c21f03dc9e4e42ff0/contourpy-1.3.3-cp313-cp313t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e4e6b05a45525357e382909a4c1600444e2a45b4795163d3b22669285591c1ae", size = 326751, upload-time = "2025-07-26T12:02:00.343Z" },
- { url = "https://files.pythonhosted.org/packages/0f/81/03b45cfad088e4770b1dcf72ea78d3802d04200009fb364d18a493857210/contourpy-1.3.3-cp313-cp313t-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ab3074b48c4e2cf1a960e6bbeb7f04566bf36b1861d5c9d4d8ac04b82e38ba20", size = 375486, upload-time = "2025-07-26T12:02:02.128Z" },
- { url = "https://files.pythonhosted.org/packages/0c/ba/49923366492ffbdd4486e970d421b289a670ae8cf539c1ea9a09822b371a/contourpy-1.3.3-cp313-cp313t-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6c3d53c796f8647d6deb1abe867daeb66dcc8a97e8455efa729516b997b8ed99", size = 388106, upload-time = "2025-07-26T12:02:03.615Z" },
- { url = "https://files.pythonhosted.org/packages/9f/52/5b00ea89525f8f143651f9f03a0df371d3cbd2fccd21ca9b768c7a6500c2/contourpy-1.3.3-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:50ed930df7289ff2a8d7afeb9603f8289e5704755c7e5c3bbd929c90c817164b", size = 352548, upload-time = "2025-07-26T12:02:05.165Z" },
- { url = "https://files.pythonhosted.org/packages/32/1d/a209ec1a3a3452d490f6b14dd92e72280c99ae3d1e73da74f8277d4ee08f/contourpy-1.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4feffb6537d64b84877da813a5c30f1422ea5739566abf0bd18065ac040e120a", size = 1322297, upload-time = "2025-07-26T12:02:07.379Z" },
- { url = "https://files.pythonhosted.org/packages/bc/9e/46f0e8ebdd884ca0e8877e46a3f4e633f6c9c8c4f3f6e72be3fe075994aa/contourpy-1.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:2b7e9480ffe2b0cd2e787e4df64270e3a0440d9db8dc823312e2c940c167df7e", size = 1391023, upload-time = "2025-07-26T12:02:10.171Z" },
- { url = "https://files.pythonhosted.org/packages/b9/70/f308384a3ae9cd2209e0849f33c913f658d3326900d0ff5d378d6a1422d2/contourpy-1.3.3-cp313-cp313t-win32.whl", hash = "sha256:283edd842a01e3dcd435b1c5116798d661378d83d36d337b8dde1d16a5fc9ba3", size = 196157, upload-time = "2025-07-26T12:02:11.488Z" },
- { url = "https://files.pythonhosted.org/packages/b2/dd/880f890a6663b84d9e34a6f88cded89d78f0091e0045a284427cb6b18521/contourpy-1.3.3-cp313-cp313t-win_amd64.whl", hash = "sha256:87acf5963fc2b34825e5b6b048f40e3635dd547f590b04d2ab317c2619ef7ae8", size = 240570, upload-time = "2025-07-26T12:02:12.754Z" },
- { url = "https://files.pythonhosted.org/packages/80/99/2adc7d8ffead633234817ef8e9a87115c8a11927a94478f6bb3d3f4d4f7d/contourpy-1.3.3-cp313-cp313t-win_arm64.whl", hash = "sha256:3c30273eb2a55024ff31ba7d052dde990d7d8e5450f4bbb6e913558b3d6c2301", size = 199713, upload-time = "2025-07-26T12:02:14.4Z" },
- { url = "https://files.pythonhosted.org/packages/72/8b/4546f3ab60f78c514ffb7d01a0bd743f90de36f0019d1be84d0a708a580a/contourpy-1.3.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:fde6c716d51c04b1c25d0b90364d0be954624a0ee9d60e23e850e8d48353d07a", size = 292189, upload-time = "2025-07-26T12:02:16.095Z" },
- { url = "https://files.pythonhosted.org/packages/fd/e1/3542a9cb596cadd76fcef413f19c79216e002623158befe6daa03dbfa88c/contourpy-1.3.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:cbedb772ed74ff5be440fa8eee9bd49f64f6e3fc09436d9c7d8f1c287b121d77", size = 273251, upload-time = "2025-07-26T12:02:17.524Z" },
- { url = "https://files.pythonhosted.org/packages/b1/71/f93e1e9471d189f79d0ce2497007731c1e6bf9ef6d1d61b911430c3db4e5/contourpy-1.3.3-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:22e9b1bd7a9b1d652cd77388465dc358dafcd2e217d35552424aa4f996f524f5", size = 335810, upload-time = "2025-07-26T12:02:18.9Z" },
- { url = "https://files.pythonhosted.org/packages/91/f9/e35f4c1c93f9275d4e38681a80506b5510e9327350c51f8d4a5a724d178c/contourpy-1.3.3-cp314-cp314-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a22738912262aa3e254e4f3cb079a95a67132fc5a063890e224393596902f5a4", size = 382871, upload-time = "2025-07-26T12:02:20.418Z" },
- { url = "https://files.pythonhosted.org/packages/b5/71/47b512f936f66a0a900d81c396a7e60d73419868fba959c61efed7a8ab46/contourpy-1.3.3-cp314-cp314-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:afe5a512f31ee6bd7d0dda52ec9864c984ca3d66664444f2d72e0dc4eb832e36", size = 386264, upload-time = "2025-07-26T12:02:21.916Z" },
- { url = "https://files.pythonhosted.org/packages/04/5f/9ff93450ba96b09c7c2b3f81c94de31c89f92292f1380261bd7195bea4ea/contourpy-1.3.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f64836de09927cba6f79dcd00fdd7d5329f3fccc633468507079c829ca4db4e3", size = 363819, upload-time = "2025-07-26T12:02:23.759Z" },
- { url = "https://files.pythonhosted.org/packages/3e/a6/0b185d4cc480ee494945cde102cb0149ae830b5fa17bf855b95f2e70ad13/contourpy-1.3.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:1fd43c3be4c8e5fd6e4f2baeae35ae18176cf2e5cced681cca908addf1cdd53b", size = 1333650, upload-time = "2025-07-26T12:02:26.181Z" },
- { url = "https://files.pythonhosted.org/packages/43/d7/afdc95580ca56f30fbcd3060250f66cedbde69b4547028863abd8aa3b47e/contourpy-1.3.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6afc576f7b33cf00996e5c1102dc2a8f7cc89e39c0b55df93a0b78c1bd992b36", size = 1404833, upload-time = "2025-07-26T12:02:28.782Z" },
- { url = "https://files.pythonhosted.org/packages/e2/e2/366af18a6d386f41132a48f033cbd2102e9b0cf6345d35ff0826cd984566/contourpy-1.3.3-cp314-cp314-win32.whl", hash = "sha256:66c8a43a4f7b8df8b71ee1840e4211a3c8d93b214b213f590e18a1beca458f7d", size = 189692, upload-time = "2025-07-26T12:02:30.128Z" },
- { url = "https://files.pythonhosted.org/packages/7d/c2/57f54b03d0f22d4044b8afb9ca0e184f8b1afd57b4f735c2fa70883dc601/contourpy-1.3.3-cp314-cp314-win_amd64.whl", hash = "sha256:cf9022ef053f2694e31d630feaacb21ea24224be1c3ad0520b13d844274614fd", size = 232424, upload-time = "2025-07-26T12:02:31.395Z" },
- { url = "https://files.pythonhosted.org/packages/18/79/a9416650df9b525737ab521aa181ccc42d56016d2123ddcb7b58e926a42c/contourpy-1.3.3-cp314-cp314-win_arm64.whl", hash = "sha256:95b181891b4c71de4bb404c6621e7e2390745f887f2a026b2d99e92c17892339", size = 198300, upload-time = "2025-07-26T12:02:32.956Z" },
- { url = "https://files.pythonhosted.org/packages/1f/42/38c159a7d0f2b7b9c04c64ab317042bb6952b713ba875c1681529a2932fe/contourpy-1.3.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:33c82d0138c0a062380332c861387650c82e4cf1747aaa6938b9b6516762e772", size = 306769, upload-time = "2025-07-26T12:02:34.2Z" },
- { url = "https://files.pythonhosted.org/packages/c3/6c/26a8205f24bca10974e77460de68d3d7c63e282e23782f1239f226fcae6f/contourpy-1.3.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ea37e7b45949df430fe649e5de8351c423430046a2af20b1c1961cae3afcda77", size = 287892, upload-time = "2025-07-26T12:02:35.807Z" },
- { url = "https://files.pythonhosted.org/packages/66/06/8a475c8ab718ebfd7925661747dbb3c3ee9c82ac834ccb3570be49d129f4/contourpy-1.3.3-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d304906ecc71672e9c89e87c4675dc5c2645e1f4269a5063b99b0bb29f232d13", size = 326748, upload-time = "2025-07-26T12:02:37.193Z" },
- { url = "https://files.pythonhosted.org/packages/b4/a3/c5ca9f010a44c223f098fccd8b158bb1cb287378a31ac141f04730dc49be/contourpy-1.3.3-cp314-cp314t-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ca658cd1a680a5c9ea96dc61cdbae1e85c8f25849843aa799dfd3cb370ad4fbe", size = 375554, upload-time = "2025-07-26T12:02:38.894Z" },
- { url = "https://files.pythonhosted.org/packages/80/5b/68bd33ae63fac658a4145088c1e894405e07584a316738710b636c6d0333/contourpy-1.3.3-cp314-cp314t-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ab2fd90904c503739a75b7c8c5c01160130ba67944a7b77bbf36ef8054576e7f", size = 388118, upload-time = "2025-07-26T12:02:40.642Z" },
- { url = "https://files.pythonhosted.org/packages/40/52/4c285a6435940ae25d7410a6c36bda5145839bc3f0beb20c707cda18b9d2/contourpy-1.3.3-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b7301b89040075c30e5768810bc96a8e8d78085b47d8be6e4c3f5a0b4ed478a0", size = 352555, upload-time = "2025-07-26T12:02:42.25Z" },
- { url = "https://files.pythonhosted.org/packages/24/ee/3e81e1dd174f5c7fefe50e85d0892de05ca4e26ef1c9a59c2a57e43b865a/contourpy-1.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:2a2a8b627d5cc6b7c41a4beff6c5ad5eb848c88255fda4a8745f7e901b32d8e4", size = 1322295, upload-time = "2025-07-26T12:02:44.668Z" },
- { url = "https://files.pythonhosted.org/packages/3c/b2/6d913d4d04e14379de429057cd169e5e00f6c2af3bb13e1710bcbdb5da12/contourpy-1.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:fd6ec6be509c787f1caf6b247f0b1ca598bef13f4ddeaa126b7658215529ba0f", size = 1391027, upload-time = "2025-07-26T12:02:47.09Z" },
- { url = "https://files.pythonhosted.org/packages/93/8a/68a4ec5c55a2971213d29a9374913f7e9f18581945a7a31d1a39b5d2dfe5/contourpy-1.3.3-cp314-cp314t-win32.whl", hash = "sha256:e74a9a0f5e3fff48fb5a7f2fd2b9b70a3fe014a67522f79b7cca4c0c7e43c9ae", size = 202428, upload-time = "2025-07-26T12:02:48.691Z" },
- { url = "https://files.pythonhosted.org/packages/fa/96/fd9f641ffedc4fa3ace923af73b9d07e869496c9cc7a459103e6e978992f/contourpy-1.3.3-cp314-cp314t-win_amd64.whl", hash = "sha256:13b68d6a62db8eafaebb8039218921399baf6e47bf85006fd8529f2a08ef33fc", size = 250331, upload-time = "2025-07-26T12:02:50.137Z" },
- { url = "https://files.pythonhosted.org/packages/ae/8c/469afb6465b853afff216f9528ffda78a915ff880ed58813ba4faf4ba0b6/contourpy-1.3.3-cp314-cp314t-win_arm64.whl", hash = "sha256:b7448cb5a725bb1e35ce88771b86fba35ef418952474492cf7c764059933ff8b", size = 203831, upload-time = "2025-07-26T12:02:51.449Z" },
- { url = "https://files.pythonhosted.org/packages/a5/29/8dcfe16f0107943fa92388c23f6e05cff0ba58058c4c95b00280d4c75a14/contourpy-1.3.3-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:cd5dfcaeb10f7b7f9dc8941717c6c2ade08f587be2226222c12b25f0483ed497", size = 278809, upload-time = "2025-07-26T12:02:52.74Z" },
- { url = "https://files.pythonhosted.org/packages/85/a9/8b37ef4f7dafeb335daee3c8254645ef5725be4d9c6aa70b50ec46ef2f7e/contourpy-1.3.3-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:0c1fc238306b35f246d61a1d416a627348b5cf0648648a031e14bb8705fcdfe8", size = 261593, upload-time = "2025-07-26T12:02:54.037Z" },
- { url = "https://files.pythonhosted.org/packages/0a/59/ebfb8c677c75605cc27f7122c90313fd2f375ff3c8d19a1694bda74aaa63/contourpy-1.3.3-pp311-pypy311_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:70f9aad7de812d6541d29d2bbf8feb22ff7e1c299523db288004e3157ff4674e", size = 302202, upload-time = "2025-07-26T12:02:55.947Z" },
- { url = "https://files.pythonhosted.org/packages/3c/37/21972a15834d90bfbfb009b9d004779bd5a07a0ec0234e5ba8f64d5736f4/contourpy-1.3.3-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5ed3657edf08512fc3fe81b510e35c2012fbd3081d2e26160f27ca28affec989", size = 329207, upload-time = "2025-07-26T12:02:57.468Z" },
- { url = "https://files.pythonhosted.org/packages/0c/58/bd257695f39d05594ca4ad60df5bcb7e32247f9951fd09a9b8edb82d1daa/contourpy-1.3.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:3d1a3799d62d45c18bafd41c5fa05120b96a28079f2393af559b843d1a966a77", size = 225315, upload-time = "2025-07-26T12:02:58.801Z" },
-]
-
-[[package]]
-name = "cryptography"
-version = "46.0.5"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "cffi", marker = "platform_python_implementation != 'PyPy'" },
- { name = "typing-extensions", marker = "python_full_version < '3.11'" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/60/04/ee2a9e8542e4fa2773b81771ff8349ff19cdd56b7258a0cc442639052edb/cryptography-46.0.5.tar.gz", hash = "sha256:abace499247268e3757271b2f1e244b36b06f8515cf27c4d49468fc9eb16e93d", size = 750064, upload-time = "2026-02-10T19:18:38.255Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/f7/81/b0bb27f2ba931a65409c6b8a8b358a7f03c0e46eceacddff55f7c84b1f3b/cryptography-46.0.5-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:351695ada9ea9618b3500b490ad54c739860883df6c1f555e088eaf25b1bbaad", size = 7176289, upload-time = "2026-02-10T19:17:08.274Z" },
- { url = "https://files.pythonhosted.org/packages/ff/9e/6b4397a3e3d15123de3b1806ef342522393d50736c13b20ec4c9ea6693a6/cryptography-46.0.5-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c18ff11e86df2e28854939acde2d003f7984f721eba450b56a200ad90eeb0e6b", size = 4275637, upload-time = "2026-02-10T19:17:10.53Z" },
- { url = "https://files.pythonhosted.org/packages/63/e7/471ab61099a3920b0c77852ea3f0ea611c9702f651600397ac567848b897/cryptography-46.0.5-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4d7e3d356b8cd4ea5aff04f129d5f66ebdc7b6f8eae802b93739ed520c47c79b", size = 4424742, upload-time = "2026-02-10T19:17:12.388Z" },
- { url = "https://files.pythonhosted.org/packages/37/53/a18500f270342d66bf7e4d9f091114e31e5ee9e7375a5aba2e85a91e0044/cryptography-46.0.5-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:50bfb6925eff619c9c023b967d5b77a54e04256c4281b0e21336a130cd7fc263", size = 4277528, upload-time = "2026-02-10T19:17:13.853Z" },
- { url = "https://files.pythonhosted.org/packages/22/29/c2e812ebc38c57b40e7c583895e73c8c5adb4d1e4a0cc4c5a4fdab2b1acc/cryptography-46.0.5-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:803812e111e75d1aa73690d2facc295eaefd4439be1023fefc4995eaea2af90d", size = 4947993, upload-time = "2026-02-10T19:17:15.618Z" },
- { url = "https://files.pythonhosted.org/packages/6b/e7/237155ae19a9023de7e30ec64e5d99a9431a567407ac21170a046d22a5a3/cryptography-46.0.5-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3ee190460e2fbe447175cda91b88b84ae8322a104fc27766ad09428754a618ed", size = 4456855, upload-time = "2026-02-10T19:17:17.221Z" },
- { url = "https://files.pythonhosted.org/packages/2d/87/fc628a7ad85b81206738abbd213b07702bcbdada1dd43f72236ef3cffbb5/cryptography-46.0.5-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:f145bba11b878005c496e93e257c1e88f154d278d2638e6450d17e0f31e558d2", size = 3984635, upload-time = "2026-02-10T19:17:18.792Z" },
- { url = "https://files.pythonhosted.org/packages/84/29/65b55622bde135aedf4565dc509d99b560ee4095e56989e815f8fd2aa910/cryptography-46.0.5-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:e9251e3be159d1020c4030bd2e5f84d6a43fe54b6c19c12f51cde9542a2817b2", size = 4277038, upload-time = "2026-02-10T19:17:20.256Z" },
- { url = "https://files.pythonhosted.org/packages/bc/36/45e76c68d7311432741faf1fbf7fac8a196a0a735ca21f504c75d37e2558/cryptography-46.0.5-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:47fb8a66058b80e509c47118ef8a75d14c455e81ac369050f20ba0d23e77fee0", size = 4912181, upload-time = "2026-02-10T19:17:21.825Z" },
- { url = "https://files.pythonhosted.org/packages/6d/1a/c1ba8fead184d6e3d5afcf03d569acac5ad063f3ac9fb7258af158f7e378/cryptography-46.0.5-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:4c3341037c136030cb46e4b1e17b7418ea4cbd9dd207e4a6f3b2b24e0d4ac731", size = 4456482, upload-time = "2026-02-10T19:17:25.133Z" },
- { url = "https://files.pythonhosted.org/packages/f9/e5/3fb22e37f66827ced3b902cf895e6a6bc1d095b5b26be26bd13c441fdf19/cryptography-46.0.5-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:890bcb4abd5a2d3f852196437129eb3667d62630333aacc13dfd470fad3aaa82", size = 4405497, upload-time = "2026-02-10T19:17:26.66Z" },
- { url = "https://files.pythonhosted.org/packages/1a/df/9d58bb32b1121a8a2f27383fabae4d63080c7ca60b9b5c88be742be04ee7/cryptography-46.0.5-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:80a8d7bfdf38f87ca30a5391c0c9ce4ed2926918e017c29ddf643d0ed2778ea1", size = 4667819, upload-time = "2026-02-10T19:17:28.569Z" },
- { url = "https://files.pythonhosted.org/packages/ea/ed/325d2a490c5e94038cdb0117da9397ece1f11201f425c4e9c57fe5b9f08b/cryptography-46.0.5-cp311-abi3-win32.whl", hash = "sha256:60ee7e19e95104d4c03871d7d7dfb3d22ef8a9b9c6778c94e1c8fcc8365afd48", size = 3028230, upload-time = "2026-02-10T19:17:30.518Z" },
- { url = "https://files.pythonhosted.org/packages/e9/5a/ac0f49e48063ab4255d9e3b79f5def51697fce1a95ea1370f03dc9db76f6/cryptography-46.0.5-cp311-abi3-win_amd64.whl", hash = "sha256:38946c54b16c885c72c4f59846be9743d699eee2b69b6988e0a00a01f46a61a4", size = 3480909, upload-time = "2026-02-10T19:17:32.083Z" },
- { url = "https://files.pythonhosted.org/packages/00/13/3d278bfa7a15a96b9dc22db5a12ad1e48a9eb3d40e1827ef66a5df75d0d0/cryptography-46.0.5-cp314-cp314t-macosx_10_9_universal2.whl", hash = "sha256:94a76daa32eb78d61339aff7952ea819b1734b46f73646a07decb40e5b3448e2", size = 7119287, upload-time = "2026-02-10T19:17:33.801Z" },
- { url = "https://files.pythonhosted.org/packages/67/c8/581a6702e14f0898a0848105cbefd20c058099e2c2d22ef4e476dfec75d7/cryptography-46.0.5-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5be7bf2fb40769e05739dd0046e7b26f9d4670badc7b032d6ce4db64dddc0678", size = 4265728, upload-time = "2026-02-10T19:17:35.569Z" },
- { url = "https://files.pythonhosted.org/packages/dd/4a/ba1a65ce8fc65435e5a849558379896c957870dd64fecea97b1ad5f46a37/cryptography-46.0.5-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fe346b143ff9685e40192a4960938545c699054ba11d4f9029f94751e3f71d87", size = 4408287, upload-time = "2026-02-10T19:17:36.938Z" },
- { url = "https://files.pythonhosted.org/packages/f8/67/8ffdbf7b65ed1ac224d1c2df3943553766914a8ca718747ee3871da6107e/cryptography-46.0.5-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:c69fd885df7d089548a42d5ec05be26050ebcd2283d89b3d30676eb32ff87dee", size = 4270291, upload-time = "2026-02-10T19:17:38.748Z" },
- { url = "https://files.pythonhosted.org/packages/f8/e5/f52377ee93bc2f2bba55a41a886fd208c15276ffbd2569f2ddc89d50e2c5/cryptography-46.0.5-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:8293f3dea7fc929ef7240796ba231413afa7b68ce38fd21da2995549f5961981", size = 4927539, upload-time = "2026-02-10T19:17:40.241Z" },
- { url = "https://files.pythonhosted.org/packages/3b/02/cfe39181b02419bbbbcf3abdd16c1c5c8541f03ca8bda240debc467d5a12/cryptography-46.0.5-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:1abfdb89b41c3be0365328a410baa9df3ff8a9110fb75e7b52e66803ddabc9a9", size = 4442199, upload-time = "2026-02-10T19:17:41.789Z" },
- { url = "https://files.pythonhosted.org/packages/c0/96/2fcaeb4873e536cf71421a388a6c11b5bc846e986b2b069c79363dc1648e/cryptography-46.0.5-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:d66e421495fdb797610a08f43b05269e0a5ea7f5e652a89bfd5a7d3c1dee3648", size = 3960131, upload-time = "2026-02-10T19:17:43.379Z" },
- { url = "https://files.pythonhosted.org/packages/d8/d2/b27631f401ddd644e94c5cf33c9a4069f72011821cf3dc7309546b0642a0/cryptography-46.0.5-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:4e817a8920bfbcff8940ecfd60f23d01836408242b30f1a708d93198393a80b4", size = 4270072, upload-time = "2026-02-10T19:17:45.481Z" },
- { url = "https://files.pythonhosted.org/packages/f4/a7/60d32b0370dae0b4ebe55ffa10e8599a2a59935b5ece1b9f06edb73abdeb/cryptography-46.0.5-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:68f68d13f2e1cb95163fa3b4db4bf9a159a418f5f6e7242564fc75fcae667fd0", size = 4892170, upload-time = "2026-02-10T19:17:46.997Z" },
- { url = "https://files.pythonhosted.org/packages/d2/b9/cf73ddf8ef1164330eb0b199a589103c363afa0cf794218c24d524a58eab/cryptography-46.0.5-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:a3d1fae9863299076f05cb8a778c467578262fae09f9dc0ee9b12eb4268ce663", size = 4441741, upload-time = "2026-02-10T19:17:48.661Z" },
- { url = "https://files.pythonhosted.org/packages/5f/eb/eee00b28c84c726fe8fa0158c65afe312d9c3b78d9d01daf700f1f6e37ff/cryptography-46.0.5-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c4143987a42a2397f2fc3b4d7e3a7d313fbe684f67ff443999e803dd75a76826", size = 4396728, upload-time = "2026-02-10T19:17:50.058Z" },
- { url = "https://files.pythonhosted.org/packages/65/f4/6bc1a9ed5aef7145045114b75b77c2a8261b4d38717bd8dea111a63c3442/cryptography-46.0.5-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:7d731d4b107030987fd61a7f8ab512b25b53cef8f233a97379ede116f30eb67d", size = 4652001, upload-time = "2026-02-10T19:17:51.54Z" },
- { url = "https://files.pythonhosted.org/packages/86/ef/5d00ef966ddd71ac2e6951d278884a84a40ffbd88948ef0e294b214ae9e4/cryptography-46.0.5-cp314-cp314t-win32.whl", hash = "sha256:c3bcce8521d785d510b2aad26ae2c966092b7daa8f45dd8f44734a104dc0bc1a", size = 3003637, upload-time = "2026-02-10T19:17:52.997Z" },
- { url = "https://files.pythonhosted.org/packages/b7/57/f3f4160123da6d098db78350fdfd9705057aad21de7388eacb2401dceab9/cryptography-46.0.5-cp314-cp314t-win_amd64.whl", hash = "sha256:4d8ae8659ab18c65ced284993c2265910f6c9e650189d4e3f68445ef82a810e4", size = 3469487, upload-time = "2026-02-10T19:17:54.549Z" },
- { url = "https://files.pythonhosted.org/packages/e2/fa/a66aa722105ad6a458bebd64086ca2b72cdd361fed31763d20390f6f1389/cryptography-46.0.5-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:4108d4c09fbbf2789d0c926eb4152ae1760d5a2d97612b92d508d96c861e4d31", size = 7170514, upload-time = "2026-02-10T19:17:56.267Z" },
- { url = "https://files.pythonhosted.org/packages/0f/04/c85bdeab78c8bc77b701bf0d9bdcf514c044e18a46dcff330df5448631b0/cryptography-46.0.5-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7d1f30a86d2757199cb2d56e48cce14deddf1f9c95f1ef1b64ee91ea43fe2e18", size = 4275349, upload-time = "2026-02-10T19:17:58.419Z" },
- { url = "https://files.pythonhosted.org/packages/5c/32/9b87132a2f91ee7f5223b091dc963055503e9b442c98fc0b8a5ca765fab0/cryptography-46.0.5-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:039917b0dc418bb9f6edce8a906572d69e74bd330b0b3fea4f79dab7f8ddd235", size = 4420667, upload-time = "2026-02-10T19:18:00.619Z" },
- { url = "https://files.pythonhosted.org/packages/a1/a6/a7cb7010bec4b7c5692ca6f024150371b295ee1c108bdc1c400e4c44562b/cryptography-46.0.5-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:ba2a27ff02f48193fc4daeadf8ad2590516fa3d0adeeb34336b96f7fa64c1e3a", size = 4276980, upload-time = "2026-02-10T19:18:02.379Z" },
- { url = "https://files.pythonhosted.org/packages/8e/7c/c4f45e0eeff9b91e3f12dbd0e165fcf2a38847288fcfd889deea99fb7b6d/cryptography-46.0.5-cp38-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:61aa400dce22cb001a98014f647dc21cda08f7915ceb95df0c9eaf84b4b6af76", size = 4939143, upload-time = "2026-02-10T19:18:03.964Z" },
- { url = "https://files.pythonhosted.org/packages/37/19/e1b8f964a834eddb44fa1b9a9976f4e414cbb7aa62809b6760c8803d22d1/cryptography-46.0.5-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3ce58ba46e1bc2aac4f7d9290223cead56743fa6ab94a5d53292ffaac6a91614", size = 4453674, upload-time = "2026-02-10T19:18:05.588Z" },
- { url = "https://files.pythonhosted.org/packages/db/ed/db15d3956f65264ca204625597c410d420e26530c4e2943e05a0d2f24d51/cryptography-46.0.5-cp38-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:420d0e909050490d04359e7fdb5ed7e667ca5c3c402b809ae2563d7e66a92229", size = 3978801, upload-time = "2026-02-10T19:18:07.167Z" },
- { url = "https://files.pythonhosted.org/packages/41/e2/df40a31d82df0a70a0daf69791f91dbb70e47644c58581d654879b382d11/cryptography-46.0.5-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:582f5fcd2afa31622f317f80426a027f30dc792e9c80ffee87b993200ea115f1", size = 4276755, upload-time = "2026-02-10T19:18:09.813Z" },
- { url = "https://files.pythonhosted.org/packages/33/45/726809d1176959f4a896b86907b98ff4391a8aa29c0aaaf9450a8a10630e/cryptography-46.0.5-cp38-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:bfd56bb4b37ed4f330b82402f6f435845a5f5648edf1ad497da51a8452d5d62d", size = 4901539, upload-time = "2026-02-10T19:18:11.263Z" },
- { url = "https://files.pythonhosted.org/packages/99/0f/a3076874e9c88ecb2ecc31382f6e7c21b428ede6f55aafa1aa272613e3cd/cryptography-46.0.5-cp38-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:a3d507bb6a513ca96ba84443226af944b0f7f47dcc9a399d110cd6146481d24c", size = 4452794, upload-time = "2026-02-10T19:18:12.914Z" },
- { url = "https://files.pythonhosted.org/packages/02/ef/ffeb542d3683d24194a38f66ca17c0a4b8bf10631feef44a7ef64e631b1a/cryptography-46.0.5-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:9f16fbdf4da055efb21c22d81b89f155f02ba420558db21288b3d0035bafd5f4", size = 4404160, upload-time = "2026-02-10T19:18:14.375Z" },
- { url = "https://files.pythonhosted.org/packages/96/93/682d2b43c1d5f1406ed048f377c0fc9fc8f7b0447a478d5c65ab3d3a66eb/cryptography-46.0.5-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:ced80795227d70549a411a4ab66e8ce307899fad2220ce5ab2f296e687eacde9", size = 4667123, upload-time = "2026-02-10T19:18:15.886Z" },
- { url = "https://files.pythonhosted.org/packages/45/2d/9c5f2926cb5300a8eefc3f4f0b3f3df39db7f7ce40c8365444c49363cbda/cryptography-46.0.5-cp38-abi3-win32.whl", hash = "sha256:02f547fce831f5096c9a567fd41bc12ca8f11df260959ecc7c3202555cc47a72", size = 3010220, upload-time = "2026-02-10T19:18:17.361Z" },
- { url = "https://files.pythonhosted.org/packages/48/ef/0c2f4a8e31018a986949d34a01115dd057bf536905dca38897bacd21fac3/cryptography-46.0.5-cp38-abi3-win_amd64.whl", hash = "sha256:556e106ee01aa13484ce9b0239bca667be5004efb0aabbed28d353df86445595", size = 3467050, upload-time = "2026-02-10T19:18:18.899Z" },
- { url = "https://files.pythonhosted.org/packages/eb/dd/2d9fdb07cebdf3d51179730afb7d5e576153c6744c3ff8fded23030c204e/cryptography-46.0.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:3b4995dc971c9fb83c25aa44cf45f02ba86f71ee600d81091c2f0cbae116b06c", size = 3476964, upload-time = "2026-02-10T19:18:20.687Z" },
- { url = "https://files.pythonhosted.org/packages/e9/6f/6cc6cc9955caa6eaf83660b0da2b077c7fe8ff9950a3c5e45d605038d439/cryptography-46.0.5-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:bc84e875994c3b445871ea7181d424588171efec3e185dced958dad9e001950a", size = 4218321, upload-time = "2026-02-10T19:18:22.349Z" },
- { url = "https://files.pythonhosted.org/packages/3e/5d/c4da701939eeee699566a6c1367427ab91a8b7088cc2328c09dbee940415/cryptography-46.0.5-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:2ae6971afd6246710480e3f15824ed3029a60fc16991db250034efd0b9fb4356", size = 4381786, upload-time = "2026-02-10T19:18:24.529Z" },
- { url = "https://files.pythonhosted.org/packages/ac/97/a538654732974a94ff96c1db621fa464f455c02d4bb7d2652f4edc21d600/cryptography-46.0.5-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:d861ee9e76ace6cf36a6a89b959ec08e7bc2493ee39d07ffe5acb23ef46d27da", size = 4217990, upload-time = "2026-02-10T19:18:25.957Z" },
- { url = "https://files.pythonhosted.org/packages/ae/11/7e500d2dd3ba891197b9efd2da5454b74336d64a7cc419aa7327ab74e5f6/cryptography-46.0.5-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:2b7a67c9cd56372f3249b39699f2ad479f6991e62ea15800973b956f4b73e257", size = 4381252, upload-time = "2026-02-10T19:18:27.496Z" },
- { url = "https://files.pythonhosted.org/packages/bc/58/6b3d24e6b9bc474a2dcdee65dfd1f008867015408a271562e4b690561a4d/cryptography-46.0.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:8456928655f856c6e1533ff59d5be76578a7157224dbd9ce6872f25055ab9ab7", size = 3407605, upload-time = "2026-02-10T19:18:29.233Z" },
-]
-
-[[package]]
-name = "cycler"
-version = "0.12.1"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/a9/95/a3dbbb5028f35eafb79008e7522a75244477d2838f38cbb722248dabc2a8/cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c", size = 7615, upload-time = "2023-10-07T05:32:18.335Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30", size = 8321, upload-time = "2023-10-07T05:32:16.783Z" },
-]
-
-[[package]]
-name = "distlib"
-version = "0.4.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz", hash = "sha256:feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d", size = 614605, upload-time = "2025-07-17T16:52:00.465Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/33/6b/e0547afaf41bf2c42e52430072fa5658766e3d65bd4b03a563d1b6336f57/distlib-0.4.0-py2.py3-none-any.whl", hash = "sha256:9659f7d87e46584a30b5780e43ac7a2143098441670ff0a49d5f9034c54a6c16", size = 469047, upload-time = "2025-07-17T16:51:58.613Z" },
-]
-
-[[package]]
-name = "distro"
-version = "1.9.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed", size = 60722, upload-time = "2023-12-24T09:54:32.31Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/12/b3/231ffd4ab1fc9d679809f356cebee130ac7daa00d6d6f3206dd4fd137e9e/distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2", size = 20277, upload-time = "2023-12-24T09:54:30.421Z" },
-]
-
-[[package]]
-name = "einops"
-version = "0.8.1"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/e5/81/df4fbe24dff8ba3934af99044188e20a98ed441ad17a274539b74e82e126/einops-0.8.1.tar.gz", hash = "sha256:de5d960a7a761225532e0f1959e5315ebeafc0cd43394732f103ca44b9837e84", size = 54805, upload-time = "2025-02-09T03:17:00.434Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/87/62/9773de14fe6c45c23649e98b83231fffd7b9892b6cf863251dc2afa73643/einops-0.8.1-py3-none-any.whl", hash = "sha256:919387eb55330f5757c6bea9165c5ff5cfe63a642682ea788a6d472576d81737", size = 64359, upload-time = "2025-02-09T03:17:01.998Z" },
-]
-
-[[package]]
-name = "exceptiongroup"
-version = "1.3.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "typing-extensions" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" },
-]
-
-[[package]]
-name = "filelock"
-version = "3.20.3"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/1d/65/ce7f1b70157833bf3cb851b556a37d4547ceafc158aa9b34b36782f23696/filelock-3.20.3.tar.gz", hash = "sha256:18c57ee915c7ec61cff0ecf7f0f869936c7c30191bb0cf406f1341778d0834e1", size = 19485, upload-time = "2026-01-09T17:55:05.421Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/b5/36/7fb70f04bf00bc646cd5bb45aa9eddb15e19437a28b8fb2b4a5249fac770/filelock-3.20.3-py3-none-any.whl", hash = "sha256:4b0dda527ee31078689fc205ec4f1c1bf7d56cf88b6dc9426c4f230e46c2dce1", size = 16701, upload-time = "2026-01-09T17:55:04.334Z" },
-]
-
-[[package]]
-name = "fonttools"
-version = "4.61.1"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/ec/ca/cf17b88a8df95691275a3d77dc0a5ad9907f328ae53acbe6795da1b2f5ed/fonttools-4.61.1.tar.gz", hash = "sha256:6675329885c44657f826ef01d9e4fb33b9158e9d93c537d84ad8399539bc6f69", size = 3565756, upload-time = "2025-12-12T17:31:24.246Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/5b/94/8a28707adb00bed1bf22dac16ccafe60faf2ade353dcb32c3617ee917307/fonttools-4.61.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c7db70d57e5e1089a274cbb2b1fd635c9a24de809a231b154965d415d6c6d24", size = 2854799, upload-time = "2025-12-12T17:29:27.5Z" },
- { url = "https://files.pythonhosted.org/packages/94/93/c2e682faaa5ee92034818d8f8a8145ae73eb83619600495dcf8503fa7771/fonttools-4.61.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5fe9fd43882620017add5eabb781ebfbc6998ee49b35bd7f8f79af1f9f99a958", size = 2403032, upload-time = "2025-12-12T17:29:30.115Z" },
- { url = "https://files.pythonhosted.org/packages/f1/62/1748f7e7e1ee41aa52279fd2e3a6d0733dc42a673b16932bad8e5d0c8b28/fonttools-4.61.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d8db08051fc9e7d8bc622f2112511b8107d8f27cd89e2f64ec45e9825e8288da", size = 4897863, upload-time = "2025-12-12T17:29:32.535Z" },
- { url = "https://files.pythonhosted.org/packages/69/69/4ca02ee367d2c98edcaeb83fc278d20972502ee071214ad9d8ca85e06080/fonttools-4.61.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a76d4cb80f41ba94a6691264be76435e5f72f2cb3cab0b092a6212855f71c2f6", size = 4859076, upload-time = "2025-12-12T17:29:34.907Z" },
- { url = "https://files.pythonhosted.org/packages/8c/f5/660f9e3cefa078861a7f099107c6d203b568a6227eef163dd173bfc56bdc/fonttools-4.61.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a13fc8aeb24bad755eea8f7f9d409438eb94e82cf86b08fe77a03fbc8f6a96b1", size = 4875623, upload-time = "2025-12-12T17:29:37.33Z" },
- { url = "https://files.pythonhosted.org/packages/63/d1/9d7c5091d2276ed47795c131c1bf9316c3c1ab2789c22e2f59e0572ccd38/fonttools-4.61.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b846a1fcf8beadeb9ea4f44ec5bdde393e2f1569e17d700bfc49cd69bde75881", size = 4993327, upload-time = "2025-12-12T17:29:39.781Z" },
- { url = "https://files.pythonhosted.org/packages/6f/2d/28def73837885ae32260d07660a052b99f0aa00454867d33745dfe49dbf0/fonttools-4.61.1-cp310-cp310-win32.whl", hash = "sha256:78a7d3ab09dc47ac1a363a493e6112d8cabed7ba7caad5f54dbe2f08676d1b47", size = 1502180, upload-time = "2025-12-12T17:29:42.217Z" },
- { url = "https://files.pythonhosted.org/packages/63/fa/bfdc98abb4dd2bd491033e85e3ba69a2313c850e759a6daa014bc9433b0f/fonttools-4.61.1-cp310-cp310-win_amd64.whl", hash = "sha256:eff1ac3cc66c2ac7cda1e64b4e2f3ffef474b7335f92fc3833fc632d595fcee6", size = 1550654, upload-time = "2025-12-12T17:29:44.564Z" },
- { url = "https://files.pythonhosted.org/packages/69/12/bf9f4eaa2fad039356cc627587e30ed008c03f1cebd3034376b5ee8d1d44/fonttools-4.61.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:c6604b735bb12fef8e0efd5578c9fb5d3d8532d5001ea13a19cddf295673ee09", size = 2852213, upload-time = "2025-12-12T17:29:46.675Z" },
- { url = "https://files.pythonhosted.org/packages/ac/49/4138d1acb6261499bedde1c07f8c2605d1d8f9d77a151e5507fd3ef084b6/fonttools-4.61.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5ce02f38a754f207f2f06557523cd39a06438ba3aafc0639c477ac409fc64e37", size = 2401689, upload-time = "2025-12-12T17:29:48.769Z" },
- { url = "https://files.pythonhosted.org/packages/e5/fe/e6ce0fe20a40e03aef906af60aa87668696f9e4802fa283627d0b5ed777f/fonttools-4.61.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:77efb033d8d7ff233385f30c62c7c79271c8885d5c9657d967ede124671bbdfb", size = 5058809, upload-time = "2025-12-12T17:29:51.701Z" },
- { url = "https://files.pythonhosted.org/packages/79/61/1ca198af22f7dd22c17ab86e9024ed3c06299cfdb08170640e9996d501a0/fonttools-4.61.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:75c1a6dfac6abd407634420c93864a1e274ebc1c7531346d9254c0d8f6ca00f9", size = 5036039, upload-time = "2025-12-12T17:29:53.659Z" },
- { url = "https://files.pythonhosted.org/packages/99/cc/fa1801e408586b5fce4da9f5455af8d770f4fc57391cd5da7256bb364d38/fonttools-4.61.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0de30bfe7745c0d1ffa2b0b7048fb7123ad0d71107e10ee090fa0b16b9452e87", size = 5034714, upload-time = "2025-12-12T17:29:55.592Z" },
- { url = "https://files.pythonhosted.org/packages/bf/aa/b7aeafe65adb1b0a925f8f25725e09f078c635bc22754f3fecb7456955b0/fonttools-4.61.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:58b0ee0ab5b1fc9921eccfe11d1435added19d6494dde14e323f25ad2bc30c56", size = 5158648, upload-time = "2025-12-12T17:29:57.861Z" },
- { url = "https://files.pythonhosted.org/packages/99/f9/08ea7a38663328881384c6e7777bbefc46fd7d282adfd87a7d2b84ec9d50/fonttools-4.61.1-cp311-cp311-win32.whl", hash = "sha256:f79b168428351d11e10c5aeb61a74e1851ec221081299f4cf56036a95431c43a", size = 2280681, upload-time = "2025-12-12T17:29:59.943Z" },
- { url = "https://files.pythonhosted.org/packages/07/ad/37dd1ae5fa6e01612a1fbb954f0927681f282925a86e86198ccd7b15d515/fonttools-4.61.1-cp311-cp311-win_amd64.whl", hash = "sha256:fe2efccb324948a11dd09d22136fe2ac8a97d6c1347cf0b58a911dcd529f66b7", size = 2331951, upload-time = "2025-12-12T17:30:02.254Z" },
- { url = "https://files.pythonhosted.org/packages/6f/16/7decaa24a1bd3a70c607b2e29f0adc6159f36a7e40eaba59846414765fd4/fonttools-4.61.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:f3cb4a569029b9f291f88aafc927dd53683757e640081ca8c412781ea144565e", size = 2851593, upload-time = "2025-12-12T17:30:04.225Z" },
- { url = "https://files.pythonhosted.org/packages/94/98/3c4cb97c64713a8cf499b3245c3bf9a2b8fd16a3e375feff2aed78f96259/fonttools-4.61.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:41a7170d042e8c0024703ed13b71893519a1a6d6e18e933e3ec7507a2c26a4b2", size = 2400231, upload-time = "2025-12-12T17:30:06.47Z" },
- { url = "https://files.pythonhosted.org/packages/b7/37/82dbef0f6342eb01f54bca073ac1498433d6ce71e50c3c3282b655733b31/fonttools-4.61.1-cp312-cp312-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:10d88e55330e092940584774ee5e8a6971b01fc2f4d3466a1d6c158230880796", size = 4954103, upload-time = "2025-12-12T17:30:08.432Z" },
- { url = "https://files.pythonhosted.org/packages/6c/44/f3aeac0fa98e7ad527f479e161aca6c3a1e47bb6996b053d45226fe37bf2/fonttools-4.61.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:15acc09befd16a0fb8a8f62bc147e1a82817542d72184acca9ce6e0aeda9fa6d", size = 5004295, upload-time = "2025-12-12T17:30:10.56Z" },
- { url = "https://files.pythonhosted.org/packages/14/e8/7424ced75473983b964d09f6747fa09f054a6d656f60e9ac9324cf40c743/fonttools-4.61.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e6bcdf33aec38d16508ce61fd81838f24c83c90a1d1b8c68982857038673d6b8", size = 4944109, upload-time = "2025-12-12T17:30:12.874Z" },
- { url = "https://files.pythonhosted.org/packages/c8/8b/6391b257fa3d0b553d73e778f953a2f0154292a7a7a085e2374b111e5410/fonttools-4.61.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5fade934607a523614726119164ff621e8c30e8fa1ffffbbd358662056ba69f0", size = 5093598, upload-time = "2025-12-12T17:30:15.79Z" },
- { url = "https://files.pythonhosted.org/packages/d9/71/fd2ea96cdc512d92da5678a1c98c267ddd4d8c5130b76d0f7a80f9a9fde8/fonttools-4.61.1-cp312-cp312-win32.whl", hash = "sha256:75da8f28eff26defba42c52986de97b22106cb8f26515b7c22443ebc9c2d3261", size = 2269060, upload-time = "2025-12-12T17:30:18.058Z" },
- { url = "https://files.pythonhosted.org/packages/80/3b/a3e81b71aed5a688e89dfe0e2694b26b78c7d7f39a5ffd8a7d75f54a12a8/fonttools-4.61.1-cp312-cp312-win_amd64.whl", hash = "sha256:497c31ce314219888c0e2fce5ad9178ca83fe5230b01a5006726cdf3ac9f24d9", size = 2319078, upload-time = "2025-12-12T17:30:22.862Z" },
- { url = "https://files.pythonhosted.org/packages/4b/cf/00ba28b0990982530addb8dc3e9e6f2fa9cb5c20df2abdda7baa755e8fe1/fonttools-4.61.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8c56c488ab471628ff3bfa80964372fc13504ece601e0d97a78ee74126b2045c", size = 2846454, upload-time = "2025-12-12T17:30:24.938Z" },
- { url = "https://files.pythonhosted.org/packages/5a/ca/468c9a8446a2103ae645d14fee3f610567b7042aba85031c1c65e3ef7471/fonttools-4.61.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dc492779501fa723b04d0ab1f5be046797fee17d27700476edc7ee9ae535a61e", size = 2398191, upload-time = "2025-12-12T17:30:27.343Z" },
- { url = "https://files.pythonhosted.org/packages/a3/4b/d67eedaed19def5967fade3297fed8161b25ba94699efc124b14fb68cdbc/fonttools-4.61.1-cp313-cp313-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:64102ca87e84261419c3747a0d20f396eb024bdbeb04c2bfb37e2891f5fadcb5", size = 4928410, upload-time = "2025-12-12T17:30:29.771Z" },
- { url = "https://files.pythonhosted.org/packages/b0/8d/6fb3494dfe61a46258cd93d979cf4725ded4eb46c2a4ca35e4490d84daea/fonttools-4.61.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4c1b526c8d3f615a7b1867f38a9410849c8f4aef078535742198e942fba0e9bd", size = 4984460, upload-time = "2025-12-12T17:30:32.073Z" },
- { url = "https://files.pythonhosted.org/packages/f7/f1/a47f1d30b3dc00d75e7af762652d4cbc3dff5c2697a0dbd5203c81afd9c3/fonttools-4.61.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:41ed4b5ec103bd306bb68f81dc166e77409e5209443e5773cb4ed837bcc9b0d3", size = 4925800, upload-time = "2025-12-12T17:30:34.339Z" },
- { url = "https://files.pythonhosted.org/packages/a7/01/e6ae64a0981076e8a66906fab01539799546181e32a37a0257b77e4aa88b/fonttools-4.61.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b501c862d4901792adaec7c25b1ecc749e2662543f68bb194c42ba18d6eec98d", size = 5067859, upload-time = "2025-12-12T17:30:36.593Z" },
- { url = "https://files.pythonhosted.org/packages/73/aa/28e40b8d6809a9b5075350a86779163f074d2b617c15d22343fce81918db/fonttools-4.61.1-cp313-cp313-win32.whl", hash = "sha256:4d7092bb38c53bbc78e9255a59158b150bcdc115a1e3b3ce0b5f267dc35dd63c", size = 2267821, upload-time = "2025-12-12T17:30:38.478Z" },
- { url = "https://files.pythonhosted.org/packages/1a/59/453c06d1d83dc0951b69ef692d6b9f1846680342927df54e9a1ca91c6f90/fonttools-4.61.1-cp313-cp313-win_amd64.whl", hash = "sha256:21e7c8d76f62ab13c9472ccf74515ca5b9a761d1bde3265152a6dc58700d895b", size = 2318169, upload-time = "2025-12-12T17:30:40.951Z" },
- { url = "https://files.pythonhosted.org/packages/32/8f/4e7bf82c0cbb738d3c2206c920ca34ca74ef9dabde779030145d28665104/fonttools-4.61.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:fff4f534200a04b4a36e7ae3cb74493afe807b517a09e99cb4faa89a34ed6ecd", size = 2846094, upload-time = "2025-12-12T17:30:43.511Z" },
- { url = "https://files.pythonhosted.org/packages/71/09/d44e45d0a4f3a651f23a1e9d42de43bc643cce2971b19e784cc67d823676/fonttools-4.61.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d9203500f7c63545b4ce3799319fe4d9feb1a1b89b28d3cb5abd11b9dd64147e", size = 2396589, upload-time = "2025-12-12T17:30:45.681Z" },
- { url = "https://files.pythonhosted.org/packages/89/18/58c64cafcf8eb677a99ef593121f719e6dcbdb7d1c594ae5a10d4997ca8a/fonttools-4.61.1-cp314-cp314-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fa646ecec9528bef693415c79a86e733c70a4965dd938e9a226b0fc64c9d2e6c", size = 4877892, upload-time = "2025-12-12T17:30:47.709Z" },
- { url = "https://files.pythonhosted.org/packages/8a/ec/9e6b38c7ba1e09eb51db849d5450f4c05b7e78481f662c3b79dbde6f3d04/fonttools-4.61.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:11f35ad7805edba3aac1a3710d104592df59f4b957e30108ae0ba6c10b11dd75", size = 4972884, upload-time = "2025-12-12T17:30:49.656Z" },
- { url = "https://files.pythonhosted.org/packages/5e/87/b5339da8e0256734ba0dbbf5b6cdebb1dd79b01dc8c270989b7bcd465541/fonttools-4.61.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b931ae8f62db78861b0ff1ac017851764602288575d65b8e8ff1963fed419063", size = 4924405, upload-time = "2025-12-12T17:30:51.735Z" },
- { url = "https://files.pythonhosted.org/packages/0b/47/e3409f1e1e69c073a3a6fd8cb886eb18c0bae0ee13db2c8d5e7f8495e8b7/fonttools-4.61.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b148b56f5de675ee16d45e769e69f87623a4944f7443850bf9a9376e628a89d2", size = 5035553, upload-time = "2025-12-12T17:30:54.823Z" },
- { url = "https://files.pythonhosted.org/packages/bf/b6/1f6600161b1073a984294c6c031e1a56ebf95b6164249eecf30012bb2e38/fonttools-4.61.1-cp314-cp314-win32.whl", hash = "sha256:9b666a475a65f4e839d3d10473fad6d47e0a9db14a2f4a224029c5bfde58ad2c", size = 2271915, upload-time = "2025-12-12T17:30:57.913Z" },
- { url = "https://files.pythonhosted.org/packages/52/7b/91e7b01e37cc8eb0e1f770d08305b3655e4f002fc160fb82b3390eabacf5/fonttools-4.61.1-cp314-cp314-win_amd64.whl", hash = "sha256:4f5686e1fe5fce75d82d93c47a438a25bf0d1319d2843a926f741140b2b16e0c", size = 2323487, upload-time = "2025-12-12T17:30:59.804Z" },
- { url = "https://files.pythonhosted.org/packages/39/5c/908ad78e46c61c3e3ed70c3b58ff82ab48437faf84ec84f109592cabbd9f/fonttools-4.61.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:e76ce097e3c57c4bcb67c5aa24a0ecdbd9f74ea9219997a707a4061fbe2707aa", size = 2929571, upload-time = "2025-12-12T17:31:02.574Z" },
- { url = "https://files.pythonhosted.org/packages/bd/41/975804132c6dea64cdbfbaa59f3518a21c137a10cccf962805b301ac6ab2/fonttools-4.61.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:9cfef3ab326780c04d6646f68d4b4742aae222e8b8ea1d627c74e38afcbc9d91", size = 2435317, upload-time = "2025-12-12T17:31:04.974Z" },
- { url = "https://files.pythonhosted.org/packages/b0/5a/aef2a0a8daf1ebaae4cfd83f84186d4a72ee08fd6a8451289fcd03ffa8a4/fonttools-4.61.1-cp314-cp314t-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:a75c301f96db737e1c5ed5fd7d77d9c34466de16095a266509e13da09751bd19", size = 4882124, upload-time = "2025-12-12T17:31:07.456Z" },
- { url = "https://files.pythonhosted.org/packages/80/33/d6db3485b645b81cea538c9d1c9219d5805f0877fda18777add4671c5240/fonttools-4.61.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:91669ccac46bbc1d09e9273546181919064e8df73488ea087dcac3e2968df9ba", size = 5100391, upload-time = "2025-12-12T17:31:09.732Z" },
- { url = "https://files.pythonhosted.org/packages/6c/d6/675ba631454043c75fcf76f0ca5463eac8eb0666ea1d7badae5fea001155/fonttools-4.61.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c33ab3ca9d3ccd581d58e989d67554e42d8d4ded94ab3ade3508455fe70e65f7", size = 4978800, upload-time = "2025-12-12T17:31:11.681Z" },
- { url = "https://files.pythonhosted.org/packages/7f/33/d3ec753d547a8d2bdaedd390d4a814e8d5b45a093d558f025c6b990b554c/fonttools-4.61.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:664c5a68ec406f6b1547946683008576ef8b38275608e1cee6c061828171c118", size = 5006426, upload-time = "2025-12-12T17:31:13.764Z" },
- { url = "https://files.pythonhosted.org/packages/b4/40/cc11f378b561a67bea850ab50063366a0d1dd3f6d0a30ce0f874b0ad5664/fonttools-4.61.1-cp314-cp314t-win32.whl", hash = "sha256:aed04cabe26f30c1647ef0e8fbb207516fd40fe9472e9439695f5c6998e60ac5", size = 2335377, upload-time = "2025-12-12T17:31:16.49Z" },
- { url = "https://files.pythonhosted.org/packages/e4/ff/c9a2b66b39f8628531ea58b320d66d951267c98c6a38684daa8f50fb02f8/fonttools-4.61.1-cp314-cp314t-win_amd64.whl", hash = "sha256:2180f14c141d2f0f3da43f3a81bc8aa4684860f6b0e6f9e165a4831f24e6a23b", size = 2400613, upload-time = "2025-12-12T17:31:18.769Z" },
- { url = "https://files.pythonhosted.org/packages/c7/4e/ce75a57ff3aebf6fc1f4e9d508b8e5810618a33d900ad6c19eb30b290b97/fonttools-4.61.1-py3-none-any.whl", hash = "sha256:17d2bf5d541add43822bcf0c43d7d847b160c9bb01d15d5007d84e2217aaa371", size = 1148996, upload-time = "2025-12-12T17:31:21.03Z" },
-]
-
-[[package]]
-name = "fsspec"
-version = "2026.1.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/d5/7d/5df2650c57d47c57232af5ef4b4fdbff182070421e405e0d62c6cdbfaa87/fsspec-2026.1.0.tar.gz", hash = "sha256:e987cb0496a0d81bba3a9d1cee62922fb395e7d4c3b575e57f547953334fe07b", size = 310496, upload-time = "2026-01-09T15:21:35.562Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/01/c9/97cc5aae1648dcb851958a3ddf73ccd7dbe5650d95203ecb4d7720b4cdbf/fsspec-2026.1.0-py3-none-any.whl", hash = "sha256:cb76aa913c2285a3b49bdd5fc55b1d7c708d7208126b60f2eb8194fe1b4cbdcc", size = 201838, upload-time = "2026-01-09T15:21:34.041Z" },
-]
-
-[[package]]
-name = "gitdb"
-version = "4.0.12"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "smmap" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz", hash = "sha256:5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571", size = 394684, upload-time = "2025-01-02T07:20:46.413Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/a0/61/5c78b91c3143ed5c14207f463aecfc8f9dbb5092fb2869baf37c273b2705/gitdb-4.0.12-py3-none-any.whl", hash = "sha256:67073e15955400952c6565cc3e707c554a4eea2e428946f7a4c162fab9bd9bcf", size = 62794, upload-time = "2025-01-02T07:20:43.624Z" },
-]
-
-[[package]]
-name = "gitpython"
-version = "3.1.46"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "gitdb" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/df/b5/59d16470a1f0dfe8c793f9ef56fd3826093fc52b3bd96d6b9d6c26c7e27b/gitpython-3.1.46.tar.gz", hash = "sha256:400124c7d0ef4ea03f7310ac2fbf7151e09ff97f2a3288d64a440c584a29c37f", size = 215371, upload-time = "2026-01-01T15:37:32.073Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/6a/09/e21df6aef1e1ffc0c816f0522ddc3f6dcded766c3261813131c78a704470/gitpython-3.1.46-py3-none-any.whl", hash = "sha256:79812ed143d9d25b6d176a10bb511de0f9c67b1fa641d82097b0ab90398a2058", size = 208620, upload-time = "2026-01-01T15:37:30.574Z" },
-]
-
-[[package]]
-name = "google-api-core"
-version = "2.29.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "google-auth" },
- { name = "googleapis-common-protos" },
- { name = "proto-plus" },
- { name = "protobuf" },
- { name = "requests" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/0d/10/05572d33273292bac49c2d1785925f7bc3ff2fe50e3044cf1062c1dde32e/google_api_core-2.29.0.tar.gz", hash = "sha256:84181be0f8e6b04006df75ddfe728f24489f0af57c96a529ff7cf45bc28797f7", size = 177828, upload-time = "2026-01-08T22:21:39.269Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/77/b6/85c4d21067220b9a78cfb81f516f9725ea6befc1544ec9bd2c1acd97c324/google_api_core-2.29.0-py3-none-any.whl", hash = "sha256:d30bc60980daa36e314b5d5a3e5958b0200cb44ca8fa1be2b614e932b75a3ea9", size = 173906, upload-time = "2026-01-08T22:21:36.093Z" },
-]
-
-[[package]]
-name = "google-auth"
-version = "2.53.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "cryptography" },
- { name = "pyasn1-modules" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/c6/ad/ff781329bbbdc0974a098d996e89c9e1f7024262f9e3eec442fbb9ad1ac6/google_auth-2.53.0.tar.gz", hash = "sha256:e7e6aa16f6bee7b2b264830fd04f08087a1d5a836df516251a5d15327b246c9c", size = 335844, upload-time = "2026-05-15T20:53:07.928Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/4a/c9/db44165ba7c581268c6d46017ef63339110378305062830104fc7fa144cb/google_auth-2.53.0-py3-none-any.whl", hash = "sha256:6e7449917c599b35126a99ec268ec6880301f2fea41dce198fe8fd83ff642b68", size = 246071, upload-time = "2026-05-15T20:53:05.609Z" },
-]
-
-[package.optional-dependencies]
-requests = [
- { name = "requests" },
-]
-
-[[package]]
-name = "google-cloud-core"
-version = "2.5.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "google-api-core" },
- { name = "google-auth" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/a6/03/ef0bc99d0e0faf4fdbe67ac445e18cdaa74824fd93cd069e7bb6548cb52d/google_cloud_core-2.5.0.tar.gz", hash = "sha256:7c1b7ef5c92311717bd05301aa1a91ffbc565673d3b0b4163a52d8413a186963", size = 36027, upload-time = "2025-10-29T23:17:39.513Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/89/20/bfa472e327c8edee00f04beecc80baeddd2ab33ee0e86fd7654da49d45e9/google_cloud_core-2.5.0-py3-none-any.whl", hash = "sha256:67d977b41ae6c7211ee830c7912e41003ea8194bff15ae7d72fd6f51e57acabc", size = 29469, upload-time = "2025-10-29T23:17:38.548Z" },
-]
-
-[[package]]
-name = "google-cloud-storage"
-version = "3.9.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "google-api-core" },
- { name = "google-auth" },
- { name = "google-cloud-core" },
- { name = "google-crc32c" },
- { name = "google-resumable-media" },
- { name = "requests" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/f7/b1/4f0798e88285b50dfc60ed3a7de071def538b358db2da468c2e0deecbb40/google_cloud_storage-3.9.0.tar.gz", hash = "sha256:f2d8ca7db2f652be757e92573b2196e10fbc09649b5c016f8b422ad593c641cc", size = 17298544, upload-time = "2026-02-02T13:36:34.119Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/46/0b/816a6ae3c9fd096937d2e5f9670558908811d57d59ddf69dd4b83b326fd1/google_cloud_storage-3.9.0-py3-none-any.whl", hash = "sha256:2dce75a9e8b3387078cbbdad44757d410ecdb916101f8ba308abf202b6968066", size = 321324, upload-time = "2026-02-02T13:36:32.271Z" },
-]
-
-[[package]]
-name = "google-crc32c"
-version = "1.8.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/03/41/4b9c02f99e4c5fb477122cd5437403b552873f014616ac1d19ac8221a58d/google_crc32c-1.8.0.tar.gz", hash = "sha256:a428e25fb7691024de47fecfbff7ff957214da51eddded0da0ae0e0f03a2cf79", size = 14192, upload-time = "2025-12-16T00:35:25.142Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/95/ac/6f7bc93886a823ab545948c2dd48143027b2355ad1944c7cf852b338dc91/google_crc32c-1.8.0-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:0470b8c3d73b5f4e3300165498e4cf25221c7eb37f1159e221d1825b6df8a7ff", size = 31296, upload-time = "2025-12-16T00:19:07.261Z" },
- { url = "https://files.pythonhosted.org/packages/f7/97/a5accde175dee985311d949cfcb1249dcbb290f5ec83c994ea733311948f/google_crc32c-1.8.0-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:119fcd90c57c89f30040b47c211acee231b25a45d225e3225294386f5d258288", size = 30870, upload-time = "2025-12-16T00:29:17.669Z" },
- { url = "https://files.pythonhosted.org/packages/3d/63/bec827e70b7a0d4094e7476f863c0dbd6b5f0f1f91d9c9b32b76dcdfeb4e/google_crc32c-1.8.0-cp310-cp310-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:6f35aaffc8ccd81ba3162443fabb920e65b1f20ab1952a31b13173a67811467d", size = 33214, upload-time = "2025-12-16T00:40:19.618Z" },
- { url = "https://files.pythonhosted.org/packages/63/bc/11b70614df04c289128d782efc084b9035ef8466b3d0a8757c1b6f5cf7ac/google_crc32c-1.8.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:864abafe7d6e2c4c66395c1eb0fe12dc891879769b52a3d56499612ca93b6092", size = 33589, upload-time = "2025-12-16T00:40:20.7Z" },
- { url = "https://files.pythonhosted.org/packages/3e/00/a08a4bc24f1261cc5b0f47312d8aebfbe4b53c2e6307f1b595605eed246b/google_crc32c-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:db3fe8eaf0612fc8b20fa21a5f25bd785bc3cd5be69f8f3412b0ac2ffd49e733", size = 34437, upload-time = "2025-12-16T00:35:19.437Z" },
- { url = "https://files.pythonhosted.org/packages/5d/ef/21ccfaab3d5078d41efe8612e0ed0bfc9ce22475de074162a91a25f7980d/google_crc32c-1.8.0-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:014a7e68d623e9a4222d663931febc3033c5c7c9730785727de2a81f87d5bab8", size = 31298, upload-time = "2025-12-16T00:20:32.241Z" },
- { url = "https://files.pythonhosted.org/packages/c5/b8/f8413d3f4b676136e965e764ceedec904fe38ae8de0cdc52a12d8eb1096e/google_crc32c-1.8.0-cp311-cp311-macosx_12_0_x86_64.whl", hash = "sha256:86cfc00fe45a0ac7359e5214a1704e51a99e757d0272554874f419f79838c5f7", size = 30872, upload-time = "2025-12-16T00:33:58.785Z" },
- { url = "https://files.pythonhosted.org/packages/f6/fd/33aa4ec62b290477181c55bb1c9302c9698c58c0ce9a6ab4874abc8b0d60/google_crc32c-1.8.0-cp311-cp311-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:19b40d637a54cb71e0829179f6cb41835f0fbd9e8eb60552152a8b52c36cbe15", size = 33243, upload-time = "2025-12-16T00:40:21.46Z" },
- { url = "https://files.pythonhosted.org/packages/71/03/4820b3bd99c9653d1a5210cb32f9ba4da9681619b4d35b6a052432df4773/google_crc32c-1.8.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:17446feb05abddc187e5441a45971b8394ea4c1b6efd88ab0af393fd9e0a156a", size = 33608, upload-time = "2025-12-16T00:40:22.204Z" },
- { url = "https://files.pythonhosted.org/packages/7c/43/acf61476a11437bf9733fb2f70599b1ced11ec7ed9ea760fdd9a77d0c619/google_crc32c-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:71734788a88f551fbd6a97be9668a0020698e07b2bf5b3aa26a36c10cdfb27b2", size = 34439, upload-time = "2025-12-16T00:35:20.458Z" },
- { url = "https://files.pythonhosted.org/packages/e9/5f/7307325b1198b59324c0fa9807cafb551afb65e831699f2ce211ad5c8240/google_crc32c-1.8.0-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:4b8286b659c1335172e39563ab0a768b8015e88e08329fa5321f774275fc3113", size = 31300, upload-time = "2025-12-16T00:21:56.723Z" },
- { url = "https://files.pythonhosted.org/packages/21/8e/58c0d5d86e2220e6a37befe7e6a94dd2f6006044b1a33edf1ff6d9f7e319/google_crc32c-1.8.0-cp312-cp312-macosx_12_0_x86_64.whl", hash = "sha256:2a3dc3318507de089c5384cc74d54318401410f82aa65b2d9cdde9d297aca7cb", size = 30867, upload-time = "2025-12-16T00:38:31.302Z" },
- { url = "https://files.pythonhosted.org/packages/ce/a9/a780cc66f86335a6019f557a8aaca8fbb970728f0efd2430d15ff1beae0e/google_crc32c-1.8.0-cp312-cp312-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:14f87e04d613dfa218d6135e81b78272c3b904e2a7053b841481b38a7d901411", size = 33364, upload-time = "2025-12-16T00:40:22.96Z" },
- { url = "https://files.pythonhosted.org/packages/21/3f/3457ea803db0198c9aaca2dd373750972ce28a26f00544b6b85088811939/google_crc32c-1.8.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cb5c869c2923d56cb0c8e6bcdd73c009c36ae39b652dbe46a05eb4ef0ad01454", size = 33740, upload-time = "2025-12-16T00:40:23.96Z" },
- { url = "https://files.pythonhosted.org/packages/df/c0/87c2073e0c72515bb8733d4eef7b21548e8d189f094b5dad20b0ecaf64f6/google_crc32c-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:3cc0c8912038065eafa603b238abf252e204accab2a704c63b9e14837a854962", size = 34437, upload-time = "2025-12-16T00:35:21.395Z" },
- { url = "https://files.pythonhosted.org/packages/d1/db/000f15b41724589b0e7bc24bc7a8967898d8d3bc8caf64c513d91ef1f6c0/google_crc32c-1.8.0-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:3ebb04528e83b2634857f43f9bb8ef5b2bbe7f10f140daeb01b58f972d04736b", size = 31297, upload-time = "2025-12-16T00:23:20.709Z" },
- { url = "https://files.pythonhosted.org/packages/d7/0d/8ebed0c39c53a7e838e2a486da8abb0e52de135f1b376ae2f0b160eb4c1a/google_crc32c-1.8.0-cp313-cp313-macosx_12_0_x86_64.whl", hash = "sha256:450dc98429d3e33ed2926fc99ee81001928d63460f8538f21a5d6060912a8e27", size = 30867, upload-time = "2025-12-16T00:43:14.628Z" },
- { url = "https://files.pythonhosted.org/packages/ce/42/b468aec74a0354b34c8cbf748db20d6e350a68a2b0912e128cabee49806c/google_crc32c-1.8.0-cp313-cp313-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:3b9776774b24ba76831609ffbabce8cdf6fa2bd5e9df37b594221c7e333a81fa", size = 33344, upload-time = "2025-12-16T00:40:24.742Z" },
- { url = "https://files.pythonhosted.org/packages/1c/e8/b33784d6fc77fb5062a8a7854e43e1e618b87d5ddf610a88025e4de6226e/google_crc32c-1.8.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:89c17d53d75562edfff86679244830599ee0a48efc216200691de8b02ab6b2b8", size = 33694, upload-time = "2025-12-16T00:40:25.505Z" },
- { url = "https://files.pythonhosted.org/packages/92/b1/d3cbd4d988afb3d8e4db94ca953df429ed6db7282ed0e700d25e6c7bfc8d/google_crc32c-1.8.0-cp313-cp313-win_amd64.whl", hash = "sha256:57a50a9035b75643996fbf224d6661e386c7162d1dfdab9bc4ca790947d1007f", size = 34435, upload-time = "2025-12-16T00:35:22.107Z" },
- { url = "https://files.pythonhosted.org/packages/21/88/8ecf3c2b864a490b9e7010c84fd203ec8cf3b280651106a3a74dd1b0ca72/google_crc32c-1.8.0-cp314-cp314-macosx_12_0_arm64.whl", hash = "sha256:e6584b12cb06796d285d09e33f63309a09368b9d806a551d8036a4207ea43697", size = 31301, upload-time = "2025-12-16T00:24:48.527Z" },
- { url = "https://files.pythonhosted.org/packages/36/c6/f7ff6c11f5ca215d9f43d3629163727a272eabc356e5c9b2853df2bfe965/google_crc32c-1.8.0-cp314-cp314-macosx_12_0_x86_64.whl", hash = "sha256:f4b51844ef67d6cf2e9425983274da75f18b1597bb2c998e1c0a0e8d46f8f651", size = 30868, upload-time = "2025-12-16T00:48:12.163Z" },
- { url = "https://files.pythonhosted.org/packages/56/15/c25671c7aad70f8179d858c55a6ae8404902abe0cdcf32a29d581792b491/google_crc32c-1.8.0-cp314-cp314-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b0d1a7afc6e8e4635564ba8aa5c0548e3173e41b6384d7711a9123165f582de2", size = 33381, upload-time = "2025-12-16T00:40:26.268Z" },
- { url = "https://files.pythonhosted.org/packages/42/fa/f50f51260d7b0ef5d4898af122d8a7ec5a84e2984f676f746445f783705f/google_crc32c-1.8.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8b3f68782f3cbd1bce027e48768293072813469af6a61a86f6bb4977a4380f21", size = 33734, upload-time = "2025-12-16T00:40:27.028Z" },
- { url = "https://files.pythonhosted.org/packages/08/a5/7b059810934a09fb3ccb657e0843813c1fee1183d3bc2c8041800374aa2c/google_crc32c-1.8.0-cp314-cp314-win_amd64.whl", hash = "sha256:d511b3153e7011a27ab6ee6bb3a5404a55b994dc1a7322c0b87b29606d9790e2", size = 34878, upload-time = "2025-12-16T00:35:23.142Z" },
- { url = "https://files.pythonhosted.org/packages/52/c5/c171e4d8c44fec1422d801a6d2e5d7ddabd733eeda505c79730ee9607f07/google_crc32c-1.8.0-pp311-pypy311_pp73-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:87fa445064e7db928226b2e6f0d5304ab4cd0339e664a4e9a25029f384d9bb93", size = 28615, upload-time = "2025-12-16T00:40:29.298Z" },
- { url = "https://files.pythonhosted.org/packages/9c/97/7d75fe37a7a6ed171a2cf17117177e7aab7e6e0d115858741b41e9dd4254/google_crc32c-1.8.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f639065ea2042d5c034bf258a9f085eaa7af0cd250667c0635a3118e8f92c69c", size = 28800, upload-time = "2025-12-16T00:40:30.322Z" },
-]
-
-[[package]]
-name = "google-genai"
-version = "2.7.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "anyio" },
- { name = "distro" },
- { name = "google-auth", extra = ["requests"] },
- { name = "httpx" },
- { name = "pydantic" },
- { name = "requests" },
- { name = "sniffio" },
- { name = "tenacity" },
- { name = "typing-extensions" },
- { name = "websockets" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/a7/7b/6eb3b3d545b6bb4c374acba1ccf91b0f33b605e551536a6243cfcef2f07f/google_genai-2.7.0.tar.gz", hash = "sha256:3c6f32f5ced9877ededd1b384b5e5b7f09c20046ec3390b662b16d8cd1882ac5", size = 555853, upload-time = "2026-05-28T15:39:24.58Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/3c/dd/7a8be39e9d698e80e9db796514efbc6083dbd787bdb9a101e8ba47248e5e/google_genai-2.7.0-py3-none-any.whl", hash = "sha256:21cac381e09a869151706aba797b6a4f96cfe92c484e13204d092caee7ff11cb", size = 822545, upload-time = "2026-05-28T15:39:22.907Z" },
-]
-
-[[package]]
-name = "google-resumable-media"
-version = "2.8.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "google-crc32c" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/64/d7/520b62a35b23038ff005e334dba3ffc75fcf583bee26723f1fd8fd4b6919/google_resumable_media-2.8.0.tar.gz", hash = "sha256:f1157ed8b46994d60a1bc432544db62352043113684d4e030ee02e77ebe9a1ae", size = 2163265, upload-time = "2025-11-17T15:38:06.659Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/1f/0b/93afde9cfe012260e9fe1522f35c9b72d6ee222f316586b1f23ecf44d518/google_resumable_media-2.8.0-py3-none-any.whl", hash = "sha256:dd14a116af303845a8d932ddae161a26e86cc229645bc98b39f026f9b1717582", size = 81340, upload-time = "2025-11-17T15:38:05.594Z" },
-]
-
-[[package]]
-name = "googleapis-common-protos"
-version = "1.72.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "protobuf" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/e5/7b/adfd75544c415c487b33061fe7ae526165241c1ea133f9a9125a56b39fd8/googleapis_common_protos-1.72.0.tar.gz", hash = "sha256:e55a601c1b32b52d7a3e65f43563e2aa61bcd737998ee672ac9b951cd49319f5", size = 147433, upload-time = "2025-11-06T18:29:24.087Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/c4/ab/09169d5a4612a5f92490806649ac8d41e3ec9129c636754575b3553f4ea4/googleapis_common_protos-1.72.0-py3-none-any.whl", hash = "sha256:4299c5a82d5ae1a9702ada957347726b167f9f8d1fc352477702a1e851ff4038", size = 297515, upload-time = "2025-11-06T18:29:13.14Z" },
-]
-
-[[package]]
-name = "h11"
-version = "0.16.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" },
-]
-
-[[package]]
-name = "hf-xet"
-version = "1.2.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/5e/6e/0f11bacf08a67f7fb5ee09740f2ca54163863b07b70d579356e9222ce5d8/hf_xet-1.2.0.tar.gz", hash = "sha256:a8c27070ca547293b6890c4bf389f713f80e8c478631432962bb7f4bc0bd7d7f", size = 506020, upload-time = "2025-10-24T19:04:32.129Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/9e/a5/85ef910a0aa034a2abcfadc360ab5ac6f6bc4e9112349bd40ca97551cff0/hf_xet-1.2.0-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:ceeefcd1b7aed4956ae8499e2199607765fbd1c60510752003b6cc0b8413b649", size = 2861870, upload-time = "2025-10-24T19:04:11.422Z" },
- { url = "https://files.pythonhosted.org/packages/ea/40/e2e0a7eb9a51fe8828ba2d47fe22a7e74914ea8a0db68a18c3aa7449c767/hf_xet-1.2.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:b70218dd548e9840224df5638fdc94bd033552963cfa97f9170829381179c813", size = 2717584, upload-time = "2025-10-24T19:04:09.586Z" },
- { url = "https://files.pythonhosted.org/packages/a5/7d/daf7f8bc4594fdd59a8a596f9e3886133fdc68e675292218a5e4c1b7e834/hf_xet-1.2.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d40b18769bb9a8bc82a9ede575ce1a44c75eb80e7375a01d76259089529b5dc", size = 3315004, upload-time = "2025-10-24T19:04:00.314Z" },
- { url = "https://files.pythonhosted.org/packages/b1/ba/45ea2f605fbf6d81c8b21e4d970b168b18a53515923010c312c06cd83164/hf_xet-1.2.0-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:cd3a6027d59cfb60177c12d6424e31f4b5ff13d8e3a1247b3a584bf8977e6df5", size = 3222636, upload-time = "2025-10-24T19:03:58.111Z" },
- { url = "https://files.pythonhosted.org/packages/4a/1d/04513e3cab8f29ab8c109d309ddd21a2705afab9d52f2ba1151e0c14f086/hf_xet-1.2.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6de1fc44f58f6dd937956c8d304d8c2dea264c80680bcfa61ca4a15e7b76780f", size = 3408448, upload-time = "2025-10-24T19:04:20.951Z" },
- { url = "https://files.pythonhosted.org/packages/f0/7c/60a2756d7feec7387db3a1176c632357632fbe7849fce576c5559d4520c7/hf_xet-1.2.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:f182f264ed2acd566c514e45da9f2119110e48a87a327ca271027904c70c5832", size = 3503401, upload-time = "2025-10-24T19:04:22.549Z" },
- { url = "https://files.pythonhosted.org/packages/4e/64/48fffbd67fb418ab07451e4ce641a70de1c40c10a13e25325e24858ebe5a/hf_xet-1.2.0-cp313-cp313t-win_amd64.whl", hash = "sha256:293a7a3787e5c95d7be1857358a9130694a9c6021de3f27fa233f37267174382", size = 2900866, upload-time = "2025-10-24T19:04:33.461Z" },
- { url = "https://files.pythonhosted.org/packages/e2/51/f7e2caae42f80af886db414d4e9885fac959330509089f97cccb339c6b87/hf_xet-1.2.0-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:10bfab528b968c70e062607f663e21e34e2bba349e8038db546646875495179e", size = 2861861, upload-time = "2025-10-24T19:04:19.01Z" },
- { url = "https://files.pythonhosted.org/packages/6e/1d/a641a88b69994f9371bd347f1dd35e5d1e2e2460a2e350c8d5165fc62005/hf_xet-1.2.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2a212e842647b02eb6a911187dc878e79c4aa0aa397e88dd3b26761676e8c1f8", size = 2717699, upload-time = "2025-10-24T19:04:17.306Z" },
- { url = "https://files.pythonhosted.org/packages/df/e0/e5e9bba7d15f0318955f7ec3f4af13f92e773fbb368c0b8008a5acbcb12f/hf_xet-1.2.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:30e06daccb3a7d4c065f34fc26c14c74f4653069bb2b194e7f18f17cbe9939c0", size = 3314885, upload-time = "2025-10-24T19:04:07.642Z" },
- { url = "https://files.pythonhosted.org/packages/21/90/b7fe5ff6f2b7b8cbdf1bd56145f863c90a5807d9758a549bf3d916aa4dec/hf_xet-1.2.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:29c8fc913a529ec0a91867ce3d119ac1aac966e098cf49501800c870328cc090", size = 3221550, upload-time = "2025-10-24T19:04:05.55Z" },
- { url = "https://files.pythonhosted.org/packages/6f/cb/73f276f0a7ce46cc6a6ec7d6c7d61cbfe5f2e107123d9bbd0193c355f106/hf_xet-1.2.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e159cbfcfbb29f920db2c09ed8b660eb894640d284f102ada929b6e3dc410a", size = 3408010, upload-time = "2025-10-24T19:04:28.598Z" },
- { url = "https://files.pythonhosted.org/packages/b8/1e/d642a12caa78171f4be64f7cd9c40e3ca5279d055d0873188a58c0f5fbb9/hf_xet-1.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:9c91d5ae931510107f148874e9e2de8a16052b6f1b3ca3c1b12f15ccb491390f", size = 3503264, upload-time = "2025-10-24T19:04:30.397Z" },
- { url = "https://files.pythonhosted.org/packages/17/b5/33764714923fa1ff922770f7ed18c2daae034d21ae6e10dbf4347c854154/hf_xet-1.2.0-cp314-cp314t-win_amd64.whl", hash = "sha256:210d577732b519ac6ede149d2f2f34049d44e8622bf14eb3d63bbcd2d4b332dc", size = 2901071, upload-time = "2025-10-24T19:04:37.463Z" },
- { url = "https://files.pythonhosted.org/packages/96/2d/22338486473df5923a9ab7107d375dbef9173c338ebef5098ef593d2b560/hf_xet-1.2.0-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:46740d4ac024a7ca9b22bebf77460ff43332868b661186a8e46c227fdae01848", size = 2866099, upload-time = "2025-10-24T19:04:15.366Z" },
- { url = "https://files.pythonhosted.org/packages/7f/8c/c5becfa53234299bc2210ba314eaaae36c2875e0045809b82e40a9544f0c/hf_xet-1.2.0-cp37-abi3-macosx_11_0_arm64.whl", hash = "sha256:27df617a076420d8845bea087f59303da8be17ed7ec0cd7ee3b9b9f579dff0e4", size = 2722178, upload-time = "2025-10-24T19:04:13.695Z" },
- { url = "https://files.pythonhosted.org/packages/9a/92/cf3ab0b652b082e66876d08da57fcc6fa2f0e6c70dfbbafbd470bb73eb47/hf_xet-1.2.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3651fd5bfe0281951b988c0facbe726aa5e347b103a675f49a3fa8144c7968fd", size = 3320214, upload-time = "2025-10-24T19:04:03.596Z" },
- { url = "https://files.pythonhosted.org/packages/46/92/3f7ec4a1b6a65bf45b059b6d4a5d38988f63e193056de2f420137e3c3244/hf_xet-1.2.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:d06fa97c8562fb3ee7a378dd9b51e343bc5bc8190254202c9771029152f5e08c", size = 3229054, upload-time = "2025-10-24T19:04:01.949Z" },
- { url = "https://files.pythonhosted.org/packages/0b/dd/7ac658d54b9fb7999a0ccb07ad863b413cbaf5cf172f48ebcd9497ec7263/hf_xet-1.2.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:4c1428c9ae73ec0939410ec73023c4f842927f39db09b063b9482dac5a3bb737", size = 3413812, upload-time = "2025-10-24T19:04:24.585Z" },
- { url = "https://files.pythonhosted.org/packages/92/68/89ac4e5b12a9ff6286a12174c8538a5930e2ed662091dd2572bbe0a18c8a/hf_xet-1.2.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a55558084c16b09b5ed32ab9ed38421e2d87cf3f1f89815764d1177081b99865", size = 3508920, upload-time = "2025-10-24T19:04:26.927Z" },
- { url = "https://files.pythonhosted.org/packages/cb/44/870d44b30e1dcfb6a65932e3e1506c103a8a5aea9103c337e7a53180322c/hf_xet-1.2.0-cp37-abi3-win_amd64.whl", hash = "sha256:e6584a52253f72c9f52f9e549d5895ca7a471608495c4ecaa6cc73dba2b24d69", size = 2905735, upload-time = "2025-10-24T19:04:35.928Z" },
-]
-
-[[package]]
-name = "httpcore"
-version = "1.0.9"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "certifi" },
- { name = "h11" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8", size = 85484, upload-time = "2025-04-24T22:06:22.219Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" },
-]
-
-[[package]]
-name = "httpx"
-version = "0.28.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "anyio" },
- { name = "certifi" },
- { name = "httpcore" },
- { name = "idna" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc", size = 141406, upload-time = "2024-12-06T15:37:23.222Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" },
-]
-
-[[package]]
-name = "huggingface-hub"
-version = "0.36.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "filelock" },
- { name = "fsspec" },
- { name = "hf-xet", marker = "platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'arm64' or platform_machine == 'x86_64'" },
- { name = "packaging" },
- { name = "pyyaml" },
- { name = "requests" },
- { name = "tqdm" },
- { name = "typing-extensions" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/98/63/4910c5fa9128fdadf6a9c5ac138e8b1b6cee4ca44bf7915bbfbce4e355ee/huggingface_hub-0.36.0.tar.gz", hash = "sha256:47b3f0e2539c39bf5cde015d63b72ec49baff67b6931c3d97f3f84532e2b8d25", size = 463358, upload-time = "2025-10-23T12:12:01.413Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/cb/bd/1a875e0d592d447cbc02805fd3fe0f497714d6a2583f59d14fa9ebad96eb/huggingface_hub-0.36.0-py3-none-any.whl", hash = "sha256:7bcc9ad17d5b3f07b57c78e79d527102d08313caa278a641993acddcb894548d", size = 566094, upload-time = "2025-10-23T12:11:59.557Z" },
-]
-
-[package.optional-dependencies]
-hf-xet = [
- { name = "hf-xet" },
-]
-
-[[package]]
-name = "identify"
-version = "2.6.16"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/5b/8d/e8b97e6bd3fb6fb271346f7981362f1e04d6a7463abd0de79e1fda17c067/identify-2.6.16.tar.gz", hash = "sha256:846857203b5511bbe94d5a352a48ef2359532bc8f6727b5544077a0dcfb24980", size = 99360, upload-time = "2026-01-12T18:58:58.201Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/b8/58/40fbbcefeda82364720eba5cf2270f98496bdfa19ea75b4cccae79c698e6/identify-2.6.16-py2.py3-none-any.whl", hash = "sha256:391ee4d77741d994189522896270b787aed8670389bfd60f326d677d64a6dfb0", size = 99202, upload-time = "2026-01-12T18:58:56.627Z" },
-]
-
-[[package]]
-name = "idna"
-version = "3.11"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902", size = 194582, upload-time = "2025-10-12T14:55:20.501Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", size = 71008, upload-time = "2025-10-12T14:55:18.883Z" },
-]
-
-[[package]]
-name = "imageio"
-version = "2.37.2"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "pillow" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/a3/6f/606be632e37bf8d05b253e8626c2291d74c691ddc7bcdf7d6aaf33b32f6a/imageio-2.37.2.tar.gz", hash = "sha256:0212ef2727ac9caa5ca4b2c75ae89454312f440a756fcfc8ef1993e718f50f8a", size = 389600, upload-time = "2025-11-04T14:29:39.898Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/fb/fe/301e0936b79bcab4cacc7548bf2853fc28dced0a578bab1f7ef53c9aa75b/imageio-2.37.2-py3-none-any.whl", hash = "sha256:ad9adfb20335d718c03de457358ed69f141021a333c40a53e57273d8a5bd0b9b", size = 317646, upload-time = "2025-11-04T14:29:37.948Z" },
-]
-
-[[package]]
-name = "imageio-ffmpeg"
-version = "0.6.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/44/bd/c3343c721f2a1b0c9fc71c1aebf1966a3b7f08c2eea8ed5437a2865611d6/imageio_ffmpeg-0.6.0.tar.gz", hash = "sha256:e2556bed8e005564a9f925bb7afa4002d82770d6b08825078b7697ab88ba1755", size = 25210, upload-time = "2025-01-16T21:34:32.747Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/da/58/87ef68ac83f4c7690961bce288fd8e382bc5f1513860fc7f90a9c1c1c6bf/imageio_ffmpeg-0.6.0-py3-none-macosx_10_9_intel.macosx_10_9_x86_64.whl", hash = "sha256:9d2baaf867088508d4a3458e61eeb30e945c4ad8016025545f66c4b5aaef0a61", size = 24932969, upload-time = "2025-01-16T21:34:20.464Z" },
- { url = "https://files.pythonhosted.org/packages/40/5c/f3d8a657d362cc93b81aab8feda487317da5b5d31c0e1fdfd5e986e55d17/imageio_ffmpeg-0.6.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:b1ae3173414b5fc5f538a726c4e48ea97edc0d2cdc11f103afee655c463fa742", size = 21113891, upload-time = "2025-01-16T21:34:00.277Z" },
- { url = "https://files.pythonhosted.org/packages/33/e7/1925bfbc563c39c1d2e82501d8372734a5c725e53ac3b31b4c2d081e895b/imageio_ffmpeg-0.6.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:1d47bebd83d2c5fc770720d211855f208af8a596c82d17730aa51e815cdee6dc", size = 25632706, upload-time = "2025-01-16T21:33:53.475Z" },
- { url = "https://files.pythonhosted.org/packages/a0/2d/43c8522a2038e9d0e7dbdf3a61195ecc31ca576fb1527a528c877e87d973/imageio_ffmpeg-0.6.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:c7e46fcec401dd990405049d2e2f475e2b397779df2519b544b8aab515195282", size = 29498237, upload-time = "2025-01-16T21:34:13.726Z" },
- { url = "https://files.pythonhosted.org/packages/a0/13/59da54728351883c3c1d9fca1710ab8eee82c7beba585df8f25ca925f08f/imageio_ffmpeg-0.6.0-py3-none-win32.whl", hash = "sha256:196faa79366b4a82f95c0f4053191d2013f4714a715780f0ad2a68ff37483cc2", size = 19652251, upload-time = "2025-01-16T21:34:06.812Z" },
- { url = "https://files.pythonhosted.org/packages/2c/c6/fa760e12a2483469e2bf5058c5faff664acf66cadb4df2ad6205b016a73d/imageio_ffmpeg-0.6.0-py3-none-win_amd64.whl", hash = "sha256:02fa47c83703c37df6bfe4896aab339013f62bf02c5ebf2dce6da56af04ffc0a", size = 31246824, upload-time = "2025-01-16T21:34:28.6Z" },
-]
-
-[[package]]
-name = "iniconfig"
-version = "2.3.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" },
-]
-
-[[package]]
-name = "jinja2"
-version = "3.1.6"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "markupsafe" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" },
-]
-
-[[package]]
-name = "jiter"
-version = "0.12.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/45/9d/e0660989c1370e25848bb4c52d061c71837239738ad937e83edca174c273/jiter-0.12.0.tar.gz", hash = "sha256:64dfcd7d5c168b38d3f9f8bba7fc639edb3418abcc74f22fdbe6b8938293f30b", size = 168294, upload-time = "2025-11-09T20:49:23.302Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/3b/91/13cb9505f7be74a933f37da3af22e029f6ba64f5669416cb8b2774bc9682/jiter-0.12.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:e7acbaba9703d5de82a2c98ae6a0f59ab9770ab5af5fa35e43a303aee962cf65", size = 316652, upload-time = "2025-11-09T20:46:41.021Z" },
- { url = "https://files.pythonhosted.org/packages/4e/76/4e9185e5d9bb4e482cf6dec6410d5f78dfeb374cfcecbbe9888d07c52daa/jiter-0.12.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:364f1a7294c91281260364222f535bc427f56d4de1d8ffd718162d21fbbd602e", size = 319829, upload-time = "2025-11-09T20:46:43.281Z" },
- { url = "https://files.pythonhosted.org/packages/86/af/727de50995d3a153138139f259baae2379d8cb0522c0c00419957bc478a6/jiter-0.12.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85ee4d25805d4fb23f0a5167a962ef8e002dbfb29c0989378488e32cf2744b62", size = 350568, upload-time = "2025-11-09T20:46:45.075Z" },
- { url = "https://files.pythonhosted.org/packages/6a/c1/d6e9f4b7a3d5ac63bcbdfddeb50b2dcfbdc512c86cffc008584fdc350233/jiter-0.12.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:796f466b7942107eb889c08433b6e31b9a7ed31daceaecf8af1be26fb26c0ca8", size = 369052, upload-time = "2025-11-09T20:46:46.818Z" },
- { url = "https://files.pythonhosted.org/packages/eb/be/00824cd530f30ed73fa8a4f9f3890a705519e31ccb9e929f1e22062e7c76/jiter-0.12.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:35506cb71f47dba416694e67af996bbdefb8e3608f1f78799c2e1f9058b01ceb", size = 481585, upload-time = "2025-11-09T20:46:48.319Z" },
- { url = "https://files.pythonhosted.org/packages/74/b6/2ad7990dff9504d4b5052eef64aa9574bd03d722dc7edced97aad0d47be7/jiter-0.12.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:726c764a90c9218ec9e4f99a33d6bf5ec169163f2ca0fc21b654e88c2abc0abc", size = 380541, upload-time = "2025-11-09T20:46:49.643Z" },
- { url = "https://files.pythonhosted.org/packages/b5/c7/f3c26ecbc1adbf1db0d6bba99192143d8fe8504729d9594542ecc4445784/jiter-0.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa47810c5565274810b726b0dc86d18dce5fd17b190ebdc3890851d7b2a0e74", size = 364423, upload-time = "2025-11-09T20:46:51.731Z" },
- { url = "https://files.pythonhosted.org/packages/18/51/eac547bf3a2d7f7e556927278e14c56a0604b8cddae75815d5739f65f81d/jiter-0.12.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f8ec0259d3f26c62aed4d73b198c53e316ae11f0f69c8fbe6682c6dcfa0fcce2", size = 389958, upload-time = "2025-11-09T20:46:53.432Z" },
- { url = "https://files.pythonhosted.org/packages/2c/1f/9ca592e67175f2db156cff035e0d817d6004e293ee0c1d73692d38fcb596/jiter-0.12.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:79307d74ea83465b0152fa23e5e297149506435535282f979f18b9033c0bb025", size = 522084, upload-time = "2025-11-09T20:46:54.848Z" },
- { url = "https://files.pythonhosted.org/packages/83/ff/597d9cdc3028f28224f53e1a9d063628e28b7a5601433e3196edda578cdd/jiter-0.12.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cf6e6dd18927121fec86739f1a8906944703941d000f0639f3eb6281cc601dca", size = 513054, upload-time = "2025-11-09T20:46:56.487Z" },
- { url = "https://files.pythonhosted.org/packages/24/6d/1970bce1351bd02e3afcc5f49e4f7ef3dabd7fb688f42be7e8091a5b809a/jiter-0.12.0-cp310-cp310-win32.whl", hash = "sha256:b6ae2aec8217327d872cbfb2c1694489057b9433afce447955763e6ab015b4c4", size = 206368, upload-time = "2025-11-09T20:46:58.638Z" },
- { url = "https://files.pythonhosted.org/packages/e3/6b/eb1eb505b2d86709b59ec06681a2b14a94d0941db091f044b9f0e16badc0/jiter-0.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:c7f49ce90a71e44f7e1aa9e7ec415b9686bbc6a5961e57eab511015e6759bc11", size = 204847, upload-time = "2025-11-09T20:47:00.295Z" },
- { url = "https://files.pythonhosted.org/packages/32/f9/eaca4633486b527ebe7e681c431f529b63fe2709e7c5242fc0f43f77ce63/jiter-0.12.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d8f8a7e317190b2c2d60eb2e8aa835270b008139562d70fe732e1c0020ec53c9", size = 316435, upload-time = "2025-11-09T20:47:02.087Z" },
- { url = "https://files.pythonhosted.org/packages/10/c1/40c9f7c22f5e6ff715f28113ebaba27ab85f9af2660ad6e1dd6425d14c19/jiter-0.12.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2218228a077e784c6c8f1a8e5d6b8cb1dea62ce25811c356364848554b2056cd", size = 320548, upload-time = "2025-11-09T20:47:03.409Z" },
- { url = "https://files.pythonhosted.org/packages/6b/1b/efbb68fe87e7711b00d2cfd1f26bb4bfc25a10539aefeaa7727329ffb9cb/jiter-0.12.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9354ccaa2982bf2188fd5f57f79f800ef622ec67beb8329903abf6b10da7d423", size = 351915, upload-time = "2025-11-09T20:47:05.171Z" },
- { url = "https://files.pythonhosted.org/packages/15/2d/c06e659888c128ad1e838123d0638f0efad90cc30860cb5f74dd3f2fc0b3/jiter-0.12.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8f2607185ea89b4af9a604d4c7ec40e45d3ad03ee66998b031134bc510232bb7", size = 368966, upload-time = "2025-11-09T20:47:06.508Z" },
- { url = "https://files.pythonhosted.org/packages/6b/20/058db4ae5fb07cf6a4ab2e9b9294416f606d8e467fb74c2184b2a1eeacba/jiter-0.12.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3a585a5e42d25f2e71db5f10b171f5e5ea641d3aa44f7df745aa965606111cc2", size = 482047, upload-time = "2025-11-09T20:47:08.382Z" },
- { url = "https://files.pythonhosted.org/packages/49/bb/dc2b1c122275e1de2eb12905015d61e8316b2f888bdaac34221c301495d6/jiter-0.12.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd9e21d34edff5a663c631f850edcb786719c960ce887a5661e9c828a53a95d9", size = 380835, upload-time = "2025-11-09T20:47:09.81Z" },
- { url = "https://files.pythonhosted.org/packages/23/7d/38f9cd337575349de16da575ee57ddb2d5a64d425c9367f5ef9e4612e32e/jiter-0.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a612534770470686cd5431478dc5a1b660eceb410abade6b1b74e320ca98de6", size = 364587, upload-time = "2025-11-09T20:47:11.529Z" },
- { url = "https://files.pythonhosted.org/packages/f0/a3/b13e8e61e70f0bb06085099c4e2462647f53cc2ca97614f7fedcaa2bb9f3/jiter-0.12.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3985aea37d40a908f887b34d05111e0aae822943796ebf8338877fee2ab67725", size = 390492, upload-time = "2025-11-09T20:47:12.993Z" },
- { url = "https://files.pythonhosted.org/packages/07/71/e0d11422ed027e21422f7bc1883c61deba2d9752b720538430c1deadfbca/jiter-0.12.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b1207af186495f48f72529f8d86671903c8c10127cac6381b11dddc4aaa52df6", size = 522046, upload-time = "2025-11-09T20:47:14.6Z" },
- { url = "https://files.pythonhosted.org/packages/9f/59/b968a9aa7102a8375dbbdfbd2aeebe563c7e5dddf0f47c9ef1588a97e224/jiter-0.12.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ef2fb241de583934c9915a33120ecc06d94aa3381a134570f59eed784e87001e", size = 513392, upload-time = "2025-11-09T20:47:16.011Z" },
- { url = "https://files.pythonhosted.org/packages/ca/e4/7df62002499080dbd61b505c5cb351aa09e9959d176cac2aa8da6f93b13b/jiter-0.12.0-cp311-cp311-win32.whl", hash = "sha256:453b6035672fecce8007465896a25b28a6b59cfe8fbc974b2563a92f5a92a67c", size = 206096, upload-time = "2025-11-09T20:47:17.344Z" },
- { url = "https://files.pythonhosted.org/packages/bb/60/1032b30ae0572196b0de0e87dce3b6c26a1eff71aad5fe43dee3082d32e0/jiter-0.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:ca264b9603973c2ad9435c71a8ec8b49f8f715ab5ba421c85a51cde9887e421f", size = 204899, upload-time = "2025-11-09T20:47:19.365Z" },
- { url = "https://files.pythonhosted.org/packages/49/d5/c145e526fccdb834063fb45c071df78b0cc426bbaf6de38b0781f45d956f/jiter-0.12.0-cp311-cp311-win_arm64.whl", hash = "sha256:cb00ef392e7d684f2754598c02c409f376ddcef857aae796d559e6cacc2d78a5", size = 188070, upload-time = "2025-11-09T20:47:20.75Z" },
- { url = "https://files.pythonhosted.org/packages/92/c9/5b9f7b4983f1b542c64e84165075335e8a236fa9e2ea03a0c79780062be8/jiter-0.12.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:305e061fa82f4680607a775b2e8e0bcb071cd2205ac38e6ef48c8dd5ebe1cf37", size = 314449, upload-time = "2025-11-09T20:47:22.999Z" },
- { url = "https://files.pythonhosted.org/packages/98/6e/e8efa0e78de00db0aee82c0cf9e8b3f2027efd7f8a71f859d8f4be8e98ef/jiter-0.12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5c1860627048e302a528333c9307c818c547f214d8659b0705d2195e1a94b274", size = 319855, upload-time = "2025-11-09T20:47:24.779Z" },
- { url = "https://files.pythonhosted.org/packages/20/26/894cd88e60b5d58af53bec5c6759d1292bd0b37a8b5f60f07abf7a63ae5f/jiter-0.12.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df37577a4f8408f7e0ec3205d2a8f87672af8f17008358063a4d6425b6081ce3", size = 350171, upload-time = "2025-11-09T20:47:26.469Z" },
- { url = "https://files.pythonhosted.org/packages/f5/27/a7b818b9979ac31b3763d25f3653ec3a954044d5e9f5d87f2f247d679fd1/jiter-0.12.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:75fdd787356c1c13a4f40b43c2156276ef7a71eb487d98472476476d803fb2cf", size = 365590, upload-time = "2025-11-09T20:47:27.918Z" },
- { url = "https://files.pythonhosted.org/packages/ba/7e/e46195801a97673a83746170b17984aa8ac4a455746354516d02ca5541b4/jiter-0.12.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1eb5db8d9c65b112aacf14fcd0faae9913d07a8afea5ed06ccdd12b724e966a1", size = 479462, upload-time = "2025-11-09T20:47:29.654Z" },
- { url = "https://files.pythonhosted.org/packages/ca/75/f833bfb009ab4bd11b1c9406d333e3b4357709ed0570bb48c7c06d78c7dd/jiter-0.12.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:73c568cc27c473f82480abc15d1301adf333a7ea4f2e813d6a2c7d8b6ba8d0df", size = 378983, upload-time = "2025-11-09T20:47:31.026Z" },
- { url = "https://files.pythonhosted.org/packages/71/b3/7a69d77943cc837d30165643db753471aff5df39692d598da880a6e51c24/jiter-0.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4321e8a3d868919bcb1abb1db550d41f2b5b326f72df29e53b2df8b006eb9403", size = 361328, upload-time = "2025-11-09T20:47:33.286Z" },
- { url = "https://files.pythonhosted.org/packages/b0/ac/a78f90caf48d65ba70d8c6efc6f23150bc39dc3389d65bbec2a95c7bc628/jiter-0.12.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0a51bad79f8cc9cac2b4b705039f814049142e0050f30d91695a2d9a6611f126", size = 386740, upload-time = "2025-11-09T20:47:34.703Z" },
- { url = "https://files.pythonhosted.org/packages/39/b6/5d31c2cc8e1b6a6bcf3c5721e4ca0a3633d1ab4754b09bc7084f6c4f5327/jiter-0.12.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:2a67b678f6a5f1dd6c36d642d7db83e456bc8b104788262aaefc11a22339f5a9", size = 520875, upload-time = "2025-11-09T20:47:36.058Z" },
- { url = "https://files.pythonhosted.org/packages/30/b5/4df540fae4e9f68c54b8dab004bd8c943a752f0b00efd6e7d64aa3850339/jiter-0.12.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efe1a211fe1fd14762adea941e3cfd6c611a136e28da6c39272dbb7a1bbe6a86", size = 511457, upload-time = "2025-11-09T20:47:37.932Z" },
- { url = "https://files.pythonhosted.org/packages/07/65/86b74010e450a1a77b2c1aabb91d4a91dd3cd5afce99f34d75fd1ac64b19/jiter-0.12.0-cp312-cp312-win32.whl", hash = "sha256:d779d97c834b4278276ec703dc3fc1735fca50af63eb7262f05bdb4e62203d44", size = 204546, upload-time = "2025-11-09T20:47:40.47Z" },
- { url = "https://files.pythonhosted.org/packages/1c/c7/6659f537f9562d963488e3e55573498a442503ced01f7e169e96a6110383/jiter-0.12.0-cp312-cp312-win_amd64.whl", hash = "sha256:e8269062060212b373316fe69236096aaf4c49022d267c6736eebd66bbbc60bb", size = 205196, upload-time = "2025-11-09T20:47:41.794Z" },
- { url = "https://files.pythonhosted.org/packages/21/f4/935304f5169edadfec7f9c01eacbce4c90bb9a82035ac1de1f3bd2d40be6/jiter-0.12.0-cp312-cp312-win_arm64.whl", hash = "sha256:06cb970936c65de926d648af0ed3d21857f026b1cf5525cb2947aa5e01e05789", size = 186100, upload-time = "2025-11-09T20:47:43.007Z" },
- { url = "https://files.pythonhosted.org/packages/3d/a6/97209693b177716e22576ee1161674d1d58029eb178e01866a0422b69224/jiter-0.12.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:6cc49d5130a14b732e0612bc76ae8db3b49898732223ef8b7599aa8d9810683e", size = 313658, upload-time = "2025-11-09T20:47:44.424Z" },
- { url = "https://files.pythonhosted.org/packages/06/4d/125c5c1537c7d8ee73ad3d530a442d6c619714b95027143f1b61c0b4dfe0/jiter-0.12.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:37f27a32ce36364d2fa4f7fdc507279db604d27d239ea2e044c8f148410defe1", size = 318605, upload-time = "2025-11-09T20:47:45.973Z" },
- { url = "https://files.pythonhosted.org/packages/99/bf/a840b89847885064c41a5f52de6e312e91fa84a520848ee56c97e4fa0205/jiter-0.12.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bbc0944aa3d4b4773e348cda635252824a78f4ba44328e042ef1ff3f6080d1cf", size = 349803, upload-time = "2025-11-09T20:47:47.535Z" },
- { url = "https://files.pythonhosted.org/packages/8a/88/e63441c28e0db50e305ae23e19c1d8fae012d78ed55365da392c1f34b09c/jiter-0.12.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:da25c62d4ee1ffbacb97fac6dfe4dcd6759ebdc9015991e92a6eae5816287f44", size = 365120, upload-time = "2025-11-09T20:47:49.284Z" },
- { url = "https://files.pythonhosted.org/packages/0a/7c/49b02714af4343970eb8aca63396bc1c82fa01197dbb1e9b0d274b550d4e/jiter-0.12.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:048485c654b838140b007390b8182ba9774621103bd4d77c9c3f6f117474ba45", size = 479918, upload-time = "2025-11-09T20:47:50.807Z" },
- { url = "https://files.pythonhosted.org/packages/69/ba/0a809817fdd5a1db80490b9150645f3aae16afad166960bcd562be194f3b/jiter-0.12.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:635e737fbb7315bef0037c19b88b799143d2d7d3507e61a76751025226b3ac87", size = 379008, upload-time = "2025-11-09T20:47:52.211Z" },
- { url = "https://files.pythonhosted.org/packages/5f/c3/c9fc0232e736c8877d9e6d83d6eeb0ba4e90c6c073835cc2e8f73fdeef51/jiter-0.12.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e017c417b1ebda911bd13b1e40612704b1f5420e30695112efdbed8a4b389ed", size = 361785, upload-time = "2025-11-09T20:47:53.512Z" },
- { url = "https://files.pythonhosted.org/packages/96/61/61f69b7e442e97ca6cd53086ddc1cf59fb830549bc72c0a293713a60c525/jiter-0.12.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:89b0bfb8b2bf2351fba36bb211ef8bfceba73ef58e7f0c68fb67b5a2795ca2f9", size = 386108, upload-time = "2025-11-09T20:47:54.893Z" },
- { url = "https://files.pythonhosted.org/packages/e9/2e/76bb3332f28550c8f1eba3bf6e5efe211efda0ddbbaf24976bc7078d42a5/jiter-0.12.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:f5aa5427a629a824a543672778c9ce0c5e556550d1569bb6ea28a85015287626", size = 519937, upload-time = "2025-11-09T20:47:56.253Z" },
- { url = "https://files.pythonhosted.org/packages/84/d6/fa96efa87dc8bff2094fb947f51f66368fa56d8d4fc9e77b25d7fbb23375/jiter-0.12.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed53b3d6acbcb0fd0b90f20c7cb3b24c357fe82a3518934d4edfa8c6898e498c", size = 510853, upload-time = "2025-11-09T20:47:58.32Z" },
- { url = "https://files.pythonhosted.org/packages/8a/28/93f67fdb4d5904a708119a6ab58a8f1ec226ff10a94a282e0215402a8462/jiter-0.12.0-cp313-cp313-win32.whl", hash = "sha256:4747de73d6b8c78f2e253a2787930f4fffc68da7fa319739f57437f95963c4de", size = 204699, upload-time = "2025-11-09T20:47:59.686Z" },
- { url = "https://files.pythonhosted.org/packages/c4/1f/30b0eb087045a0abe2a5c9c0c0c8da110875a1d3be83afd4a9a4e548be3c/jiter-0.12.0-cp313-cp313-win_amd64.whl", hash = "sha256:e25012eb0c456fcc13354255d0338cd5397cce26c77b2832b3c4e2e255ea5d9a", size = 204258, upload-time = "2025-11-09T20:48:01.01Z" },
- { url = "https://files.pythonhosted.org/packages/2c/f4/2b4daf99b96bce6fc47971890b14b2a36aef88d7beb9f057fafa032c6141/jiter-0.12.0-cp313-cp313-win_arm64.whl", hash = "sha256:c97b92c54fe6110138c872add030a1f99aea2401ddcdaa21edf74705a646dd60", size = 185503, upload-time = "2025-11-09T20:48:02.35Z" },
- { url = "https://files.pythonhosted.org/packages/39/ca/67bb15a7061d6fe20b9b2a2fd783e296a1e0f93468252c093481a2f00efa/jiter-0.12.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:53839b35a38f56b8be26a7851a48b89bc47e5d88e900929df10ed93b95fea3d6", size = 317965, upload-time = "2025-11-09T20:48:03.783Z" },
- { url = "https://files.pythonhosted.org/packages/18/af/1788031cd22e29c3b14bc6ca80b16a39a0b10e611367ffd480c06a259831/jiter-0.12.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94f669548e55c91ab47fef8bddd9c954dab1938644e715ea49d7e117015110a4", size = 345831, upload-time = "2025-11-09T20:48:05.55Z" },
- { url = "https://files.pythonhosted.org/packages/05/17/710bf8472d1dff0d3caf4ced6031060091c1320f84ee7d5dcbed1f352417/jiter-0.12.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:351d54f2b09a41600ffea43d081522d792e81dcfb915f6d2d242744c1cc48beb", size = 361272, upload-time = "2025-11-09T20:48:06.951Z" },
- { url = "https://files.pythonhosted.org/packages/fb/f1/1dcc4618b59761fef92d10bcbb0b038b5160be653b003651566a185f1a5c/jiter-0.12.0-cp313-cp313t-win_amd64.whl", hash = "sha256:2a5e90604620f94bf62264e7c2c038704d38217b7465b863896c6d7c902b06c7", size = 204604, upload-time = "2025-11-09T20:48:08.328Z" },
- { url = "https://files.pythonhosted.org/packages/d9/32/63cb1d9f1c5c6632a783c0052cde9ef7ba82688f7065e2f0d5f10a7e3edb/jiter-0.12.0-cp313-cp313t-win_arm64.whl", hash = "sha256:88ef757017e78d2860f96250f9393b7b577b06a956ad102c29c8237554380db3", size = 185628, upload-time = "2025-11-09T20:48:09.572Z" },
- { url = "https://files.pythonhosted.org/packages/a8/99/45c9f0dbe4a1416b2b9a8a6d1236459540f43d7fb8883cff769a8db0612d/jiter-0.12.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:c46d927acd09c67a9fb1416df45c5a04c27e83aae969267e98fba35b74e99525", size = 312478, upload-time = "2025-11-09T20:48:10.898Z" },
- { url = "https://files.pythonhosted.org/packages/4c/a7/54ae75613ba9e0f55fcb0bc5d1f807823b5167cc944e9333ff322e9f07dd/jiter-0.12.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:774ff60b27a84a85b27b88cd5583899c59940bcc126caca97eb2a9df6aa00c49", size = 318706, upload-time = "2025-11-09T20:48:12.266Z" },
- { url = "https://files.pythonhosted.org/packages/59/31/2aa241ad2c10774baf6c37f8b8e1f39c07db358f1329f4eb40eba179c2a2/jiter-0.12.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5433fab222fb072237df3f637d01b81f040a07dcac1cb4a5c75c7aa9ed0bef1", size = 351894, upload-time = "2025-11-09T20:48:13.673Z" },
- { url = "https://files.pythonhosted.org/packages/54/4f/0f2759522719133a9042781b18cc94e335b6d290f5e2d3e6899d6af933e3/jiter-0.12.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f8c593c6e71c07866ec6bfb790e202a833eeec885022296aff6b9e0b92d6a70e", size = 365714, upload-time = "2025-11-09T20:48:15.083Z" },
- { url = "https://files.pythonhosted.org/packages/dc/6f/806b895f476582c62a2f52c453151edd8a0fde5411b0497baaa41018e878/jiter-0.12.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:90d32894d4c6877a87ae00c6b915b609406819dce8bc0d4e962e4de2784e567e", size = 478989, upload-time = "2025-11-09T20:48:16.706Z" },
- { url = "https://files.pythonhosted.org/packages/86/6c/012d894dc6e1033acd8db2b8346add33e413ec1c7c002598915278a37f79/jiter-0.12.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:798e46eed9eb10c3adbbacbd3bdb5ecd4cf7064e453d00dbef08802dae6937ff", size = 378615, upload-time = "2025-11-09T20:48:18.614Z" },
- { url = "https://files.pythonhosted.org/packages/87/30/d718d599f6700163e28e2c71c0bbaf6dace692e7df2592fd793ac9276717/jiter-0.12.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b3f1368f0a6719ea80013a4eb90ba72e75d7ea67cfc7846db2ca504f3df0169a", size = 364745, upload-time = "2025-11-09T20:48:20.117Z" },
- { url = "https://files.pythonhosted.org/packages/8f/85/315b45ce4b6ddc7d7fceca24068543b02bdc8782942f4ee49d652e2cc89f/jiter-0.12.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:65f04a9d0b4406f7e51279710b27484af411896246200e461d80d3ba0caa901a", size = 386502, upload-time = "2025-11-09T20:48:21.543Z" },
- { url = "https://files.pythonhosted.org/packages/74/0b/ce0434fb40c5b24b368fe81b17074d2840748b4952256bab451b72290a49/jiter-0.12.0-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:fd990541982a24281d12b67a335e44f117e4c6cbad3c3b75c7dea68bf4ce3a67", size = 519845, upload-time = "2025-11-09T20:48:22.964Z" },
- { url = "https://files.pythonhosted.org/packages/e8/a3/7a7a4488ba052767846b9c916d208b3ed114e3eb670ee984e4c565b9cf0d/jiter-0.12.0-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:b111b0e9152fa7df870ecaebb0bd30240d9f7fff1f2003bcb4ed0f519941820b", size = 510701, upload-time = "2025-11-09T20:48:24.483Z" },
- { url = "https://files.pythonhosted.org/packages/c3/16/052ffbf9d0467b70af24e30f91e0579e13ded0c17bb4a8eb2aed3cb60131/jiter-0.12.0-cp314-cp314-win32.whl", hash = "sha256:a78befb9cc0a45b5a5a0d537b06f8544c2ebb60d19d02c41ff15da28a9e22d42", size = 205029, upload-time = "2025-11-09T20:48:25.749Z" },
- { url = "https://files.pythonhosted.org/packages/e4/18/3cf1f3f0ccc789f76b9a754bdb7a6977e5d1d671ee97a9e14f7eb728d80e/jiter-0.12.0-cp314-cp314-win_amd64.whl", hash = "sha256:e1fe01c082f6aafbe5c8faf0ff074f38dfb911d53f07ec333ca03f8f6226debf", size = 204960, upload-time = "2025-11-09T20:48:27.415Z" },
- { url = "https://files.pythonhosted.org/packages/02/68/736821e52ecfdeeb0f024b8ab01b5a229f6b9293bbdb444c27efade50b0f/jiter-0.12.0-cp314-cp314-win_arm64.whl", hash = "sha256:d72f3b5a432a4c546ea4bedc84cce0c3404874f1d1676260b9c7f048a9855451", size = 185529, upload-time = "2025-11-09T20:48:29.125Z" },
- { url = "https://files.pythonhosted.org/packages/30/61/12ed8ee7a643cce29ac97c2281f9ce3956eb76b037e88d290f4ed0d41480/jiter-0.12.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e6ded41aeba3603f9728ed2b6196e4df875348ab97b28fc8afff115ed42ba7a7", size = 318974, upload-time = "2025-11-09T20:48:30.87Z" },
- { url = "https://files.pythonhosted.org/packages/2d/c6/f3041ede6d0ed5e0e79ff0de4c8f14f401bbf196f2ef3971cdbe5fd08d1d/jiter-0.12.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a947920902420a6ada6ad51892082521978e9dd44a802663b001436e4b771684", size = 345932, upload-time = "2025-11-09T20:48:32.658Z" },
- { url = "https://files.pythonhosted.org/packages/d5/5d/4d94835889edd01ad0e2dbfc05f7bdfaed46292e7b504a6ac7839aa00edb/jiter-0.12.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:add5e227e0554d3a52cf390a7635edaffdf4f8fce4fdbcef3cc2055bb396a30c", size = 367243, upload-time = "2025-11-09T20:48:34.093Z" },
- { url = "https://files.pythonhosted.org/packages/fd/76/0051b0ac2816253a99d27baf3dda198663aff882fa6ea7deeb94046da24e/jiter-0.12.0-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f9b1cda8fcb736250d7e8711d4580ebf004a46771432be0ae4796944b5dfa5d", size = 479315, upload-time = "2025-11-09T20:48:35.507Z" },
- { url = "https://files.pythonhosted.org/packages/70/ae/83f793acd68e5cb24e483f44f482a1a15601848b9b6f199dacb970098f77/jiter-0.12.0-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:deeb12a2223fe0135c7ff1356a143d57f95bbf1f4a66584f1fc74df21d86b993", size = 380714, upload-time = "2025-11-09T20:48:40.014Z" },
- { url = "https://files.pythonhosted.org/packages/b1/5e/4808a88338ad2c228b1126b93fcd8ba145e919e886fe910d578230dabe3b/jiter-0.12.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c596cc0f4cb574877550ce4ecd51f8037469146addd676d7c1a30ebe6391923f", size = 365168, upload-time = "2025-11-09T20:48:41.462Z" },
- { url = "https://files.pythonhosted.org/packages/0c/d4/04619a9e8095b42aef436b5aeb4c0282b4ff1b27d1db1508df9f5dc82750/jiter-0.12.0-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5ab4c823b216a4aeab3fdbf579c5843165756bd9ad87cc6b1c65919c4715f783", size = 387893, upload-time = "2025-11-09T20:48:42.921Z" },
- { url = "https://files.pythonhosted.org/packages/17/ea/d3c7e62e4546fdc39197fa4a4315a563a89b95b6d54c0d25373842a59cbe/jiter-0.12.0-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:e427eee51149edf962203ff8db75a7514ab89be5cb623fb9cea1f20b54f1107b", size = 520828, upload-time = "2025-11-09T20:48:44.278Z" },
- { url = "https://files.pythonhosted.org/packages/cc/0b/c6d3562a03fd767e31cb119d9041ea7958c3c80cb3d753eafb19b3b18349/jiter-0.12.0-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:edb868841f84c111255ba5e80339d386d937ec1fdce419518ce1bd9370fac5b6", size = 511009, upload-time = "2025-11-09T20:48:45.726Z" },
- { url = "https://files.pythonhosted.org/packages/aa/51/2cb4468b3448a8385ebcd15059d325c9ce67df4e2758d133ab9442b19834/jiter-0.12.0-cp314-cp314t-win32.whl", hash = "sha256:8bbcfe2791dfdb7c5e48baf646d37a6a3dcb5a97a032017741dea9f817dca183", size = 205110, upload-time = "2025-11-09T20:48:47.033Z" },
- { url = "https://files.pythonhosted.org/packages/b2/c5/ae5ec83dec9c2d1af805fd5fe8f74ebded9c8670c5210ec7820ce0dbeb1e/jiter-0.12.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2fa940963bf02e1d8226027ef461e36af472dea85d36054ff835aeed944dd873", size = 205223, upload-time = "2025-11-09T20:48:49.076Z" },
- { url = "https://files.pythonhosted.org/packages/97/9a/3c5391907277f0e55195550cf3fa8e293ae9ee0c00fb402fec1e38c0c82f/jiter-0.12.0-cp314-cp314t-win_arm64.whl", hash = "sha256:506c9708dd29b27288f9f8f1140c3cb0e3d8ddb045956d7757b1fa0e0f39a473", size = 185564, upload-time = "2025-11-09T20:48:50.376Z" },
- { url = "https://files.pythonhosted.org/packages/fe/54/5339ef1ecaa881c6948669956567a64d2670941925f245c434f494ffb0e5/jiter-0.12.0-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:4739a4657179ebf08f85914ce50332495811004cc1747852e8b2041ed2aab9b8", size = 311144, upload-time = "2025-11-09T20:49:10.503Z" },
- { url = "https://files.pythonhosted.org/packages/27/74/3446c652bffbd5e81ab354e388b1b5fc1d20daac34ee0ed11ff096b1b01a/jiter-0.12.0-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:41da8def934bf7bec16cb24bd33c0ca62126d2d45d81d17b864bd5ad721393c3", size = 305877, upload-time = "2025-11-09T20:49:12.269Z" },
- { url = "https://files.pythonhosted.org/packages/a1/f4/ed76ef9043450f57aac2d4fbeb27175aa0eb9c38f833be6ef6379b3b9a86/jiter-0.12.0-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c44ee814f499c082e69872d426b624987dbc5943ab06e9bbaa4f81989fdb79e", size = 340419, upload-time = "2025-11-09T20:49:13.803Z" },
- { url = "https://files.pythonhosted.org/packages/21/01/857d4608f5edb0664aa791a3d45702e1a5bcfff9934da74035e7b9803846/jiter-0.12.0-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cd2097de91cf03eaa27b3cbdb969addf83f0179c6afc41bbc4513705e013c65d", size = 347212, upload-time = "2025-11-09T20:49:15.643Z" },
- { url = "https://files.pythonhosted.org/packages/cb/f5/12efb8ada5f5c9edc1d4555fe383c1fb2eac05ac5859258a72d61981d999/jiter-0.12.0-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:e8547883d7b96ef2e5fe22b88f8a4c8725a56e7f4abafff20fd5272d634c7ecb", size = 309974, upload-time = "2025-11-09T20:49:17.187Z" },
- { url = "https://files.pythonhosted.org/packages/85/15/d6eb3b770f6a0d332675141ab3962fd4a7c270ede3515d9f3583e1d28276/jiter-0.12.0-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:89163163c0934854a668ed783a2546a0617f71706a2551a4a0666d91ab365d6b", size = 304233, upload-time = "2025-11-09T20:49:18.734Z" },
- { url = "https://files.pythonhosted.org/packages/8c/3e/e7e06743294eea2cf02ced6aa0ff2ad237367394e37a0e2b4a1108c67a36/jiter-0.12.0-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d96b264ab7d34bbb2312dedc47ce07cd53f06835eacbc16dde3761f47c3a9e7f", size = 338537, upload-time = "2025-11-09T20:49:20.317Z" },
- { url = "https://files.pythonhosted.org/packages/2f/9c/6753e6522b8d0ef07d3a3d239426669e984fb0eba15a315cdbc1253904e4/jiter-0.12.0-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c24e864cb30ab82311c6425655b0cdab0a98c5d973b065c66a3f020740c2324c", size = 346110, upload-time = "2025-11-09T20:49:21.817Z" },
-]
-
-[[package]]
-name = "kiwisolver"
-version = "1.4.9"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/5c/3c/85844f1b0feb11ee581ac23fe5fce65cd049a200c1446708cc1b7f922875/kiwisolver-1.4.9.tar.gz", hash = "sha256:c3b22c26c6fd6811b0ae8363b95ca8ce4ea3c202d3d0975b2914310ceb1bcc4d", size = 97564, upload-time = "2025-08-10T21:27:49.279Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/c6/5d/8ce64e36d4e3aac5ca96996457dcf33e34e6051492399a3f1fec5657f30b/kiwisolver-1.4.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b4b4d74bda2b8ebf4da5bd42af11d02d04428b2c32846e4c2c93219df8a7987b", size = 124159, upload-time = "2025-08-10T21:25:35.472Z" },
- { url = "https://files.pythonhosted.org/packages/96/1e/22f63ec454874378175a5f435d6ea1363dd33fb2af832c6643e4ccea0dc8/kiwisolver-1.4.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:fb3b8132019ea572f4611d770991000d7f58127560c4889729248eb5852a102f", size = 66578, upload-time = "2025-08-10T21:25:36.73Z" },
- { url = "https://files.pythonhosted.org/packages/41/4c/1925dcfff47a02d465121967b95151c82d11027d5ec5242771e580e731bd/kiwisolver-1.4.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:84fd60810829c27ae375114cd379da1fa65e6918e1da405f356a775d49a62bcf", size = 65312, upload-time = "2025-08-10T21:25:37.658Z" },
- { url = "https://files.pythonhosted.org/packages/d4/42/0f333164e6307a0687d1eb9ad256215aae2f4bd5d28f4653d6cd319a3ba3/kiwisolver-1.4.9-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:b78efa4c6e804ecdf727e580dbb9cba85624d2e1c6b5cb059c66290063bd99a9", size = 1628458, upload-time = "2025-08-10T21:25:39.067Z" },
- { url = "https://files.pythonhosted.org/packages/86/b6/2dccb977d651943995a90bfe3495c2ab2ba5cd77093d9f2318a20c9a6f59/kiwisolver-1.4.9-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d4efec7bcf21671db6a3294ff301d2fc861c31faa3c8740d1a94689234d1b415", size = 1225640, upload-time = "2025-08-10T21:25:40.489Z" },
- { url = "https://files.pythonhosted.org/packages/50/2b/362ebd3eec46c850ccf2bfe3e30f2fc4c008750011f38a850f088c56a1c6/kiwisolver-1.4.9-cp310-cp310-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:90f47e70293fc3688b71271100a1a5453aa9944a81d27ff779c108372cf5567b", size = 1244074, upload-time = "2025-08-10T21:25:42.221Z" },
- { url = "https://files.pythonhosted.org/packages/6f/bb/f09a1e66dab8984773d13184a10a29fe67125337649d26bdef547024ed6b/kiwisolver-1.4.9-cp310-cp310-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8fdca1def57a2e88ef339de1737a1449d6dbf5fab184c54a1fca01d541317154", size = 1293036, upload-time = "2025-08-10T21:25:43.801Z" },
- { url = "https://files.pythonhosted.org/packages/ea/01/11ecf892f201cafda0f68fa59212edaea93e96c37884b747c181303fccd1/kiwisolver-1.4.9-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9cf554f21be770f5111a1690d42313e140355e687e05cf82cb23d0a721a64a48", size = 2175310, upload-time = "2025-08-10T21:25:45.045Z" },
- { url = "https://files.pythonhosted.org/packages/7f/5f/bfe11d5b934f500cc004314819ea92427e6e5462706a498c1d4fc052e08f/kiwisolver-1.4.9-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fc1795ac5cd0510207482c3d1d3ed781143383b8cfd36f5c645f3897ce066220", size = 2270943, upload-time = "2025-08-10T21:25:46.393Z" },
- { url = "https://files.pythonhosted.org/packages/3d/de/259f786bf71f1e03e73d87e2db1a9a3bcab64d7b4fd780167123161630ad/kiwisolver-1.4.9-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:ccd09f20ccdbbd341b21a67ab50a119b64a403b09288c27481575105283c1586", size = 2440488, upload-time = "2025-08-10T21:25:48.074Z" },
- { url = "https://files.pythonhosted.org/packages/1b/76/c989c278faf037c4d3421ec07a5c452cd3e09545d6dae7f87c15f54e4edf/kiwisolver-1.4.9-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:540c7c72324d864406a009d72f5d6856f49693db95d1fbb46cf86febef873634", size = 2246787, upload-time = "2025-08-10T21:25:49.442Z" },
- { url = "https://files.pythonhosted.org/packages/a2/55/c2898d84ca440852e560ca9f2a0d28e6e931ac0849b896d77231929900e7/kiwisolver-1.4.9-cp310-cp310-win_amd64.whl", hash = "sha256:ede8c6d533bc6601a47ad4046080d36b8fc99f81e6f1c17b0ac3c2dc91ac7611", size = 73730, upload-time = "2025-08-10T21:25:51.102Z" },
- { url = "https://files.pythonhosted.org/packages/e8/09/486d6ac523dd33b80b368247f238125d027964cfacb45c654841e88fb2ae/kiwisolver-1.4.9-cp310-cp310-win_arm64.whl", hash = "sha256:7b4da0d01ac866a57dd61ac258c5607b4cd677f63abaec7b148354d2b2cdd536", size = 65036, upload-time = "2025-08-10T21:25:52.063Z" },
- { url = "https://files.pythonhosted.org/packages/6f/ab/c80b0d5a9d8a1a65f4f815f2afff9798b12c3b9f31f1d304dd233dd920e2/kiwisolver-1.4.9-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:eb14a5da6dc7642b0f3a18f13654847cd8b7a2550e2645a5bda677862b03ba16", size = 124167, upload-time = "2025-08-10T21:25:53.403Z" },
- { url = "https://files.pythonhosted.org/packages/a0/c0/27fe1a68a39cf62472a300e2879ffc13c0538546c359b86f149cc19f6ac3/kiwisolver-1.4.9-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:39a219e1c81ae3b103643d2aedb90f1ef22650deb266ff12a19e7773f3e5f089", size = 66579, upload-time = "2025-08-10T21:25:54.79Z" },
- { url = "https://files.pythonhosted.org/packages/31/a2/a12a503ac1fd4943c50f9822678e8015a790a13b5490354c68afb8489814/kiwisolver-1.4.9-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2405a7d98604b87f3fc28b1716783534b1b4b8510d8142adca34ee0bc3c87543", size = 65309, upload-time = "2025-08-10T21:25:55.76Z" },
- { url = "https://files.pythonhosted.org/packages/66/e1/e533435c0be77c3f64040d68d7a657771194a63c279f55573188161e81ca/kiwisolver-1.4.9-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:dc1ae486f9abcef254b5618dfb4113dd49f94c68e3e027d03cf0143f3f772b61", size = 1435596, upload-time = "2025-08-10T21:25:56.861Z" },
- { url = "https://files.pythonhosted.org/packages/67/1e/51b73c7347f9aabdc7215aa79e8b15299097dc2f8e67dee2b095faca9cb0/kiwisolver-1.4.9-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8a1f570ce4d62d718dce3f179ee78dac3b545ac16c0c04bb363b7607a949c0d1", size = 1246548, upload-time = "2025-08-10T21:25:58.246Z" },
- { url = "https://files.pythonhosted.org/packages/21/aa/72a1c5d1e430294f2d32adb9542719cfb441b5da368d09d268c7757af46c/kiwisolver-1.4.9-cp311-cp311-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cb27e7b78d716c591e88e0a09a2139c6577865d7f2e152488c2cc6257f460872", size = 1263618, upload-time = "2025-08-10T21:25:59.857Z" },
- { url = "https://files.pythonhosted.org/packages/a3/af/db1509a9e79dbf4c260ce0cfa3903ea8945f6240e9e59d1e4deb731b1a40/kiwisolver-1.4.9-cp311-cp311-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:15163165efc2f627eb9687ea5f3a28137217d217ac4024893d753f46bce9de26", size = 1317437, upload-time = "2025-08-10T21:26:01.105Z" },
- { url = "https://files.pythonhosted.org/packages/e0/f2/3ea5ee5d52abacdd12013a94130436e19969fa183faa1e7c7fbc89e9a42f/kiwisolver-1.4.9-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bdee92c56a71d2b24c33a7d4c2856bd6419d017e08caa7802d2963870e315028", size = 2195742, upload-time = "2025-08-10T21:26:02.675Z" },
- { url = "https://files.pythonhosted.org/packages/6f/9b/1efdd3013c2d9a2566aa6a337e9923a00590c516add9a1e89a768a3eb2fc/kiwisolver-1.4.9-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:412f287c55a6f54b0650bd9b6dce5aceddb95864a1a90c87af16979d37c89771", size = 2290810, upload-time = "2025-08-10T21:26:04.009Z" },
- { url = "https://files.pythonhosted.org/packages/fb/e5/cfdc36109ae4e67361f9bc5b41323648cb24a01b9ade18784657e022e65f/kiwisolver-1.4.9-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:2c93f00dcba2eea70af2be5f11a830a742fe6b579a1d4e00f47760ef13be247a", size = 2461579, upload-time = "2025-08-10T21:26:05.317Z" },
- { url = "https://files.pythonhosted.org/packages/62/86/b589e5e86c7610842213994cdea5add00960076bef4ae290c5fa68589cac/kiwisolver-1.4.9-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f117e1a089d9411663a3207ba874f31be9ac8eaa5b533787024dc07aeb74f464", size = 2268071, upload-time = "2025-08-10T21:26:06.686Z" },
- { url = "https://files.pythonhosted.org/packages/3b/c6/f8df8509fd1eee6c622febe54384a96cfaf4d43bf2ccec7a0cc17e4715c9/kiwisolver-1.4.9-cp311-cp311-win_amd64.whl", hash = "sha256:be6a04e6c79819c9a8c2373317d19a96048e5a3f90bec587787e86a1153883c2", size = 73840, upload-time = "2025-08-10T21:26:07.94Z" },
- { url = "https://files.pythonhosted.org/packages/e2/2d/16e0581daafd147bc11ac53f032a2b45eabac897f42a338d0a13c1e5c436/kiwisolver-1.4.9-cp311-cp311-win_arm64.whl", hash = "sha256:0ae37737256ba2de764ddc12aed4956460277f00c4996d51a197e72f62f5eec7", size = 65159, upload-time = "2025-08-10T21:26:09.048Z" },
- { url = "https://files.pythonhosted.org/packages/86/c9/13573a747838aeb1c76e3267620daa054f4152444d1f3d1a2324b78255b5/kiwisolver-1.4.9-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ac5a486ac389dddcc5bef4f365b6ae3ffff2c433324fb38dd35e3fab7c957999", size = 123686, upload-time = "2025-08-10T21:26:10.034Z" },
- { url = "https://files.pythonhosted.org/packages/51/ea/2ecf727927f103ffd1739271ca19c424d0e65ea473fbaeea1c014aea93f6/kiwisolver-1.4.9-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f2ba92255faa7309d06fe44c3a4a97efe1c8d640c2a79a5ef728b685762a6fd2", size = 66460, upload-time = "2025-08-10T21:26:11.083Z" },
- { url = "https://files.pythonhosted.org/packages/5b/5a/51f5464373ce2aeb5194508298a508b6f21d3867f499556263c64c621914/kiwisolver-1.4.9-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a2899935e724dd1074cb568ce7ac0dce28b2cd6ab539c8e001a8578eb106d14", size = 64952, upload-time = "2025-08-10T21:26:12.058Z" },
- { url = "https://files.pythonhosted.org/packages/70/90/6d240beb0f24b74371762873e9b7f499f1e02166a2d9c5801f4dbf8fa12e/kiwisolver-1.4.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f6008a4919fdbc0b0097089f67a1eb55d950ed7e90ce2cc3e640abadd2757a04", size = 1474756, upload-time = "2025-08-10T21:26:13.096Z" },
- { url = "https://files.pythonhosted.org/packages/12/42/f36816eaf465220f683fb711efdd1bbf7a7005a2473d0e4ed421389bd26c/kiwisolver-1.4.9-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:67bb8b474b4181770f926f7b7d2f8c0248cbcb78b660fdd41a47054b28d2a752", size = 1276404, upload-time = "2025-08-10T21:26:14.457Z" },
- { url = "https://files.pythonhosted.org/packages/2e/64/bc2de94800adc830c476dce44e9b40fd0809cddeef1fde9fcf0f73da301f/kiwisolver-1.4.9-cp312-cp312-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2327a4a30d3ee07d2fbe2e7933e8a37c591663b96ce42a00bc67461a87d7df77", size = 1294410, upload-time = "2025-08-10T21:26:15.73Z" },
- { url = "https://files.pythonhosted.org/packages/5f/42/2dc82330a70aa8e55b6d395b11018045e58d0bb00834502bf11509f79091/kiwisolver-1.4.9-cp312-cp312-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7a08b491ec91b1d5053ac177afe5290adacf1f0f6307d771ccac5de30592d198", size = 1343631, upload-time = "2025-08-10T21:26:17.045Z" },
- { url = "https://files.pythonhosted.org/packages/22/fd/f4c67a6ed1aab149ec5a8a401c323cee7a1cbe364381bb6c9c0d564e0e20/kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d8fc5c867c22b828001b6a38d2eaeb88160bf5783c6cb4a5e440efc981ce286d", size = 2224963, upload-time = "2025-08-10T21:26:18.737Z" },
- { url = "https://files.pythonhosted.org/packages/45/aa/76720bd4cb3713314677d9ec94dcc21ced3f1baf4830adde5bb9b2430a5f/kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:3b3115b2581ea35bb6d1f24a4c90af37e5d9b49dcff267eeed14c3893c5b86ab", size = 2321295, upload-time = "2025-08-10T21:26:20.11Z" },
- { url = "https://files.pythonhosted.org/packages/80/19/d3ec0d9ab711242f56ae0dc2fc5d70e298bb4a1f9dfab44c027668c673a1/kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:858e4c22fb075920b96a291928cb7dea5644e94c0ee4fcd5af7e865655e4ccf2", size = 2487987, upload-time = "2025-08-10T21:26:21.49Z" },
- { url = "https://files.pythonhosted.org/packages/39/e9/61e4813b2c97e86b6fdbd4dd824bf72d28bcd8d4849b8084a357bc0dd64d/kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ed0fecd28cc62c54b262e3736f8bb2512d8dcfdc2bcf08be5f47f96bf405b145", size = 2291817, upload-time = "2025-08-10T21:26:22.812Z" },
- { url = "https://files.pythonhosted.org/packages/a0/41/85d82b0291db7504da3c2defe35c9a8a5c9803a730f297bd823d11d5fb77/kiwisolver-1.4.9-cp312-cp312-win_amd64.whl", hash = "sha256:f68208a520c3d86ea51acf688a3e3002615a7f0238002cccc17affecc86a8a54", size = 73895, upload-time = "2025-08-10T21:26:24.37Z" },
- { url = "https://files.pythonhosted.org/packages/e2/92/5f3068cf15ee5cb624a0c7596e67e2a0bb2adee33f71c379054a491d07da/kiwisolver-1.4.9-cp312-cp312-win_arm64.whl", hash = "sha256:2c1a4f57df73965f3f14df20b80ee29e6a7930a57d2d9e8491a25f676e197c60", size = 64992, upload-time = "2025-08-10T21:26:25.732Z" },
- { url = "https://files.pythonhosted.org/packages/31/c1/c2686cda909742ab66c7388e9a1a8521a59eb89f8bcfbee28fc980d07e24/kiwisolver-1.4.9-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a5d0432ccf1c7ab14f9949eec60c5d1f924f17c037e9f8b33352fa05799359b8", size = 123681, upload-time = "2025-08-10T21:26:26.725Z" },
- { url = "https://files.pythonhosted.org/packages/ca/f0/f44f50c9f5b1a1860261092e3bc91ecdc9acda848a8b8c6abfda4a24dd5c/kiwisolver-1.4.9-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efb3a45b35622bb6c16dbfab491a8f5a391fe0e9d45ef32f4df85658232ca0e2", size = 66464, upload-time = "2025-08-10T21:26:27.733Z" },
- { url = "https://files.pythonhosted.org/packages/2d/7a/9d90a151f558e29c3936b8a47ac770235f436f2120aca41a6d5f3d62ae8d/kiwisolver-1.4.9-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1a12cf6398e8a0a001a059747a1cbf24705e18fe413bc22de7b3d15c67cffe3f", size = 64961, upload-time = "2025-08-10T21:26:28.729Z" },
- { url = "https://files.pythonhosted.org/packages/e9/e9/f218a2cb3a9ffbe324ca29a9e399fa2d2866d7f348ec3a88df87fc248fc5/kiwisolver-1.4.9-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b67e6efbf68e077dd71d1a6b37e43e1a99d0bff1a3d51867d45ee8908b931098", size = 1474607, upload-time = "2025-08-10T21:26:29.798Z" },
- { url = "https://files.pythonhosted.org/packages/d9/28/aac26d4c882f14de59041636292bc838db8961373825df23b8eeb807e198/kiwisolver-1.4.9-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5656aa670507437af0207645273ccdfee4f14bacd7f7c67a4306d0dcaeaf6eed", size = 1276546, upload-time = "2025-08-10T21:26:31.401Z" },
- { url = "https://files.pythonhosted.org/packages/8b/ad/8bfc1c93d4cc565e5069162f610ba2f48ff39b7de4b5b8d93f69f30c4bed/kiwisolver-1.4.9-cp313-cp313-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bfc08add558155345129c7803b3671cf195e6a56e7a12f3dde7c57d9b417f525", size = 1294482, upload-time = "2025-08-10T21:26:32.721Z" },
- { url = "https://files.pythonhosted.org/packages/da/f1/6aca55ff798901d8ce403206d00e033191f63d82dd708a186e0ed2067e9c/kiwisolver-1.4.9-cp313-cp313-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:40092754720b174e6ccf9e845d0d8c7d8e12c3d71e7fc35f55f3813e96376f78", size = 1343720, upload-time = "2025-08-10T21:26:34.032Z" },
- { url = "https://files.pythonhosted.org/packages/d1/91/eed031876c595c81d90d0f6fc681ece250e14bf6998c3d7c419466b523b7/kiwisolver-1.4.9-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:497d05f29a1300d14e02e6441cf0f5ee81c1ff5a304b0d9fb77423974684e08b", size = 2224907, upload-time = "2025-08-10T21:26:35.824Z" },
- { url = "https://files.pythonhosted.org/packages/e9/ec/4d1925f2e49617b9cca9c34bfa11adefad49d00db038e692a559454dfb2e/kiwisolver-1.4.9-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:bdd1a81a1860476eb41ac4bc1e07b3f07259e6d55bbf739b79c8aaedcf512799", size = 2321334, upload-time = "2025-08-10T21:26:37.534Z" },
- { url = "https://files.pythonhosted.org/packages/43/cb/450cd4499356f68802750c6ddc18647b8ea01ffa28f50d20598e0befe6e9/kiwisolver-1.4.9-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:e6b93f13371d341afee3be9f7c5964e3fe61d5fa30f6a30eb49856935dfe4fc3", size = 2488313, upload-time = "2025-08-10T21:26:39.191Z" },
- { url = "https://files.pythonhosted.org/packages/71/67/fc76242bd99f885651128a5d4fa6083e5524694b7c88b489b1b55fdc491d/kiwisolver-1.4.9-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d75aa530ccfaa593da12834b86a0724f58bff12706659baa9227c2ccaa06264c", size = 2291970, upload-time = "2025-08-10T21:26:40.828Z" },
- { url = "https://files.pythonhosted.org/packages/75/bd/f1a5d894000941739f2ae1b65a32892349423ad49c2e6d0771d0bad3fae4/kiwisolver-1.4.9-cp313-cp313-win_amd64.whl", hash = "sha256:dd0a578400839256df88c16abddf9ba14813ec5f21362e1fe65022e00c883d4d", size = 73894, upload-time = "2025-08-10T21:26:42.33Z" },
- { url = "https://files.pythonhosted.org/packages/95/38/dce480814d25b99a391abbddadc78f7c117c6da34be68ca8b02d5848b424/kiwisolver-1.4.9-cp313-cp313-win_arm64.whl", hash = "sha256:d4188e73af84ca82468f09cadc5ac4db578109e52acb4518d8154698d3a87ca2", size = 64995, upload-time = "2025-08-10T21:26:43.889Z" },
- { url = "https://files.pythonhosted.org/packages/e2/37/7d218ce5d92dadc5ebdd9070d903e0c7cf7edfe03f179433ac4d13ce659c/kiwisolver-1.4.9-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:5a0f2724dfd4e3b3ac5a82436a8e6fd16baa7d507117e4279b660fe8ca38a3a1", size = 126510, upload-time = "2025-08-10T21:26:44.915Z" },
- { url = "https://files.pythonhosted.org/packages/23/b0/e85a2b48233daef4b648fb657ebbb6f8367696a2d9548a00b4ee0eb67803/kiwisolver-1.4.9-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:1b11d6a633e4ed84fc0ddafd4ebfd8ea49b3f25082c04ad12b8315c11d504dc1", size = 67903, upload-time = "2025-08-10T21:26:45.934Z" },
- { url = "https://files.pythonhosted.org/packages/44/98/f2425bc0113ad7de24da6bb4dae1343476e95e1d738be7c04d31a5d037fd/kiwisolver-1.4.9-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:61874cdb0a36016354853593cffc38e56fc9ca5aa97d2c05d3dcf6922cd55a11", size = 66402, upload-time = "2025-08-10T21:26:47.101Z" },
- { url = "https://files.pythonhosted.org/packages/98/d8/594657886df9f34c4177cc353cc28ca7e6e5eb562d37ccc233bff43bbe2a/kiwisolver-1.4.9-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:60c439763a969a6af93b4881db0eed8fadf93ee98e18cbc35bc8da868d0c4f0c", size = 1582135, upload-time = "2025-08-10T21:26:48.665Z" },
- { url = "https://files.pythonhosted.org/packages/5c/c6/38a115b7170f8b306fc929e166340c24958347308ea3012c2b44e7e295db/kiwisolver-1.4.9-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:92a2f997387a1b79a75e7803aa7ded2cfbe2823852ccf1ba3bcf613b62ae3197", size = 1389409, upload-time = "2025-08-10T21:26:50.335Z" },
- { url = "https://files.pythonhosted.org/packages/bf/3b/e04883dace81f24a568bcee6eb3001da4ba05114afa622ec9b6fafdc1f5e/kiwisolver-1.4.9-cp313-cp313t-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a31d512c812daea6d8b3be3b2bfcbeb091dbb09177706569bcfc6240dcf8b41c", size = 1401763, upload-time = "2025-08-10T21:26:51.867Z" },
- { url = "https://files.pythonhosted.org/packages/9f/80/20ace48e33408947af49d7d15c341eaee69e4e0304aab4b7660e234d6288/kiwisolver-1.4.9-cp313-cp313t-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:52a15b0f35dad39862d376df10c5230155243a2c1a436e39eb55623ccbd68185", size = 1453643, upload-time = "2025-08-10T21:26:53.592Z" },
- { url = "https://files.pythonhosted.org/packages/64/31/6ce4380a4cd1f515bdda976a1e90e547ccd47b67a1546d63884463c92ca9/kiwisolver-1.4.9-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:a30fd6fdef1430fd9e1ba7b3398b5ee4e2887783917a687d86ba69985fb08748", size = 2330818, upload-time = "2025-08-10T21:26:55.051Z" },
- { url = "https://files.pythonhosted.org/packages/fa/e9/3f3fcba3bcc7432c795b82646306e822f3fd74df0ee81f0fa067a1f95668/kiwisolver-1.4.9-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:cc9617b46837c6468197b5945e196ee9ca43057bb7d9d1ae688101e4e1dddf64", size = 2419963, upload-time = "2025-08-10T21:26:56.421Z" },
- { url = "https://files.pythonhosted.org/packages/99/43/7320c50e4133575c66e9f7dadead35ab22d7c012a3b09bb35647792b2a6d/kiwisolver-1.4.9-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:0ab74e19f6a2b027ea4f845a78827969af45ce790e6cb3e1ebab71bdf9f215ff", size = 2594639, upload-time = "2025-08-10T21:26:57.882Z" },
- { url = "https://files.pythonhosted.org/packages/65/d6/17ae4a270d4a987ef8a385b906d2bdfc9fce502d6dc0d3aea865b47f548c/kiwisolver-1.4.9-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:dba5ee5d3981160c28d5490f0d1b7ed730c22470ff7f6cc26cfcfaacb9896a07", size = 2391741, upload-time = "2025-08-10T21:26:59.237Z" },
- { url = "https://files.pythonhosted.org/packages/2a/8f/8f6f491d595a9e5912971f3f863d81baddccc8a4d0c3749d6a0dd9ffc9df/kiwisolver-1.4.9-cp313-cp313t-win_arm64.whl", hash = "sha256:0749fd8f4218ad2e851e11cc4dc05c7cbc0cbc4267bdfdb31782e65aace4ee9c", size = 68646, upload-time = "2025-08-10T21:27:00.52Z" },
- { url = "https://files.pythonhosted.org/packages/6b/32/6cc0fbc9c54d06c2969faa9c1d29f5751a2e51809dd55c69055e62d9b426/kiwisolver-1.4.9-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:9928fe1eb816d11ae170885a74d074f57af3a0d65777ca47e9aeb854a1fba386", size = 123806, upload-time = "2025-08-10T21:27:01.537Z" },
- { url = "https://files.pythonhosted.org/packages/b2/dd/2bfb1d4a4823d92e8cbb420fe024b8d2167f72079b3bb941207c42570bdf/kiwisolver-1.4.9-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:d0005b053977e7b43388ddec89fa567f43d4f6d5c2c0affe57de5ebf290dc552", size = 66605, upload-time = "2025-08-10T21:27:03.335Z" },
- { url = "https://files.pythonhosted.org/packages/f7/69/00aafdb4e4509c2ca6064646cba9cd4b37933898f426756adb2cb92ebbed/kiwisolver-1.4.9-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:2635d352d67458b66fd0667c14cb1d4145e9560d503219034a18a87e971ce4f3", size = 64925, upload-time = "2025-08-10T21:27:04.339Z" },
- { url = "https://files.pythonhosted.org/packages/43/dc/51acc6791aa14e5cb6d8a2e28cefb0dc2886d8862795449d021334c0df20/kiwisolver-1.4.9-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:767c23ad1c58c9e827b649a9ab7809fd5fd9db266a9cf02b0e926ddc2c680d58", size = 1472414, upload-time = "2025-08-10T21:27:05.437Z" },
- { url = "https://files.pythonhosted.org/packages/3d/bb/93fa64a81db304ac8a246f834d5094fae4b13baf53c839d6bb6e81177129/kiwisolver-1.4.9-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:72d0eb9fba308b8311685c2268cf7d0a0639a6cd027d8128659f72bdd8a024b4", size = 1281272, upload-time = "2025-08-10T21:27:07.063Z" },
- { url = "https://files.pythonhosted.org/packages/70/e6/6df102916960fb8d05069d4bd92d6d9a8202d5a3e2444494e7cd50f65b7a/kiwisolver-1.4.9-cp314-cp314-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f68e4f3eeca8fb22cc3d731f9715a13b652795ef657a13df1ad0c7dc0e9731df", size = 1298578, upload-time = "2025-08-10T21:27:08.452Z" },
- { url = "https://files.pythonhosted.org/packages/7c/47/e142aaa612f5343736b087864dbaebc53ea8831453fb47e7521fa8658f30/kiwisolver-1.4.9-cp314-cp314-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d84cd4061ae292d8ac367b2c3fa3aad11cb8625a95d135fe93f286f914f3f5a6", size = 1345607, upload-time = "2025-08-10T21:27:10.125Z" },
- { url = "https://files.pythonhosted.org/packages/54/89/d641a746194a0f4d1a3670fb900d0dbaa786fb98341056814bc3f058fa52/kiwisolver-1.4.9-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:a60ea74330b91bd22a29638940d115df9dc00af5035a9a2a6ad9399ffb4ceca5", size = 2230150, upload-time = "2025-08-10T21:27:11.484Z" },
- { url = "https://files.pythonhosted.org/packages/aa/6b/5ee1207198febdf16ac11f78c5ae40861b809cbe0e6d2a8d5b0b3044b199/kiwisolver-1.4.9-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:ce6a3a4e106cf35c2d9c4fa17c05ce0b180db622736845d4315519397a77beaf", size = 2325979, upload-time = "2025-08-10T21:27:12.917Z" },
- { url = "https://files.pythonhosted.org/packages/fc/ff/b269eefd90f4ae14dcc74973d5a0f6d28d3b9bb1afd8c0340513afe6b39a/kiwisolver-1.4.9-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:77937e5e2a38a7b48eef0585114fe7930346993a88060d0bf886086d2aa49ef5", size = 2491456, upload-time = "2025-08-10T21:27:14.353Z" },
- { url = "https://files.pythonhosted.org/packages/fc/d4/10303190bd4d30de547534601e259a4fbf014eed94aae3e5521129215086/kiwisolver-1.4.9-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:24c175051354f4a28c5d6a31c93906dc653e2bf234e8a4bbfb964892078898ce", size = 2294621, upload-time = "2025-08-10T21:27:15.808Z" },
- { url = "https://files.pythonhosted.org/packages/28/e0/a9a90416fce5c0be25742729c2ea52105d62eda6c4be4d803c2a7be1fa50/kiwisolver-1.4.9-cp314-cp314-win_amd64.whl", hash = "sha256:0763515d4df10edf6d06a3c19734e2566368980d21ebec439f33f9eb936c07b7", size = 75417, upload-time = "2025-08-10T21:27:17.436Z" },
- { url = "https://files.pythonhosted.org/packages/1f/10/6949958215b7a9a264299a7db195564e87900f709db9245e4ebdd3c70779/kiwisolver-1.4.9-cp314-cp314-win_arm64.whl", hash = "sha256:0e4e2bf29574a6a7b7f6cb5fa69293b9f96c928949ac4a53ba3f525dffb87f9c", size = 66582, upload-time = "2025-08-10T21:27:18.436Z" },
- { url = "https://files.pythonhosted.org/packages/ec/79/60e53067903d3bc5469b369fe0dfc6b3482e2133e85dae9daa9527535991/kiwisolver-1.4.9-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:d976bbb382b202f71c67f77b0ac11244021cfa3f7dfd9e562eefcea2df711548", size = 126514, upload-time = "2025-08-10T21:27:19.465Z" },
- { url = "https://files.pythonhosted.org/packages/25/d1/4843d3e8d46b072c12a38c97c57fab4608d36e13fe47d47ee96b4d61ba6f/kiwisolver-1.4.9-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:2489e4e5d7ef9a1c300a5e0196e43d9c739f066ef23270607d45aba368b91f2d", size = 67905, upload-time = "2025-08-10T21:27:20.51Z" },
- { url = "https://files.pythonhosted.org/packages/8c/ae/29ffcbd239aea8b93108de1278271ae764dfc0d803a5693914975f200596/kiwisolver-1.4.9-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e2ea9f7ab7fbf18fffb1b5434ce7c69a07582f7acc7717720f1d69f3e806f90c", size = 66399, upload-time = "2025-08-10T21:27:21.496Z" },
- { url = "https://files.pythonhosted.org/packages/a1/ae/d7ba902aa604152c2ceba5d352d7b62106bedbccc8e95c3934d94472bfa3/kiwisolver-1.4.9-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b34e51affded8faee0dfdb705416153819d8ea9250bbbf7ea1b249bdeb5f1122", size = 1582197, upload-time = "2025-08-10T21:27:22.604Z" },
- { url = "https://files.pythonhosted.org/packages/f2/41/27c70d427eddb8bc7e4f16420a20fefc6f480312122a59a959fdfe0445ad/kiwisolver-1.4.9-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d8aacd3d4b33b772542b2e01beb50187536967b514b00003bdda7589722d2a64", size = 1390125, upload-time = "2025-08-10T21:27:24.036Z" },
- { url = "https://files.pythonhosted.org/packages/41/42/b3799a12bafc76d962ad69083f8b43b12bf4fe78b097b12e105d75c9b8f1/kiwisolver-1.4.9-cp314-cp314t-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7cf974dd4e35fa315563ac99d6287a1024e4dc2077b8a7d7cd3d2fb65d283134", size = 1402612, upload-time = "2025-08-10T21:27:25.773Z" },
- { url = "https://files.pythonhosted.org/packages/d2/b5/a210ea073ea1cfaca1bb5c55a62307d8252f531beb364e18aa1e0888b5a0/kiwisolver-1.4.9-cp314-cp314t-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:85bd218b5ecfbee8c8a82e121802dcb519a86044c9c3b2e4aef02fa05c6da370", size = 1453990, upload-time = "2025-08-10T21:27:27.089Z" },
- { url = "https://files.pythonhosted.org/packages/5f/ce/a829eb8c033e977d7ea03ed32fb3c1781b4fa0433fbadfff29e39c676f32/kiwisolver-1.4.9-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:0856e241c2d3df4efef7c04a1e46b1936b6120c9bcf36dd216e3acd84bc4fb21", size = 2331601, upload-time = "2025-08-10T21:27:29.343Z" },
- { url = "https://files.pythonhosted.org/packages/e0/4b/b5e97eb142eb9cd0072dacfcdcd31b1c66dc7352b0f7c7255d339c0edf00/kiwisolver-1.4.9-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:9af39d6551f97d31a4deebeac6f45b156f9755ddc59c07b402c148f5dbb6482a", size = 2422041, upload-time = "2025-08-10T21:27:30.754Z" },
- { url = "https://files.pythonhosted.org/packages/40/be/8eb4cd53e1b85ba4edc3a9321666f12b83113a178845593307a3e7891f44/kiwisolver-1.4.9-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:bb4ae2b57fc1d8cbd1cf7b1d9913803681ffa903e7488012be5b76dedf49297f", size = 2594897, upload-time = "2025-08-10T21:27:32.803Z" },
- { url = "https://files.pythonhosted.org/packages/99/dd/841e9a66c4715477ea0abc78da039832fbb09dac5c35c58dc4c41a407b8a/kiwisolver-1.4.9-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:aedff62918805fb62d43a4aa2ecd4482c380dc76cd31bd7c8878588a61bd0369", size = 2391835, upload-time = "2025-08-10T21:27:34.23Z" },
- { url = "https://files.pythonhosted.org/packages/0c/28/4b2e5c47a0da96896fdfdb006340ade064afa1e63675d01ea5ac222b6d52/kiwisolver-1.4.9-cp314-cp314t-win_amd64.whl", hash = "sha256:1fa333e8b2ce4d9660f2cda9c0e1b6bafcfb2457a9d259faa82289e73ec24891", size = 79988, upload-time = "2025-08-10T21:27:35.587Z" },
- { url = "https://files.pythonhosted.org/packages/80/be/3578e8afd18c88cdf9cb4cffde75a96d2be38c5a903f1ed0ceec061bd09e/kiwisolver-1.4.9-cp314-cp314t-win_arm64.whl", hash = "sha256:4a48a2ce79d65d363597ef7b567ce3d14d68783d2b2263d98db3d9477805ba32", size = 70260, upload-time = "2025-08-10T21:27:36.606Z" },
- { url = "https://files.pythonhosted.org/packages/a2/63/fde392691690f55b38d5dd7b3710f5353bf7a8e52de93a22968801ab8978/kiwisolver-1.4.9-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:4d1d9e582ad4d63062d34077a9a1e9f3c34088a2ec5135b1f7190c07cf366527", size = 60183, upload-time = "2025-08-10T21:27:37.669Z" },
- { url = "https://files.pythonhosted.org/packages/27/b1/6aad34edfdb7cced27f371866f211332bba215bfd918ad3322a58f480d8b/kiwisolver-1.4.9-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:deed0c7258ceb4c44ad5ec7d9918f9f14fd05b2be86378d86cf50e63d1e7b771", size = 58675, upload-time = "2025-08-10T21:27:39.031Z" },
- { url = "https://files.pythonhosted.org/packages/9d/1a/23d855a702bb35a76faed5ae2ba3de57d323f48b1f6b17ee2176c4849463/kiwisolver-1.4.9-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0a590506f303f512dff6b7f75fd2fd18e16943efee932008fe7140e5fa91d80e", size = 80277, upload-time = "2025-08-10T21:27:40.129Z" },
- { url = "https://files.pythonhosted.org/packages/5a/5b/5239e3c2b8fb5afa1e8508f721bb77325f740ab6994d963e61b2b7abcc1e/kiwisolver-1.4.9-pp310-pypy310_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e09c2279a4d01f099f52d5c4b3d9e208e91edcbd1a175c9662a8b16e000fece9", size = 77994, upload-time = "2025-08-10T21:27:41.181Z" },
- { url = "https://files.pythonhosted.org/packages/f9/1c/5d4d468fb16f8410e596ed0eac02d2c68752aa7dc92997fe9d60a7147665/kiwisolver-1.4.9-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:c9e7cdf45d594ee04d5be1b24dd9d49f3d1590959b2271fb30b5ca2b262c00fb", size = 73744, upload-time = "2025-08-10T21:27:42.254Z" },
- { url = "https://files.pythonhosted.org/packages/a3/0f/36d89194b5a32c054ce93e586d4049b6c2c22887b0eb229c61c68afd3078/kiwisolver-1.4.9-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:720e05574713db64c356e86732c0f3c5252818d05f9df320f0ad8380641acea5", size = 60104, upload-time = "2025-08-10T21:27:43.287Z" },
- { url = "https://files.pythonhosted.org/packages/52/ba/4ed75f59e4658fd21fe7dde1fee0ac397c678ec3befba3fe6482d987af87/kiwisolver-1.4.9-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:17680d737d5335b552994a2008fab4c851bcd7de33094a82067ef3a576ff02fa", size = 58592, upload-time = "2025-08-10T21:27:44.314Z" },
- { url = "https://files.pythonhosted.org/packages/33/01/a8ea7c5ea32a9b45ceeaee051a04c8ed4320f5add3c51bfa20879b765b70/kiwisolver-1.4.9-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:85b5352f94e490c028926ea567fc569c52ec79ce131dadb968d3853e809518c2", size = 80281, upload-time = "2025-08-10T21:27:45.369Z" },
- { url = "https://files.pythonhosted.org/packages/da/e3/dbd2ecdce306f1d07a1aaf324817ee993aab7aee9db47ceac757deabafbe/kiwisolver-1.4.9-pp311-pypy311_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:464415881e4801295659462c49461a24fb107c140de781d55518c4b80cb6790f", size = 78009, upload-time = "2025-08-10T21:27:46.376Z" },
- { url = "https://files.pythonhosted.org/packages/da/e9/0d4add7873a73e462aeb45c036a2dead2562b825aa46ba326727b3f31016/kiwisolver-1.4.9-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:fb940820c63a9590d31d88b815e7a3aa5915cad3ce735ab45f0c730b39547de1", size = 73929, upload-time = "2025-08-10T21:27:48.236Z" },
-]
-
-[[package]]
-name = "lazy-loader"
-version = "0.4"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "packaging" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/6f/6b/c875b30a1ba490860c93da4cabf479e03f584eba06fe5963f6f6644653d8/lazy_loader-0.4.tar.gz", hash = "sha256:47c75182589b91a4e1a85a136c074285a5ad4d9f39c63e0d7fb76391c4574cd1", size = 15431, upload-time = "2024-04-05T13:03:12.261Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/83/60/d497a310bde3f01cb805196ac61b7ad6dc5dcf8dce66634dc34364b20b4f/lazy_loader-0.4-py3-none-any.whl", hash = "sha256:342aa8e14d543a154047afb4ba8ef17f5563baad3fc610d7b15b213b0f119efc", size = 12097, upload-time = "2024-04-05T13:03:10.514Z" },
-]
-
-[[package]]
-name = "ltx-core"
-version = "1.1.7"
-source = { editable = "packages/ltx-core" }
-dependencies = [
- { name = "accelerate" },
- { name = "einops" },
- { name = "mps-sdpa", marker = "platform_machine == 'arm64' and sys_platform == 'darwin'" },
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "safetensors" },
- { name = "scipy", version = "1.15.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "scipy", version = "1.17.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "torch", version = "2.9.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
- { name = "torch", version = "2.12.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
- { name = "torchaudio", version = "2.9.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
- { name = "torchaudio", version = "2.11.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
- { name = "transformers" },
-]
-
-[package.dev-dependencies]
-dev = [
- { name = "scikit-image", version = "0.25.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "scikit-image", version = "0.26.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
-]
-
-[package.metadata]
-requires-dist = [
- { name = "accelerate" },
- { name = "einops" },
- { name = "mps-sdpa", marker = "platform_machine == 'arm64' and sys_platform == 'darwin'", specifier = ">=0.2.0" },
- { name = "numpy" },
- { name = "safetensors" },
- { name = "scipy", specifier = ">=1.14" },
- { name = "torch", specifier = "~=2.7" },
- { name = "torchaudio" },
- { name = "transformers", specifier = ">=4.52" },
-]
-
-[package.metadata.requires-dev]
-dev = [{ name = "scikit-image", specifier = ">=0.25.2" }]
-
-[[package]]
-name = "ltx-kernels"
-version = "0.1.0"
-source = { editable = "packages/ltx-kernels" }
-dependencies = [
- { name = "torch", version = "2.9.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
- { name = "torch", version = "2.12.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
-]
-
-[package.metadata]
-requires-dist = [{ name = "torch" }]
-
-[[package]]
-name = "ltx-pipelines"
-version = "1.1.7"
-source = { editable = "packages/ltx-pipelines" }
-dependencies = [
- { name = "av" },
- { name = "cloudpickle" },
- { name = "ltx-core" },
- { name = "openimageio" },
- { name = "pillow" },
- { name = "tqdm" },
-]
-
-[package.metadata]
-requires-dist = [
- { name = "av" },
- { name = "cloudpickle", specifier = ">=3.1" },
- { name = "ltx-core", editable = "packages/ltx-core" },
- { name = "openimageio" },
- { name = "pillow" },
- { name = "tqdm" },
-]
-
-[[package]]
-name = "ltx-trainer"
-version = "1.1.7"
-source = { editable = "packages/ltx-trainer" }
-dependencies = [
- { name = "accelerate" },
- { name = "av" },
- { name = "bitsandbytes", marker = "sys_platform == 'linux'" },
- { name = "google-genai" },
- { name = "huggingface-hub", extra = ["hf-xet"] },
- { name = "imageio" },
- { name = "imageio-ffmpeg" },
- { name = "ltx-core" },
- { name = "openai" },
- { name = "opencv-python" },
- { name = "optimum-quanto" },
- { name = "pandas" },
- { name = "peft" },
- { name = "pillow-heif" },
- { name = "pydantic" },
- { name = "rich" },
- { name = "safetensors" },
- { name = "scenedetect" },
- { name = "sentencepiece" },
- { name = "setuptools" },
- { name = "soundfile" },
- { name = "torch", version = "2.9.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
- { name = "torch", version = "2.12.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
- { name = "torchaudio", version = "2.9.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
- { name = "torchaudio", version = "2.11.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
- { name = "torchcodec" },
- { name = "torchvision", version = "0.24.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
- { name = "torchvision", version = "0.27.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
- { name = "typer" },
- { name = "wandb" },
-]
-
-[package.dev-dependencies]
-dev = [
- { name = "pre-commit" },
- { name = "ruff" },
-]
-
-[package.metadata]
-requires-dist = [
- { name = "accelerate", specifier = ">=1.2.1" },
- { name = "av", specifier = ">=14.2.1" },
- { name = "bitsandbytes", marker = "sys_platform == 'linux'", specifier = ">=0.45.2" },
- { name = "google-genai", specifier = ">=2.0" },
- { name = "huggingface-hub", extras = ["hf-xet"], specifier = ">=0.31.4" },
- { name = "imageio", specifier = ">=2.37.0" },
- { name = "imageio-ffmpeg", specifier = ">=0.6.0" },
- { name = "ltx-core", editable = "packages/ltx-core" },
- { name = "openai", specifier = ">=2.0" },
- { name = "opencv-python", specifier = ">=4.11.0.86" },
- { name = "optimum-quanto", specifier = ">=0.2.6" },
- { name = "pandas", specifier = ">=2.2.3" },
- { name = "peft", specifier = ">=0.14.0" },
- { name = "pillow-heif", specifier = ">=0.21.0" },
- { name = "pydantic", specifier = ">=2.10.4" },
- { name = "rich", specifier = ">=13.9.4" },
- { name = "safetensors", specifier = ">=0.5.0" },
- { name = "scenedetect", specifier = ">=0.6.5.2" },
- { name = "sentencepiece", specifier = ">=0.2.0" },
- { name = "setuptools", specifier = ">=79.0.0" },
- { name = "soundfile", specifier = ">=0.12.1" },
- { name = "torch", specifier = ">=2.6.0" },
- { name = "torchaudio", specifier = ">=2.7.0" },
- { name = "torchcodec", specifier = ">=0.8.1,<0.10" },
- { name = "torchvision", specifier = ">=0.21.0" },
- { name = "typer", specifier = ">=0.15.1" },
- { name = "wandb", specifier = ">=0.27.0" },
-]
-
-[package.metadata.requires-dev]
-dev = [
- { name = "pre-commit", specifier = ">=4.0.1" },
- { name = "ruff", specifier = ">=0.8.6" },
-]
-
-[[package]]
-name = "markdown-it-py"
-version = "4.0.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "mdurl" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz", hash = "sha256:cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3", size = 73070, upload-time = "2025-08-11T12:57:52.854Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/94/54/e7d793b573f298e1c9013b8c4dade17d481164aa517d1d7148619c2cedbf/markdown_it_py-4.0.0-py3-none-any.whl", hash = "sha256:87327c59b172c5011896038353a81343b6754500a08cd7a4973bb48c6d578147", size = 87321, upload-time = "2025-08-11T12:57:51.923Z" },
-]
-
-[[package]]
-name = "markupsafe"
-version = "3.0.3"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", size = 80313, upload-time = "2025-09-27T18:37:40.426Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/e8/4b/3541d44f3937ba468b75da9eebcae497dcf67adb65caa16760b0a6807ebb/markupsafe-3.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f981d352f04553a7171b8e44369f2af4055f888dfb147d55e42d29e29e74559", size = 11631, upload-time = "2025-09-27T18:36:05.558Z" },
- { url = "https://files.pythonhosted.org/packages/98/1b/fbd8eed11021cabd9226c37342fa6ca4e8a98d8188a8d9b66740494960e4/markupsafe-3.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e1c1493fb6e50ab01d20a22826e57520f1284df32f2d8601fdd90b6304601419", size = 12057, upload-time = "2025-09-27T18:36:07.165Z" },
- { url = "https://files.pythonhosted.org/packages/40/01/e560d658dc0bb8ab762670ece35281dec7b6c1b33f5fbc09ebb57a185519/markupsafe-3.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1ba88449deb3de88bd40044603fafffb7bc2b055d626a330323a9ed736661695", size = 22050, upload-time = "2025-09-27T18:36:08.005Z" },
- { url = "https://files.pythonhosted.org/packages/af/cd/ce6e848bbf2c32314c9b237839119c5a564a59725b53157c856e90937b7a/markupsafe-3.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f42d0984e947b8adf7dd6dde396e720934d12c506ce84eea8476409563607591", size = 20681, upload-time = "2025-09-27T18:36:08.881Z" },
- { url = "https://files.pythonhosted.org/packages/c9/2a/b5c12c809f1c3045c4d580b035a743d12fcde53cf685dbc44660826308da/markupsafe-3.0.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c0c0b3ade1c0b13b936d7970b1d37a57acde9199dc2aecc4c336773e1d86049c", size = 20705, upload-time = "2025-09-27T18:36:10.131Z" },
- { url = "https://files.pythonhosted.org/packages/cf/e3/9427a68c82728d0a88c50f890d0fc072a1484de2f3ac1ad0bfc1a7214fd5/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:0303439a41979d9e74d18ff5e2dd8c43ed6c6001fd40e5bf2e43f7bd9bbc523f", size = 21524, upload-time = "2025-09-27T18:36:11.324Z" },
- { url = "https://files.pythonhosted.org/packages/bc/36/23578f29e9e582a4d0278e009b38081dbe363c5e7165113fad546918a232/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:d2ee202e79d8ed691ceebae8e0486bd9a2cd4794cec4824e1c99b6f5009502f6", size = 20282, upload-time = "2025-09-27T18:36:12.573Z" },
- { url = "https://files.pythonhosted.org/packages/56/21/dca11354e756ebd03e036bd8ad58d6d7168c80ce1fe5e75218e4945cbab7/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:177b5253b2834fe3678cb4a5f0059808258584c559193998be2601324fdeafb1", size = 20745, upload-time = "2025-09-27T18:36:13.504Z" },
- { url = "https://files.pythonhosted.org/packages/87/99/faba9369a7ad6e4d10b6a5fbf71fa2a188fe4a593b15f0963b73859a1bbd/markupsafe-3.0.3-cp310-cp310-win32.whl", hash = "sha256:2a15a08b17dd94c53a1da0438822d70ebcd13f8c3a95abe3a9ef9f11a94830aa", size = 14571, upload-time = "2025-09-27T18:36:14.779Z" },
- { url = "https://files.pythonhosted.org/packages/d6/25/55dc3ab959917602c96985cb1253efaa4ff42f71194bddeb61eb7278b8be/markupsafe-3.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:c4ffb7ebf07cfe8931028e3e4c85f0357459a3f9f9490886198848f4fa002ec8", size = 15056, upload-time = "2025-09-27T18:36:16.125Z" },
- { url = "https://files.pythonhosted.org/packages/d0/9e/0a02226640c255d1da0b8d12e24ac2aa6734da68bff14c05dd53b94a0fc3/markupsafe-3.0.3-cp310-cp310-win_arm64.whl", hash = "sha256:e2103a929dfa2fcaf9bb4e7c091983a49c9ac3b19c9061b6d5427dd7d14d81a1", size = 13932, upload-time = "2025-09-27T18:36:17.311Z" },
- { url = "https://files.pythonhosted.org/packages/08/db/fefacb2136439fc8dd20e797950e749aa1f4997ed584c62cfb8ef7c2be0e/markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad", size = 11631, upload-time = "2025-09-27T18:36:18.185Z" },
- { url = "https://files.pythonhosted.org/packages/e1/2e/5898933336b61975ce9dc04decbc0a7f2fee78c30353c5efba7f2d6ff27a/markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a", size = 12058, upload-time = "2025-09-27T18:36:19.444Z" },
- { url = "https://files.pythonhosted.org/packages/1d/09/adf2df3699d87d1d8184038df46a9c80d78c0148492323f4693df54e17bb/markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50", size = 24287, upload-time = "2025-09-27T18:36:20.768Z" },
- { url = "https://files.pythonhosted.org/packages/30/ac/0273f6fcb5f42e314c6d8cd99effae6a5354604d461b8d392b5ec9530a54/markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf", size = 22940, upload-time = "2025-09-27T18:36:22.249Z" },
- { url = "https://files.pythonhosted.org/packages/19/ae/31c1be199ef767124c042c6c3e904da327a2f7f0cd63a0337e1eca2967a8/markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f", size = 21887, upload-time = "2025-09-27T18:36:23.535Z" },
- { url = "https://files.pythonhosted.org/packages/b2/76/7edcab99d5349a4532a459e1fe64f0b0467a3365056ae550d3bcf3f79e1e/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a", size = 23692, upload-time = "2025-09-27T18:36:24.823Z" },
- { url = "https://files.pythonhosted.org/packages/a4/28/6e74cdd26d7514849143d69f0bf2399f929c37dc2b31e6829fd2045b2765/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115", size = 21471, upload-time = "2025-09-27T18:36:25.95Z" },
- { url = "https://files.pythonhosted.org/packages/62/7e/a145f36a5c2945673e590850a6f8014318d5577ed7e5920a4b3448e0865d/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a", size = 22923, upload-time = "2025-09-27T18:36:27.109Z" },
- { url = "https://files.pythonhosted.org/packages/0f/62/d9c46a7f5c9adbeeeda52f5b8d802e1094e9717705a645efc71b0913a0a8/markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19", size = 14572, upload-time = "2025-09-27T18:36:28.045Z" },
- { url = "https://files.pythonhosted.org/packages/83/8a/4414c03d3f891739326e1783338e48fb49781cc915b2e0ee052aa490d586/markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01", size = 15077, upload-time = "2025-09-27T18:36:29.025Z" },
- { url = "https://files.pythonhosted.org/packages/35/73/893072b42e6862f319b5207adc9ae06070f095b358655f077f69a35601f0/markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c", size = 13876, upload-time = "2025-09-27T18:36:29.954Z" },
- { url = "https://files.pythonhosted.org/packages/5a/72/147da192e38635ada20e0a2e1a51cf8823d2119ce8883f7053879c2199b5/markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e", size = 11615, upload-time = "2025-09-27T18:36:30.854Z" },
- { url = "https://files.pythonhosted.org/packages/9a/81/7e4e08678a1f98521201c3079f77db69fb552acd56067661f8c2f534a718/markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce", size = 12020, upload-time = "2025-09-27T18:36:31.971Z" },
- { url = "https://files.pythonhosted.org/packages/1e/2c/799f4742efc39633a1b54a92eec4082e4f815314869865d876824c257c1e/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d", size = 24332, upload-time = "2025-09-27T18:36:32.813Z" },
- { url = "https://files.pythonhosted.org/packages/3c/2e/8d0c2ab90a8c1d9a24f0399058ab8519a3279d1bd4289511d74e909f060e/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d", size = 22947, upload-time = "2025-09-27T18:36:33.86Z" },
- { url = "https://files.pythonhosted.org/packages/2c/54/887f3092a85238093a0b2154bd629c89444f395618842e8b0c41783898ea/markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a", size = 21962, upload-time = "2025-09-27T18:36:35.099Z" },
- { url = "https://files.pythonhosted.org/packages/c9/2f/336b8c7b6f4a4d95e91119dc8521402461b74a485558d8f238a68312f11c/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b", size = 23760, upload-time = "2025-09-27T18:36:36.001Z" },
- { url = "https://files.pythonhosted.org/packages/32/43/67935f2b7e4982ffb50a4d169b724d74b62a3964bc1a9a527f5ac4f1ee2b/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f", size = 21529, upload-time = "2025-09-27T18:36:36.906Z" },
- { url = "https://files.pythonhosted.org/packages/89/e0/4486f11e51bbba8b0c041098859e869e304d1c261e59244baa3d295d47b7/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b", size = 23015, upload-time = "2025-09-27T18:36:37.868Z" },
- { url = "https://files.pythonhosted.org/packages/2f/e1/78ee7a023dac597a5825441ebd17170785a9dab23de95d2c7508ade94e0e/markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d", size = 14540, upload-time = "2025-09-27T18:36:38.761Z" },
- { url = "https://files.pythonhosted.org/packages/aa/5b/bec5aa9bbbb2c946ca2733ef9c4ca91c91b6a24580193e891b5f7dbe8e1e/markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c", size = 15105, upload-time = "2025-09-27T18:36:39.701Z" },
- { url = "https://files.pythonhosted.org/packages/e5/f1/216fc1bbfd74011693a4fd837e7026152e89c4bcf3e77b6692fba9923123/markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f", size = 13906, upload-time = "2025-09-27T18:36:40.689Z" },
- { url = "https://files.pythonhosted.org/packages/38/2f/907b9c7bbba283e68f20259574b13d005c121a0fa4c175f9bed27c4597ff/markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795", size = 11622, upload-time = "2025-09-27T18:36:41.777Z" },
- { url = "https://files.pythonhosted.org/packages/9c/d9/5f7756922cdd676869eca1c4e3c0cd0df60ed30199ffd775e319089cb3ed/markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219", size = 12029, upload-time = "2025-09-27T18:36:43.257Z" },
- { url = "https://files.pythonhosted.org/packages/00/07/575a68c754943058c78f30db02ee03a64b3c638586fba6a6dd56830b30a3/markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6", size = 24374, upload-time = "2025-09-27T18:36:44.508Z" },
- { url = "https://files.pythonhosted.org/packages/a9/21/9b05698b46f218fc0e118e1f8168395c65c8a2c750ae2bab54fc4bd4e0e8/markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676", size = 22980, upload-time = "2025-09-27T18:36:45.385Z" },
- { url = "https://files.pythonhosted.org/packages/7f/71/544260864f893f18b6827315b988c146b559391e6e7e8f7252839b1b846a/markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9", size = 21990, upload-time = "2025-09-27T18:36:46.916Z" },
- { url = "https://files.pythonhosted.org/packages/c2/28/b50fc2f74d1ad761af2f5dcce7492648b983d00a65b8c0e0cb457c82ebbe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1", size = 23784, upload-time = "2025-09-27T18:36:47.884Z" },
- { url = "https://files.pythonhosted.org/packages/ed/76/104b2aa106a208da8b17a2fb72e033a5a9d7073c68f7e508b94916ed47a9/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc", size = 21588, upload-time = "2025-09-27T18:36:48.82Z" },
- { url = "https://files.pythonhosted.org/packages/b5/99/16a5eb2d140087ebd97180d95249b00a03aa87e29cc224056274f2e45fd6/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12", size = 23041, upload-time = "2025-09-27T18:36:49.797Z" },
- { url = "https://files.pythonhosted.org/packages/19/bc/e7140ed90c5d61d77cea142eed9f9c303f4c4806f60a1044c13e3f1471d0/markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed", size = 14543, upload-time = "2025-09-27T18:36:51.584Z" },
- { url = "https://files.pythonhosted.org/packages/05/73/c4abe620b841b6b791f2edc248f556900667a5a1cf023a6646967ae98335/markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5", size = 15113, upload-time = "2025-09-27T18:36:52.537Z" },
- { url = "https://files.pythonhosted.org/packages/f0/3a/fa34a0f7cfef23cf9500d68cb7c32dd64ffd58a12b09225fb03dd37d5b80/markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485", size = 13911, upload-time = "2025-09-27T18:36:53.513Z" },
- { url = "https://files.pythonhosted.org/packages/e4/d7/e05cd7efe43a88a17a37b3ae96e79a19e846f3f456fe79c57ca61356ef01/markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73", size = 11658, upload-time = "2025-09-27T18:36:54.819Z" },
- { url = "https://files.pythonhosted.org/packages/99/9e/e412117548182ce2148bdeacdda3bb494260c0b0184360fe0d56389b523b/markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37", size = 12066, upload-time = "2025-09-27T18:36:55.714Z" },
- { url = "https://files.pythonhosted.org/packages/bc/e6/fa0ffcda717ef64a5108eaa7b4f5ed28d56122c9a6d70ab8b72f9f715c80/markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19", size = 25639, upload-time = "2025-09-27T18:36:56.908Z" },
- { url = "https://files.pythonhosted.org/packages/96/ec/2102e881fe9d25fc16cb4b25d5f5cde50970967ffa5dddafdb771237062d/markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025", size = 23569, upload-time = "2025-09-27T18:36:57.913Z" },
- { url = "https://files.pythonhosted.org/packages/4b/30/6f2fce1f1f205fc9323255b216ca8a235b15860c34b6798f810f05828e32/markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6", size = 23284, upload-time = "2025-09-27T18:36:58.833Z" },
- { url = "https://files.pythonhosted.org/packages/58/47/4a0ccea4ab9f5dcb6f79c0236d954acb382202721e704223a8aafa38b5c8/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f", size = 24801, upload-time = "2025-09-27T18:36:59.739Z" },
- { url = "https://files.pythonhosted.org/packages/6a/70/3780e9b72180b6fecb83a4814d84c3bf4b4ae4bf0b19c27196104149734c/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb", size = 22769, upload-time = "2025-09-27T18:37:00.719Z" },
- { url = "https://files.pythonhosted.org/packages/98/c5/c03c7f4125180fc215220c035beac6b9cb684bc7a067c84fc69414d315f5/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009", size = 23642, upload-time = "2025-09-27T18:37:01.673Z" },
- { url = "https://files.pythonhosted.org/packages/80/d6/2d1b89f6ca4bff1036499b1e29a1d02d282259f3681540e16563f27ebc23/markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354", size = 14612, upload-time = "2025-09-27T18:37:02.639Z" },
- { url = "https://files.pythonhosted.org/packages/2b/98/e48a4bfba0a0ffcf9925fe2d69240bfaa19c6f7507b8cd09c70684a53c1e/markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218", size = 15200, upload-time = "2025-09-27T18:37:03.582Z" },
- { url = "https://files.pythonhosted.org/packages/0e/72/e3cc540f351f316e9ed0f092757459afbc595824ca724cbc5a5d4263713f/markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287", size = 13973, upload-time = "2025-09-27T18:37:04.929Z" },
- { url = "https://files.pythonhosted.org/packages/33/8a/8e42d4838cd89b7dde187011e97fe6c3af66d8c044997d2183fbd6d31352/markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe", size = 11619, upload-time = "2025-09-27T18:37:06.342Z" },
- { url = "https://files.pythonhosted.org/packages/b5/64/7660f8a4a8e53c924d0fa05dc3a55c9cee10bbd82b11c5afb27d44b096ce/markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026", size = 12029, upload-time = "2025-09-27T18:37:07.213Z" },
- { url = "https://files.pythonhosted.org/packages/da/ef/e648bfd021127bef5fa12e1720ffed0c6cbb8310c8d9bea7266337ff06de/markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737", size = 24408, upload-time = "2025-09-27T18:37:09.572Z" },
- { url = "https://files.pythonhosted.org/packages/41/3c/a36c2450754618e62008bf7435ccb0f88053e07592e6028a34776213d877/markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97", size = 23005, upload-time = "2025-09-27T18:37:10.58Z" },
- { url = "https://files.pythonhosted.org/packages/bc/20/b7fdf89a8456b099837cd1dc21974632a02a999ec9bf7ca3e490aacd98e7/markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d", size = 22048, upload-time = "2025-09-27T18:37:11.547Z" },
- { url = "https://files.pythonhosted.org/packages/9a/a7/591f592afdc734f47db08a75793a55d7fbcc6902a723ae4cfbab61010cc5/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda", size = 23821, upload-time = "2025-09-27T18:37:12.48Z" },
- { url = "https://files.pythonhosted.org/packages/7d/33/45b24e4f44195b26521bc6f1a82197118f74df348556594bd2262bda1038/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf", size = 21606, upload-time = "2025-09-27T18:37:13.485Z" },
- { url = "https://files.pythonhosted.org/packages/ff/0e/53dfaca23a69fbfbbf17a4b64072090e70717344c52eaaaa9c5ddff1e5f0/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe", size = 23043, upload-time = "2025-09-27T18:37:14.408Z" },
- { url = "https://files.pythonhosted.org/packages/46/11/f333a06fc16236d5238bfe74daccbca41459dcd8d1fa952e8fbd5dccfb70/markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9", size = 14747, upload-time = "2025-09-27T18:37:15.36Z" },
- { url = "https://files.pythonhosted.org/packages/28/52/182836104b33b444e400b14f797212f720cbc9ed6ba34c800639d154e821/markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581", size = 15341, upload-time = "2025-09-27T18:37:16.496Z" },
- { url = "https://files.pythonhosted.org/packages/6f/18/acf23e91bd94fd7b3031558b1f013adfa21a8e407a3fdb32745538730382/markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4", size = 14073, upload-time = "2025-09-27T18:37:17.476Z" },
- { url = "https://files.pythonhosted.org/packages/3c/f0/57689aa4076e1b43b15fdfa646b04653969d50cf30c32a102762be2485da/markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab", size = 11661, upload-time = "2025-09-27T18:37:18.453Z" },
- { url = "https://files.pythonhosted.org/packages/89/c3/2e67a7ca217c6912985ec766c6393b636fb0c2344443ff9d91404dc4c79f/markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175", size = 12069, upload-time = "2025-09-27T18:37:19.332Z" },
- { url = "https://files.pythonhosted.org/packages/f0/00/be561dce4e6ca66b15276e184ce4b8aec61fe83662cce2f7d72bd3249d28/markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634", size = 25670, upload-time = "2025-09-27T18:37:20.245Z" },
- { url = "https://files.pythonhosted.org/packages/50/09/c419f6f5a92e5fadde27efd190eca90f05e1261b10dbd8cbcb39cd8ea1dc/markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50", size = 23598, upload-time = "2025-09-27T18:37:21.177Z" },
- { url = "https://files.pythonhosted.org/packages/22/44/a0681611106e0b2921b3033fc19bc53323e0b50bc70cffdd19f7d679bb66/markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e", size = 23261, upload-time = "2025-09-27T18:37:22.167Z" },
- { url = "https://files.pythonhosted.org/packages/5f/57/1b0b3f100259dc9fffe780cfb60d4be71375510e435efec3d116b6436d43/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5", size = 24835, upload-time = "2025-09-27T18:37:23.296Z" },
- { url = "https://files.pythonhosted.org/packages/26/6a/4bf6d0c97c4920f1597cc14dd720705eca0bf7c787aebc6bb4d1bead5388/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523", size = 22733, upload-time = "2025-09-27T18:37:24.237Z" },
- { url = "https://files.pythonhosted.org/packages/14/c7/ca723101509b518797fedc2fdf79ba57f886b4aca8a7d31857ba3ee8281f/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc", size = 23672, upload-time = "2025-09-27T18:37:25.271Z" },
- { url = "https://files.pythonhosted.org/packages/fb/df/5bd7a48c256faecd1d36edc13133e51397e41b73bb77e1a69deab746ebac/markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d", size = 14819, upload-time = "2025-09-27T18:37:26.285Z" },
- { url = "https://files.pythonhosted.org/packages/1a/8a/0402ba61a2f16038b48b39bccca271134be00c5c9f0f623208399333c448/markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9", size = 15426, upload-time = "2025-09-27T18:37:27.316Z" },
- { url = "https://files.pythonhosted.org/packages/70/bc/6f1c2f612465f5fa89b95bead1f44dcb607670fd42891d8fdcd5d039f4f4/markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa", size = 14146, upload-time = "2025-09-27T18:37:28.327Z" },
-]
-
-[[package]]
-name = "matplotlib"
-version = "3.10.8"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "contourpy", version = "1.3.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "contourpy", version = "1.3.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "cycler" },
- { name = "fonttools" },
- { name = "kiwisolver" },
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "packaging" },
- { name = "pillow" },
- { name = "pyparsing" },
- { name = "python-dateutil" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/8a/76/d3c6e3a13fe484ebe7718d14e269c9569c4eb0020a968a327acb3b9a8fe6/matplotlib-3.10.8.tar.gz", hash = "sha256:2299372c19d56bcd35cf05a2738308758d32b9eaed2371898d8f5bd33f084aa3", size = 34806269, upload-time = "2025-12-10T22:56:51.155Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/58/be/a30bd917018ad220c400169fba298f2bb7003c8ccbc0c3e24ae2aacad1e8/matplotlib-3.10.8-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:00270d217d6b20d14b584c521f810d60c5c78406dc289859776550df837dcda7", size = 8239828, upload-time = "2025-12-10T22:55:02.313Z" },
- { url = "https://files.pythonhosted.org/packages/58/27/ca01e043c4841078e82cf6e80a6993dfecd315c3d79f5f3153afbb8e1ec6/matplotlib-3.10.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:37b3c1cc42aa184b3f738cfa18c1c1d72fd496d85467a6cf7b807936d39aa656", size = 8128050, upload-time = "2025-12-10T22:55:04.997Z" },
- { url = "https://files.pythonhosted.org/packages/cb/aa/7ab67f2b729ae6a91bcf9dcac0affb95fb8c56f7fd2b2af894ae0b0cf6fa/matplotlib-3.10.8-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ee40c27c795bda6a5292e9cff9890189d32f7e3a0bf04e0e3c9430c4a00c37df", size = 8700452, upload-time = "2025-12-10T22:55:07.47Z" },
- { url = "https://files.pythonhosted.org/packages/73/ae/2d5817b0acee3c49b7e7ccfbf5b273f284957cc8e270adf36375db353190/matplotlib-3.10.8-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a48f2b74020919552ea25d222d5cc6af9ca3f4eb43a93e14d068457f545c2a17", size = 9534928, upload-time = "2025-12-10T22:55:10.566Z" },
- { url = "https://files.pythonhosted.org/packages/c9/5b/8e66653e9f7c39cb2e5cab25fce4810daffa2bff02cbf5f3077cea9e942c/matplotlib-3.10.8-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f254d118d14a7f99d616271d6c3c27922c092dac11112670b157798b89bf4933", size = 9586377, upload-time = "2025-12-10T22:55:12.362Z" },
- { url = "https://files.pythonhosted.org/packages/e2/e2/fd0bbadf837f81edb0d208ba8f8cb552874c3b16e27cb91a31977d90875d/matplotlib-3.10.8-cp310-cp310-win_amd64.whl", hash = "sha256:f9b587c9c7274c1613a30afabf65a272114cd6cdbe67b3406f818c79d7ab2e2a", size = 8128127, upload-time = "2025-12-10T22:55:14.436Z" },
- { url = "https://files.pythonhosted.org/packages/f8/86/de7e3a1cdcfc941483af70609edc06b83e7c8a0e0dc9ac325200a3f4d220/matplotlib-3.10.8-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:6be43b667360fef5c754dda5d25a32e6307a03c204f3c0fc5468b78fa87b4160", size = 8251215, upload-time = "2025-12-10T22:55:16.175Z" },
- { url = "https://files.pythonhosted.org/packages/fd/14/baad3222f424b19ce6ad243c71de1ad9ec6b2e4eb1e458a48fdc6d120401/matplotlib-3.10.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a2b336e2d91a3d7006864e0990c83b216fcdca64b5a6484912902cef87313d78", size = 8139625, upload-time = "2025-12-10T22:55:17.712Z" },
- { url = "https://files.pythonhosted.org/packages/8f/a0/7024215e95d456de5883e6732e708d8187d9753a21d32f8ddb3befc0c445/matplotlib-3.10.8-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:efb30e3baaea72ce5928e32bab719ab4770099079d66726a62b11b1ef7273be4", size = 8712614, upload-time = "2025-12-10T22:55:20.8Z" },
- { url = "https://files.pythonhosted.org/packages/5a/f4/b8347351da9a5b3f41e26cf547252d861f685c6867d179a7c9d60ad50189/matplotlib-3.10.8-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d56a1efd5bfd61486c8bc968fa18734464556f0fb8e51690f4ac25d85cbbbbc2", size = 9540997, upload-time = "2025-12-10T22:55:23.258Z" },
- { url = "https://files.pythonhosted.org/packages/9e/c0/c7b914e297efe0bc36917bf216b2acb91044b91e930e878ae12981e461e5/matplotlib-3.10.8-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:238b7ce5717600615c895050239ec955d91f321c209dd110db988500558e70d6", size = 9596825, upload-time = "2025-12-10T22:55:25.217Z" },
- { url = "https://files.pythonhosted.org/packages/6f/d3/a4bbc01c237ab710a1f22b4da72f4ff6d77eb4c7735ea9811a94ae239067/matplotlib-3.10.8-cp311-cp311-win_amd64.whl", hash = "sha256:18821ace09c763ec93aef5eeff087ee493a24051936d7b9ebcad9662f66501f9", size = 8135090, upload-time = "2025-12-10T22:55:27.162Z" },
- { url = "https://files.pythonhosted.org/packages/89/dd/a0b6588f102beab33ca6f5218b31725216577b2a24172f327eaf6417d5c9/matplotlib-3.10.8-cp311-cp311-win_arm64.whl", hash = "sha256:bab485bcf8b1c7d2060b4fcb6fc368a9e6f4cd754c9c2fea281f4be21df394a2", size = 8012377, upload-time = "2025-12-10T22:55:29.185Z" },
- { url = "https://files.pythonhosted.org/packages/9e/67/f997cdcbb514012eb0d10cd2b4b332667997fb5ebe26b8d41d04962fa0e6/matplotlib-3.10.8-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:64fcc24778ca0404ce0cb7b6b77ae1f4c7231cdd60e6778f999ee05cbd581b9a", size = 8260453, upload-time = "2025-12-10T22:55:30.709Z" },
- { url = "https://files.pythonhosted.org/packages/7e/65/07d5f5c7f7c994f12c768708bd2e17a4f01a2b0f44a1c9eccad872433e2e/matplotlib-3.10.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b9a5ca4ac220a0cdd1ba6bcba3608547117d30468fefce49bb26f55c1a3d5c58", size = 8148321, upload-time = "2025-12-10T22:55:33.265Z" },
- { url = "https://files.pythonhosted.org/packages/3e/f3/c5195b1ae57ef85339fd7285dfb603b22c8b4e79114bae5f4f0fcf688677/matplotlib-3.10.8-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3ab4aabc72de4ff77b3ec33a6d78a68227bf1123465887f9905ba79184a1cc04", size = 8716944, upload-time = "2025-12-10T22:55:34.922Z" },
- { url = "https://files.pythonhosted.org/packages/00/f9/7638f5cc82ec8a7aa005de48622eecc3ed7c9854b96ba15bd76b7fd27574/matplotlib-3.10.8-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:24d50994d8c5816ddc35411e50a86ab05f575e2530c02752e02538122613371f", size = 9550099, upload-time = "2025-12-10T22:55:36.789Z" },
- { url = "https://files.pythonhosted.org/packages/57/61/78cd5920d35b29fd2a0fe894de8adf672ff52939d2e9b43cb83cd5ce1bc7/matplotlib-3.10.8-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:99eefd13c0dc3b3c1b4d561c1169e65fe47aab7b8158754d7c084088e2329466", size = 9613040, upload-time = "2025-12-10T22:55:38.715Z" },
- { url = "https://files.pythonhosted.org/packages/30/4e/c10f171b6e2f44d9e3a2b96efa38b1677439d79c99357600a62cc1e9594e/matplotlib-3.10.8-cp312-cp312-win_amd64.whl", hash = "sha256:dd80ecb295460a5d9d260df63c43f4afbdd832d725a531f008dad1664f458adf", size = 8142717, upload-time = "2025-12-10T22:55:41.103Z" },
- { url = "https://files.pythonhosted.org/packages/f1/76/934db220026b5fef85f45d51a738b91dea7d70207581063cd9bd8fafcf74/matplotlib-3.10.8-cp312-cp312-win_arm64.whl", hash = "sha256:3c624e43ed56313651bc18a47f838b60d7b8032ed348911c54906b130b20071b", size = 8012751, upload-time = "2025-12-10T22:55:42.684Z" },
- { url = "https://files.pythonhosted.org/packages/3d/b9/15fd5541ef4f5b9a17eefd379356cf12175fe577424e7b1d80676516031a/matplotlib-3.10.8-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:3f2e409836d7f5ac2f1c013110a4d50b9f7edc26328c108915f9075d7d7a91b6", size = 8261076, upload-time = "2025-12-10T22:55:44.648Z" },
- { url = "https://files.pythonhosted.org/packages/8d/a0/2ba3473c1b66b9c74dc7107c67e9008cb1782edbe896d4c899d39ae9cf78/matplotlib-3.10.8-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:56271f3dac49a88d7fca5060f004d9d22b865f743a12a23b1e937a0be4818ee1", size = 8148794, upload-time = "2025-12-10T22:55:46.252Z" },
- { url = "https://files.pythonhosted.org/packages/75/97/a471f1c3eb1fd6f6c24a31a5858f443891d5127e63a7788678d14e249aea/matplotlib-3.10.8-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a0a7f52498f72f13d4a25ea70f35f4cb60642b466cbb0a9be951b5bc3f45a486", size = 8718474, upload-time = "2025-12-10T22:55:47.864Z" },
- { url = "https://files.pythonhosted.org/packages/01/be/cd478f4b66f48256f42927d0acbcd63a26a893136456cd079c0cc24fbabf/matplotlib-3.10.8-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:646d95230efb9ca614a7a594d4fcacde0ac61d25e37dd51710b36477594963ce", size = 9549637, upload-time = "2025-12-10T22:55:50.048Z" },
- { url = "https://files.pythonhosted.org/packages/5d/7c/8dc289776eae5109e268c4fb92baf870678dc048a25d4ac903683b86d5bf/matplotlib-3.10.8-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f89c151aab2e2e23cb3fe0acad1e8b82841fd265379c4cecd0f3fcb34c15e0f6", size = 9613678, upload-time = "2025-12-10T22:55:52.21Z" },
- { url = "https://files.pythonhosted.org/packages/64/40/37612487cc8a437d4dd261b32ca21fe2d79510fe74af74e1f42becb1bdb8/matplotlib-3.10.8-cp313-cp313-win_amd64.whl", hash = "sha256:e8ea3e2d4066083e264e75c829078f9e149fa119d27e19acd503de65e0b13149", size = 8142686, upload-time = "2025-12-10T22:55:54.253Z" },
- { url = "https://files.pythonhosted.org/packages/66/52/8d8a8730e968185514680c2a6625943f70269509c3dcfc0dcf7d75928cb8/matplotlib-3.10.8-cp313-cp313-win_arm64.whl", hash = "sha256:c108a1d6fa78a50646029cb6d49808ff0fc1330fda87fa6f6250c6b5369b6645", size = 8012917, upload-time = "2025-12-10T22:55:56.268Z" },
- { url = "https://files.pythonhosted.org/packages/b5/27/51fe26e1062f298af5ef66343d8ef460e090a27fea73036c76c35821df04/matplotlib-3.10.8-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:ad3d9833a64cf48cc4300f2b406c3d0f4f4724a91c0bd5640678a6ba7c102077", size = 8305679, upload-time = "2025-12-10T22:55:57.856Z" },
- { url = "https://files.pythonhosted.org/packages/2c/1e/4de865bc591ac8e3062e835f42dd7fe7a93168d519557837f0e37513f629/matplotlib-3.10.8-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:eb3823f11823deade26ce3b9f40dcb4a213da7a670013929f31d5f5ed1055b22", size = 8198336, upload-time = "2025-12-10T22:55:59.371Z" },
- { url = "https://files.pythonhosted.org/packages/c6/cb/2f7b6e75fb4dce87ef91f60cac4f6e34f4c145ab036a22318ec837971300/matplotlib-3.10.8-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d9050fee89a89ed57b4fb2c1bfac9a3d0c57a0d55aed95949eedbc42070fea39", size = 8731653, upload-time = "2025-12-10T22:56:01.032Z" },
- { url = "https://files.pythonhosted.org/packages/46/b3/bd9c57d6ba670a37ab31fb87ec3e8691b947134b201f881665b28cc039ff/matplotlib-3.10.8-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b44d07310e404ba95f8c25aa5536f154c0a8ec473303535949e52eb71d0a1565", size = 9561356, upload-time = "2025-12-10T22:56:02.95Z" },
- { url = "https://files.pythonhosted.org/packages/c0/3d/8b94a481456dfc9dfe6e39e93b5ab376e50998cddfd23f4ae3b431708f16/matplotlib-3.10.8-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:0a33deb84c15ede243aead39f77e990469fff93ad1521163305095b77b72ce4a", size = 9614000, upload-time = "2025-12-10T22:56:05.411Z" },
- { url = "https://files.pythonhosted.org/packages/bd/cd/bc06149fe5585ba800b189a6a654a75f1f127e8aab02fd2be10df7fa500c/matplotlib-3.10.8-cp313-cp313t-win_amd64.whl", hash = "sha256:3a48a78d2786784cc2413e57397981fb45c79e968d99656706018d6e62e57958", size = 8220043, upload-time = "2025-12-10T22:56:07.551Z" },
- { url = "https://files.pythonhosted.org/packages/e3/de/b22cf255abec916562cc04eef457c13e58a1990048de0c0c3604d082355e/matplotlib-3.10.8-cp313-cp313t-win_arm64.whl", hash = "sha256:15d30132718972c2c074cd14638c7f4592bd98719e2308bccea40e0538bc0cb5", size = 8062075, upload-time = "2025-12-10T22:56:09.178Z" },
- { url = "https://files.pythonhosted.org/packages/3c/43/9c0ff7a2f11615e516c3b058e1e6e8f9614ddeca53faca06da267c48345d/matplotlib-3.10.8-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:b53285e65d4fa4c86399979e956235deb900be5baa7fc1218ea67fbfaeaadd6f", size = 8262481, upload-time = "2025-12-10T22:56:10.885Z" },
- { url = "https://files.pythonhosted.org/packages/6f/ca/e8ae28649fcdf039fda5ef554b40a95f50592a3c47e6f7270c9561c12b07/matplotlib-3.10.8-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:32f8dce744be5569bebe789e46727946041199030db8aeb2954d26013a0eb26b", size = 8151473, upload-time = "2025-12-10T22:56:12.377Z" },
- { url = "https://files.pythonhosted.org/packages/f1/6f/009d129ae70b75e88cbe7e503a12a4c0670e08ed748a902c2568909e9eb5/matplotlib-3.10.8-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4cf267add95b1c88300d96ca837833d4112756045364f5c734a2276038dae27d", size = 9553896, upload-time = "2025-12-10T22:56:14.432Z" },
- { url = "https://files.pythonhosted.org/packages/f5/26/4221a741eb97967bc1fd5e4c52b9aa5a91b2f4ec05b59f6def4d820f9df9/matplotlib-3.10.8-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2cf5bd12cecf46908f286d7838b2abc6c91cda506c0445b8223a7c19a00df008", size = 9824193, upload-time = "2025-12-10T22:56:16.29Z" },
- { url = "https://files.pythonhosted.org/packages/1f/f3/3abf75f38605772cf48a9daf5821cd4f563472f38b4b828c6fba6fa6d06e/matplotlib-3.10.8-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:41703cc95688f2516b480f7f339d8851a6035f18e100ee6a32bc0b8536a12a9c", size = 9615444, upload-time = "2025-12-10T22:56:18.155Z" },
- { url = "https://files.pythonhosted.org/packages/93/a5/de89ac80f10b8dc615807ee1133cd99ac74082581196d4d9590bea10690d/matplotlib-3.10.8-cp314-cp314-win_amd64.whl", hash = "sha256:83d282364ea9f3e52363da262ce32a09dfe241e4080dcedda3c0db059d3c1f11", size = 8272719, upload-time = "2025-12-10T22:56:20.366Z" },
- { url = "https://files.pythonhosted.org/packages/69/ce/b006495c19ccc0a137b48083168a37bd056392dee02f87dba0472f2797fe/matplotlib-3.10.8-cp314-cp314-win_arm64.whl", hash = "sha256:2c1998e92cd5999e295a731bcb2911c75f597d937341f3030cc24ef2733d78a8", size = 8144205, upload-time = "2025-12-10T22:56:22.239Z" },
- { url = "https://files.pythonhosted.org/packages/68/d9/b31116a3a855bd313c6fcdb7226926d59b041f26061c6c5b1be66a08c826/matplotlib-3.10.8-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:b5a2b97dbdc7d4f353ebf343744f1d1f1cca8aa8bfddb4262fcf4306c3761d50", size = 8305785, upload-time = "2025-12-10T22:56:24.218Z" },
- { url = "https://files.pythonhosted.org/packages/1e/90/6effe8103f0272685767ba5f094f453784057072f49b393e3ea178fe70a5/matplotlib-3.10.8-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:3f5c3e4da343bba819f0234186b9004faba952cc420fbc522dc4e103c1985908", size = 8198361, upload-time = "2025-12-10T22:56:26.787Z" },
- { url = "https://files.pythonhosted.org/packages/d7/65/a73188711bea603615fc0baecca1061429ac16940e2385433cc778a9d8e7/matplotlib-3.10.8-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f62550b9a30afde8c1c3ae450e5eb547d579dd69b25c2fc7a1c67f934c1717a", size = 9561357, upload-time = "2025-12-10T22:56:28.953Z" },
- { url = "https://files.pythonhosted.org/packages/f4/3d/b5c5d5d5be8ce63292567f0e2c43dde9953d3ed86ac2de0a72e93c8f07a1/matplotlib-3.10.8-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:495672de149445ec1b772ff2c9ede9b769e3cb4f0d0aa7fa730d7f59e2d4e1c1", size = 9823610, upload-time = "2025-12-10T22:56:31.455Z" },
- { url = "https://files.pythonhosted.org/packages/4d/4b/e7beb6bbd49f6bae727a12b270a2654d13c397576d25bd6786e47033300f/matplotlib-3.10.8-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:595ba4d8fe983b88f0eec8c26a241e16d6376fe1979086232f481f8f3f67494c", size = 9614011, upload-time = "2025-12-10T22:56:33.85Z" },
- { url = "https://files.pythonhosted.org/packages/7c/e6/76f2813d31f032e65f6f797e3f2f6e4aab95b65015924b1c51370395c28a/matplotlib-3.10.8-cp314-cp314t-win_amd64.whl", hash = "sha256:25d380fe8b1dc32cf8f0b1b448470a77afb195438bafdf1d858bfb876f3edf7b", size = 8362801, upload-time = "2025-12-10T22:56:36.107Z" },
- { url = "https://files.pythonhosted.org/packages/5d/49/d651878698a0b67f23aa28e17f45a6d6dd3d3f933fa29087fa4ce5947b5a/matplotlib-3.10.8-cp314-cp314t-win_arm64.whl", hash = "sha256:113bb52413ea508ce954a02c10ffd0d565f9c3bc7f2eddc27dfe1731e71c7b5f", size = 8192560, upload-time = "2025-12-10T22:56:38.008Z" },
- { url = "https://files.pythonhosted.org/packages/f5/43/31d59500bb950b0d188e149a2e552040528c13d6e3d6e84d0cccac593dcd/matplotlib-3.10.8-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:f97aeb209c3d2511443f8797e3e5a569aebb040d4f8bc79aa3ee78a8fb9e3dd8", size = 8237252, upload-time = "2025-12-10T22:56:39.529Z" },
- { url = "https://files.pythonhosted.org/packages/0c/2c/615c09984f3c5f907f51c886538ad785cf72e0e11a3225de2c0f9442aecc/matplotlib-3.10.8-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:fb061f596dad3a0f52b60dc6a5dec4a0c300dec41e058a7efe09256188d170b7", size = 8124693, upload-time = "2025-12-10T22:56:41.758Z" },
- { url = "https://files.pythonhosted.org/packages/91/e1/2757277a1c56041e1fc104b51a0f7b9a4afc8eb737865d63cababe30bc61/matplotlib-3.10.8-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:12d90df9183093fcd479f4172ac26b322b1248b15729cb57f42f71f24c7e37a3", size = 8702205, upload-time = "2025-12-10T22:56:43.415Z" },
- { url = "https://files.pythonhosted.org/packages/04/30/3afaa31c757f34b7725ab9d2ba8b48b5e89c2019c003e7d0ead143aabc5a/matplotlib-3.10.8-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:6da7c2ce169267d0d066adcf63758f0604aa6c3eebf67458930f9d9b79ad1db1", size = 8249198, upload-time = "2025-12-10T22:56:45.584Z" },
- { url = "https://files.pythonhosted.org/packages/48/2f/6334aec331f57485a642a7c8be03cb286f29111ae71c46c38b363230063c/matplotlib-3.10.8-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:9153c3292705be9f9c64498a8872118540c3f4123d1a1c840172edf262c8be4a", size = 8136817, upload-time = "2025-12-10T22:56:47.339Z" },
- { url = "https://files.pythonhosted.org/packages/73/e4/6d6f14b2a759c622f191b2d67e9075a3f56aaccb3be4bb9bb6890030d0a0/matplotlib-3.10.8-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1ae029229a57cd1e8fe542485f27e7ca7b23aa9e8944ddb4985d0bc444f1eca2", size = 8713867, upload-time = "2025-12-10T22:56:48.954Z" },
-]
-
-[[package]]
-name = "mdurl"
-version = "0.1.2"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba", size = 8729, upload-time = "2022-08-14T12:40:10.846Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979, upload-time = "2022-08-14T12:40:09.779Z" },
-]
-
-[[package]]
-name = "mpmath"
-version = "1.3.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/e0/47/dd32fa426cc72114383ac549964eecb20ecfd886d1e5ccf5340b55b02f57/mpmath-1.3.0.tar.gz", hash = "sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f", size = 508106, upload-time = "2023-03-07T16:47:11.061Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c", size = 536198, upload-time = "2023-03-07T16:47:09.197Z" },
-]
-
-[[package]]
-name = "mps-sdpa"
-version = "0.2.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "ninja" },
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "psutil" },
- { name = "pyobjc-core" },
- { name = "pyobjc-framework-metal" },
- { name = "pyobjc-framework-metalperformanceshadersgraph" },
- { name = "torch", version = "2.12.1", source = { registry = "https://pypi.org/simple" } },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/f0/c2/cf52e4364c4a5f9db84238a34974a9498e5922720349ec6f6a3700cd492c/mps_sdpa-0.2.0.tar.gz", hash = "sha256:1d6b6024801657bbdc4a6420ec7a0b52191ab0b88d847143a3ea1728ba3f93b5", size = 81037, upload-time = "2026-04-30T16:12:53.581Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/b1/eb/629b9846b972471c4edacb244e1f59d72862fa57b7bc92a8c7fc5dabd9b0/mps_sdpa-0.2.0-py3-none-any.whl", hash = "sha256:2fa980c7028968164a6ae15e4ed380447c76411f4a258184f23d80cf5272f3fd", size = 58151, upload-time = "2026-04-30T16:12:52.089Z" },
-]
-
-[[package]]
-name = "networkx"
-version = "3.4.2"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version < '3.11' and sys_platform == 'linux'",
- "python_full_version < '3.11' and sys_platform != 'linux'",
-]
-sdist = { url = "https://files.pythonhosted.org/packages/fd/1d/06475e1cd5264c0b870ea2cc6fdb3e37177c1e565c43f56ff17a10e3937f/networkx-3.4.2.tar.gz", hash = "sha256:307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1", size = 2151368, upload-time = "2024-10-21T12:39:38.695Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/b9/54/dd730b32ea14ea797530a4479b2ed46a6fb250f682a9cfb997e968bf0261/networkx-3.4.2-py3-none-any.whl", hash = "sha256:df5d4365b724cf81b8c6a7312509d0c22386097011ad1abe274afd5e9d3bbc5f", size = 1723263, upload-time = "2024-10-21T12:39:36.247Z" },
-]
-
-[[package]]
-name = "networkx"
-version = "3.6.1"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version >= '3.13' and sys_platform == 'linux'",
- "python_full_version == '3.12.*' and sys_platform == 'linux'",
- "python_full_version == '3.11.*' and sys_platform == 'linux'",
- "python_full_version >= '3.13' and sys_platform != 'linux'",
- "python_full_version == '3.12.*' and sys_platform != 'linux'",
- "python_full_version == '3.11.*' and sys_platform != 'linux'",
-]
-sdist = { url = "https://files.pythonhosted.org/packages/6a/51/63fe664f3908c97be9d2e4f1158eb633317598cfa6e1fc14af5383f17512/networkx-3.6.1.tar.gz", hash = "sha256:26b7c357accc0c8cde558ad486283728b65b6a95d85ee1cd66bafab4c8168509", size = 2517025, upload-time = "2025-12-08T17:02:39.908Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/9e/c9/b2622292ea83fbb4ec318f5b9ab867d0a28ab43c5717bb85b0a5f6b3b0a4/networkx-3.6.1-py3-none-any.whl", hash = "sha256:d47fbf302e7d9cbbb9e2555a0d267983d2aa476bac30e90dfbe5669bd57f3762", size = 2068504, upload-time = "2025-12-08T17:02:38.159Z" },
-]
-
-[[package]]
-name = "ninja"
-version = "1.13.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/43/73/79a0b22fc731989c708068427579e840a6cf4e937fe7ae5c5d0b7356ac22/ninja-1.13.0.tar.gz", hash = "sha256:4a40ce995ded54d9dc24f8ea37ff3bf62ad192b547f6c7126e7e25045e76f978", size = 242558, upload-time = "2025-08-11T15:10:19.421Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/3c/74/d02409ed2aa865e051b7edda22ad416a39d81a84980f544f8de717cab133/ninja-1.13.0-py3-none-macosx_10_9_universal2.whl", hash = "sha256:fa2a8bfc62e31b08f83127d1613d10821775a0eb334197154c4d6067b7068ff1", size = 310125, upload-time = "2025-08-11T15:09:50.971Z" },
- { url = "https://files.pythonhosted.org/packages/8e/de/6e1cd6b84b412ac1ef327b76f0641aeb5dcc01e9d3f9eee0286d0c34fd93/ninja-1.13.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3d00c692fb717fd511abeb44b8c5d00340c36938c12d6538ba989fe764e79630", size = 177467, upload-time = "2025-08-11T15:09:52.767Z" },
- { url = "https://files.pythonhosted.org/packages/c8/83/49320fb6e58ae3c079381e333575fdbcf1cca3506ee160a2dcce775046fa/ninja-1.13.0-py3-none-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:be7f478ff9f96a128b599a964fc60a6a87b9fa332ee1bd44fa243ac88d50291c", size = 187834, upload-time = "2025-08-11T15:09:54.115Z" },
- { url = "https://files.pythonhosted.org/packages/56/c7/ba22748fb59f7f896b609cd3e568d28a0a367a6d953c24c461fe04fc4433/ninja-1.13.0-py3-none-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:60056592cf495e9a6a4bea3cd178903056ecb0943e4de45a2ea825edb6dc8d3e", size = 202736, upload-time = "2025-08-11T15:09:55.745Z" },
- { url = "https://files.pythonhosted.org/packages/79/22/d1de07632b78ac8e6b785f41fa9aad7a978ec8c0a1bf15772def36d77aac/ninja-1.13.0-py3-none-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:1c97223cdda0417f414bf864cfb73b72d8777e57ebb279c5f6de368de0062988", size = 179034, upload-time = "2025-08-11T15:09:57.394Z" },
- { url = "https://files.pythonhosted.org/packages/ed/de/0e6edf44d6a04dabd0318a519125ed0415ce437ad5a1ec9b9be03d9048cf/ninja-1.13.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fb46acf6b93b8dd0322adc3a4945452a4e774b75b91293bafcc7b7f8e6517dfa", size = 180716, upload-time = "2025-08-11T15:09:58.696Z" },
- { url = "https://files.pythonhosted.org/packages/54/28/938b562f9057aaa4d6bfbeaa05e81899a47aebb3ba6751e36c027a7f5ff7/ninja-1.13.0-py3-none-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4be9c1b082d244b1ad7ef41eb8ab088aae8c109a9f3f0b3e56a252d3e00f42c1", size = 146843, upload-time = "2025-08-11T15:10:00.046Z" },
- { url = "https://files.pythonhosted.org/packages/2a/fb/d06a3838de4f8ab866e44ee52a797b5491df823901c54943b2adb0389fbb/ninja-1.13.0-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:6739d3352073341ad284246f81339a384eec091d9851a886dfa5b00a6d48b3e2", size = 154402, upload-time = "2025-08-11T15:10:01.657Z" },
- { url = "https://files.pythonhosted.org/packages/31/bf/0d7808af695ceddc763cf251b84a9892cd7f51622dc8b4c89d5012779f06/ninja-1.13.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:11be2d22027bde06f14c343f01d31446747dbb51e72d00decca2eb99be911e2f", size = 552388, upload-time = "2025-08-11T15:10:03.349Z" },
- { url = "https://files.pythonhosted.org/packages/9d/70/c99d0c2c809f992752453cce312848abb3b1607e56d4cd1b6cded317351a/ninja-1.13.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:aa45b4037b313c2f698bc13306239b8b93b4680eb47e287773156ac9e9304714", size = 472501, upload-time = "2025-08-11T15:10:04.735Z" },
- { url = "https://files.pythonhosted.org/packages/9f/43/c217b1153f0e499652f5e0766da8523ce3480f0a951039c7af115e224d55/ninja-1.13.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:5f8e1e8a1a30835eeb51db05cf5a67151ad37542f5a4af2a438e9490915e5b72", size = 638280, upload-time = "2025-08-11T15:10:06.512Z" },
- { url = "https://files.pythonhosted.org/packages/8c/45/9151bba2c8d0ae2b6260f71696330590de5850e5574b7b5694dce6023e20/ninja-1.13.0-py3-none-musllinux_1_2_ppc64le.whl", hash = "sha256:3d7d7779d12cb20c6d054c61b702139fd23a7a964ec8f2c823f1ab1b084150db", size = 642420, upload-time = "2025-08-11T15:10:08.35Z" },
- { url = "https://files.pythonhosted.org/packages/3c/fb/95752eb635bb8ad27d101d71bef15bc63049de23f299e312878fc21cb2da/ninja-1.13.0-py3-none-musllinux_1_2_riscv64.whl", hash = "sha256:d741a5e6754e0bda767e3274a0f0deeef4807f1fec6c0d7921a0244018926ae5", size = 585106, upload-time = "2025-08-11T15:10:09.818Z" },
- { url = "https://files.pythonhosted.org/packages/c1/31/aa56a1a286703800c0cbe39fb4e82811c277772dc8cd084f442dd8e2938a/ninja-1.13.0-py3-none-musllinux_1_2_s390x.whl", hash = "sha256:e8bad11f8a00b64137e9b315b137d8bb6cbf3086fbdc43bf1f90fd33324d2e96", size = 707138, upload-time = "2025-08-11T15:10:11.366Z" },
- { url = "https://files.pythonhosted.org/packages/34/6f/5f5a54a1041af945130abdb2b8529cbef0cdcbbf9bcf3f4195378319d29a/ninja-1.13.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b4f2a072db3c0f944c32793e91532d8948d20d9ab83da9c0c7c15b5768072200", size = 581758, upload-time = "2025-08-11T15:10:13.295Z" },
- { url = "https://files.pythonhosted.org/packages/95/97/51359c77527d45943fe7a94d00a3843b81162e6c4244b3579fe8fc54cb9c/ninja-1.13.0-py3-none-win32.whl", hash = "sha256:8cfbb80b4a53456ae8a39f90ae3d7a2129f45ea164f43fadfa15dc38c4aef1c9", size = 267201, upload-time = "2025-08-11T15:10:15.158Z" },
- { url = "https://files.pythonhosted.org/packages/29/45/c0adfbfb0b5895aa18cec400c535b4f7ff3e52536e0403602fc1a23f7de9/ninja-1.13.0-py3-none-win_amd64.whl", hash = "sha256:fb8ee8719f8af47fed145cced4a85f0755dd55d45b2bddaf7431fa89803c5f3e", size = 309975, upload-time = "2025-08-11T15:10:16.697Z" },
- { url = "https://files.pythonhosted.org/packages/df/93/a7b983643d1253bb223234b5b226e69de6cda02b76cdca7770f684b795f5/ninja-1.13.0-py3-none-win_arm64.whl", hash = "sha256:3c0b40b1f0bba764644385319028650087b4c1b18cdfa6f45cb39a3669b81aa9", size = 290806, upload-time = "2025-08-11T15:10:18.018Z" },
-]
-
-[[package]]
-name = "nodeenv"
-version = "1.10.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/24/bf/d1bda4f6168e0b2e9e5958945e01910052158313224ada5ce1fb2e1113b8/nodeenv-1.10.0.tar.gz", hash = "sha256:996c191ad80897d076bdfba80a41994c2b47c68e224c542b48feba42ba00f8bb", size = 55611, upload-time = "2025-12-20T14:08:54.006Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/88/b2/d0896bdcdc8d28a7fc5717c305f1a861c26e18c05047949fb371034d98bd/nodeenv-1.10.0-py2.py3-none-any.whl", hash = "sha256:5bb13e3eed2923615535339b3c620e76779af4cb4c6a90deccc9e36b274d3827", size = 23438, upload-time = "2025-12-20T14:08:52.782Z" },
-]
-
-[[package]]
-name = "numpy"
-version = "2.2.6"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version < '3.11' and sys_platform == 'linux'",
- "python_full_version < '3.11' and sys_platform != 'linux'",
-]
-sdist = { url = "https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz", hash = "sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd", size = 20276440, upload-time = "2025-05-17T22:38:04.611Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb", size = 21165245, upload-time = "2025-05-17T21:27:58.555Z" },
- { url = "https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90", size = 14360048, upload-time = "2025-05-17T21:28:21.406Z" },
- { url = "https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163", size = 5340542, upload-time = "2025-05-17T21:28:30.931Z" },
- { url = "https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf", size = 6878301, upload-time = "2025-05-17T21:28:41.613Z" },
- { url = "https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83", size = 14297320, upload-time = "2025-05-17T21:29:02.78Z" },
- { url = "https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915", size = 16801050, upload-time = "2025-05-17T21:29:27.675Z" },
- { url = "https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680", size = 15807034, upload-time = "2025-05-17T21:29:51.102Z" },
- { url = "https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289", size = 18614185, upload-time = "2025-05-17T21:30:18.703Z" },
- { url = "https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl", hash = "sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d", size = 6527149, upload-time = "2025-05-17T21:30:29.788Z" },
- { url = "https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3", size = 12904620, upload-time = "2025-05-17T21:30:48.994Z" },
- { url = "https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae", size = 21176963, upload-time = "2025-05-17T21:31:19.36Z" },
- { url = "https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a", size = 14406743, upload-time = "2025-05-17T21:31:41.087Z" },
- { url = "https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42", size = 5352616, upload-time = "2025-05-17T21:31:50.072Z" },
- { url = "https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491", size = 6889579, upload-time = "2025-05-17T21:32:01.712Z" },
- { url = "https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a", size = 14312005, upload-time = "2025-05-17T21:32:23.332Z" },
- { url = "https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf", size = 16821570, upload-time = "2025-05-17T21:32:47.991Z" },
- { url = "https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1", size = 15818548, upload-time = "2025-05-17T21:33:11.728Z" },
- { url = "https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab", size = 18620521, upload-time = "2025-05-17T21:33:39.139Z" },
- { url = "https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl", hash = "sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47", size = 6525866, upload-time = "2025-05-17T21:33:50.273Z" },
- { url = "https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl", hash = "sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303", size = 12907455, upload-time = "2025-05-17T21:34:09.135Z" },
- { url = "https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff", size = 20875348, upload-time = "2025-05-17T21:34:39.648Z" },
- { url = "https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c", size = 14119362, upload-time = "2025-05-17T21:35:01.241Z" },
- { url = "https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3", size = 5084103, upload-time = "2025-05-17T21:35:10.622Z" },
- { url = "https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282", size = 6625382, upload-time = "2025-05-17T21:35:21.414Z" },
- { url = "https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87", size = 14018462, upload-time = "2025-05-17T21:35:42.174Z" },
- { url = "https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249", size = 16527618, upload-time = "2025-05-17T21:36:06.711Z" },
- { url = "https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49", size = 15505511, upload-time = "2025-05-17T21:36:29.965Z" },
- { url = "https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de", size = 18313783, upload-time = "2025-05-17T21:36:56.883Z" },
- { url = "https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl", hash = "sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4", size = 6246506, upload-time = "2025-05-17T21:37:07.368Z" },
- { url = "https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl", hash = "sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2", size = 12614190, upload-time = "2025-05-17T21:37:26.213Z" },
- { url = "https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84", size = 20867828, upload-time = "2025-05-17T21:37:56.699Z" },
- { url = "https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b", size = 14143006, upload-time = "2025-05-17T21:38:18.291Z" },
- { url = "https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d", size = 5076765, upload-time = "2025-05-17T21:38:27.319Z" },
- { url = "https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566", size = 6617736, upload-time = "2025-05-17T21:38:38.141Z" },
- { url = "https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f", size = 14010719, upload-time = "2025-05-17T21:38:58.433Z" },
- { url = "https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f", size = 16526072, upload-time = "2025-05-17T21:39:22.638Z" },
- { url = "https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868", size = 15503213, upload-time = "2025-05-17T21:39:45.865Z" },
- { url = "https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d", size = 18316632, upload-time = "2025-05-17T21:40:13.331Z" },
- { url = "https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl", hash = "sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd", size = 6244532, upload-time = "2025-05-17T21:43:46.099Z" },
- { url = "https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl", hash = "sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c", size = 12610885, upload-time = "2025-05-17T21:44:05.145Z" },
- { url = "https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6", size = 20963467, upload-time = "2025-05-17T21:40:44Z" },
- { url = "https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda", size = 14225144, upload-time = "2025-05-17T21:41:05.695Z" },
- { url = "https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40", size = 5200217, upload-time = "2025-05-17T21:41:15.903Z" },
- { url = "https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8", size = 6712014, upload-time = "2025-05-17T21:41:27.321Z" },
- { url = "https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f", size = 14077935, upload-time = "2025-05-17T21:41:49.738Z" },
- { url = "https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa", size = 16600122, upload-time = "2025-05-17T21:42:14.046Z" },
- { url = "https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571", size = 15586143, upload-time = "2025-05-17T21:42:37.464Z" },
- { url = "https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1", size = 18385260, upload-time = "2025-05-17T21:43:05.189Z" },
- { url = "https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl", hash = "sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff", size = 6377225, upload-time = "2025-05-17T21:43:16.254Z" },
- { url = "https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl", hash = "sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06", size = 12771374, upload-time = "2025-05-17T21:43:35.479Z" },
- { url = "https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d", size = 21040391, upload-time = "2025-05-17T21:44:35.948Z" },
- { url = "https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db", size = 6786754, upload-time = "2025-05-17T21:44:47.446Z" },
- { url = "https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543", size = 16643476, upload-time = "2025-05-17T21:45:11.871Z" },
- { url = "https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00", size = 12812666, upload-time = "2025-05-17T21:45:31.426Z" },
-]
-
-[[package]]
-name = "numpy"
-version = "2.4.1"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version >= '3.13' and sys_platform == 'linux'",
- "python_full_version == '3.12.*' and sys_platform == 'linux'",
- "python_full_version == '3.11.*' and sys_platform == 'linux'",
- "python_full_version >= '3.13' and sys_platform != 'linux'",
- "python_full_version == '3.12.*' and sys_platform != 'linux'",
- "python_full_version == '3.11.*' and sys_platform != 'linux'",
-]
-sdist = { url = "https://files.pythonhosted.org/packages/24/62/ae72ff66c0f1fd959925b4c11f8c2dea61f47f6acaea75a08512cdfe3fed/numpy-2.4.1.tar.gz", hash = "sha256:a1ceafc5042451a858231588a104093474c6a5c57dcc724841f5c888d237d690", size = 20721320, upload-time = "2026-01-10T06:44:59.619Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/a5/34/2b1bc18424f3ad9af577f6ce23600319968a70575bd7db31ce66731bbef9/numpy-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0cce2a669e3c8ba02ee563c7835f92c153cf02edff1ae05e1823f1dde21b16a5", size = 16944563, upload-time = "2026-01-10T06:42:14.615Z" },
- { url = "https://files.pythonhosted.org/packages/2c/57/26e5f97d075aef3794045a6ca9eada6a4ed70eb9a40e7a4a93f9ac80d704/numpy-2.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:899d2c18024984814ac7e83f8f49d8e8180e2fbe1b2e252f2e7f1d06bea92425", size = 12645658, upload-time = "2026-01-10T06:42:17.298Z" },
- { url = "https://files.pythonhosted.org/packages/8e/ba/80fc0b1e3cb2fd5c6143f00f42eb67762aa043eaa05ca924ecc3222a7849/numpy-2.4.1-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:09aa8a87e45b55a1c2c205d42e2808849ece5c484b2aab11fecabec3841cafba", size = 5474132, upload-time = "2026-01-10T06:42:19.637Z" },
- { url = "https://files.pythonhosted.org/packages/40/ae/0a5b9a397f0e865ec171187c78d9b57e5588afc439a04ba9cab1ebb2c945/numpy-2.4.1-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:edee228f76ee2dab4579fad6f51f6a305de09d444280109e0f75df247ff21501", size = 6804159, upload-time = "2026-01-10T06:42:21.44Z" },
- { url = "https://files.pythonhosted.org/packages/86/9c/841c15e691c7085caa6fd162f063eff494099c8327aeccd509d1ab1e36ab/numpy-2.4.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a92f227dbcdc9e4c3e193add1a189a9909947d4f8504c576f4a732fd0b54240a", size = 14708058, upload-time = "2026-01-10T06:42:23.546Z" },
- { url = "https://files.pythonhosted.org/packages/5d/9d/7862db06743f489e6a502a3b93136d73aea27d97b2cf91504f70a27501d6/numpy-2.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:538bf4ec353709c765ff75ae616c34d3c3dca1a68312727e8f2676ea644f8509", size = 16651501, upload-time = "2026-01-10T06:42:25.909Z" },
- { url = "https://files.pythonhosted.org/packages/a6/9c/6fc34ebcbd4015c6e5f0c0ce38264010ce8a546cb6beacb457b84a75dfc8/numpy-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ac08c63cb7779b85e9d5318e6c3518b424bc1f364ac4cb2c6136f12e5ff2dccc", size = 16492627, upload-time = "2026-01-10T06:42:28.938Z" },
- { url = "https://files.pythonhosted.org/packages/aa/63/2494a8597502dacda439f61b3c0db4da59928150e62be0e99395c3ad23c5/numpy-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4f9c360ecef085e5841c539a9a12b883dff005fbd7ce46722f5e9cef52634d82", size = 18585052, upload-time = "2026-01-10T06:42:31.312Z" },
- { url = "https://files.pythonhosted.org/packages/6a/93/098e1162ae7522fc9b618d6272b77404c4656c72432ecee3abc029aa3de0/numpy-2.4.1-cp311-cp311-win32.whl", hash = "sha256:0f118ce6b972080ba0758c6087c3617b5ba243d806268623dc34216d69099ba0", size = 6236575, upload-time = "2026-01-10T06:42:33.872Z" },
- { url = "https://files.pythonhosted.org/packages/8c/de/f5e79650d23d9e12f38a7bc6b03ea0835b9575494f8ec94c11c6e773b1b1/numpy-2.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:18e14c4d09d55eef39a6ab5b08406e84bc6869c1e34eef45564804f90b7e0574", size = 12604479, upload-time = "2026-01-10T06:42:35.778Z" },
- { url = "https://files.pythonhosted.org/packages/dd/65/e1097a7047cff12ce3369bd003811516b20ba1078dbdec135e1cd7c16c56/numpy-2.4.1-cp311-cp311-win_arm64.whl", hash = "sha256:6461de5113088b399d655d45c3897fa188766415d0f568f175ab071c8873bd73", size = 10578325, upload-time = "2026-01-10T06:42:38.518Z" },
- { url = "https://files.pythonhosted.org/packages/78/7f/ec53e32bf10c813604edf07a3682616bd931d026fcde7b6d13195dfb684a/numpy-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d3703409aac693fa82c0aee023a1ae06a6e9d065dba10f5e8e80f642f1e9d0a2", size = 16656888, upload-time = "2026-01-10T06:42:40.913Z" },
- { url = "https://files.pythonhosted.org/packages/b8/e0/1f9585d7dae8f14864e948fd7fa86c6cb72dee2676ca2748e63b1c5acfe0/numpy-2.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7211b95ca365519d3596a1d8688a95874cc94219d417504d9ecb2df99fa7bfa8", size = 12373956, upload-time = "2026-01-10T06:42:43.091Z" },
- { url = "https://files.pythonhosted.org/packages/8e/43/9762e88909ff2326f5e7536fa8cb3c49fb03a7d92705f23e6e7f553d9cb3/numpy-2.4.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:5adf01965456a664fc727ed69cc71848f28d063217c63e1a0e200a118d5eec9a", size = 5202567, upload-time = "2026-01-10T06:42:45.107Z" },
- { url = "https://files.pythonhosted.org/packages/4b/ee/34b7930eb61e79feb4478800a4b95b46566969d837546aa7c034c742ef98/numpy-2.4.1-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:26f0bcd9c79a00e339565b303badc74d3ea2bd6d52191eeca5f95936cad107d0", size = 6549459, upload-time = "2026-01-10T06:42:48.152Z" },
- { url = "https://files.pythonhosted.org/packages/79/e3/5f115fae982565771be994867c89bcd8d7208dbfe9469185497d70de5ddf/numpy-2.4.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0093e85df2960d7e4049664b26afc58b03236e967fb942354deef3208857a04c", size = 14404859, upload-time = "2026-01-10T06:42:49.947Z" },
- { url = "https://files.pythonhosted.org/packages/d9/7d/9c8a781c88933725445a859cac5d01b5871588a15969ee6aeb618ba99eee/numpy-2.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7ad270f438cbdd402c364980317fb6b117d9ec5e226fff5b4148dd9aa9fc6e02", size = 16371419, upload-time = "2026-01-10T06:42:52.409Z" },
- { url = "https://files.pythonhosted.org/packages/a6/d2/8aa084818554543f17cf4162c42f162acbd3bb42688aefdba6628a859f77/numpy-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:297c72b1b98100c2e8f873d5d35fb551fce7040ade83d67dd51d38c8d42a2162", size = 16182131, upload-time = "2026-01-10T06:42:54.694Z" },
- { url = "https://files.pythonhosted.org/packages/60/db/0425216684297c58a8df35f3284ef56ec4a043e6d283f8a59c53562caf1b/numpy-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:cf6470d91d34bf669f61d515499859fa7a4c2f7c36434afb70e82df7217933f9", size = 18295342, upload-time = "2026-01-10T06:42:56.991Z" },
- { url = "https://files.pythonhosted.org/packages/31/4c/14cb9d86240bd8c386c881bafbe43f001284b7cce3bc01623ac9475da163/numpy-2.4.1-cp312-cp312-win32.whl", hash = "sha256:b6bcf39112e956594b3331316d90c90c90fb961e39696bda97b89462f5f3943f", size = 5959015, upload-time = "2026-01-10T06:42:59.631Z" },
- { url = "https://files.pythonhosted.org/packages/51/cf/52a703dbeb0c65807540d29699fef5fda073434ff61846a564d5c296420f/numpy-2.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:e1a27bb1b2dee45a2a53f5ca6ff2d1a7f135287883a1689e930d44d1ff296c87", size = 12310730, upload-time = "2026-01-10T06:43:01.627Z" },
- { url = "https://files.pythonhosted.org/packages/69/80/a828b2d0ade5e74a9fe0f4e0a17c30fdc26232ad2bc8c9f8b3197cf7cf18/numpy-2.4.1-cp312-cp312-win_arm64.whl", hash = "sha256:0e6e8f9d9ecf95399982019c01223dc130542960a12edfa8edd1122dfa66a8a8", size = 10312166, upload-time = "2026-01-10T06:43:03.673Z" },
- { url = "https://files.pythonhosted.org/packages/04/68/732d4b7811c00775f3bd522a21e8dd5a23f77eb11acdeb663e4a4ebf0ef4/numpy-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d797454e37570cfd61143b73b8debd623c3c0952959adb817dd310a483d58a1b", size = 16652495, upload-time = "2026-01-10T06:43:06.283Z" },
- { url = "https://files.pythonhosted.org/packages/20/ca/857722353421a27f1465652b2c66813eeeccea9d76d5f7b74b99f298e60e/numpy-2.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:82c55962006156aeef1629b953fd359064aa47e4d82cfc8e67f0918f7da3344f", size = 12368657, upload-time = "2026-01-10T06:43:09.094Z" },
- { url = "https://files.pythonhosted.org/packages/81/0d/2377c917513449cc6240031a79d30eb9a163d32a91e79e0da47c43f2c0c8/numpy-2.4.1-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:71abbea030f2cfc3092a0ff9f8c8fdefdc5e0bf7d9d9c99663538bb0ecdac0b9", size = 5197256, upload-time = "2026-01-10T06:43:13.634Z" },
- { url = "https://files.pythonhosted.org/packages/17/39/569452228de3f5de9064ac75137082c6214be1f5c532016549a7923ab4b5/numpy-2.4.1-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:5b55aa56165b17aaf15520beb9cbd33c9039810e0d9643dd4379e44294c7303e", size = 6545212, upload-time = "2026-01-10T06:43:15.661Z" },
- { url = "https://files.pythonhosted.org/packages/8c/a4/77333f4d1e4dac4395385482557aeecf4826e6ff517e32ca48e1dafbe42a/numpy-2.4.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c0faba4a331195bfa96f93dd9dfaa10b2c7aa8cda3a02b7fd635e588fe821bf5", size = 14402871, upload-time = "2026-01-10T06:43:17.324Z" },
- { url = "https://files.pythonhosted.org/packages/ba/87/d341e519956273b39d8d47969dd1eaa1af740615394fe67d06f1efa68773/numpy-2.4.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d3e3087f53e2b4428766b54932644d148613c5a595150533ae7f00dab2f319a8", size = 16359305, upload-time = "2026-01-10T06:43:19.376Z" },
- { url = "https://files.pythonhosted.org/packages/32/91/789132c6666288eaa20ae8066bb99eba1939362e8f1a534949a215246e97/numpy-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:49e792ec351315e16da54b543db06ca8a86985ab682602d90c60ef4ff4db2a9c", size = 16181909, upload-time = "2026-01-10T06:43:21.808Z" },
- { url = "https://files.pythonhosted.org/packages/cf/b8/090b8bd27b82a844bb22ff8fdf7935cb1980b48d6e439ae116f53cdc2143/numpy-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:79e9e06c4c2379db47f3f6fc7a8652e7498251789bf8ff5bd43bf478ef314ca2", size = 18284380, upload-time = "2026-01-10T06:43:23.957Z" },
- { url = "https://files.pythonhosted.org/packages/67/78/722b62bd31842ff029412271556a1a27a98f45359dea78b1548a3a9996aa/numpy-2.4.1-cp313-cp313-win32.whl", hash = "sha256:3d1a100e48cb266090a031397863ff8a30050ceefd798f686ff92c67a486753d", size = 5957089, upload-time = "2026-01-10T06:43:27.535Z" },
- { url = "https://files.pythonhosted.org/packages/da/a6/cf32198b0b6e18d4fbfa9a21a992a7fca535b9bb2b0cdd217d4a3445b5ca/numpy-2.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:92a0e65272fd60bfa0d9278e0484c2f52fe03b97aedc02b357f33fe752c52ffb", size = 12307230, upload-time = "2026-01-10T06:43:29.298Z" },
- { url = "https://files.pythonhosted.org/packages/44/6c/534d692bfb7d0afe30611320c5fb713659dcb5104d7cc182aff2aea092f5/numpy-2.4.1-cp313-cp313-win_arm64.whl", hash = "sha256:20d4649c773f66cc2fc36f663e091f57c3b7655f936a4c681b4250855d1da8f5", size = 10313125, upload-time = "2026-01-10T06:43:31.782Z" },
- { url = "https://files.pythonhosted.org/packages/da/a1/354583ac5c4caa566de6ddfbc42744409b515039e085fab6e0ff942e0df5/numpy-2.4.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:f93bc6892fe7b0663e5ffa83b61aab510aacffd58c16e012bb9352d489d90cb7", size = 12496156, upload-time = "2026-01-10T06:43:34.237Z" },
- { url = "https://files.pythonhosted.org/packages/51/b0/42807c6e8cce58c00127b1dc24d365305189991f2a7917aa694a109c8d7d/numpy-2.4.1-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:178de8f87948163d98a4c9ab5bee4ce6519ca918926ec8df195af582de28544d", size = 5324663, upload-time = "2026-01-10T06:43:36.211Z" },
- { url = "https://files.pythonhosted.org/packages/fe/55/7a621694010d92375ed82f312b2f28017694ed784775269115323e37f5e2/numpy-2.4.1-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:98b35775e03ab7f868908b524fc0a84d38932d8daf7b7e1c3c3a1b6c7a2c9f15", size = 6645224, upload-time = "2026-01-10T06:43:37.884Z" },
- { url = "https://files.pythonhosted.org/packages/50/96/9fa8635ed9d7c847d87e30c834f7109fac5e88549d79ef3324ab5c20919f/numpy-2.4.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:941c2a93313d030f219f3a71fd3d91a728b82979a5e8034eb2e60d394a2b83f9", size = 14462352, upload-time = "2026-01-10T06:43:39.479Z" },
- { url = "https://files.pythonhosted.org/packages/03/d1/8cf62d8bb2062da4fb82dd5d49e47c923f9c0738032f054e0a75342faba7/numpy-2.4.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:529050522e983e00a6c1c6b67411083630de8b57f65e853d7b03d9281b8694d2", size = 16407279, upload-time = "2026-01-10T06:43:41.93Z" },
- { url = "https://files.pythonhosted.org/packages/86/1c/95c86e17c6b0b31ce6ef219da00f71113b220bcb14938c8d9a05cee0ff53/numpy-2.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:2302dc0224c1cbc49bb94f7064f3f923a971bfae45c33870dcbff63a2a550505", size = 16248316, upload-time = "2026-01-10T06:43:44.121Z" },
- { url = "https://files.pythonhosted.org/packages/30/b4/e7f5ff8697274c9d0fa82398b6a372a27e5cef069b37df6355ccb1f1db1a/numpy-2.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:9171a42fcad32dcf3fa86f0a4faa5e9f8facefdb276f54b8b390d90447cff4e2", size = 18329884, upload-time = "2026-01-10T06:43:46.613Z" },
- { url = "https://files.pythonhosted.org/packages/37/a4/b073f3e9d77f9aec8debe8ca7f9f6a09e888ad1ba7488f0c3b36a94c03ac/numpy-2.4.1-cp313-cp313t-win32.whl", hash = "sha256:382ad67d99ef49024f11d1ce5dcb5ad8432446e4246a4b014418ba3a1175a1f4", size = 6081138, upload-time = "2026-01-10T06:43:48.854Z" },
- { url = "https://files.pythonhosted.org/packages/16/16/af42337b53844e67752a092481ab869c0523bc95c4e5c98e4dac4e9581ac/numpy-2.4.1-cp313-cp313t-win_amd64.whl", hash = "sha256:62fea415f83ad8fdb6c20840578e5fbaf5ddd65e0ec6c3c47eda0f69da172510", size = 12447478, upload-time = "2026-01-10T06:43:50.476Z" },
- { url = "https://files.pythonhosted.org/packages/6c/f8/fa85b2eac68ec631d0b631abc448552cb17d39afd17ec53dcbcc3537681a/numpy-2.4.1-cp313-cp313t-win_arm64.whl", hash = "sha256:a7870e8c5fc11aef57d6fea4b4085e537a3a60ad2cdd14322ed531fdca68d261", size = 10382981, upload-time = "2026-01-10T06:43:52.575Z" },
- { url = "https://files.pythonhosted.org/packages/1b/a7/ef08d25698e0e4b4efbad8d55251d20fe2a15f6d9aa7c9b30cd03c165e6f/numpy-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:3869ea1ee1a1edc16c29bbe3a2f2a4e515cc3a44d43903ad41e0cacdbaf733dc", size = 16652046, upload-time = "2026-01-10T06:43:54.797Z" },
- { url = "https://files.pythonhosted.org/packages/8f/39/e378b3e3ca13477e5ac70293ec027c438d1927f18637e396fe90b1addd72/numpy-2.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:e867df947d427cdd7a60e3e271729090b0f0df80f5f10ab7dd436f40811699c3", size = 12378858, upload-time = "2026-01-10T06:43:57.099Z" },
- { url = "https://files.pythonhosted.org/packages/c3/74/7ec6154f0006910ed1fdbb7591cf4432307033102b8a22041599935f8969/numpy-2.4.1-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:e3bd2cb07841166420d2fa7146c96ce00cb3410664cbc1a6be028e456c4ee220", size = 5207417, upload-time = "2026-01-10T06:43:59.037Z" },
- { url = "https://files.pythonhosted.org/packages/f7/b7/053ac11820d84e42f8feea5cb81cc4fcd1091499b45b1ed8c7415b1bf831/numpy-2.4.1-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:f0a90aba7d521e6954670550e561a4cb925713bd944445dbe9e729b71f6cabee", size = 6542643, upload-time = "2026-01-10T06:44:01.852Z" },
- { url = "https://files.pythonhosted.org/packages/c0/c4/2e7908915c0e32ca636b92e4e4a3bdec4cb1e7eb0f8aedf1ed3c68a0d8cd/numpy-2.4.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5d558123217a83b2d1ba316b986e9248a1ed1971ad495963d555ccd75dcb1556", size = 14418963, upload-time = "2026-01-10T06:44:04.047Z" },
- { url = "https://files.pythonhosted.org/packages/eb/c0/3ed5083d94e7ffd7c404e54619c088e11f2e1939a9544f5397f4adb1b8ba/numpy-2.4.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2f44de05659b67d20499cbc96d49f2650769afcb398b79b324bb6e297bfe3844", size = 16363811, upload-time = "2026-01-10T06:44:06.207Z" },
- { url = "https://files.pythonhosted.org/packages/0e/68/42b66f1852bf525050a67315a4fb94586ab7e9eaa541b1bef530fab0c5dd/numpy-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:69e7419c9012c4aaf695109564e3387f1259f001b4326dfa55907b098af082d3", size = 16197643, upload-time = "2026-01-10T06:44:08.33Z" },
- { url = "https://files.pythonhosted.org/packages/d2/40/e8714fc933d85f82c6bfc7b998a0649ad9769a32f3494ba86598aaf18a48/numpy-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2ffd257026eb1b34352e749d7cc1678b5eeec3e329ad8c9965a797e08ccba205", size = 18289601, upload-time = "2026-01-10T06:44:10.841Z" },
- { url = "https://files.pythonhosted.org/packages/80/9a/0d44b468cad50315127e884802351723daca7cf1c98d102929468c81d439/numpy-2.4.1-cp314-cp314-win32.whl", hash = "sha256:727c6c3275ddefa0dc078524a85e064c057b4f4e71ca5ca29a19163c607be745", size = 6005722, upload-time = "2026-01-10T06:44:13.332Z" },
- { url = "https://files.pythonhosted.org/packages/7e/bb/c6513edcce5a831810e2dddc0d3452ce84d208af92405a0c2e58fd8e7881/numpy-2.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:7d5d7999df434a038d75a748275cd6c0094b0ecdb0837342b332a82defc4dc4d", size = 12438590, upload-time = "2026-01-10T06:44:15.006Z" },
- { url = "https://files.pythonhosted.org/packages/e9/da/a598d5cb260780cf4d255102deba35c1d072dc028c4547832f45dd3323a8/numpy-2.4.1-cp314-cp314-win_arm64.whl", hash = "sha256:ce9ce141a505053b3c7bce3216071f3bf5c182b8b28930f14cd24d43932cd2df", size = 10596180, upload-time = "2026-01-10T06:44:17.386Z" },
- { url = "https://files.pythonhosted.org/packages/de/bc/ea3f2c96fcb382311827231f911723aeff596364eb6e1b6d1d91128aa29b/numpy-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:4e53170557d37ae404bf8d542ca5b7c629d6efa1117dac6a83e394142ea0a43f", size = 12498774, upload-time = "2026-01-10T06:44:19.467Z" },
- { url = "https://files.pythonhosted.org/packages/aa/ab/ef9d939fe4a812648c7a712610b2ca6140b0853c5efea361301006c02ae5/numpy-2.4.1-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:a73044b752f5d34d4232f25f18160a1cc418ea4507f5f11e299d8ac36875f8a0", size = 5327274, upload-time = "2026-01-10T06:44:23.189Z" },
- { url = "https://files.pythonhosted.org/packages/bd/31/d381368e2a95c3b08b8cf7faac6004849e960f4a042d920337f71cef0cae/numpy-2.4.1-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:fb1461c99de4d040666ca0444057b06541e5642f800b71c56e6ea92d6a853a0c", size = 6648306, upload-time = "2026-01-10T06:44:25.012Z" },
- { url = "https://files.pythonhosted.org/packages/c8/e5/0989b44ade47430be6323d05c23207636d67d7362a1796ccbccac6773dd2/numpy-2.4.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:423797bdab2eeefbe608d7c1ec7b2b4fd3c58d51460f1ee26c7500a1d9c9ee93", size = 14464653, upload-time = "2026-01-10T06:44:26.706Z" },
- { url = "https://files.pythonhosted.org/packages/10/a7/cfbe475c35371cae1358e61f20c5f075badc18c4797ab4354140e1d283cf/numpy-2.4.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:52b5f61bdb323b566b528899cc7db2ba5d1015bda7ea811a8bcf3c89c331fa42", size = 16405144, upload-time = "2026-01-10T06:44:29.378Z" },
- { url = "https://files.pythonhosted.org/packages/f8/a3/0c63fe66b534888fa5177cc7cef061541064dbe2b4b60dcc60ffaf0d2157/numpy-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:42d7dd5fa36d16d52a84f821eb96031836fd405ee6955dd732f2023724d0aa01", size = 16247425, upload-time = "2026-01-10T06:44:31.721Z" },
- { url = "https://files.pythonhosted.org/packages/6b/2b/55d980cfa2c93bd40ff4c290bf824d792bd41d2fe3487b07707559071760/numpy-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:e7b6b5e28bbd47b7532698e5db2fe1db693d84b58c254e4389d99a27bb9b8f6b", size = 18330053, upload-time = "2026-01-10T06:44:34.617Z" },
- { url = "https://files.pythonhosted.org/packages/23/12/8b5fc6b9c487a09a7957188e0943c9ff08432c65e34567cabc1623b03a51/numpy-2.4.1-cp314-cp314t-win32.whl", hash = "sha256:5de60946f14ebe15e713a6f22850c2372fa72f4ff9a432ab44aa90edcadaa65a", size = 6152482, upload-time = "2026-01-10T06:44:36.798Z" },
- { url = "https://files.pythonhosted.org/packages/00/a5/9f8ca5856b8940492fc24fbe13c1bc34d65ddf4079097cf9e53164d094e1/numpy-2.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:8f085da926c0d491ffff3096f91078cc97ea67e7e6b65e490bc8dcda65663be2", size = 12627117, upload-time = "2026-01-10T06:44:38.828Z" },
- { url = "https://files.pythonhosted.org/packages/ad/0d/eca3d962f9eef265f01a8e0d20085c6dd1f443cbffc11b6dede81fd82356/numpy-2.4.1-cp314-cp314t-win_arm64.whl", hash = "sha256:6436cffb4f2bf26c974344439439c95e152c9a527013f26b3577be6c2ca64295", size = 10667121, upload-time = "2026-01-10T06:44:41.644Z" },
- { url = "https://files.pythonhosted.org/packages/1e/48/d86f97919e79314a1cdee4c832178763e6e98e623e123d0bada19e92c15a/numpy-2.4.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:8ad35f20be147a204e28b6a0575fbf3540c5e5f802634d4258d55b1ff5facce1", size = 16822202, upload-time = "2026-01-10T06:44:43.738Z" },
- { url = "https://files.pythonhosted.org/packages/51/e9/1e62a7f77e0f37dcfb0ad6a9744e65df00242b6ea37dfafb55debcbf5b55/numpy-2.4.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:8097529164c0f3e32bb89412a0905d9100bf434d9692d9fc275e18dcf53c9344", size = 12569985, upload-time = "2026-01-10T06:44:45.945Z" },
- { url = "https://files.pythonhosted.org/packages/c7/7e/914d54f0c801342306fdcdce3e994a56476f1b818c46c47fc21ae968088c/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_arm64.whl", hash = "sha256:ea66d2b41ca4a1630aae5507ee0a71647d3124d1741980138aa8f28f44dac36e", size = 5398484, upload-time = "2026-01-10T06:44:48.012Z" },
- { url = "https://files.pythonhosted.org/packages/1c/d8/9570b68584e293a33474e7b5a77ca404f1dcc655e40050a600dee81d27fb/numpy-2.4.1-pp311-pypy311_pp73-macosx_14_0_x86_64.whl", hash = "sha256:d3f8f0df9f4b8be57b3bf74a1d087fec68f927a2fab68231fdb442bf2c12e426", size = 6713216, upload-time = "2026-01-10T06:44:49.725Z" },
- { url = "https://files.pythonhosted.org/packages/33/9b/9dd6e2db8d49eb24f86acaaa5258e5f4c8ed38209a4ee9de2d1a0ca25045/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2023ef86243690c2791fd6353e5b4848eedaa88ca8a2d129f462049f6d484696", size = 14538937, upload-time = "2026-01-10T06:44:51.498Z" },
- { url = "https://files.pythonhosted.org/packages/53/87/d5bd995b0f798a37105b876350d346eea5838bd8f77ea3d7a48392f3812b/numpy-2.4.1-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8361ea4220d763e54cff2fbe7d8c93526b744f7cd9ddab47afeff7e14e8503be", size = 16479830, upload-time = "2026-01-10T06:44:53.931Z" },
- { url = "https://files.pythonhosted.org/packages/5b/c7/b801bf98514b6ae6475e941ac05c58e6411dd863ea92916bfd6d510b08c1/numpy-2.4.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:4f1b68ff47680c2925f8063402a693ede215f0257f02596b1318ecdfb1d79e33", size = 12492579, upload-time = "2026-01-10T06:44:57.094Z" },
-]
-
-[[package]]
-name = "nvidia-cublas-cu12"
-version = "12.8.4.1"
-source = { registry = "https://pypi.org/simple" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/dc/61/e24b560ab2e2eaeb3c839129175fb330dfcfc29e5203196e5541a4c44682/nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:8ac4e771d5a348c551b2a426eda6193c19aa630236b418086020df5ba9667142", size = 594346921, upload-time = "2025-03-07T01:44:31.254Z" },
-]
-
-[[package]]
-name = "nvidia-cuda-cupti-cu12"
-version = "12.8.90"
-source = { registry = "https://pypi.org/simple" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/f8/02/2adcaa145158bf1a8295d83591d22e4103dbfd821bcaf6f3f53151ca4ffa/nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ea0cb07ebda26bb9b29ba82cda34849e73c166c18162d3913575b0c9db9a6182", size = 10248621, upload-time = "2025-03-07T01:40:21.213Z" },
-]
-
-[[package]]
-name = "nvidia-cuda-nvrtc-cu12"
-version = "12.8.93"
-source = { registry = "https://pypi.org/simple" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/05/6b/32f747947df2da6994e999492ab306a903659555dddc0fbdeb9d71f75e52/nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:a7756528852ef889772a84c6cd89d41dfa74667e24cca16bb31f8f061e3e9994", size = 88040029, upload-time = "2025-03-07T01:42:13.562Z" },
-]
-
-[[package]]
-name = "nvidia-cuda-runtime-cu12"
-version = "12.8.90"
-source = { registry = "https://pypi.org/simple" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/0d/9b/a997b638fcd068ad6e4d53b8551a7d30fe8b404d6f1804abf1df69838932/nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:adade8dcbd0edf427b7204d480d6066d33902cab2a4707dcfc48a2d0fd44ab90", size = 954765, upload-time = "2025-03-07T01:40:01.615Z" },
-]
-
-[[package]]
-name = "nvidia-cudnn-cu12"
-version = "9.10.2.21"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "nvidia-cublas-cu12" },
-]
-wheels = [
- { url = "https://files.pythonhosted.org/packages/ba/51/e123d997aa098c61d029f76663dedbfb9bc8dcf8c60cbd6adbe42f76d049/nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:949452be657fa16687d0930933f032835951ef0892b37d2d53824d1a84dc97a8", size = 706758467, upload-time = "2025-06-06T21:54:08.597Z" },
-]
-
-[[package]]
-name = "nvidia-cufft-cu12"
-version = "11.3.3.83"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "nvidia-nvjitlink-cu12" },
-]
-wheels = [
- { url = "https://files.pythonhosted.org/packages/1f/13/ee4e00f30e676b66ae65b4f08cb5bcbb8392c03f54f2d5413ea99a5d1c80/nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4d2dd21ec0b88cf61b62e6b43564355e5222e4a3fb394cac0db101f2dd0d4f74", size = 193118695, upload-time = "2025-03-07T01:45:27.821Z" },
-]
-
-[[package]]
-name = "nvidia-cufile-cu12"
-version = "1.13.1.3"
-source = { registry = "https://pypi.org/simple" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/bb/fe/1bcba1dfbfb8d01be8d93f07bfc502c93fa23afa6fd5ab3fc7c1df71038a/nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1d069003be650e131b21c932ec3d8969c1715379251f8d23a1860554b1cb24fc", size = 1197834, upload-time = "2025-03-07T01:45:50.723Z" },
-]
-
-[[package]]
-name = "nvidia-curand-cu12"
-version = "10.3.9.90"
-source = { registry = "https://pypi.org/simple" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/fb/aa/6584b56dc84ebe9cf93226a5cde4d99080c8e90ab40f0c27bda7a0f29aa1/nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:b32331d4f4df5d6eefa0554c565b626c7216f87a06a4f56fab27c3b68a830ec9", size = 63619976, upload-time = "2025-03-07T01:46:23.323Z" },
-]
-
-[[package]]
-name = "nvidia-cusolver-cu12"
-version = "11.7.3.90"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "nvidia-cublas-cu12" },
- { name = "nvidia-cusparse-cu12" },
- { name = "nvidia-nvjitlink-cu12" },
-]
-wheels = [
- { url = "https://files.pythonhosted.org/packages/85/48/9a13d2975803e8cf2777d5ed57b87a0b6ca2cc795f9a4f59796a910bfb80/nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:4376c11ad263152bd50ea295c05370360776f8c3427b30991df774f9fb26c450", size = 267506905, upload-time = "2025-03-07T01:47:16.273Z" },
-]
-
-[[package]]
-name = "nvidia-cusparse-cu12"
-version = "12.5.8.93"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "nvidia-nvjitlink-cu12" },
-]
-wheels = [
- { url = "https://files.pythonhosted.org/packages/c2/f5/e1854cb2f2bcd4280c44736c93550cc300ff4b8c95ebe370d0aa7d2b473d/nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1ec05d76bbbd8b61b06a80e1eaf8cf4959c3d4ce8e711b65ebd0443bb0ebb13b", size = 288216466, upload-time = "2025-03-07T01:48:13.779Z" },
-]
-
-[[package]]
-name = "nvidia-cusparselt-cu12"
-version = "0.7.1"
-source = { registry = "https://pypi.org/simple" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/56/79/12978b96bd44274fe38b5dde5cfb660b1d114f70a65ef962bcbbed99b549/nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:f1bb701d6b930d5a7cea44c19ceb973311500847f81b634d802b7b539dc55623", size = 287193691, upload-time = "2025-02-26T00:15:44.104Z" },
-]
-
-[[package]]
-name = "nvidia-nccl-cu12"
-version = "2.27.5"
-source = { registry = "https://pypi.org/simple" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/6e/89/f7a07dc961b60645dbbf42e80f2bc85ade7feb9a491b11a1e973aa00071f/nvidia_nccl_cu12-2.27.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ad730cf15cb5d25fe849c6e6ca9eb5b76db16a80f13f425ac68d8e2e55624457", size = 322348229, upload-time = "2025-06-26T04:11:28.385Z" },
-]
-
-[[package]]
-name = "nvidia-nvjitlink-cu12"
-version = "12.8.93"
-source = { registry = "https://pypi.org/simple" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/f6/74/86a07f1d0f42998ca31312f998bd3b9a7eff7f52378f4f270c8679c77fb9/nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:81ff63371a7ebd6e6451970684f916be2eab07321b73c9d244dc2b4da7f73b88", size = 39254836, upload-time = "2025-03-07T01:49:55.661Z" },
-]
-
-[[package]]
-name = "nvidia-nvshmem-cu12"
-version = "3.3.20"
-source = { registry = "https://pypi.org/simple" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/3b/6c/99acb2f9eb85c29fc6f3a7ac4dccfd992e22666dd08a642b303311326a97/nvidia_nvshmem_cu12-3.3.20-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d00f26d3f9b2e3c3065be895e3059d6479ea5c638a3f38c9fec49b1b9dd7c1e5", size = 124657145, upload-time = "2025-08-04T20:25:19.995Z" },
-]
-
-[[package]]
-name = "nvidia-nvtx-cu12"
-version = "12.8.90"
-source = { registry = "https://pypi.org/simple" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/a2/eb/86626c1bbc2edb86323022371c39aa48df6fd8b0a1647bc274577f72e90b/nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5b17e2001cc0d751a5bc2c6ec6d26ad95913324a4adb86788c944f8ce9ba441f", size = 89954, upload-time = "2025-03-07T01:42:44.131Z" },
-]
-
-[[package]]
-name = "openai"
-version = "2.15.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "anyio" },
- { name = "distro" },
- { name = "httpx" },
- { name = "jiter" },
- { name = "pydantic" },
- { name = "sniffio" },
- { name = "tqdm" },
- { name = "typing-extensions" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/94/f4/4690ecb5d70023ce6bfcfeabfe717020f654bde59a775058ec6ac4692463/openai-2.15.0.tar.gz", hash = "sha256:42eb8cbb407d84770633f31bf727d4ffb4138711c670565a41663d9439174fba", size = 627383, upload-time = "2026-01-09T22:10:08.603Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/b5/df/c306f7375d42bafb379934c2df4c2fa3964656c8c782bac75ee10c102818/openai-2.15.0-py3-none-any.whl", hash = "sha256:6ae23b932cd7230f7244e52954daa6602716d6b9bf235401a107af731baea6c3", size = 1067879, upload-time = "2026-01-09T22:10:06.446Z" },
-]
-
-[[package]]
-name = "opencv-python"
-version = "4.13.0.90"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
-]
-wheels = [
- { url = "https://files.pythonhosted.org/packages/77/d7/133d5756aef78090f4d8dd4895793aed24942dec6064a15375cfac9175fc/opencv_python-4.13.0.90-cp37-abi3-macosx_13_0_arm64.whl", hash = "sha256:58803f8b05b51d8a785e2306d83b44173b32536f980342f3bc76d8c122b5938d", size = 46020278, upload-time = "2026-01-18T08:57:42.539Z" },
- { url = "https://files.pythonhosted.org/packages/7b/65/3b8cdbe13fa2436695d00e1d8c1ddf5edb4050a93436f34ed867233d1960/opencv_python-4.13.0.90-cp37-abi3-macosx_14_0_x86_64.whl", hash = "sha256:a5354e8b161409fce7710ba4c1cfe88b7bb460d97f705dc4e714a1636616f87d", size = 32568376, upload-time = "2026-01-18T08:58:47.19Z" },
- { url = "https://files.pythonhosted.org/packages/34/ff/e4d7c165e678563f49505d3d2811fcc16011e929cd00bc4b0070c7ee82b0/opencv_python-4.13.0.90-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d557cbf0c7818081c9acf56585b68e781af4f00638971f75eaa3de70904a6314", size = 47685110, upload-time = "2026-01-18T08:59:58.045Z" },
- { url = "https://files.pythonhosted.org/packages/cf/02/d9b73dbce28712204e85ae4c1e179505e9a771f95b33743a97e170caedde/opencv_python-4.13.0.90-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9911581e37b24169e4842069ff01d6645ea2bc4af7e10a022d9ebe340fd035ec", size = 70460479, upload-time = "2026-01-18T09:01:16.377Z" },
- { url = "https://files.pythonhosted.org/packages/fc/1c/87fa71968beb71481ed359e21772061ceff7c9b45a61b3e7daa71e5b0b66/opencv_python-4.13.0.90-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:1150b8f1947761b848bbfa9c96ceba8877743ffef157c08a04af6f7717ddd709", size = 46707819, upload-time = "2026-01-18T09:02:48.049Z" },
- { url = "https://files.pythonhosted.org/packages/af/16/915a94e5b537c328fa3e96b769c7d4eed3b67d1be978e0af658a3d3faed8/opencv_python-4.13.0.90-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:d6716f16149b04eea52f953b8ca983d60dd9cd4872c1fd5113f6e2fcebb90e93", size = 72926629, upload-time = "2026-01-18T09:04:29.23Z" },
- { url = "https://files.pythonhosted.org/packages/bf/84/9c63c84be013943dd4c5fff36157f1ec0ec894b69a2fc3026fd4e3c9280a/opencv_python-4.13.0.90-cp37-abi3-win32.whl", hash = "sha256:458a00f2ba47a877eca385be3e7bcc45e6d30a4361d107ce73c1800f516dab09", size = 30932151, upload-time = "2026-01-18T09:05:22.181Z" },
- { url = "https://files.pythonhosted.org/packages/13/de/291cbb17f44242ed6bfd3450fc2535d6bd298115c0ccd6f01cd51d4a11d7/opencv_python-4.13.0.90-cp37-abi3-win_amd64.whl", hash = "sha256:526bde4c33a86808a751e2bb57bf4921beb49794621810971926c472897f6433", size = 40211706, upload-time = "2026-01-18T09:06:06.749Z" },
-]
-
-[[package]]
-name = "openimageio"
-version = "3.1.11.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/f6/bd/d49fe9f78b244251301da7b4caff7053b151df55ce0e04829004ac9f65ba/openimageio-3.1.11.0.tar.gz", hash = "sha256:7c096607569b0d01266da739bbf7496f1c0a8fb4449092f8f66fde2bf3a20494", size = 6555440, upload-time = "2026-03-01T03:09:00.936Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/b9/cc/eb7725c3ca6c76fd5defe92b2d558773b1a7a89a69c483bb33d791b0a723/openimageio-3.1.11.0-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:ef9377cdd84d67c415e6fc67f75553cacad36976cfd3f5ae1f0b2b5a6c46a7ef", size = 6851102, upload-time = "2026-03-01T03:08:18.322Z" },
- { url = "https://files.pythonhosted.org/packages/2a/54/ffc2d3b70dee7690dae808cfa8787cfa1f109fc7b4cd68632cade9fab5f3/openimageio-3.1.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0c497762ec7993c9af51079edd723ca0a37faa085c6115b8e69f151460a60927", size = 6465995, upload-time = "2026-03-01T03:08:19.907Z" },
- { url = "https://files.pythonhosted.org/packages/7f/7c/e2f32ee394db041af8477d984aef2c04067713e916830fb113ade2dd3426/openimageio-3.1.11.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1cfc57d9e790e76e76498b0e5c5a0bed83ae1be6104c635eca114265eefff34c", size = 6501598, upload-time = "2026-03-01T03:08:21.486Z" },
- { url = "https://files.pythonhosted.org/packages/e1/4d/fa9d641d424d7e16a44a502c440165687adad13ca005507dbf29d8b7febf/openimageio-3.1.11.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f01e9e115b1832bd27bb6a62e29bf435cb27f3f41b589ac7d2838bdda530f15", size = 6789743, upload-time = "2026-03-01T03:08:22.714Z" },
- { url = "https://files.pythonhosted.org/packages/34/0a/cbde5147af9db425a5c692147da45f849d1203304f195bcae71875b43afb/openimageio-3.1.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:4b57b599294afac5f21885949014ca1469866c3b648375b834d19723c67dc52c", size = 7459665, upload-time = "2026-03-01T03:08:24.267Z" },
- { url = "https://files.pythonhosted.org/packages/0e/9d/6d67fb8358faeb7f6b195ea35483ffa58d9fd45806dbedea471c79ae8050/openimageio-3.1.11.0-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:d02021c7a4baf0418cde43ebddd0103886cc809c8e85c9c8cd4a1cbe69879c5a", size = 6852201, upload-time = "2026-03-01T03:08:25.864Z" },
- { url = "https://files.pythonhosted.org/packages/ec/c2/1412eb64ea7a7156ebe335a03118e8d2dc116e63e354d44fceb475b520cc/openimageio-3.1.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:daa4396f8094ed94c9b963711b2a680dc8f34c5361be5bc06804b0fc94cb4f4b", size = 6466903, upload-time = "2026-03-01T03:08:27.124Z" },
- { url = "https://files.pythonhosted.org/packages/75/20/16e4d4a310628d0960588f919a7fc85dd94be4eb37a043f5cacfb9e024fc/openimageio-3.1.11.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f457ca10c45d4e03dd4d3af13456962bee2ee6abee91bf40a8d21ffa7da1f74", size = 6502239, upload-time = "2026-03-01T03:08:28.637Z" },
- { url = "https://files.pythonhosted.org/packages/9c/6f/70f75c4fbc958e9f4f829aeb8d88558591cdcdb6dd36e97d8ee6f50c4011/openimageio-3.1.11.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11655436841f11d268049f5494c6621dfd6370c104b4aa8c20f0724271850796", size = 6790238, upload-time = "2026-03-01T03:08:30.083Z" },
- { url = "https://files.pythonhosted.org/packages/3b/1e/f85f0393237dbbcec0559c357795462e43eb2fead40d2954a99ebf24c310/openimageio-3.1.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:58eacdc68992c49257be43a30ac424fd6cf617b9de1e516debc14c0bd93af075", size = 7460293, upload-time = "2026-03-01T03:08:31.646Z" },
- { url = "https://files.pythonhosted.org/packages/cf/2c/24036c501b24f0d4136d9c4605a8861f5affc87df23fa78c279e0a9216c0/openimageio-3.1.11.0-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:53337dd2e11f7f0a07fbe664d21c0d578a0674695da1e5f327764a3f421aff83", size = 6942447, upload-time = "2026-03-01T03:08:33.179Z" },
- { url = "https://files.pythonhosted.org/packages/69/ca/d84f062cbceb35a8006a9a3393da1893e23ffd8147c53d5f461fa99898cc/openimageio-3.1.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d50f1d8159177561c6d5efcc0f2d7f9fd5393cc147a39b546849da8762bb4f8", size = 6540326, upload-time = "2026-03-01T03:08:34.542Z" },
- { url = "https://files.pythonhosted.org/packages/6c/f8/ca6f4ca3d5dc2b2cc1411a1083b926d5fc9eb22e57d352333027b3eb4659/openimageio-3.1.11.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:212dd58364f8e11c0fbd90f82bbaf617afc68b4f3910538d0ac2324ef60a4c28", size = 6503147, upload-time = "2026-03-01T03:08:35.87Z" },
- { url = "https://files.pythonhosted.org/packages/81/9c/5ea545f62790bc4f8b9c04d433963f9fe5f08548c8663e89a54f1db7002d/openimageio-3.1.11.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f845304bb17a1fd48f19c972572eb03ee3f96336f2d5599d043cb7ac1c348035", size = 6791359, upload-time = "2026-03-01T03:08:37.412Z" },
- { url = "https://files.pythonhosted.org/packages/9b/ba/c64923d962dd6c2dd0421feaa6000b081bcf1e26e07a125da94488f9cd39/openimageio-3.1.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:30284fb3367e480eaa345b122ccf38df61bd3885c78b237942a585cefaf0538a", size = 7466181, upload-time = "2026-03-01T03:08:38.931Z" },
- { url = "https://files.pythonhosted.org/packages/00/81/76375647018dce289e13f8a75c42cddbd9c688baa50d1dc99f73457508f0/openimageio-3.1.11.0-cp313-cp313-macosx_10_15_x86_64.whl", hash = "sha256:35ac810ccf3aa8a4cdc1fb19289dab57e20a9d915a78041a6fa2052d3b7a8c3c", size = 6942555, upload-time = "2026-03-01T03:08:40.539Z" },
- { url = "https://files.pythonhosted.org/packages/6b/a1/b1a861bc03462bc5ac6e6a9eac3e4f9e28302f0cc14748e0cd3f1f1efadd/openimageio-3.1.11.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d294f1d631baea51cf9d940ee770f789946dcfae187cf78a5b440a3cc88c4c7", size = 6540381, upload-time = "2026-03-01T03:08:41.796Z" },
- { url = "https://files.pythonhosted.org/packages/c2/5a/79ceb6c7cf57fdce947e9b341c5de1fbf6e219a0db5ce990e69431c54f90/openimageio-3.1.11.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:78cffd41f1d0e575c56aa5e601a0f3c98347cb9a20d3ca6210b4ef881cef256c", size = 6503197, upload-time = "2026-03-01T03:08:43.23Z" },
- { url = "https://files.pythonhosted.org/packages/e1/49/6593704b762dfe1296229323219e216fda029c6153622a57f1e865f82160/openimageio-3.1.11.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:020e7b5a0d2898dca1c66c7c6f800aa2c307a509ffd3dbed2898562445b5f6bd", size = 6791511, upload-time = "2026-03-01T03:08:44.544Z" },
- { url = "https://files.pythonhosted.org/packages/60/c2/43c1eeb5dcc7620a212c1705dc03547d20c917f3761fd6a2bde3fa3b9fb1/openimageio-3.1.11.0-cp313-cp313-win_amd64.whl", hash = "sha256:cb331042a297bd3de87b4eed5efed4c337e1446aaed3807ac4899c129e33d61a", size = 7466220, upload-time = "2026-03-01T03:08:45.78Z" },
- { url = "https://files.pythonhosted.org/packages/2e/b9/6b09045f1a92cd38a59fd3c03dd59374f27c03270943ebd5844247633c70/openimageio-3.1.11.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:f7c9b14c3981cd992b33f8a47735ce099687cddc9d05ffdd03b87490c0bcdd47", size = 6940155, upload-time = "2026-03-01T03:08:47.09Z" },
- { url = "https://files.pythonhosted.org/packages/13/d8/f10343f5ddf6bc9003f8e9c1eae3b2d4b5cfed01fccde6fffe5a7cafce33/openimageio-3.1.11.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4f5e106054c01c5a768c6442b712493bfe21526dd4e202e3c18245a0224e6d53", size = 6536784, upload-time = "2026-03-01T03:08:48.364Z" },
- { url = "https://files.pythonhosted.org/packages/4b/6f/4709da066a4dafef14b5bb0e7e221fa9d65e196806ce22721862627ab37c/openimageio-3.1.11.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4c2affc140802fdc42b2f01aeebedfdd64ff29891fdc2e2c708d4653852eff2b", size = 6503379, upload-time = "2026-03-01T03:08:49.947Z" },
- { url = "https://files.pythonhosted.org/packages/0d/5b/de755dfb3a8837592263511fc14966901d1b8d880eeb3cde9d65b8f02e81/openimageio-3.1.11.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ee25034ceff73b8f08ae4b562a5a62cfcdaa0e873ce913c5df72d9dc2a0d56c7", size = 6791460, upload-time = "2026-03-01T03:08:51.483Z" },
- { url = "https://files.pythonhosted.org/packages/20/fb/159531b67af2ddca76dc1bbfcc31e4b94a8d91215ae0fa168e0243327b3b/openimageio-3.1.11.0-cp314-cp314-win_amd64.whl", hash = "sha256:1945317959ac1905e97c8d9479efc716bb765dec82a647365d37e046e154a46c", size = 7767018, upload-time = "2026-03-01T03:08:52.707Z" },
-]
-
-[[package]]
-name = "optimum-quanto"
-version = "0.2.7"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "huggingface-hub" },
- { name = "ninja" },
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "safetensors" },
- { name = "torch", version = "2.9.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
- { name = "torch", version = "2.12.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/3e/df/03ae85090b33d81f06b4dd7a43b16cef6ee5f1d36d8fdcce864964895c70/optimum_quanto-0.2.7.tar.gz", hash = "sha256:91b5c2dc8a9100297dc7924a93747fb77ab010784b5e1f6d0208976ba054dade", size = 361601, upload-time = "2025-03-06T08:07:51.578Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/8d/33/4ad914b0ae7e46296fe00d76d084be351fef69816b3498ed32a178471c8a/optimum_quanto-0.2.7-py3-none-any.whl", hash = "sha256:1369b1d9a4a197f88c0d1c67e8d950694e5b86ce4c9f3878e178d5be35339f61", size = 165285, upload-time = "2025-03-06T08:07:32.913Z" },
-]
-
-[[package]]
-name = "packaging"
-version = "25.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" },
-]
-
-[[package]]
-name = "pandas"
-version = "2.3.3"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "python-dateutil" },
- { name = "pytz" },
- { name = "tzdata" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz", hash = "sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b", size = 4495223, upload-time = "2025-09-29T23:34:51.853Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c", size = 11555763, upload-time = "2025-09-29T23:16:53.287Z" },
- { url = "https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a", size = 10801217, upload-time = "2025-09-29T23:17:04.522Z" },
- { url = "https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1", size = 12148791, upload-time = "2025-09-29T23:17:18.444Z" },
- { url = "https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838", size = 12769373, upload-time = "2025-09-29T23:17:35.846Z" },
- { url = "https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250", size = 13200444, upload-time = "2025-09-29T23:17:49.341Z" },
- { url = "https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4", size = 13858459, upload-time = "2025-09-29T23:18:03.722Z" },
- { url = "https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl", hash = "sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826", size = 11346086, upload-time = "2025-09-29T23:18:18.505Z" },
- { url = "https://files.pythonhosted.org/packages/c1/fa/7ac648108144a095b4fb6aa3de1954689f7af60a14cf25583f4960ecb878/pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523", size = 11578790, upload-time = "2025-09-29T23:18:30.065Z" },
- { url = "https://files.pythonhosted.org/packages/9b/35/74442388c6cf008882d4d4bdfc4109be87e9b8b7ccd097ad1e7f006e2e95/pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45", size = 10833831, upload-time = "2025-09-29T23:38:56.071Z" },
- { url = "https://files.pythonhosted.org/packages/fe/e4/de154cbfeee13383ad58d23017da99390b91d73f8c11856f2095e813201b/pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66", size = 12199267, upload-time = "2025-09-29T23:18:41.627Z" },
- { url = "https://files.pythonhosted.org/packages/bf/c9/63f8d545568d9ab91476b1818b4741f521646cbdd151c6efebf40d6de6f7/pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b", size = 12789281, upload-time = "2025-09-29T23:18:56.834Z" },
- { url = "https://files.pythonhosted.org/packages/f2/00/a5ac8c7a0e67fd1a6059e40aa08fa1c52cc00709077d2300e210c3ce0322/pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791", size = 13240453, upload-time = "2025-09-29T23:19:09.247Z" },
- { url = "https://files.pythonhosted.org/packages/27/4d/5c23a5bc7bd209231618dd9e606ce076272c9bc4f12023a70e03a86b4067/pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151", size = 13890361, upload-time = "2025-09-29T23:19:25.342Z" },
- { url = "https://files.pythonhosted.org/packages/8e/59/712db1d7040520de7a4965df15b774348980e6df45c129b8c64d0dbe74ef/pandas-2.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c", size = 11348702, upload-time = "2025-09-29T23:19:38.296Z" },
- { url = "https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53", size = 11597846, upload-time = "2025-09-29T23:19:48.856Z" },
- { url = "https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35", size = 10729618, upload-time = "2025-09-29T23:39:08.659Z" },
- { url = "https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908", size = 11737212, upload-time = "2025-09-29T23:19:59.765Z" },
- { url = "https://files.pythonhosted.org/packages/e5/63/cd7d615331b328e287d8233ba9fdf191a9c2d11b6af0c7a59cfcec23de68/pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89", size = 12362693, upload-time = "2025-09-29T23:20:14.098Z" },
- { url = "https://files.pythonhosted.org/packages/a6/de/8b1895b107277d52f2b42d3a6806e69cfef0d5cf1d0ba343470b9d8e0a04/pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98", size = 12771002, upload-time = "2025-09-29T23:20:26.76Z" },
- { url = "https://files.pythonhosted.org/packages/87/21/84072af3187a677c5893b170ba2c8fbe450a6ff911234916da889b698220/pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084", size = 13450971, upload-time = "2025-09-29T23:20:41.344Z" },
- { url = "https://files.pythonhosted.org/packages/86/41/585a168330ff063014880a80d744219dbf1dd7a1c706e75ab3425a987384/pandas-2.3.3-cp312-cp312-win_amd64.whl", hash = "sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b", size = 10992722, upload-time = "2025-09-29T23:20:54.139Z" },
- { url = "https://files.pythonhosted.org/packages/cd/4b/18b035ee18f97c1040d94debd8f2e737000ad70ccc8f5513f4eefad75f4b/pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713", size = 11544671, upload-time = "2025-09-29T23:21:05.024Z" },
- { url = "https://files.pythonhosted.org/packages/31/94/72fac03573102779920099bcac1c3b05975c2cb5f01eac609faf34bed1ca/pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8", size = 10680807, upload-time = "2025-09-29T23:21:15.979Z" },
- { url = "https://files.pythonhosted.org/packages/16/87/9472cf4a487d848476865321de18cc8c920b8cab98453ab79dbbc98db63a/pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d", size = 11709872, upload-time = "2025-09-29T23:21:27.165Z" },
- { url = "https://files.pythonhosted.org/packages/15/07/284f757f63f8a8d69ed4472bfd85122bd086e637bf4ed09de572d575a693/pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac", size = 12306371, upload-time = "2025-09-29T23:21:40.532Z" },
- { url = "https://files.pythonhosted.org/packages/33/81/a3afc88fca4aa925804a27d2676d22dcd2031c2ebe08aabd0ae55b9ff282/pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c", size = 12765333, upload-time = "2025-09-29T23:21:55.77Z" },
- { url = "https://files.pythonhosted.org/packages/8d/0f/b4d4ae743a83742f1153464cf1a8ecfafc3ac59722a0b5c8602310cb7158/pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493", size = 13418120, upload-time = "2025-09-29T23:22:10.109Z" },
- { url = "https://files.pythonhosted.org/packages/4f/c7/e54682c96a895d0c808453269e0b5928a07a127a15704fedb643e9b0a4c8/pandas-2.3.3-cp313-cp313-win_amd64.whl", hash = "sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee", size = 10993991, upload-time = "2025-09-29T23:25:04.889Z" },
- { url = "https://files.pythonhosted.org/packages/f9/ca/3f8d4f49740799189e1395812f3bf23b5e8fc7c190827d55a610da72ce55/pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5", size = 12048227, upload-time = "2025-09-29T23:22:24.343Z" },
- { url = "https://files.pythonhosted.org/packages/0e/5a/f43efec3e8c0cc92c4663ccad372dbdff72b60bdb56b2749f04aa1d07d7e/pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21", size = 11411056, upload-time = "2025-09-29T23:22:37.762Z" },
- { url = "https://files.pythonhosted.org/packages/46/b1/85331edfc591208c9d1a63a06baa67b21d332e63b7a591a5ba42a10bb507/pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78", size = 11645189, upload-time = "2025-09-29T23:22:51.688Z" },
- { url = "https://files.pythonhosted.org/packages/44/23/78d645adc35d94d1ac4f2a3c4112ab6f5b8999f4898b8cdf01252f8df4a9/pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110", size = 12121912, upload-time = "2025-09-29T23:23:05.042Z" },
- { url = "https://files.pythonhosted.org/packages/53/da/d10013df5e6aaef6b425aa0c32e1fc1f3e431e4bcabd420517dceadce354/pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86", size = 12712160, upload-time = "2025-09-29T23:23:28.57Z" },
- { url = "https://files.pythonhosted.org/packages/bd/17/e756653095a083d8a37cbd816cb87148debcfcd920129b25f99dd8d04271/pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc", size = 13199233, upload-time = "2025-09-29T23:24:24.876Z" },
- { url = "https://files.pythonhosted.org/packages/04/fd/74903979833db8390b73b3a8a7d30d146d710bd32703724dd9083950386f/pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0", size = 11540635, upload-time = "2025-09-29T23:25:52.486Z" },
- { url = "https://files.pythonhosted.org/packages/21/00/266d6b357ad5e6d3ad55093a7e8efc7dd245f5a842b584db9f30b0f0a287/pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593", size = 10759079, upload-time = "2025-09-29T23:26:33.204Z" },
- { url = "https://files.pythonhosted.org/packages/ca/05/d01ef80a7a3a12b2f8bbf16daba1e17c98a2f039cbc8e2f77a2c5a63d382/pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c", size = 11814049, upload-time = "2025-09-29T23:27:15.384Z" },
- { url = "https://files.pythonhosted.org/packages/15/b2/0e62f78c0c5ba7e3d2c5945a82456f4fac76c480940f805e0b97fcbc2f65/pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b", size = 12332638, upload-time = "2025-09-29T23:27:51.625Z" },
- { url = "https://files.pythonhosted.org/packages/c5/33/dd70400631b62b9b29c3c93d2feee1d0964dc2bae2e5ad7a6c73a7f25325/pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6", size = 12886834, upload-time = "2025-09-29T23:28:21.289Z" },
- { url = "https://files.pythonhosted.org/packages/d3/18/b5d48f55821228d0d2692b34fd5034bb185e854bdb592e9c640f6290e012/pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3", size = 13409925, upload-time = "2025-09-29T23:28:58.261Z" },
- { url = "https://files.pythonhosted.org/packages/a6/3d/124ac75fcd0ecc09b8fdccb0246ef65e35b012030defb0e0eba2cbbbe948/pandas-2.3.3-cp314-cp314-win_amd64.whl", hash = "sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5", size = 11109071, upload-time = "2025-09-29T23:32:27.484Z" },
- { url = "https://files.pythonhosted.org/packages/89/9c/0e21c895c38a157e0faa1fb64587a9226d6dd46452cac4532d80c3c4a244/pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec", size = 12048504, upload-time = "2025-09-29T23:29:31.47Z" },
- { url = "https://files.pythonhosted.org/packages/d7/82/b69a1c95df796858777b68fbe6a81d37443a33319761d7c652ce77797475/pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7", size = 11410702, upload-time = "2025-09-29T23:29:54.591Z" },
- { url = "https://files.pythonhosted.org/packages/f9/88/702bde3ba0a94b8c73a0181e05144b10f13f29ebfc2150c3a79062a8195d/pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450", size = 11634535, upload-time = "2025-09-29T23:30:21.003Z" },
- { url = "https://files.pythonhosted.org/packages/a4/1e/1bac1a839d12e6a82ec6cb40cda2edde64a2013a66963293696bbf31fbbb/pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5", size = 12121582, upload-time = "2025-09-29T23:30:43.391Z" },
- { url = "https://files.pythonhosted.org/packages/44/91/483de934193e12a3b1d6ae7c8645d083ff88dec75f46e827562f1e4b4da6/pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788", size = 12699963, upload-time = "2025-09-29T23:31:10.009Z" },
- { url = "https://files.pythonhosted.org/packages/70/44/5191d2e4026f86a2a109053e194d3ba7a31a2d10a9c2348368c63ed4e85a/pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87", size = 13202175, upload-time = "2025-09-29T23:31:59.173Z" },
-]
-
-[[package]]
-name = "peft"
-version = "0.18.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "accelerate" },
- { name = "huggingface-hub" },
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "packaging" },
- { name = "psutil" },
- { name = "pyyaml" },
- { name = "safetensors" },
- { name = "torch", version = "2.9.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
- { name = "torch", version = "2.12.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
- { name = "tqdm" },
- { name = "transformers" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/d8/48/147b3ea999560b40a34fd78724c7777aa9d18409c2250bdcaf9c4f2db7fc/peft-0.18.1.tar.gz", hash = "sha256:2dd0d6bfce936d1850e48aaddbd250941c5c02fc8ef3237cd8fd5aac35e0bae2", size = 635030, upload-time = "2026-01-09T13:08:01.136Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/b3/14/b4e3f574acf349ae6f61f9c000a77f97a3b315b4bb6ad03791e79ae4a568/peft-0.18.1-py3-none-any.whl", hash = "sha256:0bf06847a3551e3019fc58c440cffc9a6b73e6e2962c95b52e224f77bbdb50f1", size = 556960, upload-time = "2026-01-09T13:07:55.865Z" },
-]
-
-[[package]]
-name = "pillow"
-version = "12.1.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/d0/02/d52c733a2452ef1ffcc123b68e6606d07276b0e358db70eabad7e40042b7/pillow-12.1.0.tar.gz", hash = "sha256:5c5ae0a06e9ea030ab786b0251b32c7e4ce10e58d983c0d5c56029455180b5b9", size = 46977283, upload-time = "2026-01-02T09:13:29.892Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/fe/41/f73d92b6b883a579e79600d391f2e21cb0df767b2714ecbd2952315dfeef/pillow-12.1.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:fb125d860738a09d363a88daa0f59c4533529a90e564785e20fe875b200b6dbd", size = 5304089, upload-time = "2026-01-02T09:10:24.953Z" },
- { url = "https://files.pythonhosted.org/packages/94/55/7aca2891560188656e4a91ed9adba305e914a4496800da6b5c0a15f09edf/pillow-12.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cad302dc10fac357d3467a74a9561c90609768a6f73a1923b0fd851b6486f8b0", size = 4657815, upload-time = "2026-01-02T09:10:27.063Z" },
- { url = "https://files.pythonhosted.org/packages/e9/d2/b28221abaa7b4c40b7dba948f0f6a708bd7342c4d47ce342f0ea39643974/pillow-12.1.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:a40905599d8079e09f25027423aed94f2823adaf2868940de991e53a449e14a8", size = 6222593, upload-time = "2026-01-02T09:10:29.115Z" },
- { url = "https://files.pythonhosted.org/packages/71/b8/7a61fb234df6a9b0b479f69e66901209d89ff72a435b49933f9122f94cac/pillow-12.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:92a7fe4225365c5e3a8e598982269c6d6698d3e783b3b1ae979e7819f9cd55c1", size = 8027579, upload-time = "2026-01-02T09:10:31.182Z" },
- { url = "https://files.pythonhosted.org/packages/ea/51/55c751a57cc524a15a0e3db20e5cde517582359508d62305a627e77fd295/pillow-12.1.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f10c98f49227ed8383d28174ee95155a675c4ed7f85e2e573b04414f7e371bda", size = 6335760, upload-time = "2026-01-02T09:10:33.02Z" },
- { url = "https://files.pythonhosted.org/packages/dc/7c/60e3e6f5e5891a1a06b4c910f742ac862377a6fe842f7184df4a274ce7bf/pillow-12.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8637e29d13f478bc4f153d8daa9ffb16455f0a6cb287da1b432fdad2bfbd66c7", size = 7027127, upload-time = "2026-01-02T09:10:35.009Z" },
- { url = "https://files.pythonhosted.org/packages/06/37/49d47266ba50b00c27ba63a7c898f1bb41a29627ced8c09e25f19ebec0ff/pillow-12.1.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:21e686a21078b0f9cb8c8a961d99e6a4ddb88e0fc5ea6e130172ddddc2e5221a", size = 6449896, upload-time = "2026-01-02T09:10:36.793Z" },
- { url = "https://files.pythonhosted.org/packages/f9/e5/67fd87d2913902462cd9b79c6211c25bfe95fcf5783d06e1367d6d9a741f/pillow-12.1.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:2415373395a831f53933c23ce051021e79c8cd7979822d8cc478547a3f4da8ef", size = 7151345, upload-time = "2026-01-02T09:10:39.064Z" },
- { url = "https://files.pythonhosted.org/packages/bd/15/f8c7abf82af68b29f50d77c227e7a1f87ce02fdc66ded9bf603bc3b41180/pillow-12.1.0-cp310-cp310-win32.whl", hash = "sha256:e75d3dba8fc1ddfec0cd752108f93b83b4f8d6ab40e524a95d35f016b9683b09", size = 6325568, upload-time = "2026-01-02T09:10:41.035Z" },
- { url = "https://files.pythonhosted.org/packages/d4/24/7d1c0e160b6b5ac2605ef7d8be537e28753c0db5363d035948073f5513d7/pillow-12.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:64efdf00c09e31efd754448a383ea241f55a994fd079866b92d2bbff598aad91", size = 7032367, upload-time = "2026-01-02T09:10:43.09Z" },
- { url = "https://files.pythonhosted.org/packages/f4/03/41c038f0d7a06099254c60f618d0ec7be11e79620fc23b8e85e5b31d9a44/pillow-12.1.0-cp310-cp310-win_arm64.whl", hash = "sha256:f188028b5af6b8fb2e9a76ac0f841a575bd1bd396e46ef0840d9b88a48fdbcea", size = 2452345, upload-time = "2026-01-02T09:10:44.795Z" },
- { url = "https://files.pythonhosted.org/packages/43/c4/bf8328039de6cc22182c3ef007a2abfbbdab153661c0a9aa78af8d706391/pillow-12.1.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:a83e0850cb8f5ac975291ebfc4170ba481f41a28065277f7f735c202cd8e0af3", size = 5304057, upload-time = "2026-01-02T09:10:46.627Z" },
- { url = "https://files.pythonhosted.org/packages/43/06/7264c0597e676104cc22ca73ee48f752767cd4b1fe084662620b17e10120/pillow-12.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b6e53e82ec2db0717eabb276aa56cf4e500c9a7cec2c2e189b55c24f65a3e8c0", size = 4657811, upload-time = "2026-01-02T09:10:49.548Z" },
- { url = "https://files.pythonhosted.org/packages/72/64/f9189e44474610daf83da31145fa56710b627b5c4c0b9c235e34058f6b31/pillow-12.1.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:40a8e3b9e8773876d6e30daed22f016509e3987bab61b3b7fe309d7019a87451", size = 6232243, upload-time = "2026-01-02T09:10:51.62Z" },
- { url = "https://files.pythonhosted.org/packages/ef/30/0df458009be6a4caca4ca2c52975e6275c387d4e5c95544e34138b41dc86/pillow-12.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:800429ac32c9b72909c671aaf17ecd13110f823ddb7db4dfef412a5587c2c24e", size = 8037872, upload-time = "2026-01-02T09:10:53.446Z" },
- { url = "https://files.pythonhosted.org/packages/e4/86/95845d4eda4f4f9557e25381d70876aa213560243ac1a6d619c46caaedd9/pillow-12.1.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0b022eaaf709541b391ee069f0022ee5b36c709df71986e3f7be312e46f42c84", size = 6345398, upload-time = "2026-01-02T09:10:55.426Z" },
- { url = "https://files.pythonhosted.org/packages/5c/1f/8e66ab9be3aaf1435bc03edd1ebdf58ffcd17f7349c1d970cafe87af27d9/pillow-12.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1f345e7bc9d7f368887c712aa5054558bad44d2a301ddf9248599f4161abc7c0", size = 7034667, upload-time = "2026-01-02T09:10:57.11Z" },
- { url = "https://files.pythonhosted.org/packages/f9/f6/683b83cb9b1db1fb52b87951b1c0b99bdcfceaa75febf11406c19f82cb5e/pillow-12.1.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d70347c8a5b7ccd803ec0c85c8709f036e6348f1e6a5bf048ecd9c64d3550b8b", size = 6458743, upload-time = "2026-01-02T09:10:59.331Z" },
- { url = "https://files.pythonhosted.org/packages/9a/7d/de833d63622538c1d58ce5395e7c6cb7e7dce80decdd8bde4a484e095d9f/pillow-12.1.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1fcc52d86ce7a34fd17cb04e87cfdb164648a3662a6f20565910a99653d66c18", size = 7159342, upload-time = "2026-01-02T09:11:01.82Z" },
- { url = "https://files.pythonhosted.org/packages/8c/40/50d86571c9e5868c42b81fe7da0c76ca26373f3b95a8dd675425f4a92ec1/pillow-12.1.0-cp311-cp311-win32.whl", hash = "sha256:3ffaa2f0659e2f740473bcf03c702c39a8d4b2b7ffc629052028764324842c64", size = 6328655, upload-time = "2026-01-02T09:11:04.556Z" },
- { url = "https://files.pythonhosted.org/packages/6c/af/b1d7e301c4cd26cd45d4af884d9ee9b6fab893b0ad2450d4746d74a6968c/pillow-12.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:806f3987ffe10e867bab0ddad45df1148a2b98221798457fa097ad85d6e8bc75", size = 7031469, upload-time = "2026-01-02T09:11:06.538Z" },
- { url = "https://files.pythonhosted.org/packages/48/36/d5716586d887fb2a810a4a61518a327a1e21c8b7134c89283af272efe84b/pillow-12.1.0-cp311-cp311-win_arm64.whl", hash = "sha256:9f5fefaca968e700ad1a4a9de98bf0869a94e397fe3524c4c9450c1445252304", size = 2452515, upload-time = "2026-01-02T09:11:08.226Z" },
- { url = "https://files.pythonhosted.org/packages/20/31/dc53fe21a2f2996e1b7d92bf671cdb157079385183ef7c1ae08b485db510/pillow-12.1.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:a332ac4ccb84b6dde65dbace8431f3af08874bf9770719d32a635c4ef411b18b", size = 5262642, upload-time = "2026-01-02T09:11:10.138Z" },
- { url = "https://files.pythonhosted.org/packages/ab/c1/10e45ac9cc79419cedf5121b42dcca5a50ad2b601fa080f58c22fb27626e/pillow-12.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:907bfa8a9cb790748a9aa4513e37c88c59660da3bcfffbd24a7d9e6abf224551", size = 4657464, upload-time = "2026-01-02T09:11:12.319Z" },
- { url = "https://files.pythonhosted.org/packages/ad/26/7b82c0ab7ef40ebede7a97c72d473bda5950f609f8e0c77b04af574a0ddb/pillow-12.1.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:efdc140e7b63b8f739d09a99033aa430accce485ff78e6d311973a67b6bf3208", size = 6234878, upload-time = "2026-01-02T09:11:14.096Z" },
- { url = "https://files.pythonhosted.org/packages/76/25/27abc9792615b5e886ca9411ba6637b675f1b77af3104710ac7353fe5605/pillow-12.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bef9768cab184e7ae6e559c032e95ba8d07b3023c289f79a2bd36e8bf85605a5", size = 8044868, upload-time = "2026-01-02T09:11:15.903Z" },
- { url = "https://files.pythonhosted.org/packages/0a/ea/f200a4c36d836100e7bc738fc48cd963d3ba6372ebc8298a889e0cfc3359/pillow-12.1.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:742aea052cf5ab5034a53c3846165bc3ce88d7c38e954120db0ab867ca242661", size = 6349468, upload-time = "2026-01-02T09:11:17.631Z" },
- { url = "https://files.pythonhosted.org/packages/11/8f/48d0b77ab2200374c66d344459b8958c86693be99526450e7aee714e03e4/pillow-12.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a6dfc2af5b082b635af6e08e0d1f9f1c4e04d17d4e2ca0ef96131e85eda6eb17", size = 7041518, upload-time = "2026-01-02T09:11:19.389Z" },
- { url = "https://files.pythonhosted.org/packages/1d/23/c281182eb986b5d31f0a76d2a2c8cd41722d6fb8ed07521e802f9bba52de/pillow-12.1.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:609e89d9f90b581c8d16358c9087df76024cf058fa693dd3e1e1620823f39670", size = 6462829, upload-time = "2026-01-02T09:11:21.28Z" },
- { url = "https://files.pythonhosted.org/packages/25/ef/7018273e0faac099d7b00982abdcc39142ae6f3bd9ceb06de09779c4a9d6/pillow-12.1.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:43b4899cfd091a9693a1278c4982f3e50f7fb7cff5153b05174b4afc9593b616", size = 7166756, upload-time = "2026-01-02T09:11:23.559Z" },
- { url = "https://files.pythonhosted.org/packages/8f/c8/993d4b7ab2e341fe02ceef9576afcf5830cdec640be2ac5bee1820d693d4/pillow-12.1.0-cp312-cp312-win32.whl", hash = "sha256:aa0c9cc0b82b14766a99fbe6084409972266e82f459821cd26997a488a7261a7", size = 6328770, upload-time = "2026-01-02T09:11:25.661Z" },
- { url = "https://files.pythonhosted.org/packages/a7/87/90b358775a3f02765d87655237229ba64a997b87efa8ccaca7dd3e36e7a7/pillow-12.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:d70534cea9e7966169ad29a903b99fc507e932069a881d0965a1a84bb57f6c6d", size = 7033406, upload-time = "2026-01-02T09:11:27.474Z" },
- { url = "https://files.pythonhosted.org/packages/5d/cf/881b457eccacac9e5b2ddd97d5071fb6d668307c57cbf4e3b5278e06e536/pillow-12.1.0-cp312-cp312-win_arm64.whl", hash = "sha256:65b80c1ee7e14a87d6a068dd3b0aea268ffcabfe0498d38661b00c5b4b22e74c", size = 2452612, upload-time = "2026-01-02T09:11:29.309Z" },
- { url = "https://files.pythonhosted.org/packages/dd/c7/2530a4aa28248623e9d7f27316b42e27c32ec410f695929696f2e0e4a778/pillow-12.1.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:7b5dd7cbae20285cdb597b10eb5a2c13aa9de6cde9bb64a3c1317427b1db1ae1", size = 4062543, upload-time = "2026-01-02T09:11:31.566Z" },
- { url = "https://files.pythonhosted.org/packages/8f/1f/40b8eae823dc1519b87d53c30ed9ef085506b05281d313031755c1705f73/pillow-12.1.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:29a4cef9cb672363926f0470afc516dbf7305a14d8c54f7abbb5c199cd8f8179", size = 4138373, upload-time = "2026-01-02T09:11:33.367Z" },
- { url = "https://files.pythonhosted.org/packages/d4/77/6fa60634cf06e52139fd0e89e5bbf055e8166c691c42fb162818b7fda31d/pillow-12.1.0-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:681088909d7e8fa9e31b9799aaa59ba5234c58e5e4f1951b4c4d1082a2e980e0", size = 3601241, upload-time = "2026-01-02T09:11:35.011Z" },
- { url = "https://files.pythonhosted.org/packages/4f/bf/28ab865de622e14b747f0cd7877510848252d950e43002e224fb1c9ababf/pillow-12.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:983976c2ab753166dc66d36af6e8ec15bb511e4a25856e2227e5f7e00a160587", size = 5262410, upload-time = "2026-01-02T09:11:36.682Z" },
- { url = "https://files.pythonhosted.org/packages/1c/34/583420a1b55e715937a85bd48c5c0991598247a1fd2eb5423188e765ea02/pillow-12.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:db44d5c160a90df2d24a24760bbd37607d53da0b34fb546c4c232af7192298ac", size = 4657312, upload-time = "2026-01-02T09:11:38.535Z" },
- { url = "https://files.pythonhosted.org/packages/1d/fd/f5a0896839762885b3376ff04878f86ab2b097c2f9a9cdccf4eda8ba8dc0/pillow-12.1.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:6b7a9d1db5dad90e2991645874f708e87d9a3c370c243c2d7684d28f7e133e6b", size = 6232605, upload-time = "2026-01-02T09:11:40.602Z" },
- { url = "https://files.pythonhosted.org/packages/98/aa/938a09d127ac1e70e6ed467bd03834350b33ef646b31edb7452d5de43792/pillow-12.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6258f3260986990ba2fa8a874f8b6e808cf5abb51a94015ca3dc3c68aa4f30ea", size = 8041617, upload-time = "2026-01-02T09:11:42.721Z" },
- { url = "https://files.pythonhosted.org/packages/17/e8/538b24cb426ac0186e03f80f78bc8dc7246c667f58b540bdd57c71c9f79d/pillow-12.1.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e115c15e3bc727b1ca3e641a909f77f8ca72a64fff150f666fcc85e57701c26c", size = 6346509, upload-time = "2026-01-02T09:11:44.955Z" },
- { url = "https://files.pythonhosted.org/packages/01/9a/632e58ec89a32738cabfd9ec418f0e9898a2b4719afc581f07c04a05e3c9/pillow-12.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6741e6f3074a35e47c77b23a4e4f2d90db3ed905cb1c5e6e0d49bff2045632bc", size = 7038117, upload-time = "2026-01-02T09:11:46.736Z" },
- { url = "https://files.pythonhosted.org/packages/c7/a2/d40308cf86eada842ca1f3ffa45d0ca0df7e4ab33c83f81e73f5eaed136d/pillow-12.1.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:935b9d1aed48fcfb3f838caac506f38e29621b44ccc4f8a64d575cb1b2a88644", size = 6460151, upload-time = "2026-01-02T09:11:48.625Z" },
- { url = "https://files.pythonhosted.org/packages/f1/88/f5b058ad6453a085c5266660a1417bdad590199da1b32fb4efcff9d33b05/pillow-12.1.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5fee4c04aad8932da9f8f710af2c1a15a83582cfb884152a9caa79d4efcdbf9c", size = 7164534, upload-time = "2026-01-02T09:11:50.445Z" },
- { url = "https://files.pythonhosted.org/packages/19/ce/c17334caea1db789163b5d855a5735e47995b0b5dc8745e9a3605d5f24c0/pillow-12.1.0-cp313-cp313-win32.whl", hash = "sha256:a786bf667724d84aa29b5db1c61b7bfdde380202aaca12c3461afd6b71743171", size = 6332551, upload-time = "2026-01-02T09:11:52.234Z" },
- { url = "https://files.pythonhosted.org/packages/e5/07/74a9d941fa45c90a0d9465098fe1ec85de3e2afbdc15cc4766622d516056/pillow-12.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:461f9dfdafa394c59cd6d818bdfdbab4028b83b02caadaff0ffd433faf4c9a7a", size = 7040087, upload-time = "2026-01-02T09:11:54.822Z" },
- { url = "https://files.pythonhosted.org/packages/88/09/c99950c075a0e9053d8e880595926302575bc742b1b47fe1bbcc8d388d50/pillow-12.1.0-cp313-cp313-win_arm64.whl", hash = "sha256:9212d6b86917a2300669511ed094a9406888362e085f2431a7da985a6b124f45", size = 2452470, upload-time = "2026-01-02T09:11:56.522Z" },
- { url = "https://files.pythonhosted.org/packages/b5/ba/970b7d85ba01f348dee4d65412476321d40ee04dcb51cd3735b9dc94eb58/pillow-12.1.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:00162e9ca6d22b7c3ee8e61faa3c3253cd19b6a37f126cad04f2f88b306f557d", size = 5264816, upload-time = "2026-01-02T09:11:58.227Z" },
- { url = "https://files.pythonhosted.org/packages/10/60/650f2fb55fdba7a510d836202aa52f0baac633e50ab1cf18415d332188fb/pillow-12.1.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:7d6daa89a00b58c37cb1747ec9fb7ac3bc5ffd5949f5888657dfddde6d1312e0", size = 4660472, upload-time = "2026-01-02T09:12:00.798Z" },
- { url = "https://files.pythonhosted.org/packages/2b/c0/5273a99478956a099d533c4f46cbaa19fd69d606624f4334b85e50987a08/pillow-12.1.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:e2479c7f02f9d505682dc47df8c0ea1fc5e264c4d1629a5d63fe3e2334b89554", size = 6268974, upload-time = "2026-01-02T09:12:02.572Z" },
- { url = "https://files.pythonhosted.org/packages/b4/26/0bf714bc2e73d5267887d47931d53c4ceeceea6978148ed2ab2a4e6463c4/pillow-12.1.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f188d580bd870cda1e15183790d1cc2fa78f666e76077d103edf048eed9c356e", size = 8073070, upload-time = "2026-01-02T09:12:04.75Z" },
- { url = "https://files.pythonhosted.org/packages/43/cf/1ea826200de111a9d65724c54f927f3111dc5ae297f294b370a670c17786/pillow-12.1.0-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0fde7ec5538ab5095cc02df38ee99b0443ff0e1c847a045554cf5f9af1f4aa82", size = 6380176, upload-time = "2026-01-02T09:12:06.626Z" },
- { url = "https://files.pythonhosted.org/packages/03/e0/7938dd2b2013373fd85d96e0f38d62b7a5a262af21ac274250c7ca7847c9/pillow-12.1.0-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0ed07dca4a8464bada6139ab38f5382f83e5f111698caf3191cb8dbf27d908b4", size = 7067061, upload-time = "2026-01-02T09:12:08.624Z" },
- { url = "https://files.pythonhosted.org/packages/86/ad/a2aa97d37272a929a98437a8c0ac37b3cf012f4f8721e1bd5154699b2518/pillow-12.1.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:f45bd71d1fa5e5749587613037b172e0b3b23159d1c00ef2fc920da6f470e6f0", size = 6491824, upload-time = "2026-01-02T09:12:10.488Z" },
- { url = "https://files.pythonhosted.org/packages/a4/44/80e46611b288d51b115826f136fb3465653c28f491068a72d3da49b54cd4/pillow-12.1.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:277518bf4fe74aa91489e1b20577473b19ee70fb97c374aa50830b279f25841b", size = 7190911, upload-time = "2026-01-02T09:12:12.772Z" },
- { url = "https://files.pythonhosted.org/packages/86/77/eacc62356b4cf81abe99ff9dbc7402750044aed02cfd6a503f7c6fc11f3e/pillow-12.1.0-cp313-cp313t-win32.whl", hash = "sha256:7315f9137087c4e0ee73a761b163fc9aa3b19f5f606a7fc08d83fd3e4379af65", size = 6336445, upload-time = "2026-01-02T09:12:14.775Z" },
- { url = "https://files.pythonhosted.org/packages/e7/3c/57d81d0b74d218706dafccb87a87ea44262c43eef98eb3b164fd000e0491/pillow-12.1.0-cp313-cp313t-win_amd64.whl", hash = "sha256:0ddedfaa8b5f0b4ffbc2fa87b556dc59f6bb4ecb14a53b33f9189713ae8053c0", size = 7045354, upload-time = "2026-01-02T09:12:16.599Z" },
- { url = "https://files.pythonhosted.org/packages/ac/82/8b9b97bba2e3576a340f93b044a3a3a09841170ab4c1eb0d5c93469fd32f/pillow-12.1.0-cp313-cp313t-win_arm64.whl", hash = "sha256:80941e6d573197a0c28f394753de529bb436b1ca990ed6e765cf42426abc39f8", size = 2454547, upload-time = "2026-01-02T09:12:18.704Z" },
- { url = "https://files.pythonhosted.org/packages/8c/87/bdf971d8bbcf80a348cc3bacfcb239f5882100fe80534b0ce67a784181d8/pillow-12.1.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:5cb7bc1966d031aec37ddb9dcf15c2da5b2e9f7cc3ca7c54473a20a927e1eb91", size = 4062533, upload-time = "2026-01-02T09:12:20.791Z" },
- { url = "https://files.pythonhosted.org/packages/ff/4f/5eb37a681c68d605eb7034c004875c81f86ec9ef51f5be4a63eadd58859a/pillow-12.1.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:97e9993d5ed946aba26baf9c1e8cf18adbab584b99f452ee72f7ee8acb882796", size = 4138546, upload-time = "2026-01-02T09:12:23.664Z" },
- { url = "https://files.pythonhosted.org/packages/11/6d/19a95acb2edbace40dcd582d077b991646b7083c41b98da4ed7555b59733/pillow-12.1.0-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:414b9a78e14ffeb98128863314e62c3f24b8a86081066625700b7985b3f529bd", size = 3601163, upload-time = "2026-01-02T09:12:26.338Z" },
- { url = "https://files.pythonhosted.org/packages/fc/36/2b8138e51cb42e4cc39c3297713455548be855a50558c3ac2beebdc251dd/pillow-12.1.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:e6bdb408f7c9dd2a5ff2b14a3b0bb6d4deb29fb9961e6eb3ae2031ae9a5cec13", size = 5266086, upload-time = "2026-01-02T09:12:28.782Z" },
- { url = "https://files.pythonhosted.org/packages/53/4b/649056e4d22e1caa90816bf99cef0884aed607ed38075bd75f091a607a38/pillow-12.1.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:3413c2ae377550f5487991d444428f1a8ae92784aac79caa8b1e3b89b175f77e", size = 4657344, upload-time = "2026-01-02T09:12:31.117Z" },
- { url = "https://files.pythonhosted.org/packages/6c/6b/c5742cea0f1ade0cd61485dc3d81f05261fc2276f537fbdc00802de56779/pillow-12.1.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:e5dcbe95016e88437ecf33544ba5db21ef1b8dd6e1b434a2cb2a3d605299e643", size = 6232114, upload-time = "2026-01-02T09:12:32.936Z" },
- { url = "https://files.pythonhosted.org/packages/bf/8f/9f521268ce22d63991601aafd3d48d5ff7280a246a1ef62d626d67b44064/pillow-12.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d0a7735df32ccbcc98b98a1ac785cc4b19b580be1bdf0aeb5c03223220ea09d5", size = 8042708, upload-time = "2026-01-02T09:12:34.78Z" },
- { url = "https://files.pythonhosted.org/packages/1a/eb/257f38542893f021502a1bbe0c2e883c90b5cff26cc33b1584a841a06d30/pillow-12.1.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0c27407a2d1b96774cbc4a7594129cc027339fd800cd081e44497722ea1179de", size = 6347762, upload-time = "2026-01-02T09:12:36.748Z" },
- { url = "https://files.pythonhosted.org/packages/c4/5a/8ba375025701c09b309e8d5163c5a4ce0102fa86bbf8800eb0d7ac87bc51/pillow-12.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:15c794d74303828eaa957ff8070846d0efe8c630901a1c753fdc63850e19ecd9", size = 7039265, upload-time = "2026-01-02T09:12:39.082Z" },
- { url = "https://files.pythonhosted.org/packages/cf/dc/cf5e4cdb3db533f539e88a7bbf9f190c64ab8a08a9bc7a4ccf55067872e4/pillow-12.1.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c990547452ee2800d8506c4150280757f88532f3de2a58e3022e9b179107862a", size = 6462341, upload-time = "2026-01-02T09:12:40.946Z" },
- { url = "https://files.pythonhosted.org/packages/d0/47/0291a25ac9550677e22eda48510cfc4fa4b2ef0396448b7fbdc0a6946309/pillow-12.1.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b63e13dd27da389ed9475b3d28510f0f954bca0041e8e551b2a4eb1eab56a39a", size = 7165395, upload-time = "2026-01-02T09:12:42.706Z" },
- { url = "https://files.pythonhosted.org/packages/4f/4c/e005a59393ec4d9416be06e6b45820403bb946a778e39ecec62f5b2b991e/pillow-12.1.0-cp314-cp314-win32.whl", hash = "sha256:1a949604f73eb07a8adab38c4fe50791f9919344398bdc8ac6b307f755fc7030", size = 6431413, upload-time = "2026-01-02T09:12:44.944Z" },
- { url = "https://files.pythonhosted.org/packages/1c/af/f23697f587ac5f9095d67e31b81c95c0249cd461a9798a061ed6709b09b5/pillow-12.1.0-cp314-cp314-win_amd64.whl", hash = "sha256:4f9f6a650743f0ddee5593ac9e954ba1bdbc5e150bc066586d4f26127853ab94", size = 7176779, upload-time = "2026-01-02T09:12:46.727Z" },
- { url = "https://files.pythonhosted.org/packages/b3/36/6a51abf8599232f3e9afbd16d52829376a68909fe14efe29084445db4b73/pillow-12.1.0-cp314-cp314-win_arm64.whl", hash = "sha256:808b99604f7873c800c4840f55ff389936ef1948e4e87645eaf3fccbc8477ac4", size = 2543105, upload-time = "2026-01-02T09:12:49.243Z" },
- { url = "https://files.pythonhosted.org/packages/82/54/2e1dd20c8749ff225080d6ba465a0cab4387f5db0d1c5fb1439e2d99923f/pillow-12.1.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:bc11908616c8a283cf7d664f77411a5ed2a02009b0097ff8abbba5e79128ccf2", size = 5268571, upload-time = "2026-01-02T09:12:51.11Z" },
- { url = "https://files.pythonhosted.org/packages/57/61/571163a5ef86ec0cf30d265ac2a70ae6fc9e28413d1dc94fa37fae6bda89/pillow-12.1.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:896866d2d436563fa2a43a9d72f417874f16b5545955c54a64941e87c1376c61", size = 4660426, upload-time = "2026-01-02T09:12:52.865Z" },
- { url = "https://files.pythonhosted.org/packages/5e/e1/53ee5163f794aef1bf84243f755ee6897a92c708505350dd1923f4afec48/pillow-12.1.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8e178e3e99d3c0ea8fc64b88447f7cac8ccf058af422a6cedc690d0eadd98c51", size = 6269908, upload-time = "2026-01-02T09:12:54.884Z" },
- { url = "https://files.pythonhosted.org/packages/bc/0b/b4b4106ff0ee1afa1dc599fde6ab230417f800279745124f6c50bcffed8e/pillow-12.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:079af2fb0c599c2ec144ba2c02766d1b55498e373b3ac64687e43849fbbef5bc", size = 8074733, upload-time = "2026-01-02T09:12:56.802Z" },
- { url = "https://files.pythonhosted.org/packages/19/9f/80b411cbac4a732439e629a26ad3ef11907a8c7fc5377b7602f04f6fe4e7/pillow-12.1.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bdec5e43377761c5dbca620efb69a77f6855c5a379e32ac5b158f54c84212b14", size = 6381431, upload-time = "2026-01-02T09:12:58.823Z" },
- { url = "https://files.pythonhosted.org/packages/8f/b7/d65c45db463b66ecb6abc17c6ba6917a911202a07662247e1355ce1789e7/pillow-12.1.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:565c986f4b45c020f5421a4cea13ef294dde9509a8577f29b2fc5edc7587fff8", size = 7068529, upload-time = "2026-01-02T09:13:00.885Z" },
- { url = "https://files.pythonhosted.org/packages/50/96/dfd4cd726b4a45ae6e3c669fc9e49deb2241312605d33aba50499e9d9bd1/pillow-12.1.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:43aca0a55ce1eefc0aefa6253661cb54571857b1a7b2964bd8a1e3ef4b729924", size = 6492981, upload-time = "2026-01-02T09:13:03.314Z" },
- { url = "https://files.pythonhosted.org/packages/4d/1c/b5dc52cf713ae46033359c5ca920444f18a6359ce1020dd3e9c553ea5bc6/pillow-12.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:0deedf2ea233722476b3a81e8cdfbad786f7adbed5d848469fa59fe52396e4ef", size = 7191878, upload-time = "2026-01-02T09:13:05.276Z" },
- { url = "https://files.pythonhosted.org/packages/53/26/c4188248bd5edaf543864fe4834aebe9c9cb4968b6f573ce014cc42d0720/pillow-12.1.0-cp314-cp314t-win32.whl", hash = "sha256:b17fbdbe01c196e7e159aacb889e091f28e61020a8abeac07b68079b6e626988", size = 6438703, upload-time = "2026-01-02T09:13:07.491Z" },
- { url = "https://files.pythonhosted.org/packages/b8/0e/69ed296de8ea05cb03ee139cee600f424ca166e632567b2d66727f08c7ed/pillow-12.1.0-cp314-cp314t-win_amd64.whl", hash = "sha256:27b9baecb428899db6c0de572d6d305cfaf38ca1596b5c0542a5182e3e74e8c6", size = 7182927, upload-time = "2026-01-02T09:13:09.841Z" },
- { url = "https://files.pythonhosted.org/packages/fc/f5/68334c015eed9b5cff77814258717dec591ded209ab5b6fb70e2ae873d1d/pillow-12.1.0-cp314-cp314t-win_arm64.whl", hash = "sha256:f61333d817698bdcdd0f9d7793e365ac3d2a21c1f1eb02b32ad6aefb8d8ea831", size = 2545104, upload-time = "2026-01-02T09:13:12.068Z" },
- { url = "https://files.pythonhosted.org/packages/8b/bc/224b1d98cffd7164b14707c91aac83c07b047fbd8f58eba4066a3e53746a/pillow-12.1.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:ca94b6aac0d7af2a10ba08c0f888b3d5114439b6b3ef39968378723622fed377", size = 5228605, upload-time = "2026-01-02T09:13:14.084Z" },
- { url = "https://files.pythonhosted.org/packages/0c/ca/49ca7769c4550107de049ed85208240ba0f330b3f2e316f24534795702ce/pillow-12.1.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:351889afef0f485b84078ea40fe33727a0492b9af3904661b0abbafee0355b72", size = 4622245, upload-time = "2026-01-02T09:13:15.964Z" },
- { url = "https://files.pythonhosted.org/packages/73/48/fac807ce82e5955bcc2718642b94b1bd22a82a6d452aea31cbb678cddf12/pillow-12.1.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:bb0984b30e973f7e2884362b7d23d0a348c7143ee559f38ef3eaab640144204c", size = 5247593, upload-time = "2026-01-02T09:13:17.913Z" },
- { url = "https://files.pythonhosted.org/packages/d2/95/3e0742fe358c4664aed4fd05d5f5373dcdad0b27af52aa0972568541e3f4/pillow-12.1.0-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:84cabc7095dd535ca934d57e9ce2a72ffd216e435a84acb06b2277b1de2689bd", size = 6989008, upload-time = "2026-01-02T09:13:20.083Z" },
- { url = "https://files.pythonhosted.org/packages/5a/74/fe2ac378e4e202e56d50540d92e1ef4ff34ed687f3c60f6a121bcf99437e/pillow-12.1.0-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:53d8b764726d3af1a138dd353116f774e3862ec7e3794e0c8781e30db0f35dfc", size = 5313824, upload-time = "2026-01-02T09:13:22.405Z" },
- { url = "https://files.pythonhosted.org/packages/f3/77/2a60dee1adee4e2655ac328dd05c02a955c1cd683b9f1b82ec3feb44727c/pillow-12.1.0-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5da841d81b1a05ef940a8567da92decaa15bc4d7dedb540a8c219ad83d91808a", size = 5963278, upload-time = "2026-01-02T09:13:24.706Z" },
- { url = "https://files.pythonhosted.org/packages/2d/71/64e9b1c7f04ae0027f788a248e6297d7fcc29571371fe7d45495a78172c0/pillow-12.1.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:75af0b4c229ac519b155028fa1be632d812a519abba9b46b20e50c6caa184f19", size = 7029809, upload-time = "2026-01-02T09:13:26.541Z" },
-]
-
-[[package]]
-name = "pillow-heif"
-version = "1.1.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "pillow" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/64/65/77284daf2a8a2849b9040889bd8e1b845e693ed97973a28ba2122b8922ad/pillow_heif-1.1.1.tar.gz", hash = "sha256:f60e8c8a8928556104cec4fff39d43caa1da105625bdb53b11ce3c89d09b6bde", size = 18271952, upload-time = "2025-09-30T16:42:24.485Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/be/58/365e2678cd74db7f36af1faafb9ed626273c73000cf951bac4761a399415/pillow_heif-1.1.1-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:7048eb0ecae3b230f086ec913ab2798dcf21d0301edecf3061b34ed50a5d4411", size = 4696597, upload-time = "2025-09-30T16:41:02.366Z" },
- { url = "https://files.pythonhosted.org/packages/33/ab/66359a2674aa8d7b220761b154d18928b67d46a43c7480468f95d98f730b/pillow_heif-1.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e2a1eca5eca44336ea213a7acd9b50572e15d77b6065c962cc9f61137b6a5b55", size = 3451082, upload-time = "2025-09-30T16:41:04.469Z" },
- { url = "https://files.pythonhosted.org/packages/5c/81/11ca3798065b765a5b592d0ccc567d19b835f85f8ba5908b7566b318630b/pillow_heif-1.1.1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dcc25739ceff0701d32693de8e5b65ff92163638f1c3c2466e203b7b978b8ddc", size = 5772935, upload-time = "2025-09-30T16:41:05.966Z" },
- { url = "https://files.pythonhosted.org/packages/af/52/752eaa40f015a01ae5ea453baee9affdd87a332bfaa5bd9f95d56a41282e/pillow_heif-1.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:75d79393fcbcc50ef7a01b7dd5b716e08f78bd5542ded6e4c51121f59d5be8da", size = 5503711, upload-time = "2025-09-30T16:41:07.778Z" },
- { url = "https://files.pythonhosted.org/packages/29/28/eca3d19eea58d24bb5d24ac04bc9432028b4a128437d2ce1bcccf52159d1/pillow_heif-1.1.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:03ba3f7e8b13b07636f5a87a6ec5ed1e39b2aa20d4b645b83c80d40be0abeb50", size = 6808883, upload-time = "2025-09-30T16:41:09.549Z" },
- { url = "https://files.pythonhosted.org/packages/8a/18/db7020967c7e0d1dbd2f375f01bafd0e48034ef09ef6a47ce4958ed5f7a0/pillow_heif-1.1.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c85fa6f9c0c2c572b1b146443813519ca9a942ef51e92858387c6dca2bbc42f9", size = 6430877, upload-time = "2025-09-30T16:41:10.808Z" },
- { url = "https://files.pythonhosted.org/packages/7b/88/ec468eff5cfed8501c354d46abd7371b69265da55c7b4e64261ce07cab9e/pillow_heif-1.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:36e98bee9cd707b1daa865fec0ff505431746587ce471b44b5eab61a115e800a", size = 5422268, upload-time = "2025-09-30T16:41:12.947Z" },
- { url = "https://files.pythonhosted.org/packages/ec/13/dd7908c39ea368abd2d25e4fa3eef97a29cc5446c9ba0d47b1fe13564f79/pillow_heif-1.1.1-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:57c140368c7ddefa20ecb9b737b4af2d2d5ea0806d1d59be4c525e6a73e6aa72", size = 4696596, upload-time = "2025-09-30T16:41:14.083Z" },
- { url = "https://files.pythonhosted.org/packages/93/a2/dbcbfd4264d19ce5b1776327f25633cc20b2b2840fc602d85341dcfce782/pillow_heif-1.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0b6ae0b002ecc7873273ded99aaffa567f7806f4bc57ee1eff7ab5fe1f70e5e7", size = 3451082, upload-time = "2025-09-30T16:41:15.597Z" },
- { url = "https://files.pythonhosted.org/packages/a7/7b/2488882acf9756c8d22108e1828232cdd216a3d333a1824cd41eee102632/pillow_heif-1.1.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:39ea2fe8878e722bdfaf30a9b711629c3a4b8a0627b70a833f7381cbd3ef8e87", size = 5774792, upload-time = "2025-09-30T16:41:16.771Z" },
- { url = "https://files.pythonhosted.org/packages/97/aa/c048f7e337ef40a86a2501d264a0f430ab8772c35306c907b1e00ddf5099/pillow_heif-1.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8a01644c3c4bc576437c05e1ece4b89814fc381684f5d7926850e01d6e9b6502", size = 5505379, upload-time = "2025-09-30T16:41:18.252Z" },
- { url = "https://files.pythonhosted.org/packages/a0/6a/28ca3dbfdd1bf2e0aaebcb38b2c375ab76ee647588a8a91200f0a0c3cb5b/pillow_heif-1.1.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:5ebe3b7f707b984c8886f367697531d004967b7d8949a34645c7bc1c6a888fe6", size = 6810454, upload-time = "2025-09-30T16:41:19.618Z" },
- { url = "https://files.pythonhosted.org/packages/64/87/a1909c6c8514b9cc451633e92d9c1088268ea0e913deabd7bb5740a5abe7/pillow_heif-1.1.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c8c8e1a561877006a5a0b654392e614c879d9e4db89d0786a94fe9f5773bcacb", size = 6432367, upload-time = "2025-09-30T16:41:21.396Z" },
- { url = "https://files.pythonhosted.org/packages/99/48/fa2407203087be5424d514c40a816eee517450e98772c1f00fe846b87a8b/pillow_heif-1.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:3d296f874bea4dd17bab7309b843a766834d2b5df53c591eaf3f7cdc91a4c1a3", size = 5422266, upload-time = "2025-09-30T16:41:23.107Z" },
- { url = "https://files.pythonhosted.org/packages/1d/fc/d9180eda35144105b6ffd3ed27363d699f0d83bbc4264bbe5638438a3b69/pillow_heif-1.1.1-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:b3a66c7d3a4ad2f9f6d08b81e102210e1b676039dbd2522b88b6957ada2186e3", size = 4696824, upload-time = "2025-09-30T16:41:24.307Z" },
- { url = "https://files.pythonhosted.org/packages/fd/b0/73050dd10e7d40f01ed92f6611b0acd60d502c1fa1f1c177d89ee2869616/pillow_heif-1.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9b31fd9b5b3c3f056f98f806e2ffe0f54710700045e28f68568753e56101d2ca", size = 3451081, upload-time = "2025-09-30T16:41:25.385Z" },
- { url = "https://files.pythonhosted.org/packages/c8/dd/82e638077bc2fa197229e200af028375e6665bb863599d9e3833abf88803/pillow_heif-1.1.1-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dea5f8a304e6b7fee3f76ac7756962af72e51bafab1bba07993a8c8fc57d5a79", size = 5773351, upload-time = "2025-09-30T16:41:28.024Z" },
- { url = "https://files.pythonhosted.org/packages/e0/08/c108b3490f745b2ed191e728c89437310ea5e587a9d4c76f0118f66a038f/pillow_heif-1.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:34e36485409468816227fbbf59b8ae4c7567702e066ca6e2a8b5e423a7a2fe92", size = 5504698, upload-time = "2025-09-30T16:41:29.434Z" },
- { url = "https://files.pythonhosted.org/packages/c4/65/98f5593dfdf65488a24441dfcd703f4281118e2da2396789153285ee89e1/pillow_heif-1.1.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:561e8086128df0aeb6ea68b4fd60bb18428a65099f95349a6674718e4f8132bd", size = 6809294, upload-time = "2025-09-30T16:41:30.691Z" },
- { url = "https://files.pythonhosted.org/packages/e0/69/2f8a985d51593bd66f051744fdfde67f78b78bc10274d63b4568d7c6c8c3/pillow_heif-1.1.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:da66c0c6b119042dda6efb67ca30fcb00f0715eb6205e5636ab487d76f1699ad", size = 6431689, upload-time = "2025-09-30T16:41:32.322Z" },
- { url = "https://files.pythonhosted.org/packages/80/65/b3f9324385caa494f4cd9255f9e6423791520fa07b4ca79fe4632f841ef6/pillow_heif-1.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:9af92c2a3492b9bb4625b1f6ec7da17ec185e6b77d519d71c06d7e79c65a6f9e", size = 5422359, upload-time = "2025-09-30T16:41:34.121Z" },
- { url = "https://files.pythonhosted.org/packages/c2/1d/2ea075d537b4ac9f5fb0c53fd543a764f5f1dee1fe6bea8fb5b34018cf94/pillow_heif-1.1.1-cp313-cp313-macosx_10_15_x86_64.whl", hash = "sha256:8269cae2e0232f73bda5128181a42fbbb562c29b76fbcced22fef70a61b94dbe", size = 4696826, upload-time = "2025-09-30T16:41:35.281Z" },
- { url = "https://files.pythonhosted.org/packages/2e/6f/860fab6d6e6f04f13b97a8d9150816fa16feb3f7a2fe2d8ab4b460adc711/pillow_heif-1.1.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:08787cc64b4a519789a348f137b914981ce520d4b906e09e2b8e974c87e3e215", size = 3451076, upload-time = "2025-09-30T16:41:36.506Z" },
- { url = "https://files.pythonhosted.org/packages/b1/9a/711f77c7c6e00fa1ae0e890a36a5be03c47170b6cbb88fc92761bee0fff5/pillow_heif-1.1.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ac0fc8523a77c351991f78766d41290241dd87fbe036b6f777c49f2bd3561119", size = 5773389, upload-time = "2025-09-30T16:41:37.65Z" },
- { url = "https://files.pythonhosted.org/packages/50/c8/50e2d1adede807dc1d3b35f2cfa28d7f8e73e9d56cb560dc94b1d7053b75/pillow_heif-1.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:18db6c78b8fa52065339ffb69739f5c45748c0b5f836349f0aba786f7bb905ab", size = 5504774, upload-time = "2025-09-30T16:41:38.849Z" },
- { url = "https://files.pythonhosted.org/packages/03/c2/0fa0ebaaec2a7e548989b84a2561300137d9999fc780d24ad7d6d4ef9417/pillow_heif-1.1.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c5db8a8ee7ee4b1311f81d223d32538d63a73adc2ece7610a9f19519856c8e68", size = 6809350, upload-time = "2025-09-30T16:41:40.455Z" },
- { url = "https://files.pythonhosted.org/packages/85/cc/b0eee2b939a362dcccb96483f8d172b64df192ec93445103be04634255c8/pillow_heif-1.1.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a2e6d4f7209aade2d55bbbcdbbbe623118722bcc7a12edef15cf4ee0d8586c3e", size = 6431750, upload-time = "2025-09-30T16:41:42.418Z" },
- { url = "https://files.pythonhosted.org/packages/dd/0b/a559ad48a5c03db5ecdc7c8b8dd04df3cb1072c0f983bcaebd26e1e63442/pillow_heif-1.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:ff158ff338082d39864abd31c69ae2ee57de3f193c85ccbe365f4d7260712229", size = 5422353, upload-time = "2025-09-30T16:41:44.15Z" },
- { url = "https://files.pythonhosted.org/packages/8e/f8/6c3fd8a28ea16236d40d6885b3babd801a2e7bdb73ee52a293eb34de7afc/pillow_heif-1.1.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:7f19389ffeb3866f95370eb917e6a32706c110a9fa670daefb63b5660948a82e", size = 4696793, upload-time = "2025-09-30T16:41:45.744Z" },
- { url = "https://files.pythonhosted.org/packages/28/09/f2ffdac98465d00b6244c4333d2f73e815351beb6fa1d22f489797f0411c/pillow_heif-1.1.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:8d5fa5539ff3c7bbe64aa446c10bf10f6d8c1604997a66b195bec02e2965eb10", size = 3451160, upload-time = "2025-09-30T16:41:47.111Z" },
- { url = "https://files.pythonhosted.org/packages/84/93/a801624eb86e8e0a2a6212a10da6c69beb7060be569fe36100d96a2d9e2c/pillow_heif-1.1.1-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f9b08c81602ffd660cd27456fbfa3cbf396cf23bb39d3015cc7a6cd56ade82fd", size = 5773568, upload-time = "2025-09-30T16:41:48.65Z" },
- { url = "https://files.pythonhosted.org/packages/e8/fd/7d619b7b9386abd6228b1465450ea0bb8a3875b1e22c4f9e5bbd598224ae/pillow_heif-1.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a0f2d68af87d5e1f6af0db021b61f62e456f413eba98ea7723d7f49f2a6f1f01", size = 5504865, upload-time = "2025-09-30T16:41:50.051Z" },
- { url = "https://files.pythonhosted.org/packages/44/72/35b5a8a5cbdcb38968328a8d8f2385f38328141dca6dc52d8e192a36e256/pillow_heif-1.1.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:e486b15696a958a04178aa9ff7f7db4f803d1ec7bbded924671576125c052ed5", size = 6809536, upload-time = "2025-09-30T16:41:51.309Z" },
- { url = "https://files.pythonhosted.org/packages/23/70/fc0e0cc6b864f53be2833b23cadd1d1a480a51d6b2d5efd5c4c119e8112e/pillow_heif-1.1.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:a37999e53c0cd32401667303e0b34c43240c32530809827091fabc7eb04d7cad", size = 6431784, upload-time = "2025-09-30T16:41:52.602Z" },
- { url = "https://files.pythonhosted.org/packages/96/0e/af38e5cbca622fceaa1ee8eba8e68b3c6bf1bd6e6a37eca3817bf3dcebdc/pillow_heif-1.1.1-cp314-cp314-win_amd64.whl", hash = "sha256:1d35e973b2463b03f7b0bd5c898c7a424a46d69f7c20a9c251b322dfe4f45068", size = 5577269, upload-time = "2025-09-30T16:41:54.206Z" },
- { url = "https://files.pythonhosted.org/packages/d6/fc/cf4d27be4a367fedfb76a92e8134ea2cacb3112dfb0dbb159ec4248bec29/pillow_heif-1.1.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:a3cdb939e4d6d4879f09edd9225d0813350ecae1901b8ea7a1172caf9e644ba5", size = 4685374, upload-time = "2025-09-30T16:42:08.612Z" },
- { url = "https://files.pythonhosted.org/packages/0a/a6/30be7dca129a7d35352270d93dee746efbecb52b5e24839f6aa850d742c1/pillow_heif-1.1.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:9c9f6911a6107f9ac4194d3793a36df0b43352ceb13dd379c8ecfbd24b6ca53f", size = 3447638, upload-time = "2025-09-30T16:42:10.358Z" },
- { url = "https://files.pythonhosted.org/packages/a8/e6/b6bb6dc64904fb471c49d7012135a029bce48cc236812d1f0c6aba27db2b/pillow_heif-1.1.1-pp310-pypy310_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bbcebadabbce24134f602c50db0ebf5632d9ef80a04c5167964c419b3d2f14a5", size = 5733397, upload-time = "2025-09-30T16:42:11.781Z" },
- { url = "https://files.pythonhosted.org/packages/db/47/eff35ab7f2e0bf1bac61c895fe07afa88e4a51deea098b63855c8936493e/pillow_heif-1.1.1-pp310-pypy310_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2fa5253dc6491d457425db34326f78638ea65938be4a631edd4b7198d7d088ab", size = 5461116, upload-time = "2025-09-30T16:42:13.066Z" },
- { url = "https://files.pythonhosted.org/packages/e4/b1/666aeeee67d8de3d9e0d38170eb754718727c61f2cf7bc183261ff1a6123/pillow_heif-1.1.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:aac2c3634ee420bb30e19090a1e1870e6ed12717020891cd6ffd34c3cca5c412", size = 5422660, upload-time = "2025-09-30T16:42:14.366Z" },
- { url = "https://files.pythonhosted.org/packages/17/7e/e7182fd74e911993ac3d4522ce43af439888baff14d8bc75fe9ee5a95580/pillow_heif-1.1.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0ea9c72f5cbe1b35229be883797eb7f113d2e7353dc21a66fd813a33d95a16b3", size = 4685305, upload-time = "2025-09-30T16:42:15.61Z" },
- { url = "https://files.pythonhosted.org/packages/aa/92/181b49961411b89c857cbb984030aa6ab0886a059be574b0f7f402e098cf/pillow_heif-1.1.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:16f83a7e0ad3aa4209ae592db2842d35faab21b44d269fb3b1145e07ecbecebc", size = 3447553, upload-time = "2025-09-30T16:42:16.96Z" },
- { url = "https://files.pythonhosted.org/packages/d5/c5/2ce061f60d52a1603c0e8634409a480c8ff799379ab0822b8e9c1d9a78bd/pillow_heif-1.1.1-pp311-pypy311_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7fc8273124fe96d83fd6dee9476a5b58b6338cb41ffe97581fc2e8f17c97864c", size = 5733421, upload-time = "2025-09-30T16:42:18.737Z" },
- { url = "https://files.pythonhosted.org/packages/49/9a/9e6cfc339b2de5cb19e7762f89b59e6ef15fb41219f7e382bb2d507245bb/pillow_heif-1.1.1-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ca64d2e83b28ae7f194640e1c6d5d842de8f061845a4fd700a4ab7efb9df15f9", size = 5461117, upload-time = "2025-09-30T16:42:20.48Z" },
- { url = "https://files.pythonhosted.org/packages/20/c5/1912f3b9220a91ef449a710bce1a3128a633b44d86a17ef58fb376403bfd/pillow_heif-1.1.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:7520b37f183f5339c9a0dbdd4cae468cc7d7f191fff26fd18d8d96cf69089994", size = 5422656, upload-time = "2025-09-30T16:42:22.39Z" },
-]
-
-[[package]]
-name = "platformdirs"
-version = "4.5.1"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/cf/86/0248f086a84f01b37aaec0fa567b397df1a119f73c16f6c7a9aac73ea309/platformdirs-4.5.1.tar.gz", hash = "sha256:61d5cdcc6065745cdd94f0f878977f8de9437be93de97c1c12f853c9c0cdcbda", size = 21715, upload-time = "2025-12-05T13:52:58.638Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/cb/28/3bfe2fa5a7b9c46fe7e13c97bda14c895fb10fa2ebf1d0abb90e0cea7ee1/platformdirs-4.5.1-py3-none-any.whl", hash = "sha256:d03afa3963c806a9bed9d5125c8f4cb2fdaf74a55ab60e5d59b3fde758104d31", size = 18731, upload-time = "2025-12-05T13:52:56.823Z" },
-]
-
-[[package]]
-name = "pluggy"
-version = "1.6.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },
-]
-
-[[package]]
-name = "pre-commit"
-version = "4.5.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "cfgv" },
- { name = "identify" },
- { name = "nodeenv" },
- { name = "pyyaml" },
- { name = "virtualenv" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/40/f1/6d86a29246dfd2e9b6237f0b5823717f60cad94d47ddc26afa916d21f525/pre_commit-4.5.1.tar.gz", hash = "sha256:eb545fcff725875197837263e977ea257a402056661f09dae08e4b149b030a61", size = 198232, upload-time = "2025-12-16T21:14:33.552Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/5d/19/fd3ef348460c80af7bb4669ea7926651d1f95c23ff2df18b9d24bab4f3fa/pre_commit-4.5.1-py2.py3-none-any.whl", hash = "sha256:3b3afd891e97337708c1674210f8eba659b52a38ea5f822ff142d10786221f77", size = 226437, upload-time = "2025-12-16T21:14:32.409Z" },
-]
-
-[[package]]
-name = "proto-plus"
-version = "1.27.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "protobuf" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/3a/02/8832cde80e7380c600fbf55090b6ab7b62bd6825dbedde6d6657c15a1f8e/proto_plus-1.27.1.tar.gz", hash = "sha256:912a7460446625b792f6448bade9e55cd4e41e6ac10e27009ef71a7f317fa147", size = 56929, upload-time = "2026-02-02T17:34:49.035Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/5d/79/ac273cbbf744691821a9cca88957257f41afe271637794975ca090b9588b/proto_plus-1.27.1-py3-none-any.whl", hash = "sha256:e4643061f3a4d0de092d62aa4ad09fa4756b2cbb89d4627f3985018216f9fefc", size = 50480, upload-time = "2026-02-02T17:34:47.339Z" },
-]
-
-[[package]]
-name = "protobuf"
-version = "6.33.4"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/53/b8/cda15d9d46d03d4aa3a67cb6bffe05173440ccf86a9541afaf7ac59a1b6b/protobuf-6.33.4.tar.gz", hash = "sha256:dc2e61bca3b10470c1912d166fe0af67bfc20eb55971dcef8dfa48ce14f0ed91", size = 444346, upload-time = "2026-01-12T18:33:40.109Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/e0/be/24ef9f3095bacdf95b458543334d0c4908ccdaee5130420bf064492c325f/protobuf-6.33.4-cp310-abi3-win32.whl", hash = "sha256:918966612c8232fc6c24c78e1cd89784307f5814ad7506c308ee3cf86662850d", size = 425612, upload-time = "2026-01-12T18:33:29.656Z" },
- { url = "https://files.pythonhosted.org/packages/31/ad/e5693e1974a28869e7cd244302911955c1cebc0161eb32dfa2b25b6e96f0/protobuf-6.33.4-cp310-abi3-win_amd64.whl", hash = "sha256:8f11ffae31ec67fc2554c2ef891dcb561dae9a2a3ed941f9e134c2db06657dbc", size = 436962, upload-time = "2026-01-12T18:33:31.345Z" },
- { url = "https://files.pythonhosted.org/packages/66/15/6ee23553b6bfd82670207ead921f4d8ef14c107e5e11443b04caeb5ab5ec/protobuf-6.33.4-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:2fe67f6c014c84f655ee06f6f66213f9254b3a8b6bda6cda0ccd4232c73c06f0", size = 427612, upload-time = "2026-01-12T18:33:32.646Z" },
- { url = "https://files.pythonhosted.org/packages/2b/48/d301907ce6d0db75f959ca74f44b475a9caa8fcba102d098d3c3dd0f2d3f/protobuf-6.33.4-cp39-abi3-manylinux2014_aarch64.whl", hash = "sha256:757c978f82e74d75cba88eddec479df9b99a42b31193313b75e492c06a51764e", size = 324484, upload-time = "2026-01-12T18:33:33.789Z" },
- { url = "https://files.pythonhosted.org/packages/92/1c/e53078d3f7fe710572ab2dcffd993e1e3b438ae71cfc031b71bae44fcb2d/protobuf-6.33.4-cp39-abi3-manylinux2014_s390x.whl", hash = "sha256:c7c64f259c618f0bef7bee042075e390debbf9682334be2b67408ec7c1c09ee6", size = 339256, upload-time = "2026-01-12T18:33:35.231Z" },
- { url = "https://files.pythonhosted.org/packages/e8/8e/971c0edd084914f7ee7c23aa70ba89e8903918adca179319ee94403701d5/protobuf-6.33.4-cp39-abi3-manylinux2014_x86_64.whl", hash = "sha256:3df850c2f8db9934de4cf8f9152f8dc2558f49f298f37f90c517e8e5c84c30e9", size = 323311, upload-time = "2026-01-12T18:33:36.305Z" },
- { url = "https://files.pythonhosted.org/packages/75/b1/1dc83c2c661b4c62d56cc081706ee33a4fc2835bd90f965baa2663ef7676/protobuf-6.33.4-py3-none-any.whl", hash = "sha256:1fe3730068fcf2e595816a6c34fe66eeedd37d51d0400b72fabc848811fdc1bc", size = 170532, upload-time = "2026-01-12T18:33:39.199Z" },
-]
-
-[[package]]
-name = "psutil"
-version = "7.2.1"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/73/cb/09e5184fb5fc0358d110fc3ca7f6b1d033800734d34cac10f4136cfac10e/psutil-7.2.1.tar.gz", hash = "sha256:f7583aec590485b43ca601dd9cea0dcd65bd7bb21d30ef4ddbf4ea6b5ed1bdd3", size = 490253, upload-time = "2025-12-29T08:26:00.169Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/77/8e/f0c242053a368c2aa89584ecd1b054a18683f13d6e5a318fc9ec36582c94/psutil-7.2.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:ba9f33bb525b14c3ea563b2fd521a84d2fa214ec59e3e6a2858f78d0844dd60d", size = 129624, upload-time = "2025-12-29T08:26:04.255Z" },
- { url = "https://files.pythonhosted.org/packages/26/97/a58a4968f8990617decee234258a2b4fc7cd9e35668387646c1963e69f26/psutil-7.2.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:81442dac7abfc2f4f4385ea9e12ddf5a796721c0f6133260687fec5c3780fa49", size = 130132, upload-time = "2025-12-29T08:26:06.228Z" },
- { url = "https://files.pythonhosted.org/packages/db/6d/ed44901e830739af5f72a85fa7ec5ff1edea7f81bfbf4875e409007149bd/psutil-7.2.1-cp313-cp313t-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ea46c0d060491051d39f0d2cff4f98d5c72b288289f57a21556cc7d504db37fc", size = 180612, upload-time = "2025-12-29T08:26:08.276Z" },
- { url = "https://files.pythonhosted.org/packages/c7/65/b628f8459bca4efbfae50d4bf3feaab803de9a160b9d5f3bd9295a33f0c2/psutil-7.2.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:35630d5af80d5d0d49cfc4d64c1c13838baf6717a13effb35869a5919b854cdf", size = 183201, upload-time = "2025-12-29T08:26:10.622Z" },
- { url = "https://files.pythonhosted.org/packages/fb/23/851cadc9764edcc18f0effe7d0bf69f727d4cf2442deb4a9f78d4e4f30f2/psutil-7.2.1-cp313-cp313t-win_amd64.whl", hash = "sha256:923f8653416604e356073e6e0bccbe7c09990acef442def2f5640dd0faa9689f", size = 139081, upload-time = "2025-12-29T08:26:12.483Z" },
- { url = "https://files.pythonhosted.org/packages/59/82/d63e8494ec5758029f31c6cb06d7d161175d8281e91d011a4a441c8a43b5/psutil-7.2.1-cp313-cp313t-win_arm64.whl", hash = "sha256:cfbe6b40ca48019a51827f20d830887b3107a74a79b01ceb8cc8de4ccb17b672", size = 134767, upload-time = "2025-12-29T08:26:14.528Z" },
- { url = "https://files.pythonhosted.org/packages/05/c2/5fb764bd61e40e1fe756a44bd4c21827228394c17414ade348e28f83cd79/psutil-7.2.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:494c513ccc53225ae23eec7fe6e1482f1b8a44674241b54561f755a898650679", size = 129716, upload-time = "2025-12-29T08:26:16.017Z" },
- { url = "https://files.pythonhosted.org/packages/c9/d2/935039c20e06f615d9ca6ca0ab756cf8408a19d298ffaa08666bc18dc805/psutil-7.2.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:3fce5f92c22b00cdefd1645aa58ab4877a01679e901555067b1bd77039aa589f", size = 130133, upload-time = "2025-12-29T08:26:18.009Z" },
- { url = "https://files.pythonhosted.org/packages/77/69/19f1eb0e01d24c2b3eacbc2f78d3b5add8a89bf0bb69465bc8d563cc33de/psutil-7.2.1-cp314-cp314t-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:93f3f7b0bb07711b49626e7940d6fe52aa9940ad86e8f7e74842e73189712129", size = 181518, upload-time = "2025-12-29T08:26:20.241Z" },
- { url = "https://files.pythonhosted.org/packages/e1/6d/7e18b1b4fa13ad370787626c95887b027656ad4829c156bb6569d02f3262/psutil-7.2.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d34d2ca888208eea2b5c68186841336a7f5e0b990edec929be909353a202768a", size = 184348, upload-time = "2025-12-29T08:26:22.215Z" },
- { url = "https://files.pythonhosted.org/packages/98/60/1672114392dd879586d60dd97896325df47d9a130ac7401318005aab28ec/psutil-7.2.1-cp314-cp314t-win_amd64.whl", hash = "sha256:2ceae842a78d1603753561132d5ad1b2f8a7979cb0c283f5b52fb4e6e14b1a79", size = 140400, upload-time = "2025-12-29T08:26:23.993Z" },
- { url = "https://files.pythonhosted.org/packages/fb/7b/d0e9d4513c46e46897b46bcfc410d51fc65735837ea57a25170f298326e6/psutil-7.2.1-cp314-cp314t-win_arm64.whl", hash = "sha256:08a2f175e48a898c8eb8eace45ce01777f4785bc744c90aa2cc7f2fa5462a266", size = 135430, upload-time = "2025-12-29T08:26:25.999Z" },
- { url = "https://files.pythonhosted.org/packages/c5/cf/5180eb8c8bdf6a503c6919f1da28328bd1e6b3b1b5b9d5b01ae64f019616/psutil-7.2.1-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:b2e953fcfaedcfbc952b44744f22d16575d3aa78eb4f51ae74165b4e96e55f42", size = 128137, upload-time = "2025-12-29T08:26:27.759Z" },
- { url = "https://files.pythonhosted.org/packages/c5/2c/78e4a789306a92ade5000da4f5de3255202c534acdadc3aac7b5458fadef/psutil-7.2.1-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:05cc68dbb8c174828624062e73078e7e35406f4ca2d0866c272c2410d8ef06d1", size = 128947, upload-time = "2025-12-29T08:26:29.548Z" },
- { url = "https://files.pythonhosted.org/packages/29/f8/40e01c350ad9a2b3cb4e6adbcc8a83b17ee50dd5792102b6142385937db5/psutil-7.2.1-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5e38404ca2bb30ed7267a46c02f06ff842e92da3bb8c5bfdadbd35a5722314d8", size = 154694, upload-time = "2025-12-29T08:26:32.147Z" },
- { url = "https://files.pythonhosted.org/packages/06/e4/b751cdf839c011a9714a783f120e6a86b7494eb70044d7d81a25a5cd295f/psutil-7.2.1-cp36-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ab2b98c9fc19f13f59628d94df5cc4cc4844bc572467d113a8b517d634e362c6", size = 156136, upload-time = "2025-12-29T08:26:34.079Z" },
- { url = "https://files.pythonhosted.org/packages/44/ad/bbf6595a8134ee1e94a4487af3f132cef7fce43aef4a93b49912a48c3af7/psutil-7.2.1-cp36-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:f78baafb38436d5a128f837fab2d92c276dfb48af01a240b861ae02b2413ada8", size = 148108, upload-time = "2025-12-29T08:26:36.225Z" },
- { url = "https://files.pythonhosted.org/packages/1c/15/dd6fd869753ce82ff64dcbc18356093471a5a5adf4f77ed1f805d473d859/psutil-7.2.1-cp36-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:99a4cd17a5fdd1f3d014396502daa70b5ec21bf4ffe38393e152f8e449757d67", size = 147402, upload-time = "2025-12-29T08:26:39.21Z" },
- { url = "https://files.pythonhosted.org/packages/34/68/d9317542e3f2b180c4306e3f45d3c922d7e86d8ce39f941bb9e2e9d8599e/psutil-7.2.1-cp37-abi3-win_amd64.whl", hash = "sha256:b1b0671619343aa71c20ff9767eced0483e4fc9e1f489d50923738caf6a03c17", size = 136938, upload-time = "2025-12-29T08:26:41.036Z" },
- { url = "https://files.pythonhosted.org/packages/3e/73/2ce007f4198c80fcf2cb24c169884f833fe93fbc03d55d302627b094ee91/psutil-7.2.1-cp37-abi3-win_arm64.whl", hash = "sha256:0d67c1822c355aa6f7314d92018fb4268a76668a536f133599b91edd48759442", size = 133836, upload-time = "2025-12-29T08:26:43.086Z" },
-]
-
-[[package]]
-name = "pyasn1"
-version = "0.6.2"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/fe/b6/6e630dff89739fcd427e3f72b3d905ce0acb85a45d4ec3e2678718a3487f/pyasn1-0.6.2.tar.gz", hash = "sha256:9b59a2b25ba7e4f8197db7686c09fb33e658b98339fadb826e9512629017833b", size = 146586, upload-time = "2026-01-16T18:04:18.534Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/44/b5/a96872e5184f354da9c84ae119971a0a4c221fe9b27a4d94bd43f2596727/pyasn1-0.6.2-py3-none-any.whl", hash = "sha256:1eb26d860996a18e9b6ed05e7aae0e9fc21619fcee6af91cca9bad4fbea224bf", size = 83371, upload-time = "2026-01-16T18:04:17.174Z" },
-]
-
-[[package]]
-name = "pyasn1-modules"
-version = "0.4.2"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "pyasn1" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz", hash = "sha256:677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6", size = 307892, upload-time = "2025-03-28T02:41:22.17Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/47/8d/d529b5d697919ba8c11ad626e835d4039be708a35b0d22de83a269a6682c/pyasn1_modules-0.4.2-py3-none-any.whl", hash = "sha256:29253a9207ce32b64c3ac6600edc75368f98473906e8fd1043bd6b5b1de2c14a", size = 181259, upload-time = "2025-03-28T02:41:19.028Z" },
-]
-
-[[package]]
-name = "pycparser"
-version = "3.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/1b/7d/92392ff7815c21062bea51aa7b87d45576f649f16458d78b7cf94b9ab2e6/pycparser-3.0.tar.gz", hash = "sha256:600f49d217304a5902ac3c37e1281c9fe94e4d0489de643a9504c5cdfdfc6b29", size = 103492, upload-time = "2026-01-21T14:26:51.89Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/0c/c3/44f3fbbfa403ea2a7c779186dc20772604442dde72947e7d01069cbe98e3/pycparser-3.0-py3-none-any.whl", hash = "sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992", size = 48172, upload-time = "2026-01-21T14:26:50.693Z" },
-]
-
-[[package]]
-name = "pydantic"
-version = "2.12.5"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "annotated-types" },
- { name = "pydantic-core" },
- { name = "typing-extensions" },
- { name = "typing-inspection" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/69/44/36f1a6e523abc58ae5f928898e4aca2e0ea509b5aa6f6f392a5d882be928/pydantic-2.12.5.tar.gz", hash = "sha256:4d351024c75c0f085a9febbb665ce8c0c6ec5d30e903bdb6394b7ede26aebb49", size = 821591, upload-time = "2025-11-26T15:11:46.471Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/5a/87/b70ad306ebb6f9b585f114d0ac2137d792b48be34d732d60e597c2f8465a/pydantic-2.12.5-py3-none-any.whl", hash = "sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d", size = 463580, upload-time = "2025-11-26T15:11:44.605Z" },
-]
-
-[[package]]
-name = "pydantic-core"
-version = "2.41.5"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "typing-extensions" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/71/70/23b021c950c2addd24ec408e9ab05d59b035b39d97cdc1130e1bce647bb6/pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e", size = 460952, upload-time = "2025-11-04T13:43:49.098Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/c6/90/32c9941e728d564b411d574d8ee0cf09b12ec978cb22b294995bae5549a5/pydantic_core-2.41.5-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:77b63866ca88d804225eaa4af3e664c5faf3568cea95360d21f4725ab6e07146", size = 2107298, upload-time = "2025-11-04T13:39:04.116Z" },
- { url = "https://files.pythonhosted.org/packages/fb/a8/61c96a77fe28993d9a6fb0f4127e05430a267b235a124545d79fea46dd65/pydantic_core-2.41.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dfa8a0c812ac681395907e71e1274819dec685fec28273a28905df579ef137e2", size = 1901475, upload-time = "2025-11-04T13:39:06.055Z" },
- { url = "https://files.pythonhosted.org/packages/5d/b6/338abf60225acc18cdc08b4faef592d0310923d19a87fba1faf05af5346e/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5921a4d3ca3aee735d9fd163808f5e8dd6c6972101e4adbda9a4667908849b97", size = 1918815, upload-time = "2025-11-04T13:39:10.41Z" },
- { url = "https://files.pythonhosted.org/packages/d1/1c/2ed0433e682983d8e8cba9c8d8ef274d4791ec6a6f24c58935b90e780e0a/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25c479382d26a2a41b7ebea1043564a937db462816ea07afa8a44c0866d52f9", size = 2065567, upload-time = "2025-11-04T13:39:12.244Z" },
- { url = "https://files.pythonhosted.org/packages/b3/24/cf84974ee7d6eae06b9e63289b7b8f6549d416b5c199ca2d7ce13bbcf619/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f547144f2966e1e16ae626d8ce72b4cfa0caedc7fa28052001c94fb2fcaa1c52", size = 2230442, upload-time = "2025-11-04T13:39:13.962Z" },
- { url = "https://files.pythonhosted.org/packages/fd/21/4e287865504b3edc0136c89c9c09431be326168b1eb7841911cbc877a995/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f52298fbd394f9ed112d56f3d11aabd0d5bd27beb3084cc3d8ad069483b8941", size = 2350956, upload-time = "2025-11-04T13:39:15.889Z" },
- { url = "https://files.pythonhosted.org/packages/a8/76/7727ef2ffa4b62fcab916686a68a0426b9b790139720e1934e8ba797e238/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:100baa204bb412b74fe285fb0f3a385256dad1d1879f0a5cb1499ed2e83d132a", size = 2068253, upload-time = "2025-11-04T13:39:17.403Z" },
- { url = "https://files.pythonhosted.org/packages/d5/8c/a4abfc79604bcb4c748e18975c44f94f756f08fb04218d5cb87eb0d3a63e/pydantic_core-2.41.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:05a2c8852530ad2812cb7914dc61a1125dc4e06252ee98e5638a12da6cc6fb6c", size = 2177050, upload-time = "2025-11-04T13:39:19.351Z" },
- { url = "https://files.pythonhosted.org/packages/67/b1/de2e9a9a79b480f9cb0b6e8b6ba4c50b18d4e89852426364c66aa82bb7b3/pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:29452c56df2ed968d18d7e21f4ab0ac55e71dc59524872f6fc57dcf4a3249ed2", size = 2147178, upload-time = "2025-11-04T13:39:21Z" },
- { url = "https://files.pythonhosted.org/packages/16/c1/dfb33f837a47b20417500efaa0378adc6635b3c79e8369ff7a03c494b4ac/pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:d5160812ea7a8a2ffbe233d8da666880cad0cbaf5d4de74ae15c313213d62556", size = 2341833, upload-time = "2025-11-04T13:39:22.606Z" },
- { url = "https://files.pythonhosted.org/packages/47/36/00f398642a0f4b815a9a558c4f1dca1b4020a7d49562807d7bc9ff279a6c/pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:df3959765b553b9440adfd3c795617c352154e497a4eaf3752555cfb5da8fc49", size = 2321156, upload-time = "2025-11-04T13:39:25.843Z" },
- { url = "https://files.pythonhosted.org/packages/7e/70/cad3acd89fde2010807354d978725ae111ddf6d0ea46d1ea1775b5c1bd0c/pydantic_core-2.41.5-cp310-cp310-win32.whl", hash = "sha256:1f8d33a7f4d5a7889e60dc39856d76d09333d8a6ed0f5f1190635cbec70ec4ba", size = 1989378, upload-time = "2025-11-04T13:39:27.92Z" },
- { url = "https://files.pythonhosted.org/packages/76/92/d338652464c6c367e5608e4488201702cd1cbb0f33f7b6a85a60fe5f3720/pydantic_core-2.41.5-cp310-cp310-win_amd64.whl", hash = "sha256:62de39db01b8d593e45871af2af9e497295db8d73b085f6bfd0b18c83c70a8f9", size = 2013622, upload-time = "2025-11-04T13:39:29.848Z" },
- { url = "https://files.pythonhosted.org/packages/e8/72/74a989dd9f2084b3d9530b0915fdda64ac48831c30dbf7c72a41a5232db8/pydantic_core-2.41.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a3a52f6156e73e7ccb0f8cced536adccb7042be67cb45f9562e12b319c119da6", size = 2105873, upload-time = "2025-11-04T13:39:31.373Z" },
- { url = "https://files.pythonhosted.org/packages/12/44/37e403fd9455708b3b942949e1d7febc02167662bf1a7da5b78ee1ea2842/pydantic_core-2.41.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7f3bf998340c6d4b0c9a2f02d6a400e51f123b59565d74dc60d252ce888c260b", size = 1899826, upload-time = "2025-11-04T13:39:32.897Z" },
- { url = "https://files.pythonhosted.org/packages/33/7f/1d5cab3ccf44c1935a359d51a8a2a9e1a654b744b5e7f80d41b88d501eec/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:378bec5c66998815d224c9ca994f1e14c0c21cb95d2f52b6021cc0b2a58f2a5a", size = 1917869, upload-time = "2025-11-04T13:39:34.469Z" },
- { url = "https://files.pythonhosted.org/packages/6e/6a/30d94a9674a7fe4f4744052ed6c5e083424510be1e93da5bc47569d11810/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e7b576130c69225432866fe2f4a469a85a54ade141d96fd396dffcf607b558f8", size = 2063890, upload-time = "2025-11-04T13:39:36.053Z" },
- { url = "https://files.pythonhosted.org/packages/50/be/76e5d46203fcb2750e542f32e6c371ffa9b8ad17364cf94bb0818dbfb50c/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6cb58b9c66f7e4179a2d5e0f849c48eff5c1fca560994d6eb6543abf955a149e", size = 2229740, upload-time = "2025-11-04T13:39:37.753Z" },
- { url = "https://files.pythonhosted.org/packages/d3/ee/fed784df0144793489f87db310a6bbf8118d7b630ed07aa180d6067e653a/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:88942d3a3dff3afc8288c21e565e476fc278902ae4d6d134f1eeda118cc830b1", size = 2350021, upload-time = "2025-11-04T13:39:40.94Z" },
- { url = "https://files.pythonhosted.org/packages/c8/be/8fed28dd0a180dca19e72c233cbf58efa36df055e5b9d90d64fd1740b828/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f31d95a179f8d64d90f6831d71fa93290893a33148d890ba15de25642c5d075b", size = 2066378, upload-time = "2025-11-04T13:39:42.523Z" },
- { url = "https://files.pythonhosted.org/packages/b0/3b/698cf8ae1d536a010e05121b4958b1257f0b5522085e335360e53a6b1c8b/pydantic_core-2.41.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c1df3d34aced70add6f867a8cf413e299177e0c22660cc767218373d0779487b", size = 2175761, upload-time = "2025-11-04T13:39:44.553Z" },
- { url = "https://files.pythonhosted.org/packages/b8/ba/15d537423939553116dea94ce02f9c31be0fa9d0b806d427e0308ec17145/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4009935984bd36bd2c774e13f9a09563ce8de4abaa7226f5108262fa3e637284", size = 2146303, upload-time = "2025-11-04T13:39:46.238Z" },
- { url = "https://files.pythonhosted.org/packages/58/7f/0de669bf37d206723795f9c90c82966726a2ab06c336deba4735b55af431/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:34a64bc3441dc1213096a20fe27e8e128bd3ff89921706e83c0b1ac971276594", size = 2340355, upload-time = "2025-11-04T13:39:48.002Z" },
- { url = "https://files.pythonhosted.org/packages/e5/de/e7482c435b83d7e3c3ee5ee4451f6e8973cff0eb6007d2872ce6383f6398/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c9e19dd6e28fdcaa5a1de679aec4141f691023916427ef9bae8584f9c2fb3b0e", size = 2319875, upload-time = "2025-11-04T13:39:49.705Z" },
- { url = "https://files.pythonhosted.org/packages/fe/e6/8c9e81bb6dd7560e33b9053351c29f30c8194b72f2d6932888581f503482/pydantic_core-2.41.5-cp311-cp311-win32.whl", hash = "sha256:2c010c6ded393148374c0f6f0bf89d206bf3217f201faa0635dcd56bd1520f6b", size = 1987549, upload-time = "2025-11-04T13:39:51.842Z" },
- { url = "https://files.pythonhosted.org/packages/11/66/f14d1d978ea94d1bc21fc98fcf570f9542fe55bfcc40269d4e1a21c19bf7/pydantic_core-2.41.5-cp311-cp311-win_amd64.whl", hash = "sha256:76ee27c6e9c7f16f47db7a94157112a2f3a00e958bc626e2f4ee8bec5c328fbe", size = 2011305, upload-time = "2025-11-04T13:39:53.485Z" },
- { url = "https://files.pythonhosted.org/packages/56/d8/0e271434e8efd03186c5386671328154ee349ff0354d83c74f5caaf096ed/pydantic_core-2.41.5-cp311-cp311-win_arm64.whl", hash = "sha256:4bc36bbc0b7584de96561184ad7f012478987882ebf9f9c389b23f432ea3d90f", size = 1972902, upload-time = "2025-11-04T13:39:56.488Z" },
- { url = "https://files.pythonhosted.org/packages/5f/5d/5f6c63eebb5afee93bcaae4ce9a898f3373ca23df3ccaef086d0233a35a7/pydantic_core-2.41.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f41a7489d32336dbf2199c8c0a215390a751c5b014c2c1c5366e817202e9cdf7", size = 2110990, upload-time = "2025-11-04T13:39:58.079Z" },
- { url = "https://files.pythonhosted.org/packages/aa/32/9c2e8ccb57c01111e0fd091f236c7b371c1bccea0fa85247ac55b1e2b6b6/pydantic_core-2.41.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:070259a8818988b9a84a449a2a7337c7f430a22acc0859c6b110aa7212a6d9c0", size = 1896003, upload-time = "2025-11-04T13:39:59.956Z" },
- { url = "https://files.pythonhosted.org/packages/68/b8/a01b53cb0e59139fbc9e4fda3e9724ede8de279097179be4ff31f1abb65a/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e96cea19e34778f8d59fe40775a7a574d95816eb150850a85a7a4c8f4b94ac69", size = 1919200, upload-time = "2025-11-04T13:40:02.241Z" },
- { url = "https://files.pythonhosted.org/packages/38/de/8c36b5198a29bdaade07b5985e80a233a5ac27137846f3bc2d3b40a47360/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed2e99c456e3fadd05c991f8f437ef902e00eedf34320ba2b0842bd1c3ca3a75", size = 2052578, upload-time = "2025-11-04T13:40:04.401Z" },
- { url = "https://files.pythonhosted.org/packages/00/b5/0e8e4b5b081eac6cb3dbb7e60a65907549a1ce035a724368c330112adfdd/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:65840751b72fbfd82c3c640cff9284545342a4f1eb1586ad0636955b261b0b05", size = 2208504, upload-time = "2025-11-04T13:40:06.072Z" },
- { url = "https://files.pythonhosted.org/packages/77/56/87a61aad59c7c5b9dc8caad5a41a5545cba3810c3e828708b3d7404f6cef/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e536c98a7626a98feb2d3eaf75944ef6f3dbee447e1f841eae16f2f0a72d8ddc", size = 2335816, upload-time = "2025-11-04T13:40:07.835Z" },
- { url = "https://files.pythonhosted.org/packages/0d/76/941cc9f73529988688a665a5c0ecff1112b3d95ab48f81db5f7606f522d3/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eceb81a8d74f9267ef4081e246ffd6d129da5d87e37a77c9bde550cb04870c1c", size = 2075366, upload-time = "2025-11-04T13:40:09.804Z" },
- { url = "https://files.pythonhosted.org/packages/d3/43/ebef01f69baa07a482844faaa0a591bad1ef129253ffd0cdaa9d8a7f72d3/pydantic_core-2.41.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d38548150c39b74aeeb0ce8ee1d8e82696f4a4e16ddc6de7b1d8823f7de4b9b5", size = 2171698, upload-time = "2025-11-04T13:40:12.004Z" },
- { url = "https://files.pythonhosted.org/packages/b1/87/41f3202e4193e3bacfc2c065fab7706ebe81af46a83d3e27605029c1f5a6/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c23e27686783f60290e36827f9c626e63154b82b116d7fe9adba1fda36da706c", size = 2132603, upload-time = "2025-11-04T13:40:13.868Z" },
- { url = "https://files.pythonhosted.org/packages/49/7d/4c00df99cb12070b6bccdef4a195255e6020a550d572768d92cc54dba91a/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:482c982f814460eabe1d3bb0adfdc583387bd4691ef00b90575ca0d2b6fe2294", size = 2329591, upload-time = "2025-11-04T13:40:15.672Z" },
- { url = "https://files.pythonhosted.org/packages/cc/6a/ebf4b1d65d458f3cda6a7335d141305dfa19bdc61140a884d165a8a1bbc7/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:bfea2a5f0b4d8d43adf9d7b8bf019fb46fdd10a2e5cde477fbcb9d1fa08c68e1", size = 2319068, upload-time = "2025-11-04T13:40:17.532Z" },
- { url = "https://files.pythonhosted.org/packages/49/3b/774f2b5cd4192d5ab75870ce4381fd89cf218af999515baf07e7206753f0/pydantic_core-2.41.5-cp312-cp312-win32.whl", hash = "sha256:b74557b16e390ec12dca509bce9264c3bbd128f8a2c376eaa68003d7f327276d", size = 1985908, upload-time = "2025-11-04T13:40:19.309Z" },
- { url = "https://files.pythonhosted.org/packages/86/45/00173a033c801cacf67c190fef088789394feaf88a98a7035b0e40d53dc9/pydantic_core-2.41.5-cp312-cp312-win_amd64.whl", hash = "sha256:1962293292865bca8e54702b08a4f26da73adc83dd1fcf26fbc875b35d81c815", size = 2020145, upload-time = "2025-11-04T13:40:21.548Z" },
- { url = "https://files.pythonhosted.org/packages/f9/22/91fbc821fa6d261b376a3f73809f907cec5ca6025642c463d3488aad22fb/pydantic_core-2.41.5-cp312-cp312-win_arm64.whl", hash = "sha256:1746d4a3d9a794cacae06a5eaaccb4b8643a131d45fbc9af23e353dc0a5ba5c3", size = 1976179, upload-time = "2025-11-04T13:40:23.393Z" },
- { url = "https://files.pythonhosted.org/packages/87/06/8806241ff1f70d9939f9af039c6c35f2360cf16e93c2ca76f184e76b1564/pydantic_core-2.41.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:941103c9be18ac8daf7b7adca8228f8ed6bb7a1849020f643b3a14d15b1924d9", size = 2120403, upload-time = "2025-11-04T13:40:25.248Z" },
- { url = "https://files.pythonhosted.org/packages/94/02/abfa0e0bda67faa65fef1c84971c7e45928e108fe24333c81f3bfe35d5f5/pydantic_core-2.41.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:112e305c3314f40c93998e567879e887a3160bb8689ef3d2c04b6cc62c33ac34", size = 1896206, upload-time = "2025-11-04T13:40:27.099Z" },
- { url = "https://files.pythonhosted.org/packages/15/df/a4c740c0943e93e6500f9eb23f4ca7ec9bf71b19e608ae5b579678c8d02f/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbaad15cb0c90aa221d43c00e77bb33c93e8d36e0bf74760cd00e732d10a6a0", size = 1919307, upload-time = "2025-11-04T13:40:29.806Z" },
- { url = "https://files.pythonhosted.org/packages/9a/e3/6324802931ae1d123528988e0e86587c2072ac2e5394b4bc2bc34b61ff6e/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:03ca43e12fab6023fc79d28ca6b39b05f794ad08ec2feccc59a339b02f2b3d33", size = 2063258, upload-time = "2025-11-04T13:40:33.544Z" },
- { url = "https://files.pythonhosted.org/packages/c9/d4/2230d7151d4957dd79c3044ea26346c148c98fbf0ee6ebd41056f2d62ab5/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc799088c08fa04e43144b164feb0c13f9a0bc40503f8df3e9fde58a3c0c101e", size = 2214917, upload-time = "2025-11-04T13:40:35.479Z" },
- { url = "https://files.pythonhosted.org/packages/e6/9f/eaac5df17a3672fef0081b6c1bb0b82b33ee89aa5cec0d7b05f52fd4a1fa/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:97aeba56665b4c3235a0e52b2c2f5ae9cd071b8a8310ad27bddb3f7fb30e9aa2", size = 2332186, upload-time = "2025-11-04T13:40:37.436Z" },
- { url = "https://files.pythonhosted.org/packages/cf/4e/35a80cae583a37cf15604b44240e45c05e04e86f9cfd766623149297e971/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:406bf18d345822d6c21366031003612b9c77b3e29ffdb0f612367352aab7d586", size = 2073164, upload-time = "2025-11-04T13:40:40.289Z" },
- { url = "https://files.pythonhosted.org/packages/bf/e3/f6e262673c6140dd3305d144d032f7bd5f7497d3871c1428521f19f9efa2/pydantic_core-2.41.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b93590ae81f7010dbe380cdeab6f515902ebcbefe0b9327cc4804d74e93ae69d", size = 2179146, upload-time = "2025-11-04T13:40:42.809Z" },
- { url = "https://files.pythonhosted.org/packages/75/c7/20bd7fc05f0c6ea2056a4565c6f36f8968c0924f19b7d97bbfea55780e73/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:01a3d0ab748ee531f4ea6c3e48ad9dac84ddba4b0d82291f87248f2f9de8d740", size = 2137788, upload-time = "2025-11-04T13:40:44.752Z" },
- { url = "https://files.pythonhosted.org/packages/3a/8d/34318ef985c45196e004bc46c6eab2eda437e744c124ef0dbe1ff2c9d06b/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:6561e94ba9dacc9c61bce40e2d6bdc3bfaa0259d3ff36ace3b1e6901936d2e3e", size = 2340133, upload-time = "2025-11-04T13:40:46.66Z" },
- { url = "https://files.pythonhosted.org/packages/9c/59/013626bf8c78a5a5d9350d12e7697d3d4de951a75565496abd40ccd46bee/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:915c3d10f81bec3a74fbd4faebe8391013ba61e5a1a8d48c4455b923bdda7858", size = 2324852, upload-time = "2025-11-04T13:40:48.575Z" },
- { url = "https://files.pythonhosted.org/packages/1a/d9/c248c103856f807ef70c18a4f986693a46a8ffe1602e5d361485da502d20/pydantic_core-2.41.5-cp313-cp313-win32.whl", hash = "sha256:650ae77860b45cfa6e2cdafc42618ceafab3a2d9a3811fcfbd3bbf8ac3c40d36", size = 1994679, upload-time = "2025-11-04T13:40:50.619Z" },
- { url = "https://files.pythonhosted.org/packages/9e/8b/341991b158ddab181cff136acd2552c9f35bd30380422a639c0671e99a91/pydantic_core-2.41.5-cp313-cp313-win_amd64.whl", hash = "sha256:79ec52ec461e99e13791ec6508c722742ad745571f234ea6255bed38c6480f11", size = 2019766, upload-time = "2025-11-04T13:40:52.631Z" },
- { url = "https://files.pythonhosted.org/packages/73/7d/f2f9db34af103bea3e09735bb40b021788a5e834c81eedb541991badf8f5/pydantic_core-2.41.5-cp313-cp313-win_arm64.whl", hash = "sha256:3f84d5c1b4ab906093bdc1ff10484838aca54ef08de4afa9de0f5f14d69639cd", size = 1981005, upload-time = "2025-11-04T13:40:54.734Z" },
- { url = "https://files.pythonhosted.org/packages/ea/28/46b7c5c9635ae96ea0fbb779e271a38129df2550f763937659ee6c5dbc65/pydantic_core-2.41.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a", size = 2119622, upload-time = "2025-11-04T13:40:56.68Z" },
- { url = "https://files.pythonhosted.org/packages/74/1a/145646e5687e8d9a1e8d09acb278c8535ebe9e972e1f162ed338a622f193/pydantic_core-2.41.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14", size = 1891725, upload-time = "2025-11-04T13:40:58.807Z" },
- { url = "https://files.pythonhosted.org/packages/23/04/e89c29e267b8060b40dca97bfc64a19b2a3cf99018167ea1677d96368273/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1", size = 1915040, upload-time = "2025-11-04T13:41:00.853Z" },
- { url = "https://files.pythonhosted.org/packages/84/a3/15a82ac7bd97992a82257f777b3583d3e84bdb06ba6858f745daa2ec8a85/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66", size = 2063691, upload-time = "2025-11-04T13:41:03.504Z" },
- { url = "https://files.pythonhosted.org/packages/74/9b/0046701313c6ef08c0c1cf0e028c67c770a4e1275ca73131563c5f2a310a/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869", size = 2213897, upload-time = "2025-11-04T13:41:05.804Z" },
- { url = "https://files.pythonhosted.org/packages/8a/cd/6bac76ecd1b27e75a95ca3a9a559c643b3afcd2dd62086d4b7a32a18b169/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2", size = 2333302, upload-time = "2025-11-04T13:41:07.809Z" },
- { url = "https://files.pythonhosted.org/packages/4c/d2/ef2074dc020dd6e109611a8be4449b98cd25e1b9b8a303c2f0fca2f2bcf7/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375", size = 2064877, upload-time = "2025-11-04T13:41:09.827Z" },
- { url = "https://files.pythonhosted.org/packages/18/66/e9db17a9a763d72f03de903883c057b2592c09509ccfe468187f2a2eef29/pydantic_core-2.41.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553", size = 2180680, upload-time = "2025-11-04T13:41:12.379Z" },
- { url = "https://files.pythonhosted.org/packages/d3/9e/3ce66cebb929f3ced22be85d4c2399b8e85b622db77dad36b73c5387f8f8/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90", size = 2138960, upload-time = "2025-11-04T13:41:14.627Z" },
- { url = "https://files.pythonhosted.org/packages/a6/62/205a998f4327d2079326b01abee48e502ea739d174f0a89295c481a2272e/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07", size = 2339102, upload-time = "2025-11-04T13:41:16.868Z" },
- { url = "https://files.pythonhosted.org/packages/3c/0d/f05e79471e889d74d3d88f5bd20d0ed189ad94c2423d81ff8d0000aab4ff/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb", size = 2326039, upload-time = "2025-11-04T13:41:18.934Z" },
- { url = "https://files.pythonhosted.org/packages/ec/e1/e08a6208bb100da7e0c4b288eed624a703f4d129bde2da475721a80cab32/pydantic_core-2.41.5-cp314-cp314-win32.whl", hash = "sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23", size = 1995126, upload-time = "2025-11-04T13:41:21.418Z" },
- { url = "https://files.pythonhosted.org/packages/48/5d/56ba7b24e9557f99c9237e29f5c09913c81eeb2f3217e40e922353668092/pydantic_core-2.41.5-cp314-cp314-win_amd64.whl", hash = "sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf", size = 2015489, upload-time = "2025-11-04T13:41:24.076Z" },
- { url = "https://files.pythonhosted.org/packages/4e/bb/f7a190991ec9e3e0ba22e4993d8755bbc4a32925c0b5b42775c03e8148f9/pydantic_core-2.41.5-cp314-cp314-win_arm64.whl", hash = "sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0", size = 1977288, upload-time = "2025-11-04T13:41:26.33Z" },
- { url = "https://files.pythonhosted.org/packages/92/ed/77542d0c51538e32e15afe7899d79efce4b81eee631d99850edc2f5e9349/pydantic_core-2.41.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a", size = 2120255, upload-time = "2025-11-04T13:41:28.569Z" },
- { url = "https://files.pythonhosted.org/packages/bb/3d/6913dde84d5be21e284439676168b28d8bbba5600d838b9dca99de0fad71/pydantic_core-2.41.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3", size = 1863760, upload-time = "2025-11-04T13:41:31.055Z" },
- { url = "https://files.pythonhosted.org/packages/5a/f0/e5e6b99d4191da102f2b0eb9687aaa7f5bea5d9964071a84effc3e40f997/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c", size = 1878092, upload-time = "2025-11-04T13:41:33.21Z" },
- { url = "https://files.pythonhosted.org/packages/71/48/36fb760642d568925953bcc8116455513d6e34c4beaa37544118c36aba6d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612", size = 2053385, upload-time = "2025-11-04T13:41:35.508Z" },
- { url = "https://files.pythonhosted.org/packages/20/25/92dc684dd8eb75a234bc1c764b4210cf2646479d54b47bf46061657292a8/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d", size = 2218832, upload-time = "2025-11-04T13:41:37.732Z" },
- { url = "https://files.pythonhosted.org/packages/e2/09/f53e0b05023d3e30357d82eb35835d0f6340ca344720a4599cd663dca599/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9", size = 2327585, upload-time = "2025-11-04T13:41:40Z" },
- { url = "https://files.pythonhosted.org/packages/aa/4e/2ae1aa85d6af35a39b236b1b1641de73f5a6ac4d5a7509f77b814885760c/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660", size = 2041078, upload-time = "2025-11-04T13:41:42.323Z" },
- { url = "https://files.pythonhosted.org/packages/cd/13/2e215f17f0ef326fc72afe94776edb77525142c693767fc347ed6288728d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9", size = 2173914, upload-time = "2025-11-04T13:41:45.221Z" },
- { url = "https://files.pythonhosted.org/packages/02/7a/f999a6dcbcd0e5660bc348a3991c8915ce6599f4f2c6ac22f01d7a10816c/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3", size = 2129560, upload-time = "2025-11-04T13:41:47.474Z" },
- { url = "https://files.pythonhosted.org/packages/3a/b1/6c990ac65e3b4c079a4fb9f5b05f5b013afa0f4ed6780a3dd236d2cbdc64/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf", size = 2329244, upload-time = "2025-11-04T13:41:49.992Z" },
- { url = "https://files.pythonhosted.org/packages/d9/02/3c562f3a51afd4d88fff8dffb1771b30cfdfd79befd9883ee094f5b6c0d8/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470", size = 2331955, upload-time = "2025-11-04T13:41:54.079Z" },
- { url = "https://files.pythonhosted.org/packages/5c/96/5fb7d8c3c17bc8c62fdb031c47d77a1af698f1d7a406b0f79aaa1338f9ad/pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa", size = 1988906, upload-time = "2025-11-04T13:41:56.606Z" },
- { url = "https://files.pythonhosted.org/packages/22/ed/182129d83032702912c2e2d8bbe33c036f342cc735737064668585dac28f/pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c", size = 1981607, upload-time = "2025-11-04T13:41:58.889Z" },
- { url = "https://files.pythonhosted.org/packages/9f/ed/068e41660b832bb0b1aa5b58011dea2a3fe0ba7861ff38c4d4904c1c1a99/pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008", size = 1974769, upload-time = "2025-11-04T13:42:01.186Z" },
- { url = "https://files.pythonhosted.org/packages/11/72/90fda5ee3b97e51c494938a4a44c3a35a9c96c19bba12372fb9c634d6f57/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034", size = 2115441, upload-time = "2025-11-04T13:42:39.557Z" },
- { url = "https://files.pythonhosted.org/packages/1f/53/8942f884fa33f50794f119012dc6a1a02ac43a56407adaac20463df8e98f/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c", size = 1930291, upload-time = "2025-11-04T13:42:42.169Z" },
- { url = "https://files.pythonhosted.org/packages/79/c8/ecb9ed9cd942bce09fc888ee960b52654fbdbede4ba6c2d6e0d3b1d8b49c/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2", size = 1948632, upload-time = "2025-11-04T13:42:44.564Z" },
- { url = "https://files.pythonhosted.org/packages/2e/1b/687711069de7efa6af934e74f601e2a4307365e8fdc404703afc453eab26/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f15489ba13d61f670dcc96772e733aad1a6f9c429cc27574c6cdaed82d0146ad", size = 2138905, upload-time = "2025-11-04T13:42:47.156Z" },
- { url = "https://files.pythonhosted.org/packages/09/32/59b0c7e63e277fa7911c2fc70ccfb45ce4b98991e7ef37110663437005af/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:7da7087d756b19037bc2c06edc6c170eeef3c3bafcb8f532ff17d64dc427adfd", size = 2110495, upload-time = "2025-11-04T13:42:49.689Z" },
- { url = "https://files.pythonhosted.org/packages/aa/81/05e400037eaf55ad400bcd318c05bb345b57e708887f07ddb2d20e3f0e98/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:aabf5777b5c8ca26f7824cb4a120a740c9588ed58df9b2d196ce92fba42ff8dc", size = 1915388, upload-time = "2025-11-04T13:42:52.215Z" },
- { url = "https://files.pythonhosted.org/packages/6e/0d/e3549b2399f71d56476b77dbf3cf8937cec5cd70536bdc0e374a421d0599/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c007fe8a43d43b3969e8469004e9845944f1a80e6acd47c150856bb87f230c56", size = 1942879, upload-time = "2025-11-04T13:42:56.483Z" },
- { url = "https://files.pythonhosted.org/packages/f7/07/34573da085946b6a313d7c42f82f16e8920bfd730665de2d11c0c37a74b5/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b", size = 2139017, upload-time = "2025-11-04T13:42:59.471Z" },
- { url = "https://files.pythonhosted.org/packages/e6/b0/1a2aa41e3b5a4ba11420aba2d091b2d17959c8d1519ece3627c371951e73/pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b5819cd790dbf0c5eb9f82c73c16b39a65dd6dd4d1439dcdea7816ec9adddab8", size = 2103351, upload-time = "2025-11-04T13:43:02.058Z" },
- { url = "https://files.pythonhosted.org/packages/a4/ee/31b1f0020baaf6d091c87900ae05c6aeae101fa4e188e1613c80e4f1ea31/pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:5a4e67afbc95fa5c34cf27d9089bca7fcab4e51e57278d710320a70b956d1b9a", size = 1925363, upload-time = "2025-11-04T13:43:05.159Z" },
- { url = "https://files.pythonhosted.org/packages/e1/89/ab8e86208467e467a80deaca4e434adac37b10a9d134cd2f99b28a01e483/pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ece5c59f0ce7d001e017643d8d24da587ea1f74f6993467d85ae8a5ef9d4f42b", size = 2135615, upload-time = "2025-11-04T13:43:08.116Z" },
- { url = "https://files.pythonhosted.org/packages/99/0a/99a53d06dd0348b2008f2f30884b34719c323f16c3be4e6cc1203b74a91d/pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:16f80f7abe3351f8ea6858914ddc8c77e02578544a0ebc15b4c2e1a0e813b0b2", size = 2175369, upload-time = "2025-11-04T13:43:12.49Z" },
- { url = "https://files.pythonhosted.org/packages/6d/94/30ca3b73c6d485b9bb0bc66e611cff4a7138ff9736b7e66bcf0852151636/pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:33cb885e759a705b426baada1fe68cbb0a2e68e34c5d0d0289a364cf01709093", size = 2144218, upload-time = "2025-11-04T13:43:15.431Z" },
- { url = "https://files.pythonhosted.org/packages/87/57/31b4f8e12680b739a91f472b5671294236b82586889ef764b5fbc6669238/pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:c8d8b4eb992936023be7dee581270af5c6e0697a8559895f527f5b7105ecd36a", size = 2329951, upload-time = "2025-11-04T13:43:18.062Z" },
- { url = "https://files.pythonhosted.org/packages/7d/73/3c2c8edef77b8f7310e6fb012dbc4b8551386ed575b9eb6fb2506e28a7eb/pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:242a206cd0318f95cd21bdacff3fcc3aab23e79bba5cac3db5a841c9ef9c6963", size = 2318428, upload-time = "2025-11-04T13:43:20.679Z" },
- { url = "https://files.pythonhosted.org/packages/2f/02/8559b1f26ee0d502c74f9cca5c0d2fd97e967e083e006bbbb4e97f3a043a/pydantic_core-2.41.5-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d3a978c4f57a597908b7e697229d996d77a6d3c94901e9edee593adada95ce1a", size = 2147009, upload-time = "2025-11-04T13:43:23.286Z" },
- { url = "https://files.pythonhosted.org/packages/5f/9b/1b3f0e9f9305839d7e84912f9e8bfbd191ed1b1ef48083609f0dabde978c/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2379fa7ed44ddecb5bfe4e48577d752db9fc10be00a6b7446e9663ba143de26", size = 2101980, upload-time = "2025-11-04T13:43:25.97Z" },
- { url = "https://files.pythonhosted.org/packages/a4/ed/d71fefcb4263df0da6a85b5d8a7508360f2f2e9b3bf5814be9c8bccdccc1/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:266fb4cbf5e3cbd0b53669a6d1b039c45e3ce651fd5442eff4d07c2cc8d66808", size = 1923865, upload-time = "2025-11-04T13:43:28.763Z" },
- { url = "https://files.pythonhosted.org/packages/ce/3a/626b38db460d675f873e4444b4bb030453bbe7b4ba55df821d026a0493c4/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58133647260ea01e4d0500089a8c4f07bd7aa6ce109682b1426394988d8aaacc", size = 2134256, upload-time = "2025-11-04T13:43:31.71Z" },
- { url = "https://files.pythonhosted.org/packages/83/d9/8412d7f06f616bbc053d30cb4e5f76786af3221462ad5eee1f202021eb4e/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:287dad91cfb551c363dc62899a80e9e14da1f0e2b6ebde82c806612ca2a13ef1", size = 2174762, upload-time = "2025-11-04T13:43:34.744Z" },
- { url = "https://files.pythonhosted.org/packages/55/4c/162d906b8e3ba3a99354e20faa1b49a85206c47de97a639510a0e673f5da/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:03b77d184b9eb40240ae9fd676ca364ce1085f203e1b1256f8ab9984dca80a84", size = 2143141, upload-time = "2025-11-04T13:43:37.701Z" },
- { url = "https://files.pythonhosted.org/packages/1f/f2/f11dd73284122713f5f89fc940f370d035fa8e1e078d446b3313955157fe/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:a668ce24de96165bb239160b3d854943128f4334822900534f2fe947930e5770", size = 2330317, upload-time = "2025-11-04T13:43:40.406Z" },
- { url = "https://files.pythonhosted.org/packages/88/9d/b06ca6acfe4abb296110fb1273a4d848a0bfb2ff65f3ee92127b3244e16b/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f14f8f046c14563f8eb3f45f499cc658ab8d10072961e07225e507adb700e93f", size = 2316992, upload-time = "2025-11-04T13:43:43.602Z" },
- { url = "https://files.pythonhosted.org/packages/36/c7/cfc8e811f061c841d7990b0201912c3556bfeb99cdcb7ed24adc8d6f8704/pydantic_core-2.41.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56121965f7a4dc965bff783d70b907ddf3d57f6eba29b6d2e5dabfaf07799c51", size = 2145302, upload-time = "2025-11-04T13:43:46.64Z" },
-]
-
-[[package]]
-name = "pygments"
-version = "2.19.2"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", size = 4968631, upload-time = "2025-06-21T13:39:12.283Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" },
-]
-
-[[package]]
-name = "pyobjc-core"
-version = "12.2.1"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/b4/b1/729f7458a63758bd21716648a8abcd9a0c8f2d2e9897763c8a1a1c7fd31b/pyobjc_core-12.2.1.tar.gz", hash = "sha256:7a7b9b018402342cf32bf1956366896350fbe5c0478cb3ef59778f77abed7f07", size = 1063383, upload-time = "2026-06-19T16:19:39.357Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/e5/62/80fe6b6bea9e9e7abe2e7a91bfd22115219b2263e435d2da09cf480b6f49/pyobjc_core-12.2.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:aa5c889961d79d7704f17eeb27f80ee791335819c1bb14babeff7b9ea665b5f0", size = 6486390, upload-time = "2026-06-19T13:29:49.457Z" },
- { url = "https://files.pythonhosted.org/packages/92/87/16564ef5e4568ee0edd9e712d8111dc8b67621d6bb6ff430646ee2d637dd/pyobjc_core-12.2.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:24b76a63caf0b5369d4a377c7c0438cd70df81539057af3db839bfaa3579e04a", size = 6484662, upload-time = "2026-06-19T16:04:44.979Z" },
- { url = "https://files.pythonhosted.org/packages/8c/88/300ad283bed0c971c52dcac6f70113e138169d4ce6d856ddd03d16081e51/pyobjc_core-12.2.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:a64232bb27ed101d4adc7d42b0e64a6d3331aac7bee7861c037a6777a163f10b", size = 6433347, upload-time = "2026-06-19T16:04:49.341Z" },
- { url = "https://files.pythonhosted.org/packages/3e/1e/b9b0ddffae66996b8779f1f7958adc9f21c13a0448cd3be8d7fe589b5b0f/pyobjc_core-12.2.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:af101222762665a4125157906cb4b23f5d5a63d3851d5e0504f72a1eaaa2cfd2", size = 6436004, upload-time = "2026-06-19T16:04:53.257Z" },
- { url = "https://files.pythonhosted.org/packages/8f/26/bd309ede07784c6e5fac4b440c90a5f72a66da7859ed303a9392fe8a5f3f/pyobjc_core-12.2.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:efe465e3ecc6fc73f7c7622620345d134a8d34564ab1c29d8247e45f4ed55071", size = 6687044, upload-time = "2026-06-19T16:04:57.42Z" },
- { url = "https://files.pythonhosted.org/packages/bd/8a/cfa4f56939d554dbb342ec6e5226a441e2f552bc2002a0ddf7705bb11bef/pyobjc_core-12.2.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:2b8fc0531c27277325e113ac00b8a72a82e6145f0a88175b9425d8de814ff69a", size = 6429289, upload-time = "2026-06-19T16:05:02.191Z" },
- { url = "https://files.pythonhosted.org/packages/42/74/446c89bc18103aaa4a00d1fb85ff8acace9a0dc3f362d9678ebf7571e275/pyobjc_core-12.2.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:9bef500f979e22d54f9da3aaebf6a48f873234b324858bd69256055a318955c7", size = 6690181, upload-time = "2026-06-19T16:05:06.201Z" },
- { url = "https://files.pythonhosted.org/packages/99/c7/0121ee4c616af07ad2de8cd1a286f6978dc9a227eb58b7c2e875cb68a1df/pyobjc_core-12.2.1-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:047c226eeb58a2993ace5e8904e71cc9426ee20d064c617f8fbf32717d37093e", size = 6487078, upload-time = "2026-06-19T16:05:10.093Z" },
- { url = "https://files.pythonhosted.org/packages/b5/a8/cb9fcc150f97d0bf22a2028f88b24cc35949beb1bcc7b8bc5c17d4401677/pyobjc_core-12.2.1-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:1188613805336270279570467e4455b74cb6c0f60913ac74c917ee1c37cfaecb", size = 6733064, upload-time = "2026-06-19T16:05:14.313Z" },
-]
-
-[[package]]
-name = "pyobjc-framework-cocoa"
-version = "12.2.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "pyobjc-core" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/51/34/fbe38a204643aa4e1b91391cdce07a34da565a69171ebcad08de7438a556/pyobjc_framework_cocoa-12.2.1.tar.gz", hash = "sha256:b94b37fe5730e5ae1fb0052912cd174e6ec329b0bfba4a012ae5db1014b5864b", size = 3125751, upload-time = "2026-06-19T16:20:05.159Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/2c/c5/f6a5458cc5a598baa7a79ffe86248560c631f5a86f4a3c678fb6a815e78b/pyobjc_framework_cocoa-12.2.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:05443c1494532779cccff83e9792fdd6f0a4800cac56620132bf28e0bf966e9d", size = 387303, upload-time = "2026-06-19T16:07:35.831Z" },
- { url = "https://files.pythonhosted.org/packages/f4/d6/dc66ea8519a0475efbccf73f82cc28066339bb300a27f5e1bf91ab1d7002/pyobjc_framework_cocoa-12.2.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:dc6da84f4fc62cc25463bbb85e77a57b8d5ac6caf9a60702daf2edb601332f15", size = 387298, upload-time = "2026-06-19T16:07:37.412Z" },
- { url = "https://files.pythonhosted.org/packages/f7/cf/1b3b32b2f28f66cc053c3438ef4e6df36a1591945bf05e7399da18d74553/pyobjc_framework_cocoa-12.2.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:28b9b8bab1c36efb94744786918752d0c1842f5fbb67e7d5ca97b5f736512080", size = 388113, upload-time = "2026-06-19T16:07:38.9Z" },
- { url = "https://files.pythonhosted.org/packages/cc/46/68e8e4d926a2f70fed0437047bc3f9fe08af8fe620d94d80656ebc3cfa9b/pyobjc_framework_cocoa-12.2.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:3b74a78fa7803e547b32e5e8ec1b49987b52fe318383e793bc6cd49b80efbd9f", size = 388183, upload-time = "2026-06-19T16:07:40.483Z" },
- { url = "https://files.pythonhosted.org/packages/2e/f3/dfc9af4c9eb2e5389c860ad5ef252be9fe456db09f39d537555dc5057aa1/pyobjc_framework_cocoa-12.2.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:dc2eaca2f13c7bcd8e41e51a372e47825dea9dd3126108760eed7ba883d2945c", size = 392275, upload-time = "2026-06-19T16:07:42.078Z" },
- { url = "https://files.pythonhosted.org/packages/ec/c8/b90baa8f3592eded79b4be98fb59d2b8dc16b62361e34292bd95806ebd9f/pyobjc_framework_cocoa-12.2.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:b386c324d64ae565c1f6b7dfb77be68f640a1c7c23caa6966ab661131f519561", size = 388357, upload-time = "2026-06-19T16:07:43.364Z" },
- { url = "https://files.pythonhosted.org/packages/98/d8/64a94651b9294702d55e748d94de30e25bc59d0784526be7643f4467eccd/pyobjc_framework_cocoa-12.2.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:a6c584e2af0813cb2f6103b184e632665a26f58c1bd5b08ffd6e95a19c617f7b", size = 392404, upload-time = "2026-06-19T16:07:44.955Z" },
- { url = "https://files.pythonhosted.org/packages/5c/cc/26e8a7bf1f5e8caa38b7f80d486296f9fd3c97e71ad7e5444ef22e802758/pyobjc_framework_cocoa-12.2.1-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:b6023657b8d6cc049a21bd6b4752425f2f53c42f9f0b02d64c7608cc484bf103", size = 388589, upload-time = "2026-06-19T16:07:46.276Z" },
- { url = "https://files.pythonhosted.org/packages/b6/f3/eedf743a303ea742b8e082afe3613fb4d6618bc1a48cf2568b004ce906f7/pyobjc_framework_cocoa-12.2.1-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:c685ccd8e266a07cf912a2c5a13b1f2eff2a868a1aff163b4801b4687bd425e1", size = 392691, upload-time = "2026-06-19T16:07:47.477Z" },
-]
-
-[[package]]
-name = "pyobjc-framework-metal"
-version = "12.2.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "pyobjc-core" },
- { name = "pyobjc-framework-cocoa" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/15/46/5920d6cb66cbbe298744889b10b3266b1408ad823855f55cdcb967c0d51d/pyobjc_framework_metal-12.2.1.tar.gz", hash = "sha256:cd362194bdb7fd2a9116b8dc1e6b14ce19629136304cdf6b88d105a969fda72c", size = 238139, upload-time = "2026-06-19T16:21:06.897Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/1f/4b/c439eabbe786f42fb727b3536159eef24ee5135f1a3d2368a7165039d711/pyobjc_framework_metal-12.2.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f58d492c0667c95dcec503f75380a526d55e5797da5d05eb7776817bed19e2c", size = 76010, upload-time = "2026-06-19T16:13:49.333Z" },
- { url = "https://files.pythonhosted.org/packages/e9/bc/fa4ddb10fbce1cdceb5fab0e1f2d5ceae90385f3ded8aec940da49e226f1/pyobjc_framework_metal-12.2.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:add59e48ca823d60bcf7e026baa2a95203b88c796b5febc140924fd9e5eb5821", size = 76004, upload-time = "2026-06-19T16:13:50.495Z" },
- { url = "https://files.pythonhosted.org/packages/d1/b4/a56f0b69cd0ba016da9f2ab64776950a7ca8d7dbf7a4e03b1bdb2fffa947/pyobjc_framework_metal-12.2.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:92b1f2e8f4a86bd9ecf307144e1f2c5ccc451fc760534833ddcde58d7624c695", size = 75923, upload-time = "2026-06-19T16:13:51.542Z" },
- { url = "https://files.pythonhosted.org/packages/7d/97/6a6d547f11ea81d4ee1570d4092947d264e60f02288c119f14332ea3298c/pyobjc_framework_metal-12.2.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:f39a87b50408afbfc8a78be0c0d164016f114c2f807eb35506051660b386931f", size = 75952, upload-time = "2026-06-19T16:13:52.471Z" },
- { url = "https://files.pythonhosted.org/packages/9e/d5/0001ccf5217cde46c61140f062be050d6760359d2c4bd652b619cbd4361f/pyobjc_framework_metal-12.2.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:eb247c22391706162bcc14e6fd52101e632a51f3c0aeccb59cea549c019303ce", size = 76508, upload-time = "2026-06-19T16:13:53.398Z" },
- { url = "https://files.pythonhosted.org/packages/ac/02/e2d652df1f5604549a346f5048243d627cadae3a18e7491999a045f08f28/pyobjc_framework_metal-12.2.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:a842860779c2a1c82d80b3800009b4604448d9635f1a69300393184b378cb6af", size = 75961, upload-time = "2026-06-19T16:13:54.466Z" },
- { url = "https://files.pythonhosted.org/packages/74/e6/fdf12a3cc476a540e064f409ccef28db80fe6bd01b652c9a7c9529869517/pyobjc_framework_metal-12.2.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:6bbfe26a9d4683d776aeed28ba725102328ef5072eedde4c4df15df67b541c80", size = 76569, upload-time = "2026-06-19T16:13:55.386Z" },
- { url = "https://files.pythonhosted.org/packages/d8/21/236462c59d7b781705bdaa79307be1d952fed48d6ad561278167b62d5712/pyobjc_framework_metal-12.2.1-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:e1be254400cc4038474466ff343093f8955925281f1e1209054d2fff9d6b362d", size = 76073, upload-time = "2026-06-19T16:13:56.311Z" },
- { url = "https://files.pythonhosted.org/packages/32/8e/8deb988841348b718b9168559b393a25e60a3c70d6f5ca0efbaa6285ad38/pyobjc_framework_metal-12.2.1-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:9f69b2c846014b19f1a7180b33fed0acf670d72b7e44290018b6bb7fb39d607e", size = 76710, upload-time = "2026-06-19T16:13:57.391Z" },
-]
-
-[[package]]
-name = "pyobjc-framework-metalperformanceshaders"
-version = "12.2.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "pyobjc-core" },
- { name = "pyobjc-framework-metal" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/50/ff/6938291dd5a71e39f6948037dbb271993d86a3ecd7706e7cc38034feeaea/pyobjc_framework_metalperformanceshaders-12.2.1.tar.gz", hash = "sha256:a4395f8619ad6f1d382aab5cf116e058b18d3646bec6b730c77daa8f692b5de4", size = 190474, upload-time = "2026-06-19T16:21:09.743Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/49/01/1bf01010aafecd9c41576edc8aa166351a2f57e541942d34bd6b5212262d/pyobjc_framework_metalperformanceshaders-12.2.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:6167eb5cbc9bde6690509b578b2f2754fac588d214bc5a01b8406f63de7a4766", size = 33924, upload-time = "2026-06-19T16:14:15.709Z" },
- { url = "https://files.pythonhosted.org/packages/b1/b0/ed310b3a4cf06a16ca1e71c943c01955d734db172df043debf850ee719c6/pyobjc_framework_metalperformanceshaders-12.2.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:521d6a3ab80d76138754e7a1eaf02412d0d7502f5d486b4c3b7548d193b90457", size = 33927, upload-time = "2026-06-19T16:14:16.686Z" },
- { url = "https://files.pythonhosted.org/packages/5c/9a/1d95d7a2c2855f9afb7a27378940f52ff87894d98e8bac6e98cb3a0099f2/pyobjc_framework_metalperformanceshaders-12.2.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:6c679e85a4197302bdd7f9f9b17448c4df5c9a66e3ddb2d371814eb84a45261f", size = 34184, upload-time = "2026-06-19T16:14:17.743Z" },
- { url = "https://files.pythonhosted.org/packages/9f/6e/40590459842bd635d0f5e77a520aca827af1331ef70e02955965f5122749/pyobjc_framework_metalperformanceshaders-12.2.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:856aa1b620ec04e64870694627435547affe350bda9e00e877e72ab518aec76e", size = 34198, upload-time = "2026-06-19T16:14:18.583Z" },
- { url = "https://files.pythonhosted.org/packages/5a/0f/f311b511eea76eaa7195164ea82133591c614bdbcf6efc069ef863dc0fa1/pyobjc_framework_metalperformanceshaders-12.2.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:c1b094b81d0ed3f72b9345e7e4fbc47604934325d3695b4b8f2457701cf90fad", size = 34398, upload-time = "2026-06-19T16:14:19.437Z" },
- { url = "https://files.pythonhosted.org/packages/1e/d2/999932228dcae4c691b295a5fb4bcd71abd16ac8dfbe67ceab629eb69582/pyobjc_framework_metalperformanceshaders-12.2.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:b96cac9d50a9bf72e2bc3e006eac5ec0e7aeaabb65eac620df830c35af9b1fef", size = 34264, upload-time = "2026-06-19T16:14:20.364Z" },
- { url = "https://files.pythonhosted.org/packages/9c/46/96536afd54579814f2ceaf5a91ff16ae38e20cde7d630e45623171e7164f/pyobjc_framework_metalperformanceshaders-12.2.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:1449836ff40cbb04a00c72b1c6219571914d895695d6d310bc1433b0181110d6", size = 34469, upload-time = "2026-06-19T16:14:21.265Z" },
- { url = "https://files.pythonhosted.org/packages/58/2b/4913eaf6eb59f20566f73b9f1b2fe0559aa610c6f8027e6ad20e9fa306f2/pyobjc_framework_metalperformanceshaders-12.2.1-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:db8048e5d7cb8a94b352f3902e330cf0f4de3c103ea07c261bcb495ee2b4ae7d", size = 34285, upload-time = "2026-06-19T16:14:22.184Z" },
- { url = "https://files.pythonhosted.org/packages/26/fe/db17f4997f342d645b9ae30ec4f542f02612bd56496184a9294fa697c70a/pyobjc_framework_metalperformanceshaders-12.2.1-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:76e1b5f6733f14eed200631f6ba0af187fa89623cb1dcb126bf55dc4eddeba86", size = 34500, upload-time = "2026-06-19T16:14:23.12Z" },
-]
-
-[[package]]
-name = "pyobjc-framework-metalperformanceshadersgraph"
-version = "12.2.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "pyobjc-core" },
- { name = "pyobjc-framework-metalperformanceshaders" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/da/11/15e3acf0636f9418384cd3e213296ad9882f546889865913cfaee2339ed6/pyobjc_framework_metalperformanceshadersgraph-12.2.1.tar.gz", hash = "sha256:656e70c86645814ef1d02bac74933eebc5ff6427100bee4a3bbffde921020ab6", size = 60199, upload-time = "2026-06-19T16:21:10.716Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/43/d5/6aa84d1d976ba8b97cdc6486f09aab85f20ea6ba5079086f1de4426cbb2e/pyobjc_framework_metalperformanceshadersgraph-12.2.1-py2.py3-none-any.whl", hash = "sha256:9ac2270c573e9399c02196ea1725bd3c7ed3699d71ee70286b1f78beb8afaf5e", size = 7134, upload-time = "2026-06-19T16:14:24.104Z" },
-]
-
-[[package]]
-name = "pyparsing"
-version = "3.3.2"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/f3/91/9c6ee907786a473bf81c5f53cf703ba0957b23ab84c264080fb5a450416f/pyparsing-3.3.2.tar.gz", hash = "sha256:c777f4d763f140633dcb6d8a3eda953bf7a214dc4eff598413c070bcdc117cbc", size = 6851574, upload-time = "2026-01-21T03:57:59.36Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/10/bd/c038d7cc38edc1aa5bf91ab8068b63d4308c66c4c8bb3cbba7dfbc049f9c/pyparsing-3.3.2-py3-none-any.whl", hash = "sha256:850ba148bd908d7e2411587e247a1e4f0327839c40e2e5e6d05a007ecc69911d", size = 122781, upload-time = "2026-01-21T03:57:55.912Z" },
-]
-
-[[package]]
-name = "pytest"
-version = "9.0.2"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "colorama", marker = "sys_platform == 'win32'" },
- { name = "exceptiongroup", marker = "python_full_version < '3.11'" },
- { name = "iniconfig" },
- { name = "packaging" },
- { name = "pluggy" },
- { name = "pygments" },
- { name = "tomli", marker = "python_full_version < '3.11'" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/d1/db/7ef3487e0fb0049ddb5ce41d3a49c235bf9ad299b6a25d5780a89f19230f/pytest-9.0.2.tar.gz", hash = "sha256:75186651a92bd89611d1d9fc20f0b4345fd827c41ccd5c299a868a05d70edf11", size = 1568901, upload-time = "2025-12-06T21:30:51.014Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/3b/ab/b3226f0bd7cdcf710fbede2b3548584366da3b19b5021e74f5bde2a8fa3f/pytest-9.0.2-py3-none-any.whl", hash = "sha256:711ffd45bf766d5264d487b917733b453d917afd2b0ad65223959f59089f875b", size = 374801, upload-time = "2025-12-06T21:30:49.154Z" },
-]
-
-[[package]]
-name = "python-dateutil"
-version = "2.9.0.post0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "six" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432, upload-time = "2024-03-01T18:36:20.211Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" },
-]
-
-[[package]]
-name = "pytz"
-version = "2025.2"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz", hash = "sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3", size = 320884, upload-time = "2025-03-25T02:25:00.538Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl", hash = "sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00", size = 509225, upload-time = "2025-03-25T02:24:58.468Z" },
-]
-
-[[package]]
-name = "pyyaml"
-version = "6.0.3"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b", size = 184227, upload-time = "2025-09-25T21:31:46.04Z" },
- { url = "https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956", size = 174019, upload-time = "2025-09-25T21:31:47.706Z" },
- { url = "https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8", size = 740646, upload-time = "2025-09-25T21:31:49.21Z" },
- { url = "https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198", size = 840793, upload-time = "2025-09-25T21:31:50.735Z" },
- { url = "https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b", size = 770293, upload-time = "2025-09-25T21:31:51.828Z" },
- { url = "https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0", size = 732872, upload-time = "2025-09-25T21:31:53.282Z" },
- { url = "https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69", size = 758828, upload-time = "2025-09-25T21:31:54.807Z" },
- { url = "https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e", size = 142415, upload-time = "2025-09-25T21:31:55.885Z" },
- { url = "https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c", size = 158561, upload-time = "2025-09-25T21:31:57.406Z" },
- { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" },
- { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" },
- { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" },
- { url = "https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00", size = 882114, upload-time = "2025-09-25T21:32:03.376Z" },
- { url = "https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", size = 806638, upload-time = "2025-09-25T21:32:04.553Z" },
- { url = "https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a", size = 767463, upload-time = "2025-09-25T21:32:06.152Z" },
- { url = "https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4", size = 794986, upload-time = "2025-09-25T21:32:07.367Z" },
- { url = "https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b", size = 142543, upload-time = "2025-09-25T21:32:08.95Z" },
- { url = "https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf", size = 158763, upload-time = "2025-09-25T21:32:09.96Z" },
- { url = "https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196", size = 182063, upload-time = "2025-09-25T21:32:11.445Z" },
- { url = "https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0", size = 173973, upload-time = "2025-09-25T21:32:12.492Z" },
- { url = "https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28", size = 775116, upload-time = "2025-09-25T21:32:13.652Z" },
- { url = "https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c", size = 844011, upload-time = "2025-09-25T21:32:15.21Z" },
- { url = "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", size = 807870, upload-time = "2025-09-25T21:32:16.431Z" },
- { url = "https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e", size = 761089, upload-time = "2025-09-25T21:32:17.56Z" },
- { url = "https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea", size = 790181, upload-time = "2025-09-25T21:32:18.834Z" },
- { url = "https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5", size = 137658, upload-time = "2025-09-25T21:32:20.209Z" },
- { url = "https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b", size = 154003, upload-time = "2025-09-25T21:32:21.167Z" },
- { url = "https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd", size = 140344, upload-time = "2025-09-25T21:32:22.617Z" },
- { url = "https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8", size = 181669, upload-time = "2025-09-25T21:32:23.673Z" },
- { url = "https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1", size = 173252, upload-time = "2025-09-25T21:32:25.149Z" },
- { url = "https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c", size = 767081, upload-time = "2025-09-25T21:32:26.575Z" },
- { url = "https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5", size = 841159, upload-time = "2025-09-25T21:32:27.727Z" },
- { url = "https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6", size = 801626, upload-time = "2025-09-25T21:32:28.878Z" },
- { url = "https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6", size = 753613, upload-time = "2025-09-25T21:32:30.178Z" },
- { url = "https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be", size = 794115, upload-time = "2025-09-25T21:32:31.353Z" },
- { url = "https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26", size = 137427, upload-time = "2025-09-25T21:32:32.58Z" },
- { url = "https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c", size = 154090, upload-time = "2025-09-25T21:32:33.659Z" },
- { url = "https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb", size = 140246, upload-time = "2025-09-25T21:32:34.663Z" },
- { url = "https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac", size = 181814, upload-time = "2025-09-25T21:32:35.712Z" },
- { url = "https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310", size = 173809, upload-time = "2025-09-25T21:32:36.789Z" },
- { url = "https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7", size = 766454, upload-time = "2025-09-25T21:32:37.966Z" },
- { url = "https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788", size = 836355, upload-time = "2025-09-25T21:32:39.178Z" },
- { url = "https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5", size = 794175, upload-time = "2025-09-25T21:32:40.865Z" },
- { url = "https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764", size = 755228, upload-time = "2025-09-25T21:32:42.084Z" },
- { url = "https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35", size = 789194, upload-time = "2025-09-25T21:32:43.362Z" },
- { url = "https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac", size = 156429, upload-time = "2025-09-25T21:32:57.844Z" },
- { url = "https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3", size = 143912, upload-time = "2025-09-25T21:32:59.247Z" },
- { url = "https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3", size = 189108, upload-time = "2025-09-25T21:32:44.377Z" },
- { url = "https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba", size = 183641, upload-time = "2025-09-25T21:32:45.407Z" },
- { url = "https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c", size = 831901, upload-time = "2025-09-25T21:32:48.83Z" },
- { url = "https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702", size = 861132, upload-time = "2025-09-25T21:32:50.149Z" },
- { url = "https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c", size = 839261, upload-time = "2025-09-25T21:32:51.808Z" },
- { url = "https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065", size = 805272, upload-time = "2025-09-25T21:32:52.941Z" },
- { url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923, upload-time = "2025-09-25T21:32:54.537Z" },
- { url = "https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9", size = 174062, upload-time = "2025-09-25T21:32:55.767Z" },
- { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" },
-]
-
-[[package]]
-name = "regex"
-version = "2026.1.15"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/0b/86/07d5056945f9ec4590b518171c4254a5925832eb727b56d3c38a7476f316/regex-2026.1.15.tar.gz", hash = "sha256:164759aa25575cbc0651bef59a0b18353e54300d79ace8084c818ad8ac72b7d5", size = 414811, upload-time = "2026-01-14T23:18:02.775Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/ea/d2/e6ee96b7dff201a83f650241c52db8e5bd080967cb93211f57aa448dc9d6/regex-2026.1.15-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4e3dd93c8f9abe8aa4b6c652016da9a3afa190df5ad822907efe6b206c09896e", size = 488166, upload-time = "2026-01-14T23:13:46.408Z" },
- { url = "https://files.pythonhosted.org/packages/23/8a/819e9ce14c9f87af026d0690901b3931f3101160833e5d4c8061fa3a1b67/regex-2026.1.15-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:97499ff7862e868b1977107873dd1a06e151467129159a6ffd07b66706ba3a9f", size = 290632, upload-time = "2026-01-14T23:13:48.688Z" },
- { url = "https://files.pythonhosted.org/packages/d5/c3/23dfe15af25d1d45b07dfd4caa6003ad710dcdcb4c4b279909bdfe7a2de8/regex-2026.1.15-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0bda75ebcac38d884240914c6c43d8ab5fb82e74cde6da94b43b17c411aa4c2b", size = 288500, upload-time = "2026-01-14T23:13:50.503Z" },
- { url = "https://files.pythonhosted.org/packages/c6/31/1adc33e2f717df30d2f4d973f8776d2ba6ecf939301efab29fca57505c95/regex-2026.1.15-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7dcc02368585334f5bc81fc73a2a6a0bbade60e7d83da21cead622faf408f32c", size = 781670, upload-time = "2026-01-14T23:13:52.453Z" },
- { url = "https://files.pythonhosted.org/packages/23/ce/21a8a22d13bc4adcb927c27b840c948f15fc973e21ed2346c1bd0eae22dc/regex-2026.1.15-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:693b465171707bbe882a7a05de5e866f33c76aa449750bee94a8d90463533cc9", size = 850820, upload-time = "2026-01-14T23:13:54.894Z" },
- { url = "https://files.pythonhosted.org/packages/6c/4f/3eeacdf587a4705a44484cd0b30e9230a0e602811fb3e2cc32268c70d509/regex-2026.1.15-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b0d190e6f013ea938623a58706d1469a62103fb2a241ce2873a9906e0386582c", size = 898777, upload-time = "2026-01-14T23:13:56.908Z" },
- { url = "https://files.pythonhosted.org/packages/79/a9/1898a077e2965c35fc22796488141a22676eed2d73701e37c73ad7c0b459/regex-2026.1.15-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5ff818702440a5878a81886f127b80127f5d50563753a28211482867f8318106", size = 791750, upload-time = "2026-01-14T23:13:58.527Z" },
- { url = "https://files.pythonhosted.org/packages/4c/84/e31f9d149a178889b3817212827f5e0e8c827a049ff31b4b381e76b26e2d/regex-2026.1.15-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f052d1be37ef35a54e394de66136e30fa1191fab64f71fc06ac7bc98c9a84618", size = 782674, upload-time = "2026-01-14T23:13:59.874Z" },
- { url = "https://files.pythonhosted.org/packages/d2/ff/adf60063db24532add6a1676943754a5654dcac8237af024ede38244fd12/regex-2026.1.15-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6bfc31a37fd1592f0c4fc4bfc674b5c42e52efe45b4b7a6a14f334cca4bcebe4", size = 767906, upload-time = "2026-01-14T23:14:01.298Z" },
- { url = "https://files.pythonhosted.org/packages/af/3e/e6a216cee1e2780fec11afe7fc47b6f3925d7264e8149c607ac389fd9b1a/regex-2026.1.15-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3d6ce5ae80066b319ae3bc62fd55a557c9491baa5efd0d355f0de08c4ba54e79", size = 774798, upload-time = "2026-01-14T23:14:02.715Z" },
- { url = "https://files.pythonhosted.org/packages/0f/98/23a4a8378a9208514ed3efc7e7850c27fa01e00ed8557c958df0335edc4a/regex-2026.1.15-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:1704d204bd42b6bb80167df0e4554f35c255b579ba99616def38f69e14a5ccb9", size = 845861, upload-time = "2026-01-14T23:14:04.824Z" },
- { url = "https://files.pythonhosted.org/packages/f8/57/d7605a9d53bd07421a8785d349cd29677fe660e13674fa4c6cbd624ae354/regex-2026.1.15-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:e3174a5ed4171570dc8318afada56373aa9289eb6dc0d96cceb48e7358b0e220", size = 755648, upload-time = "2026-01-14T23:14:06.371Z" },
- { url = "https://files.pythonhosted.org/packages/6f/76/6f2e24aa192da1e299cc1101674a60579d3912391867ce0b946ba83e2194/regex-2026.1.15-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:87adf5bd6d72e3e17c9cb59ac4096b1faaf84b7eb3037a5ffa61c4b4370f0f13", size = 836250, upload-time = "2026-01-14T23:14:08.343Z" },
- { url = "https://files.pythonhosted.org/packages/11/3a/1f2a1d29453299a7858eab7759045fc3d9d1b429b088dec2dc85b6fa16a2/regex-2026.1.15-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e85dc94595f4d766bd7d872a9de5ede1ca8d3063f3bdf1e2c725f5eb411159e3", size = 779919, upload-time = "2026-01-14T23:14:09.954Z" },
- { url = "https://files.pythonhosted.org/packages/c0/67/eab9bc955c9dcc58e9b222c801e39cff7ca0b04261792a2149166ce7e792/regex-2026.1.15-cp310-cp310-win32.whl", hash = "sha256:21ca32c28c30d5d65fc9886ff576fc9b59bbca08933e844fa2363e530f4c8218", size = 265888, upload-time = "2026-01-14T23:14:11.35Z" },
- { url = "https://files.pythonhosted.org/packages/1d/62/31d16ae24e1f8803bddb0885508acecaec997fcdcde9c243787103119ae4/regex-2026.1.15-cp310-cp310-win_amd64.whl", hash = "sha256:3038a62fc7d6e5547b8915a3d927a0fbeef84cdbe0b1deb8c99bbd4a8961b52a", size = 277830, upload-time = "2026-01-14T23:14:12.908Z" },
- { url = "https://files.pythonhosted.org/packages/e5/36/5d9972bccd6417ecd5a8be319cebfd80b296875e7f116c37fb2a2deecebf/regex-2026.1.15-cp310-cp310-win_arm64.whl", hash = "sha256:505831646c945e3e63552cc1b1b9b514f0e93232972a2d5bedbcc32f15bc82e3", size = 270376, upload-time = "2026-01-14T23:14:14.782Z" },
- { url = "https://files.pythonhosted.org/packages/d0/c9/0c80c96eab96948363d270143138d671d5731c3a692b417629bf3492a9d6/regex-2026.1.15-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:1ae6020fb311f68d753b7efa9d4b9a5d47a5d6466ea0d5e3b5a471a960ea6e4a", size = 488168, upload-time = "2026-01-14T23:14:16.129Z" },
- { url = "https://files.pythonhosted.org/packages/17/f0/271c92f5389a552494c429e5cc38d76d1322eb142fb5db3c8ccc47751468/regex-2026.1.15-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:eddf73f41225942c1f994914742afa53dc0d01a6e20fe14b878a1b1edc74151f", size = 290636, upload-time = "2026-01-14T23:14:17.715Z" },
- { url = "https://files.pythonhosted.org/packages/a0/f9/5f1fd077d106ca5655a0f9ff8f25a1ab55b92128b5713a91ed7134ff688e/regex-2026.1.15-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e8cd52557603f5c66a548f69421310886b28b7066853089e1a71ee710e1cdc1", size = 288496, upload-time = "2026-01-14T23:14:19.326Z" },
- { url = "https://files.pythonhosted.org/packages/b5/e1/8f43b03a4968c748858ec77f746c286d81f896c2e437ccf050ebc5d3128c/regex-2026.1.15-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5170907244b14303edc5978f522f16c974f32d3aa92109fabc2af52411c9433b", size = 793503, upload-time = "2026-01-14T23:14:20.922Z" },
- { url = "https://files.pythonhosted.org/packages/8d/4e/a39a5e8edc5377a46a7c875c2f9a626ed3338cb3bb06931be461c3e1a34a/regex-2026.1.15-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2748c1ec0663580b4510bd89941a31560b4b439a0b428b49472a3d9944d11cd8", size = 860535, upload-time = "2026-01-14T23:14:22.405Z" },
- { url = "https://files.pythonhosted.org/packages/dc/1c/9dce667a32a9477f7a2869c1c767dc00727284a9fa3ff5c09a5c6c03575e/regex-2026.1.15-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2f2775843ca49360508d080eaa87f94fa248e2c946bbcd963bb3aae14f333413", size = 907225, upload-time = "2026-01-14T23:14:23.897Z" },
- { url = "https://files.pythonhosted.org/packages/a4/3c/87ca0a02736d16b6262921425e84b48984e77d8e4e572c9072ce96e66c30/regex-2026.1.15-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d9ea2604370efc9a174c1b5dcc81784fb040044232150f7f33756049edfc9026", size = 800526, upload-time = "2026-01-14T23:14:26.039Z" },
- { url = "https://files.pythonhosted.org/packages/4b/ff/647d5715aeea7c87bdcbd2f578f47b415f55c24e361e639fe8c0cc88878f/regex-2026.1.15-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0dcd31594264029b57bf16f37fd7248a70b3b764ed9e0839a8f271b2d22c0785", size = 773446, upload-time = "2026-01-14T23:14:28.109Z" },
- { url = "https://files.pythonhosted.org/packages/af/89/bf22cac25cb4ba0fe6bff52ebedbb65b77a179052a9d6037136ae93f42f4/regex-2026.1.15-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c08c1f3e34338256732bd6938747daa3c0d5b251e04b6e43b5813e94d503076e", size = 783051, upload-time = "2026-01-14T23:14:29.929Z" },
- { url = "https://files.pythonhosted.org/packages/1e/f4/6ed03e71dca6348a5188363a34f5e26ffd5db1404780288ff0d79513bce4/regex-2026.1.15-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e43a55f378df1e7a4fa3547c88d9a5a9b7113f653a66821bcea4718fe6c58763", size = 854485, upload-time = "2026-01-14T23:14:31.366Z" },
- { url = "https://files.pythonhosted.org/packages/d9/9a/8e8560bd78caded8eb137e3e47612430a05b9a772caf60876435192d670a/regex-2026.1.15-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:f82110ab962a541737bd0ce87978d4c658f06e7591ba899192e2712a517badbb", size = 762195, upload-time = "2026-01-14T23:14:32.802Z" },
- { url = "https://files.pythonhosted.org/packages/38/6b/61fc710f9aa8dfcd764fe27d37edfaa023b1a23305a0d84fccd5adb346ea/regex-2026.1.15-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:27618391db7bdaf87ac6c92b31e8f0dfb83a9de0075855152b720140bda177a2", size = 845986, upload-time = "2026-01-14T23:14:34.898Z" },
- { url = "https://files.pythonhosted.org/packages/fd/2e/fbee4cb93f9d686901a7ca8d94285b80405e8c34fe4107f63ffcbfb56379/regex-2026.1.15-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bfb0d6be01fbae8d6655c8ca21b3b72458606c4aec9bbc932db758d47aba6db1", size = 788992, upload-time = "2026-01-14T23:14:37.116Z" },
- { url = "https://files.pythonhosted.org/packages/ed/14/3076348f3f586de64b1ab75a3fbabdaab7684af7f308ad43be7ef1849e55/regex-2026.1.15-cp311-cp311-win32.whl", hash = "sha256:b10e42a6de0e32559a92f2f8dc908478cc0fa02838d7dbe764c44dca3fa13569", size = 265893, upload-time = "2026-01-14T23:14:38.426Z" },
- { url = "https://files.pythonhosted.org/packages/0f/19/772cf8b5fc803f5c89ba85d8b1870a1ca580dc482aa030383a9289c82e44/regex-2026.1.15-cp311-cp311-win_amd64.whl", hash = "sha256:e9bf3f0bbdb56633c07d7116ae60a576f846efdd86a8848f8d62b749e1209ca7", size = 277840, upload-time = "2026-01-14T23:14:39.785Z" },
- { url = "https://files.pythonhosted.org/packages/78/84/d05f61142709474da3c0853222d91086d3e1372bcdab516c6fd8d80f3297/regex-2026.1.15-cp311-cp311-win_arm64.whl", hash = "sha256:41aef6f953283291c4e4e6850607bd71502be67779586a61472beacb315c97ec", size = 270374, upload-time = "2026-01-14T23:14:41.592Z" },
- { url = "https://files.pythonhosted.org/packages/92/81/10d8cf43c807d0326efe874c1b79f22bfb0fb226027b0b19ebc26d301408/regex-2026.1.15-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:4c8fcc5793dde01641a35905d6731ee1548f02b956815f8f1cab89e515a5bdf1", size = 489398, upload-time = "2026-01-14T23:14:43.741Z" },
- { url = "https://files.pythonhosted.org/packages/90/b0/7c2a74e74ef2a7c32de724658a69a862880e3e4155cba992ba04d1c70400/regex-2026.1.15-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:bfd876041a956e6a90ad7cdb3f6a630c07d491280bfeed4544053cd434901681", size = 291339, upload-time = "2026-01-14T23:14:45.183Z" },
- { url = "https://files.pythonhosted.org/packages/19/4d/16d0773d0c818417f4cc20aa0da90064b966d22cd62a8c46765b5bd2d643/regex-2026.1.15-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9250d087bc92b7d4899ccd5539a1b2334e44eee85d848c4c1aef8e221d3f8c8f", size = 289003, upload-time = "2026-01-14T23:14:47.25Z" },
- { url = "https://files.pythonhosted.org/packages/c6/e4/1fc4599450c9f0863d9406e944592d968b8d6dfd0d552a7d569e43bceada/regex-2026.1.15-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c8a154cf6537ebbc110e24dabe53095e714245c272da9c1be05734bdad4a61aa", size = 798656, upload-time = "2026-01-14T23:14:48.77Z" },
- { url = "https://files.pythonhosted.org/packages/b2/e6/59650d73a73fa8a60b3a590545bfcf1172b4384a7df2e7fe7b9aab4e2da9/regex-2026.1.15-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8050ba2e3ea1d8731a549e83c18d2f0999fbc99a5f6bd06b4c91449f55291804", size = 864252, upload-time = "2026-01-14T23:14:50.528Z" },
- { url = "https://files.pythonhosted.org/packages/6e/ab/1d0f4d50a1638849a97d731364c9a80fa304fec46325e48330c170ee8e80/regex-2026.1.15-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0bf065240704cb8951cc04972cf107063917022511273e0969bdb34fc173456c", size = 912268, upload-time = "2026-01-14T23:14:52.952Z" },
- { url = "https://files.pythonhosted.org/packages/dd/df/0d722c030c82faa1d331d1921ee268a4e8fb55ca8b9042c9341c352f17fa/regex-2026.1.15-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c32bef3e7aeee75746748643667668ef941d28b003bfc89994ecf09a10f7a1b5", size = 803589, upload-time = "2026-01-14T23:14:55.182Z" },
- { url = "https://files.pythonhosted.org/packages/66/23/33289beba7ccb8b805c6610a8913d0131f834928afc555b241caabd422a9/regex-2026.1.15-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d5eaa4a4c5b1906bd0d2508d68927f15b81821f85092e06f1a34a4254b0e1af3", size = 775700, upload-time = "2026-01-14T23:14:56.707Z" },
- { url = "https://files.pythonhosted.org/packages/e7/65/bf3a42fa6897a0d3afa81acb25c42f4b71c274f698ceabd75523259f6688/regex-2026.1.15-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:86c1077a3cc60d453d4084d5b9649065f3bf1184e22992bd322e1f081d3117fb", size = 787928, upload-time = "2026-01-14T23:14:58.312Z" },
- { url = "https://files.pythonhosted.org/packages/f4/f5/13bf65864fc314f68cdd6d8ca94adcab064d4d39dbd0b10fef29a9da48fc/regex-2026.1.15-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:2b091aefc05c78d286657cd4db95f2e6313375ff65dcf085e42e4c04d9c8d410", size = 858607, upload-time = "2026-01-14T23:15:00.657Z" },
- { url = "https://files.pythonhosted.org/packages/a3/31/040e589834d7a439ee43fb0e1e902bc81bd58a5ba81acffe586bb3321d35/regex-2026.1.15-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:57e7d17f59f9ebfa9667e6e5a1c0127b96b87cb9cede8335482451ed00788ba4", size = 763729, upload-time = "2026-01-14T23:15:02.248Z" },
- { url = "https://files.pythonhosted.org/packages/9b/84/6921e8129687a427edf25a34a5594b588b6d88f491320b9de5b6339a4fcb/regex-2026.1.15-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:c6c4dcdfff2c08509faa15d36ba7e5ef5fcfab25f1e8f85a0c8f45bc3a30725d", size = 850697, upload-time = "2026-01-14T23:15:03.878Z" },
- { url = "https://files.pythonhosted.org/packages/8a/87/3d06143d4b128f4229158f2de5de6c8f2485170c7221e61bf381313314b2/regex-2026.1.15-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:cf8ff04c642716a7f2048713ddc6278c5fd41faa3b9cab12607c7abecd012c22", size = 789849, upload-time = "2026-01-14T23:15:06.102Z" },
- { url = "https://files.pythonhosted.org/packages/77/69/c50a63842b6bd48850ebc7ab22d46e7a2a32d824ad6c605b218441814639/regex-2026.1.15-cp312-cp312-win32.whl", hash = "sha256:82345326b1d8d56afbe41d881fdf62f1926d7264b2fc1537f99ae5da9aad7913", size = 266279, upload-time = "2026-01-14T23:15:07.678Z" },
- { url = "https://files.pythonhosted.org/packages/f2/36/39d0b29d087e2b11fd8191e15e81cce1b635fcc845297c67f11d0d19274d/regex-2026.1.15-cp312-cp312-win_amd64.whl", hash = "sha256:4def140aa6156bc64ee9912383d4038f3fdd18fee03a6f222abd4de6357ce42a", size = 277166, upload-time = "2026-01-14T23:15:09.257Z" },
- { url = "https://files.pythonhosted.org/packages/28/32/5b8e476a12262748851fa8ab1b0be540360692325975b094e594dfebbb52/regex-2026.1.15-cp312-cp312-win_arm64.whl", hash = "sha256:c6c565d9a6e1a8d783c1948937ffc377dd5771e83bd56de8317c450a954d2056", size = 270415, upload-time = "2026-01-14T23:15:10.743Z" },
- { url = "https://files.pythonhosted.org/packages/f8/2e/6870bb16e982669b674cce3ee9ff2d1d46ab80528ee6bcc20fb2292efb60/regex-2026.1.15-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e69d0deeb977ffe7ed3d2e4439360089f9c3f217ada608f0f88ebd67afb6385e", size = 489164, upload-time = "2026-01-14T23:15:13.962Z" },
- { url = "https://files.pythonhosted.org/packages/dc/67/9774542e203849b0286badf67199970a44ebdb0cc5fb739f06e47ada72f8/regex-2026.1.15-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:3601ffb5375de85a16f407854d11cca8fe3f5febbe3ac78fb2866bb220c74d10", size = 291218, upload-time = "2026-01-14T23:15:15.647Z" },
- { url = "https://files.pythonhosted.org/packages/b2/87/b0cda79f22b8dee05f774922a214da109f9a4c0eca5da2c9d72d77ea062c/regex-2026.1.15-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4c5ef43b5c2d4114eb8ea424bb8c9cec01d5d17f242af88b2448f5ee81caadbc", size = 288895, upload-time = "2026-01-14T23:15:17.788Z" },
- { url = "https://files.pythonhosted.org/packages/3b/6a/0041f0a2170d32be01ab981d6346c83a8934277d82c780d60b127331f264/regex-2026.1.15-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:968c14d4f03e10b2fd960f1d5168c1f0ac969381d3c1fcc973bc45fb06346599", size = 798680, upload-time = "2026-01-14T23:15:19.342Z" },
- { url = "https://files.pythonhosted.org/packages/58/de/30e1cfcdbe3e891324aa7568b7c968771f82190df5524fabc1138cb2d45a/regex-2026.1.15-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:56a5595d0f892f214609c9f76b41b7428bed439d98dc961efafdd1354d42baae", size = 864210, upload-time = "2026-01-14T23:15:22.005Z" },
- { url = "https://files.pythonhosted.org/packages/64/44/4db2f5c5ca0ccd40ff052ae7b1e9731352fcdad946c2b812285a7505ca75/regex-2026.1.15-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0bf650f26087363434c4e560011f8e4e738f6f3e029b85d4904c50135b86cfa5", size = 912358, upload-time = "2026-01-14T23:15:24.569Z" },
- { url = "https://files.pythonhosted.org/packages/79/b6/e6a5665d43a7c42467138c8a2549be432bad22cbd206f5ec87162de74bd7/regex-2026.1.15-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:18388a62989c72ac24de75f1449d0fb0b04dfccd0a1a7c1c43af5eb503d890f6", size = 803583, upload-time = "2026-01-14T23:15:26.526Z" },
- { url = "https://files.pythonhosted.org/packages/e7/53/7cd478222169d85d74d7437e74750005e993f52f335f7c04ff7adfda3310/regex-2026.1.15-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6d220a2517f5893f55daac983bfa9fe998a7dbcaee4f5d27a88500f8b7873788", size = 775782, upload-time = "2026-01-14T23:15:29.352Z" },
- { url = "https://files.pythonhosted.org/packages/ca/b5/75f9a9ee4b03a7c009fe60500fe550b45df94f0955ca29af16333ef557c5/regex-2026.1.15-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c9c08c2fbc6120e70abff5d7f28ffb4d969e14294fb2143b4b5c7d20e46d1714", size = 787978, upload-time = "2026-01-14T23:15:31.295Z" },
- { url = "https://files.pythonhosted.org/packages/72/b3/79821c826245bbe9ccbb54f6eadb7879c722fd3e0248c17bfc90bf54e123/regex-2026.1.15-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:7ef7d5d4bd49ec7364315167a4134a015f61e8266c6d446fc116a9ac4456e10d", size = 858550, upload-time = "2026-01-14T23:15:33.558Z" },
- { url = "https://files.pythonhosted.org/packages/4a/85/2ab5f77a1c465745bfbfcb3ad63178a58337ae8d5274315e2cc623a822fa/regex-2026.1.15-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:6e42844ad64194fa08d5ccb75fe6a459b9b08e6d7296bd704460168d58a388f3", size = 763747, upload-time = "2026-01-14T23:15:35.206Z" },
- { url = "https://files.pythonhosted.org/packages/6d/84/c27df502d4bfe2873a3e3a7cf1bdb2b9cc10284d1a44797cf38bed790470/regex-2026.1.15-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:cfecdaa4b19f9ca534746eb3b55a5195d5c95b88cac32a205e981ec0a22b7d31", size = 850615, upload-time = "2026-01-14T23:15:37.523Z" },
- { url = "https://files.pythonhosted.org/packages/7d/b7/658a9782fb253680aa8ecb5ccbb51f69e088ed48142c46d9f0c99b46c575/regex-2026.1.15-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:08df9722d9b87834a3d701f3fca570b2be115654dbfd30179f30ab2f39d606d3", size = 789951, upload-time = "2026-01-14T23:15:39.582Z" },
- { url = "https://files.pythonhosted.org/packages/fc/2a/5928af114441e059f15b2f63e188bd00c6529b3051c974ade7444b85fcda/regex-2026.1.15-cp313-cp313-win32.whl", hash = "sha256:d426616dae0967ca225ab12c22274eb816558f2f99ccb4a1d52ca92e8baf180f", size = 266275, upload-time = "2026-01-14T23:15:42.108Z" },
- { url = "https://files.pythonhosted.org/packages/4f/16/5bfbb89e435897bff28cf0352a992ca719d9e55ebf8b629203c96b6ce4f7/regex-2026.1.15-cp313-cp313-win_amd64.whl", hash = "sha256:febd38857b09867d3ed3f4f1af7d241c5c50362e25ef43034995b77a50df494e", size = 277145, upload-time = "2026-01-14T23:15:44.244Z" },
- { url = "https://files.pythonhosted.org/packages/56/c1/a09ff7392ef4233296e821aec5f78c51be5e91ffde0d163059e50fd75835/regex-2026.1.15-cp313-cp313-win_arm64.whl", hash = "sha256:8e32f7896f83774f91499d239e24cebfadbc07639c1494bb7213983842348337", size = 270411, upload-time = "2026-01-14T23:15:45.858Z" },
- { url = "https://files.pythonhosted.org/packages/3c/38/0cfd5a78e5c6db00e6782fdae70458f89850ce95baa5e8694ab91d89744f/regex-2026.1.15-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:ec94c04149b6a7b8120f9f44565722c7ae31b7a6d2275569d2eefa76b83da3be", size = 492068, upload-time = "2026-01-14T23:15:47.616Z" },
- { url = "https://files.pythonhosted.org/packages/50/72/6c86acff16cb7c959c4355826bbf06aad670682d07c8f3998d9ef4fee7cd/regex-2026.1.15-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:40c86d8046915bb9aeb15d3f3f15b6fd500b8ea4485b30e1bbc799dab3fe29f8", size = 292756, upload-time = "2026-01-14T23:15:49.307Z" },
- { url = "https://files.pythonhosted.org/packages/4e/58/df7fb69eadfe76526ddfce28abdc0af09ffe65f20c2c90932e89d705153f/regex-2026.1.15-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:726ea4e727aba21643205edad8f2187ec682d3305d790f73b7a51c7587b64bdd", size = 291114, upload-time = "2026-01-14T23:15:51.484Z" },
- { url = "https://files.pythonhosted.org/packages/ed/6c/a4011cd1cf96b90d2cdc7e156f91efbd26531e822a7fbb82a43c1016678e/regex-2026.1.15-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1cb740d044aff31898804e7bf1181cc72c03d11dfd19932b9911ffc19a79070a", size = 807524, upload-time = "2026-01-14T23:15:53.102Z" },
- { url = "https://files.pythonhosted.org/packages/1d/25/a53ffb73183f69c3e9f4355c4922b76d2840aee160af6af5fac229b6201d/regex-2026.1.15-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:05d75a668e9ea16f832390d22131fe1e8acc8389a694c8febc3e340b0f810b93", size = 873455, upload-time = "2026-01-14T23:15:54.956Z" },
- { url = "https://files.pythonhosted.org/packages/66/0b/8b47fc2e8f97d9b4a851736f3890a5f786443aa8901061c55f24c955f45b/regex-2026.1.15-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d991483606f3dbec93287b9f35596f41aa2e92b7c2ebbb935b63f409e243c9af", size = 915007, upload-time = "2026-01-14T23:15:57.041Z" },
- { url = "https://files.pythonhosted.org/packages/c2/fa/97de0d681e6d26fabe71968dbee06dd52819e9a22fdce5dac7256c31ed84/regex-2026.1.15-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:194312a14819d3e44628a44ed6fea6898fdbecb0550089d84c403475138d0a09", size = 812794, upload-time = "2026-01-14T23:15:58.916Z" },
- { url = "https://files.pythonhosted.org/packages/22/38/e752f94e860d429654aa2b1c51880bff8dfe8f084268258adf9151cf1f53/regex-2026.1.15-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fe2fda4110a3d0bc163c2e0664be44657431440722c5c5315c65155cab92f9e5", size = 781159, upload-time = "2026-01-14T23:16:00.817Z" },
- { url = "https://files.pythonhosted.org/packages/e9/a7/d739ffaef33c378fc888302a018d7f81080393d96c476b058b8c64fd2b0d/regex-2026.1.15-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:124dc36c85d34ef2d9164da41a53c1c8c122cfb1f6e1ec377a1f27ee81deb794", size = 795558, upload-time = "2026-01-14T23:16:03.267Z" },
- { url = "https://files.pythonhosted.org/packages/3e/c4/542876f9a0ac576100fc73e9c75b779f5c31e3527576cfc9cb3009dcc58a/regex-2026.1.15-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:a1774cd1981cd212506a23a14dba7fdeaee259f5deba2df6229966d9911e767a", size = 868427, upload-time = "2026-01-14T23:16:05.646Z" },
- { url = "https://files.pythonhosted.org/packages/fc/0f/d5655bea5b22069e32ae85a947aa564912f23758e112cdb74212848a1a1b/regex-2026.1.15-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:b5f7d8d2867152cdb625e72a530d2ccb48a3d199159144cbdd63870882fb6f80", size = 769939, upload-time = "2026-01-14T23:16:07.542Z" },
- { url = "https://files.pythonhosted.org/packages/20/06/7e18a4fa9d326daeda46d471a44ef94201c46eaa26dbbb780b5d92cbfdda/regex-2026.1.15-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:492534a0ab925d1db998defc3c302dae3616a2fc3fe2e08db1472348f096ddf2", size = 854753, upload-time = "2026-01-14T23:16:10.395Z" },
- { url = "https://files.pythonhosted.org/packages/3b/67/dc8946ef3965e166f558ef3b47f492bc364e96a265eb4a2bb3ca765c8e46/regex-2026.1.15-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c661fc820cfb33e166bf2450d3dadbda47c8d8981898adb9b6fe24e5e582ba60", size = 799559, upload-time = "2026-01-14T23:16:12.347Z" },
- { url = "https://files.pythonhosted.org/packages/a5/61/1bba81ff6d50c86c65d9fd84ce9699dd106438ee4cdb105bf60374ee8412/regex-2026.1.15-cp313-cp313t-win32.whl", hash = "sha256:99ad739c3686085e614bf77a508e26954ff1b8f14da0e3765ff7abbf7799f952", size = 268879, upload-time = "2026-01-14T23:16:14.049Z" },
- { url = "https://files.pythonhosted.org/packages/e9/5e/cef7d4c5fb0ea3ac5c775fd37db5747f7378b29526cc83f572198924ff47/regex-2026.1.15-cp313-cp313t-win_amd64.whl", hash = "sha256:32655d17905e7ff8ba5c764c43cb124e34a9245e45b83c22e81041e1071aee10", size = 280317, upload-time = "2026-01-14T23:16:15.718Z" },
- { url = "https://files.pythonhosted.org/packages/b4/52/4317f7a5988544e34ab57b4bde0f04944c4786128c933fb09825924d3e82/regex-2026.1.15-cp313-cp313t-win_arm64.whl", hash = "sha256:b2a13dd6a95e95a489ca242319d18fc02e07ceb28fa9ad146385194d95b3c829", size = 271551, upload-time = "2026-01-14T23:16:17.533Z" },
- { url = "https://files.pythonhosted.org/packages/52/0a/47fa888ec7cbbc7d62c5f2a6a888878e76169170ead271a35239edd8f0e8/regex-2026.1.15-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:d920392a6b1f353f4aa54328c867fec3320fa50657e25f64abf17af054fc97ac", size = 489170, upload-time = "2026-01-14T23:16:19.835Z" },
- { url = "https://files.pythonhosted.org/packages/ac/c4/d000e9b7296c15737c9301708e9e7fbdea009f8e93541b6b43bdb8219646/regex-2026.1.15-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:b5a28980a926fa810dbbed059547b02783952e2efd9c636412345232ddb87ff6", size = 291146, upload-time = "2026-01-14T23:16:21.541Z" },
- { url = "https://files.pythonhosted.org/packages/f9/b6/921cc61982e538682bdf3bdf5b2c6ab6b34368da1f8e98a6c1ddc503c9cf/regex-2026.1.15-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:621f73a07595d83f28952d7bd1e91e9d1ed7625fb7af0064d3516674ec93a2a2", size = 288986, upload-time = "2026-01-14T23:16:23.381Z" },
- { url = "https://files.pythonhosted.org/packages/ca/33/eb7383dde0bbc93f4fb9d03453aab97e18ad4024ac7e26cef8d1f0a2cff0/regex-2026.1.15-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3d7d92495f47567a9b1669c51fc8d6d809821849063d168121ef801bbc213846", size = 799098, upload-time = "2026-01-14T23:16:25.088Z" },
- { url = "https://files.pythonhosted.org/packages/27/56/b664dccae898fc8d8b4c23accd853f723bde0f026c747b6f6262b688029c/regex-2026.1.15-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8dd16fba2758db7a3780a051f245539c4451ca20910f5a5e6ea1c08d06d4a76b", size = 864980, upload-time = "2026-01-14T23:16:27.297Z" },
- { url = "https://files.pythonhosted.org/packages/16/40/0999e064a170eddd237bae9ccfcd8f28b3aa98a38bf727a086425542a4fc/regex-2026.1.15-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1e1808471fbe44c1a63e5f577a1d5f02fe5d66031dcbdf12f093ffc1305a858e", size = 911607, upload-time = "2026-01-14T23:16:29.235Z" },
- { url = "https://files.pythonhosted.org/packages/07/78/c77f644b68ab054e5a674fb4da40ff7bffb2c88df58afa82dbf86573092d/regex-2026.1.15-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0751a26ad39d4f2ade8fe16c59b2bf5cb19eb3d2cd543e709e583d559bd9efde", size = 803358, upload-time = "2026-01-14T23:16:31.369Z" },
- { url = "https://files.pythonhosted.org/packages/27/31/d4292ea8566eaa551fafc07797961c5963cf5235c797cc2ae19b85dfd04d/regex-2026.1.15-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0f0c7684c7f9ca241344ff95a1de964f257a5251968484270e91c25a755532c5", size = 775833, upload-time = "2026-01-14T23:16:33.141Z" },
- { url = "https://files.pythonhosted.org/packages/ce/b2/cff3bf2fea4133aa6fb0d1e370b37544d18c8350a2fa118c7e11d1db0e14/regex-2026.1.15-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:74f45d170a21df41508cb67165456538425185baaf686281fa210d7e729abc34", size = 788045, upload-time = "2026-01-14T23:16:35.005Z" },
- { url = "https://files.pythonhosted.org/packages/8d/99/2cb9b69045372ec877b6f5124bda4eb4253bc58b8fe5848c973f752bc52c/regex-2026.1.15-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:f1862739a1ffb50615c0fde6bae6569b5efbe08d98e59ce009f68a336f64da75", size = 859374, upload-time = "2026-01-14T23:16:36.919Z" },
- { url = "https://files.pythonhosted.org/packages/09/16/710b0a5abe8e077b1729a562d2f297224ad079f3a66dce46844c193416c8/regex-2026.1.15-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:453078802f1b9e2b7303fb79222c054cb18e76f7bdc220f7530fdc85d319f99e", size = 763940, upload-time = "2026-01-14T23:16:38.685Z" },
- { url = "https://files.pythonhosted.org/packages/dd/d1/7585c8e744e40eb3d32f119191969b91de04c073fca98ec14299041f6e7e/regex-2026.1.15-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:a30a68e89e5a218b8b23a52292924c1f4b245cb0c68d1cce9aec9bbda6e2c160", size = 850112, upload-time = "2026-01-14T23:16:40.646Z" },
- { url = "https://files.pythonhosted.org/packages/af/d6/43e1dd85df86c49a347aa57c1f69d12c652c7b60e37ec162e3096194a278/regex-2026.1.15-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9479cae874c81bf610d72b85bb681a94c95722c127b55445285fb0e2c82db8e1", size = 789586, upload-time = "2026-01-14T23:16:42.799Z" },
- { url = "https://files.pythonhosted.org/packages/93/38/77142422f631e013f316aaae83234c629555729a9fbc952b8a63ac91462a/regex-2026.1.15-cp314-cp314-win32.whl", hash = "sha256:d639a750223132afbfb8f429c60d9d318aeba03281a5f1ab49f877456448dcf1", size = 271691, upload-time = "2026-01-14T23:16:44.671Z" },
- { url = "https://files.pythonhosted.org/packages/4a/a9/ab16b4649524ca9e05213c1cdbb7faa85cc2aa90a0230d2f796cbaf22736/regex-2026.1.15-cp314-cp314-win_amd64.whl", hash = "sha256:4161d87f85fa831e31469bfd82c186923070fc970b9de75339b68f0c75b51903", size = 280422, upload-time = "2026-01-14T23:16:46.607Z" },
- { url = "https://files.pythonhosted.org/packages/be/2a/20fd057bf3521cb4791f69f869635f73e0aaf2b9ad2d260f728144f9047c/regex-2026.1.15-cp314-cp314-win_arm64.whl", hash = "sha256:91c5036ebb62663a6b3999bdd2e559fd8456d17e2b485bf509784cd31a8b1705", size = 273467, upload-time = "2026-01-14T23:16:48.967Z" },
- { url = "https://files.pythonhosted.org/packages/ad/77/0b1e81857060b92b9cad239104c46507dd481b3ff1fa79f8e7f865aae38a/regex-2026.1.15-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:ee6854c9000a10938c79238de2379bea30c82e4925a371711af45387df35cab8", size = 492073, upload-time = "2026-01-14T23:16:51.154Z" },
- { url = "https://files.pythonhosted.org/packages/70/f3/f8302b0c208b22c1e4f423147e1913fd475ddd6230565b299925353de644/regex-2026.1.15-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:2c2b80399a422348ce5de4fe40c418d6299a0fa2803dd61dc0b1a2f28e280fcf", size = 292757, upload-time = "2026-01-14T23:16:53.08Z" },
- { url = "https://files.pythonhosted.org/packages/bf/f0/ef55de2460f3b4a6da9d9e7daacd0cb79d4ef75c64a2af316e68447f0df0/regex-2026.1.15-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:dca3582bca82596609959ac39e12b7dad98385b4fefccb1151b937383cec547d", size = 291122, upload-time = "2026-01-14T23:16:55.383Z" },
- { url = "https://files.pythonhosted.org/packages/cf/55/bb8ccbacabbc3a11d863ee62a9f18b160a83084ea95cdfc5d207bfc3dd75/regex-2026.1.15-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ef71d476caa6692eea743ae5ea23cde3260677f70122c4d258ca952e5c2d4e84", size = 807761, upload-time = "2026-01-14T23:16:57.251Z" },
- { url = "https://files.pythonhosted.org/packages/8f/84/f75d937f17f81e55679a0509e86176e29caa7298c38bd1db7ce9c0bf6075/regex-2026.1.15-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c243da3436354f4af6c3058a3f81a97d47ea52c9bd874b52fd30274853a1d5df", size = 873538, upload-time = "2026-01-14T23:16:59.349Z" },
- { url = "https://files.pythonhosted.org/packages/b8/d9/0da86327df70349aa8d86390da91171bd3ca4f0e7c1d1d453a9c10344da3/regex-2026.1.15-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8355ad842a7c7e9e5e55653eade3b7d1885ba86f124dd8ab1f722f9be6627434", size = 915066, upload-time = "2026-01-14T23:17:01.607Z" },
- { url = "https://files.pythonhosted.org/packages/2a/5e/f660fb23fc77baa2a61aa1f1fe3a4eea2bbb8a286ddec148030672e18834/regex-2026.1.15-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f192a831d9575271a22d804ff1a5355355723f94f31d9eef25f0d45a152fdc1a", size = 812938, upload-time = "2026-01-14T23:17:04.366Z" },
- { url = "https://files.pythonhosted.org/packages/69/33/a47a29bfecebbbfd1e5cd3f26b28020a97e4820f1c5148e66e3b7d4b4992/regex-2026.1.15-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:166551807ec20d47ceaeec380081f843e88c8949780cd42c40f18d16168bed10", size = 781314, upload-time = "2026-01-14T23:17:06.378Z" },
- { url = "https://files.pythonhosted.org/packages/65/ec/7ec2bbfd4c3f4e494a24dec4c6943a668e2030426b1b8b949a6462d2c17b/regex-2026.1.15-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:f9ca1cbdc0fbfe5e6e6f8221ef2309988db5bcede52443aeaee9a4ad555e0dac", size = 795652, upload-time = "2026-01-14T23:17:08.521Z" },
- { url = "https://files.pythonhosted.org/packages/46/79/a5d8651ae131fe27d7c521ad300aa7f1c7be1dbeee4d446498af5411b8a9/regex-2026.1.15-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b30bcbd1e1221783c721483953d9e4f3ab9c5d165aa709693d3f3946747b1aea", size = 868550, upload-time = "2026-01-14T23:17:10.573Z" },
- { url = "https://files.pythonhosted.org/packages/06/b7/25635d2809664b79f183070786a5552dd4e627e5aedb0065f4e3cf8ee37d/regex-2026.1.15-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:2a8d7b50c34578d0d3bf7ad58cde9652b7d683691876f83aedc002862a35dc5e", size = 769981, upload-time = "2026-01-14T23:17:12.871Z" },
- { url = "https://files.pythonhosted.org/packages/16/8b/fc3fcbb2393dcfa4a6c5ffad92dc498e842df4581ea9d14309fcd3c55fb9/regex-2026.1.15-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:9d787e3310c6a6425eb346be4ff2ccf6eece63017916fd77fe8328c57be83521", size = 854780, upload-time = "2026-01-14T23:17:14.837Z" },
- { url = "https://files.pythonhosted.org/packages/d0/38/dde117c76c624713c8a2842530be9c93ca8b606c0f6102d86e8cd1ce8bea/regex-2026.1.15-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:619843841e220adca114118533a574a9cd183ed8a28b85627d2844c500a2b0db", size = 799778, upload-time = "2026-01-14T23:17:17.369Z" },
- { url = "https://files.pythonhosted.org/packages/e3/0d/3a6cfa9ae99606afb612d8fb7a66b245a9d5ff0f29bb347c8a30b6ad561b/regex-2026.1.15-cp314-cp314t-win32.whl", hash = "sha256:e90b8db97f6f2c97eb045b51a6b2c5ed69cedd8392459e0642d4199b94fabd7e", size = 274667, upload-time = "2026-01-14T23:17:19.301Z" },
- { url = "https://files.pythonhosted.org/packages/5b/b2/297293bb0742fd06b8d8e2572db41a855cdf1cae0bf009b1cb74fe07e196/regex-2026.1.15-cp314-cp314t-win_amd64.whl", hash = "sha256:5ef19071f4ac9f0834793af85bd04a920b4407715624e40cb7a0631a11137cdf", size = 284386, upload-time = "2026-01-14T23:17:21.231Z" },
- { url = "https://files.pythonhosted.org/packages/95/e4/a3b9480c78cf8ee86626cb06f8d931d74d775897d44201ccb813097ae697/regex-2026.1.15-cp314-cp314t-win_arm64.whl", hash = "sha256:ca89c5e596fc05b015f27561b3793dc2fa0917ea0d7507eebb448efd35274a70", size = 274837, upload-time = "2026-01-14T23:17:23.146Z" },
-]
-
-[[package]]
-name = "requests"
-version = "2.32.5"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "certifi" },
- { name = "charset-normalizer" },
- { name = "idna" },
- { name = "urllib3" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf", size = 134517, upload-time = "2025-08-18T20:46:02.573Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6", size = 64738, upload-time = "2025-08-18T20:46:00.542Z" },
-]
-
-[[package]]
-name = "rich"
-version = "14.2.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "markdown-it-py" },
- { name = "pygments" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz", hash = "sha256:73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4", size = 219990, upload-time = "2025-10-09T14:16:53.064Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/25/7a/b0178788f8dc6cafce37a212c99565fa1fe7872c70c6c9c1e1a372d9d88f/rich-14.2.0-py3-none-any.whl", hash = "sha256:76bc51fe2e57d2b1be1f96c524b890b816e334ab4c1e45888799bfaab0021edd", size = 243393, upload-time = "2025-10-09T14:16:51.245Z" },
-]
-
-[[package]]
-name = "ruff"
-version = "0.14.13"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/50/0a/1914efb7903174b381ee2ffeebb4253e729de57f114e63595114c8ca451f/ruff-0.14.13.tar.gz", hash = "sha256:83cd6c0763190784b99650a20fec7633c59f6ebe41c5cc9d45ee42749563ad47", size = 6059504, upload-time = "2026-01-15T20:15:16.918Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/c3/ae/0deefbc65ca74b0ab1fd3917f94dc3b398233346a74b8bbb0a916a1a6bf6/ruff-0.14.13-py3-none-linux_armv6l.whl", hash = "sha256:76f62c62cd37c276cb03a275b198c7c15bd1d60c989f944db08a8c1c2dbec18b", size = 13062418, upload-time = "2026-01-15T20:14:50.779Z" },
- { url = "https://files.pythonhosted.org/packages/47/df/5916604faa530a97a3c154c62a81cb6b735c0cb05d1e26d5ad0f0c8ac48a/ruff-0.14.13-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:914a8023ece0528d5cc33f5a684f5f38199bbb566a04815c2c211d8f40b5d0ed", size = 13442344, upload-time = "2026-01-15T20:15:07.94Z" },
- { url = "https://files.pythonhosted.org/packages/4c/f3/e0e694dd69163c3a1671e102aa574a50357536f18a33375050334d5cd517/ruff-0.14.13-py3-none-macosx_11_0_arm64.whl", hash = "sha256:d24899478c35ebfa730597a4a775d430ad0d5631b8647a3ab368c29b7e7bd063", size = 12354720, upload-time = "2026-01-15T20:15:09.854Z" },
- { url = "https://files.pythonhosted.org/packages/c3/e8/67f5fcbbaee25e8fc3b56cc33e9892eca7ffe09f773c8e5907757a7e3bdb/ruff-0.14.13-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9aaf3870f14d925bbaf18b8a2347ee0ae7d95a2e490e4d4aea6813ed15ebc80e", size = 12774493, upload-time = "2026-01-15T20:15:20.908Z" },
- { url = "https://files.pythonhosted.org/packages/6b/ce/d2e9cb510870b52a9565d885c0d7668cc050e30fa2c8ac3fb1fda15c083d/ruff-0.14.13-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac5b7f63dd3b27cc811850f5ffd8fff845b00ad70e60b043aabf8d6ecc304e09", size = 12815174, upload-time = "2026-01-15T20:15:05.74Z" },
- { url = "https://files.pythonhosted.org/packages/88/00/c38e5da58beebcf4fa32d0ddd993b63dfacefd02ab7922614231330845bf/ruff-0.14.13-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:78d2b1097750d90ba82ce4ba676e85230a0ed694178ca5e61aa9b459970b3eb9", size = 13680909, upload-time = "2026-01-15T20:15:14.537Z" },
- { url = "https://files.pythonhosted.org/packages/61/61/cd37c9dd5bd0a3099ba79b2a5899ad417d8f3b04038810b0501a80814fd7/ruff-0.14.13-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:7d0bf87705acbbcb8d4c24b2d77fbb73d40210a95c3903b443cd9e30824a5032", size = 15144215, upload-time = "2026-01-15T20:15:22.886Z" },
- { url = "https://files.pythonhosted.org/packages/56/8a/85502d7edbf98c2df7b8876f316c0157359165e16cdf98507c65c8d07d3d/ruff-0.14.13-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a3eb5da8e2c9e9f13431032fdcbe7681de9ceda5835efee3269417c13f1fed5c", size = 14706067, upload-time = "2026-01-15T20:14:48.271Z" },
- { url = "https://files.pythonhosted.org/packages/7e/2f/de0df127feb2ee8c1e54354dc1179b4a23798f0866019528c938ba439aca/ruff-0.14.13-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:642442b42957093811cd8d2140dfadd19c7417030a7a68cf8d51fcdd5f217427", size = 14133916, upload-time = "2026-01-15T20:14:57.357Z" },
- { url = "https://files.pythonhosted.org/packages/0d/77/9b99686bb9fe07a757c82f6f95e555c7a47801a9305576a9c67e0a31d280/ruff-0.14.13-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4acdf009f32b46f6e8864af19cbf6841eaaed8638e65c8dac845aea0d703c841", size = 13859207, upload-time = "2026-01-15T20:14:55.111Z" },
- { url = "https://files.pythonhosted.org/packages/7d/46/2bdcb34a87a179a4d23022d818c1c236cb40e477faf0d7c9afb6813e5876/ruff-0.14.13-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:591a7f68860ea4e003917d19b5c4f5ac39ff558f162dc753a2c5de897fd5502c", size = 14043686, upload-time = "2026-01-15T20:14:52.841Z" },
- { url = "https://files.pythonhosted.org/packages/1a/a9/5c6a4f56a0512c691cf143371bcf60505ed0f0860f24a85da8bd123b2bf1/ruff-0.14.13-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:774c77e841cc6e046fc3e91623ce0903d1cd07e3a36b1a9fe79b81dab3de506b", size = 12663837, upload-time = "2026-01-15T20:15:18.921Z" },
- { url = "https://files.pythonhosted.org/packages/fe/bb/b920016ece7651fa7fcd335d9d199306665486694d4361547ccb19394c44/ruff-0.14.13-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:61f4e40077a1248436772bb6512db5fc4457fe4c49e7a94ea7c5088655dd21ae", size = 12805867, upload-time = "2026-01-15T20:14:59.272Z" },
- { url = "https://files.pythonhosted.org/packages/7d/b3/0bd909851e5696cd21e32a8fc25727e5f58f1934b3596975503e6e85415c/ruff-0.14.13-py3-none-musllinux_1_2_i686.whl", hash = "sha256:6d02f1428357fae9e98ac7aa94b7e966fd24151088510d32cf6f902d6c09235e", size = 13208528, upload-time = "2026-01-15T20:15:03.732Z" },
- { url = "https://files.pythonhosted.org/packages/3b/3b/e2d94cb613f6bbd5155a75cbe072813756363eba46a3f2177a1fcd0cd670/ruff-0.14.13-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:e399341472ce15237be0c0ae5fbceca4b04cd9bebab1a2b2c979e015455d8f0c", size = 13929242, upload-time = "2026-01-15T20:15:11.918Z" },
- { url = "https://files.pythonhosted.org/packages/6a/c5/abd840d4132fd51a12f594934af5eba1d5d27298a6f5b5d6c3be45301caf/ruff-0.14.13-py3-none-win32.whl", hash = "sha256:ef720f529aec113968b45dfdb838ac8934e519711da53a0456038a0efecbd680", size = 12919024, upload-time = "2026-01-15T20:14:43.647Z" },
- { url = "https://files.pythonhosted.org/packages/c2/55/6384b0b8ce731b6e2ade2b5449bf07c0e4c31e8a2e68ea65b3bafadcecc5/ruff-0.14.13-py3-none-win_amd64.whl", hash = "sha256:6070bd026e409734b9257e03e3ef18c6e1a216f0435c6751d7a8ec69cb59abef", size = 14097887, upload-time = "2026-01-15T20:15:01.48Z" },
- { url = "https://files.pythonhosted.org/packages/4d/e1/7348090988095e4e39560cfc2f7555b1b2a7357deba19167b600fdf5215d/ruff-0.14.13-py3-none-win_arm64.whl", hash = "sha256:7ab819e14f1ad9fe39f246cfcc435880ef7a9390d81a2b6ac7e01039083dd247", size = 13080224, upload-time = "2026-01-15T20:14:45.853Z" },
-]
-
-[[package]]
-name = "safetensors"
-version = "0.7.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/29/9c/6e74567782559a63bd040a236edca26fd71bc7ba88de2ef35d75df3bca5e/safetensors-0.7.0.tar.gz", hash = "sha256:07663963b67e8bd9f0b8ad15bb9163606cd27cc5a1b96235a50d8369803b96b0", size = 200878, upload-time = "2025-11-19T15:18:43.199Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/fa/47/aef6c06649039accf914afef490268e1067ed82be62bcfa5b7e886ad15e8/safetensors-0.7.0-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:c82f4d474cf725255d9e6acf17252991c3c8aac038d6ef363a4bf8be2f6db517", size = 467781, upload-time = "2025-11-19T15:18:35.84Z" },
- { url = "https://files.pythonhosted.org/packages/e8/00/374c0c068e30cd31f1e1b46b4b5738168ec79e7689ca82ee93ddfea05109/safetensors-0.7.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:94fd4858284736bb67a897a41608b5b0c2496c9bdb3bf2af1fa3409127f20d57", size = 447058, upload-time = "2025-11-19T15:18:34.416Z" },
- { url = "https://files.pythonhosted.org/packages/f1/06/578ffed52c2296f93d7fd2d844cabfa92be51a587c38c8afbb8ae449ca89/safetensors-0.7.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e07d91d0c92a31200f25351f4acb2bc6aff7f48094e13ebb1d0fb995b54b6542", size = 491748, upload-time = "2025-11-19T15:18:09.79Z" },
- { url = "https://files.pythonhosted.org/packages/ae/33/1debbbb70e4791dde185edb9413d1fe01619255abb64b300157d7f15dddd/safetensors-0.7.0-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8469155f4cb518bafb4acf4865e8bb9d6804110d2d9bdcaa78564b9fd841e104", size = 503881, upload-time = "2025-11-19T15:18:16.145Z" },
- { url = "https://files.pythonhosted.org/packages/8e/1c/40c2ca924d60792c3be509833df711b553c60effbd91da6f5284a83f7122/safetensors-0.7.0-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:54bef08bf00a2bff599982f6b08e8770e09cc012d7bba00783fc7ea38f1fb37d", size = 623463, upload-time = "2025-11-19T15:18:21.11Z" },
- { url = "https://files.pythonhosted.org/packages/9b/3a/13784a9364bd43b0d61eef4bea2845039bc2030458b16594a1bd787ae26e/safetensors-0.7.0-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:42cb091236206bb2016d245c377ed383aa7f78691748f3bb6ee1bfa51ae2ce6a", size = 532855, upload-time = "2025-11-19T15:18:25.719Z" },
- { url = "https://files.pythonhosted.org/packages/a0/60/429e9b1cb3fc651937727befe258ea24122d9663e4d5709a48c9cbfceecb/safetensors-0.7.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dac7252938f0696ddea46f5e855dd3138444e82236e3be475f54929f0c510d48", size = 507152, upload-time = "2025-11-19T15:18:33.023Z" },
- { url = "https://files.pythonhosted.org/packages/3c/a8/4b45e4e059270d17af60359713ffd83f97900d45a6afa73aaa0d737d48b6/safetensors-0.7.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1d060c70284127fa805085d8f10fbd0962792aed71879d00864acda69dbab981", size = 541856, upload-time = "2025-11-19T15:18:31.075Z" },
- { url = "https://files.pythonhosted.org/packages/06/87/d26d8407c44175d8ae164a95b5a62707fcc445f3c0c56108e37d98070a3d/safetensors-0.7.0-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:cdab83a366799fa730f90a4ebb563e494f28e9e92c4819e556152ad55e43591b", size = 674060, upload-time = "2025-11-19T15:18:37.211Z" },
- { url = "https://files.pythonhosted.org/packages/11/f5/57644a2ff08dc6325816ba7217e5095f17269dada2554b658442c66aed51/safetensors-0.7.0-cp38-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:672132907fcad9f2aedcb705b2d7b3b93354a2aec1b2f706c4db852abe338f85", size = 771715, upload-time = "2025-11-19T15:18:38.689Z" },
- { url = "https://files.pythonhosted.org/packages/86/31/17883e13a814bd278ae6e266b13282a01049b0c81341da7fd0e3e71a80a3/safetensors-0.7.0-cp38-abi3-musllinux_1_2_i686.whl", hash = "sha256:5d72abdb8a4d56d4020713724ba81dac065fedb7f3667151c4a637f1d3fb26c0", size = 714377, upload-time = "2025-11-19T15:18:40.162Z" },
- { url = "https://files.pythonhosted.org/packages/4a/d8/0c8a7dc9b41dcac53c4cbf9df2b9c83e0e0097203de8b37a712b345c0be5/safetensors-0.7.0-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b0f6d66c1c538d5a94a73aa9ddca8ccc4227e6c9ff555322ea40bdd142391dd4", size = 677368, upload-time = "2025-11-19T15:18:41.627Z" },
- { url = "https://files.pythonhosted.org/packages/05/e5/cb4b713c8a93469e3c5be7c3f8d77d307e65fe89673e731f5c2bfd0a9237/safetensors-0.7.0-cp38-abi3-win32.whl", hash = "sha256:c74af94bf3ac15ac4d0f2a7c7b4663a15f8c2ab15ed0fc7531ca61d0835eccba", size = 326423, upload-time = "2025-11-19T15:18:45.74Z" },
- { url = "https://files.pythonhosted.org/packages/5d/e6/ec8471c8072382cb91233ba7267fd931219753bb43814cbc71757bfd4dab/safetensors-0.7.0-cp38-abi3-win_amd64.whl", hash = "sha256:d1239932053f56f3456f32eb9625590cc7582e905021f94636202a864d470755", size = 341380, upload-time = "2025-11-19T15:18:44.427Z" },
- { url = "https://files.pythonhosted.org/packages/a7/6a/4d08d89a6fcbe905c5ae68b8b34f0791850882fc19782d0d02c65abbdf3b/safetensors-0.7.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4729811a6640d019a4b7ba8638ee2fd21fa5ca8c7e7bdf0fed62068fcaac737", size = 492430, upload-time = "2025-11-19T15:18:11.884Z" },
- { url = "https://files.pythonhosted.org/packages/dd/29/59ed8152b30f72c42d00d241e58eaca558ae9dbfa5695206e2e0f54c7063/safetensors-0.7.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:12f49080303fa6bb424b362149a12949dfbbf1e06811a88f2307276b0c131afd", size = 503977, upload-time = "2025-11-19T15:18:17.523Z" },
- { url = "https://files.pythonhosted.org/packages/d3/0b/4811bfec67fa260e791369b16dab105e4bae82686120554cc484064e22b4/safetensors-0.7.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0071bffba4150c2f46cae1432d31995d77acfd9f8db598b5d1a2ce67e8440ad2", size = 623890, upload-time = "2025-11-19T15:18:22.666Z" },
- { url = "https://files.pythonhosted.org/packages/58/5b/632a58724221ef03d78ab65062e82a1010e1bef8e8e0b9d7c6d7b8044841/safetensors-0.7.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:473b32699f4200e69801bf5abf93f1a4ecd432a70984df164fc22ccf39c4a6f3", size = 531885, upload-time = "2025-11-19T15:18:27.146Z" },
-]
-
-[[package]]
-name = "scenedetect"
-version = "0.6.7.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "click" },
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "platformdirs" },
- { name = "tqdm" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/f0/b4/e77e1812ae89bc4864ff54efb6a8232eabebd471e372096cb711f03cca52/scenedetect-0.6.7.1.tar.gz", hash = "sha256:07833b0cb83a0106786a88136462580e9865e097f411f01501a688714c483a4e", size = 164208, upload-time = "2025-09-25T03:18:59.929Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/b1/5b/2294ea44b3b2264a50b82a55a3822837a04cb779c873fc168844f36f5b46/scenedetect-0.6.7.1-py3-none-any.whl", hash = "sha256:3808ef4436ab0fc6fee8a155e95759b42e2446c925c45746a82ff119be4eb3e1", size = 130860, upload-time = "2025-09-25T03:18:58.43Z" },
-]
-
-[[package]]
-name = "scikit-image"
-version = "0.25.2"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version < '3.11' and sys_platform == 'linux'",
- "python_full_version < '3.11' and sys_platform != 'linux'",
-]
-dependencies = [
- { name = "imageio" },
- { name = "lazy-loader" },
- { name = "networkx", version = "3.4.2", source = { registry = "https://pypi.org/simple" } },
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" } },
- { name = "packaging" },
- { name = "pillow" },
- { name = "scipy", version = "1.15.3", source = { registry = "https://pypi.org/simple" } },
- { name = "tifffile", version = "2025.5.10", source = { registry = "https://pypi.org/simple" } },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/c7/a8/3c0f256012b93dd2cb6fda9245e9f4bff7dc0486880b248005f15ea2255e/scikit_image-0.25.2.tar.gz", hash = "sha256:e5a37e6cd4d0c018a7a55b9d601357e3382826d3888c10d0213fc63bff977dde", size = 22693594, upload-time = "2025-02-18T18:05:24.538Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/11/cb/016c63f16065c2d333c8ed0337e18a5cdf9bc32d402e4f26b0db362eb0e2/scikit_image-0.25.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d3278f586793176599df6a4cf48cb6beadae35c31e58dc01a98023af3dc31c78", size = 13988922, upload-time = "2025-02-18T18:04:11.069Z" },
- { url = "https://files.pythonhosted.org/packages/30/ca/ff4731289cbed63c94a0c9a5b672976603118de78ed21910d9060c82e859/scikit_image-0.25.2-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:5c311069899ce757d7dbf1d03e32acb38bb06153236ae77fcd820fd62044c063", size = 13192698, upload-time = "2025-02-18T18:04:15.362Z" },
- { url = "https://files.pythonhosted.org/packages/39/6d/a2aadb1be6d8e149199bb9b540ccde9e9622826e1ab42fe01de4c35ab918/scikit_image-0.25.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:be455aa7039a6afa54e84f9e38293733a2622b8c2fb3362b822d459cc5605e99", size = 14153634, upload-time = "2025-02-18T18:04:18.496Z" },
- { url = "https://files.pythonhosted.org/packages/96/08/916e7d9ee4721031b2f625db54b11d8379bd51707afaa3e5a29aecf10bc4/scikit_image-0.25.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a4c464b90e978d137330be433df4e76d92ad3c5f46a22f159520ce0fdbea8a09", size = 14767545, upload-time = "2025-02-18T18:04:22.556Z" },
- { url = "https://files.pythonhosted.org/packages/5f/ee/c53a009e3997dda9d285402f19226fbd17b5b3cb215da391c4ed084a1424/scikit_image-0.25.2-cp310-cp310-win_amd64.whl", hash = "sha256:60516257c5a2d2f74387c502aa2f15a0ef3498fbeaa749f730ab18f0a40fd054", size = 12812908, upload-time = "2025-02-18T18:04:26.364Z" },
- { url = "https://files.pythonhosted.org/packages/c4/97/3051c68b782ee3f1fb7f8f5bb7d535cf8cb92e8aae18fa9c1cdf7e15150d/scikit_image-0.25.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f4bac9196fb80d37567316581c6060763b0f4893d3aca34a9ede3825bc035b17", size = 14003057, upload-time = "2025-02-18T18:04:30.395Z" },
- { url = "https://files.pythonhosted.org/packages/19/23/257fc696c562639826065514d551b7b9b969520bd902c3a8e2fcff5b9e17/scikit_image-0.25.2-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:d989d64ff92e0c6c0f2018c7495a5b20e2451839299a018e0e5108b2680f71e0", size = 13180335, upload-time = "2025-02-18T18:04:33.449Z" },
- { url = "https://files.pythonhosted.org/packages/ef/14/0c4a02cb27ca8b1e836886b9ec7c9149de03053650e9e2ed0625f248dd92/scikit_image-0.25.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2cfc96b27afe9a05bc92f8c6235321d3a66499995675b27415e0d0c76625173", size = 14144783, upload-time = "2025-02-18T18:04:36.594Z" },
- { url = "https://files.pythonhosted.org/packages/dd/9b/9fb556463a34d9842491d72a421942c8baff4281025859c84fcdb5e7e602/scikit_image-0.25.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:24cc986e1f4187a12aa319f777b36008764e856e5013666a4a83f8df083c2641", size = 14785376, upload-time = "2025-02-18T18:04:39.856Z" },
- { url = "https://files.pythonhosted.org/packages/de/ec/b57c500ee85885df5f2188f8bb70398481393a69de44a00d6f1d055f103c/scikit_image-0.25.2-cp311-cp311-win_amd64.whl", hash = "sha256:b4f6b61fc2db6340696afe3db6b26e0356911529f5f6aee8c322aa5157490c9b", size = 12791698, upload-time = "2025-02-18T18:04:42.868Z" },
- { url = "https://files.pythonhosted.org/packages/35/8c/5df82881284459f6eec796a5ac2a0a304bb3384eec2e73f35cfdfcfbf20c/scikit_image-0.25.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:8db8dd03663112783221bf01ccfc9512d1cc50ac9b5b0fe8f4023967564719fb", size = 13986000, upload-time = "2025-02-18T18:04:47.156Z" },
- { url = "https://files.pythonhosted.org/packages/ce/e6/93bebe1abcdce9513ffec01d8af02528b4c41fb3c1e46336d70b9ed4ef0d/scikit_image-0.25.2-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:483bd8cc10c3d8a7a37fae36dfa5b21e239bd4ee121d91cad1f81bba10cfb0ed", size = 13235893, upload-time = "2025-02-18T18:04:51.049Z" },
- { url = "https://files.pythonhosted.org/packages/53/4b/eda616e33f67129e5979a9eb33c710013caa3aa8a921991e6cc0b22cea33/scikit_image-0.25.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d1e80107bcf2bf1291acfc0bf0425dceb8890abe9f38d8e94e23497cbf7ee0d", size = 14178389, upload-time = "2025-02-18T18:04:54.245Z" },
- { url = "https://files.pythonhosted.org/packages/6b/b5/b75527c0f9532dd8a93e8e7cd8e62e547b9f207d4c11e24f0006e8646b36/scikit_image-0.25.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a17e17eb8562660cc0d31bb55643a4da996a81944b82c54805c91b3fe66f4824", size = 15003435, upload-time = "2025-02-18T18:04:57.586Z" },
- { url = "https://files.pythonhosted.org/packages/34/e3/49beb08ebccda3c21e871b607c1cb2f258c3fa0d2f609fed0a5ba741b92d/scikit_image-0.25.2-cp312-cp312-win_amd64.whl", hash = "sha256:bdd2b8c1de0849964dbc54037f36b4e9420157e67e45a8709a80d727f52c7da2", size = 12899474, upload-time = "2025-02-18T18:05:01.166Z" },
- { url = "https://files.pythonhosted.org/packages/e6/7c/9814dd1c637f7a0e44342985a76f95a55dd04be60154247679fd96c7169f/scikit_image-0.25.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7efa888130f6c548ec0439b1a7ed7295bc10105458a421e9bf739b457730b6da", size = 13921841, upload-time = "2025-02-18T18:05:03.963Z" },
- { url = "https://files.pythonhosted.org/packages/84/06/66a2e7661d6f526740c309e9717d3bd07b473661d5cdddef4dd978edab25/scikit_image-0.25.2-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:dd8011efe69c3641920614d550f5505f83658fe33581e49bed86feab43a180fc", size = 13196862, upload-time = "2025-02-18T18:05:06.986Z" },
- { url = "https://files.pythonhosted.org/packages/4e/63/3368902ed79305f74c2ca8c297dfeb4307269cbe6402412668e322837143/scikit_image-0.25.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28182a9d3e2ce3c2e251383bdda68f8d88d9fff1a3ebe1eb61206595c9773341", size = 14117785, upload-time = "2025-02-18T18:05:10.69Z" },
- { url = "https://files.pythonhosted.org/packages/cd/9b/c3da56a145f52cd61a68b8465d6a29d9503bc45bc993bb45e84371c97d94/scikit_image-0.25.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8abd3c805ce6944b941cfed0406d88faeb19bab3ed3d4b50187af55cf24d147", size = 14977119, upload-time = "2025-02-18T18:05:13.871Z" },
- { url = "https://files.pythonhosted.org/packages/8a/97/5fcf332e1753831abb99a2525180d3fb0d70918d461ebda9873f66dcc12f/scikit_image-0.25.2-cp313-cp313-win_amd64.whl", hash = "sha256:64785a8acefee460ec49a354706db0b09d1f325674107d7fa3eadb663fb56d6f", size = 12885116, upload-time = "2025-02-18T18:05:17.844Z" },
- { url = "https://files.pythonhosted.org/packages/10/cc/75e9f17e3670b5ed93c32456fda823333c6279b144cd93e2c03aa06aa472/scikit_image-0.25.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:330d061bd107d12f8d68f1d611ae27b3b813b8cdb0300a71d07b1379178dd4cd", size = 13862801, upload-time = "2025-02-18T18:05:20.783Z" },
-]
-
-[[package]]
-name = "scikit-image"
-version = "0.26.0"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version >= '3.13' and sys_platform == 'linux'",
- "python_full_version == '3.12.*' and sys_platform == 'linux'",
- "python_full_version == '3.11.*' and sys_platform == 'linux'",
- "python_full_version >= '3.13' and sys_platform != 'linux'",
- "python_full_version == '3.12.*' and sys_platform != 'linux'",
- "python_full_version == '3.11.*' and sys_platform != 'linux'",
-]
-dependencies = [
- { name = "imageio" },
- { name = "lazy-loader" },
- { name = "networkx", version = "3.6.1", source = { registry = "https://pypi.org/simple" } },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" } },
- { name = "packaging" },
- { name = "pillow" },
- { name = "scipy", version = "1.17.0", source = { registry = "https://pypi.org/simple" } },
- { name = "tifffile", version = "2026.1.14", source = { registry = "https://pypi.org/simple" } },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/a1/b4/2528bb43c67d48053a7a649a9666432dc307d66ba02e3a6d5c40f46655df/scikit_image-0.26.0.tar.gz", hash = "sha256:f5f970ab04efad85c24714321fcc91613fcb64ef2a892a13167df2f3e59199fa", size = 22729739, upload-time = "2025-12-20T17:12:21.824Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/76/16/8a407688b607f86f81f8c649bf0d68a2a6d67375f18c2d660aba20f5b648/scikit_image-0.26.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b1ede33a0fb3731457eaf53af6361e73dd510f449dac437ab54573b26788baf0", size = 12355510, upload-time = "2025-12-20T17:10:31.628Z" },
- { url = "https://files.pythonhosted.org/packages/6b/f9/7efc088ececb6f6868fd4475e16cfafc11f242ce9ab5fc3557d78b5da0d4/scikit_image-0.26.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7af7aa331c6846bd03fa28b164c18d0c3fd419dbb888fb05e958ac4257a78fdd", size = 12056334, upload-time = "2025-12-20T17:10:34.559Z" },
- { url = "https://files.pythonhosted.org/packages/9f/1e/bc7fb91fb5ff65ef42346c8b7ee8b09b04eabf89235ab7dbfdfd96cbd1ea/scikit_image-0.26.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9ea6207d9e9d21c3f464efe733121c0504e494dbdc7728649ff3e23c3c5a4953", size = 13297768, upload-time = "2025-12-20T17:10:37.733Z" },
- { url = "https://files.pythonhosted.org/packages/a5/2a/e71c1a7d90e70da67b88ccc609bd6ae54798d5847369b15d3a8052232f9d/scikit_image-0.26.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:74aa5518ccea28121f57a95374581d3b979839adc25bb03f289b1bc9b99c58af", size = 13711217, upload-time = "2025-12-20T17:10:40.935Z" },
- { url = "https://files.pythonhosted.org/packages/d4/59/9637ee12c23726266b91296791465218973ce1ad3e4c56fc81e4d8e7d6e1/scikit_image-0.26.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d5c244656de905e195a904e36dbc18585e06ecf67d90f0482cbde63d7f9ad59d", size = 14337782, upload-time = "2025-12-20T17:10:43.452Z" },
- { url = "https://files.pythonhosted.org/packages/e7/5c/a3e1e0860f9294663f540c117e4bf83d55e5b47c281d475cc06227e88411/scikit_image-0.26.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:21a818ee6ca2f2131b9e04d8eb7637b5c18773ebe7b399ad23dcc5afaa226d2d", size = 14805997, upload-time = "2025-12-20T17:10:45.93Z" },
- { url = "https://files.pythonhosted.org/packages/d3/c6/2eeacf173da041a9e388975f54e5c49df750757fcfc3ee293cdbbae1ea0a/scikit_image-0.26.0-cp311-cp311-win_amd64.whl", hash = "sha256:9490360c8d3f9a7e85c8de87daf7c0c66507960cf4947bb9610d1751928721c7", size = 11878486, upload-time = "2025-12-20T17:10:48.246Z" },
- { url = "https://files.pythonhosted.org/packages/c3/a4/a852c4949b9058d585e762a66bf7e9a2cd3be4795cd940413dfbfbb0ce79/scikit_image-0.26.0-cp311-cp311-win_arm64.whl", hash = "sha256:0baa0108d2d027f34d748e84e592b78acc23e965a5de0e4bb03cf371de5c0581", size = 11346518, upload-time = "2025-12-20T17:10:50.575Z" },
- { url = "https://files.pythonhosted.org/packages/99/e8/e13757982264b33a1621628f86b587e9a73a13f5256dad49b19ba7dc9083/scikit_image-0.26.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d454b93a6fa770ac5ae2d33570f8e7a321bb80d29511ce4b6b78058ebe176e8c", size = 12376452, upload-time = "2025-12-20T17:10:52.796Z" },
- { url = "https://files.pythonhosted.org/packages/e3/be/f8dd17d0510f9911f9f17ba301f7455328bf13dae416560126d428de9568/scikit_image-0.26.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3409e89d66eff5734cd2b672d1c48d2759360057e714e1d92a11df82c87cba37", size = 12061567, upload-time = "2025-12-20T17:10:55.207Z" },
- { url = "https://files.pythonhosted.org/packages/b3/2b/c70120a6880579fb42b91567ad79feb4772f7be72e8d52fec403a3dde0c6/scikit_image-0.26.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4c717490cec9e276afb0438dd165b7c3072d6c416709cc0f9f5a4c1070d23a44", size = 13084214, upload-time = "2025-12-20T17:10:57.468Z" },
- { url = "https://files.pythonhosted.org/packages/f4/a2/70401a107d6d7466d64b466927e6b96fcefa99d57494b972608e2f8be50f/scikit_image-0.26.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7df650e79031634ac90b11e64a9eedaf5a5e06fcd09bcd03a34be01745744466", size = 13561683, upload-time = "2025-12-20T17:10:59.49Z" },
- { url = "https://files.pythonhosted.org/packages/13/a5/48bdfd92794c5002d664e0910a349d0a1504671ef5ad358150f21643c79a/scikit_image-0.26.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:cefd85033e66d4ea35b525bb0937d7f42d4cdcfed2d1888e1570d5ce450d3932", size = 14112147, upload-time = "2025-12-20T17:11:02.083Z" },
- { url = "https://files.pythonhosted.org/packages/ee/b5/ac71694da92f5def5953ca99f18a10fe98eac2dd0a34079389b70b4d0394/scikit_image-0.26.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3f5bf622d7c0435884e1e141ebbe4b2804e16b2dd23ae4c6183e2ea99233be70", size = 14661625, upload-time = "2025-12-20T17:11:04.528Z" },
- { url = "https://files.pythonhosted.org/packages/23/4d/a3cc1e96f080e253dad2251bfae7587cf2b7912bcd76fd43fd366ff35a87/scikit_image-0.26.0-cp312-cp312-win_amd64.whl", hash = "sha256:abed017474593cd3056ae0fe948d07d0747b27a085e92df5474f4955dd65aec0", size = 11911059, upload-time = "2025-12-20T17:11:06.61Z" },
- { url = "https://files.pythonhosted.org/packages/35/8a/d1b8055f584acc937478abf4550d122936f420352422a1a625eef2c605d8/scikit_image-0.26.0-cp312-cp312-win_arm64.whl", hash = "sha256:4d57e39ef67a95d26860c8caf9b14b8fb130f83b34c6656a77f191fa6d1d04d8", size = 11348740, upload-time = "2025-12-20T17:11:09.118Z" },
- { url = "https://files.pythonhosted.org/packages/4f/48/02357ffb2cca35640f33f2cfe054a4d6d5d7a229b88880a64f1e45c11f4e/scikit_image-0.26.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a2e852eccf41d2d322b8e60144e124802873a92b8d43a6f96331aa42888491c7", size = 12346329, upload-time = "2025-12-20T17:11:11.599Z" },
- { url = "https://files.pythonhosted.org/packages/67/b9/b792c577cea2c1e94cda83b135a656924fc57c428e8a6d302cd69aac1b60/scikit_image-0.26.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:98329aab3bc87db352b9887f64ce8cdb8e75f7c2daa19927f2e121b797b678d5", size = 12031726, upload-time = "2025-12-20T17:11:13.871Z" },
- { url = "https://files.pythonhosted.org/packages/07/a9/9564250dfd65cb20404a611016db52afc6268b2b371cd19c7538ea47580f/scikit_image-0.26.0-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:915bb3ba66455cf8adac00dc8fdf18a4cd29656aec7ddd38cb4dda90289a6f21", size = 13094910, upload-time = "2025-12-20T17:11:16.2Z" },
- { url = "https://files.pythonhosted.org/packages/a3/b8/0d8eeb5a9fd7d34ba84f8a55753a0a3e2b5b51b2a5a0ade648a8db4a62f7/scikit_image-0.26.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b36ab5e778bf50af5ff386c3ac508027dc3aaeccf2161bdf96bde6848f44d21b", size = 13660939, upload-time = "2025-12-20T17:11:18.464Z" },
- { url = "https://files.pythonhosted.org/packages/2f/d6/91d8973584d4793d4c1a847d388e34ef1218d835eeddecfc9108d735b467/scikit_image-0.26.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:09bad6a5d5949c7896c8347424c4cca899f1d11668030e5548813ab9c2865dcb", size = 14138938, upload-time = "2025-12-20T17:11:20.919Z" },
- { url = "https://files.pythonhosted.org/packages/39/9a/7e15d8dc10d6bbf212195fb39bdeb7f226c46dd53f9c63c312e111e2e175/scikit_image-0.26.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:aeb14db1ed09ad4bee4ceb9e635547a8d5f3549be67fc6c768c7f923e027e6cd", size = 14752243, upload-time = "2025-12-20T17:11:23.347Z" },
- { url = "https://files.pythonhosted.org/packages/8f/58/2b11b933097bc427e42b4a8b15f7de8f24f2bac1fd2779d2aea1431b2c31/scikit_image-0.26.0-cp313-cp313-win_amd64.whl", hash = "sha256:ac529eb9dbd5954f9aaa2e3fe9a3fd9661bfe24e134c688587d811a0233127f1", size = 11906770, upload-time = "2025-12-20T17:11:25.297Z" },
- { url = "https://files.pythonhosted.org/packages/ad/ec/96941474a18a04b69b6f6562a5bd79bd68049fa3728d3b350976eccb8b93/scikit_image-0.26.0-cp313-cp313-win_arm64.whl", hash = "sha256:a2d211bc355f59725efdcae699b93b30348a19416cc9e017f7b2fb599faf7219", size = 11342506, upload-time = "2025-12-20T17:11:27.399Z" },
- { url = "https://files.pythonhosted.org/packages/03/e5/c1a9962b0cf1952f42d32b4a2e48eed520320dbc4d2ff0b981c6fa508b6b/scikit_image-0.26.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:9eefb4adad066da408a7601c4c24b07af3b472d90e08c3e7483d4e9e829d8c49", size = 12663278, upload-time = "2025-12-20T17:11:29.358Z" },
- { url = "https://files.pythonhosted.org/packages/ae/97/c1a276a59ce8e4e24482d65c1a3940d69c6b3873279193b7ebd04e5ee56b/scikit_image-0.26.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:6caec76e16c970c528d15d1c757363334d5cb3069f9cea93d2bead31820511f3", size = 12405142, upload-time = "2025-12-20T17:11:31.282Z" },
- { url = "https://files.pythonhosted.org/packages/d4/4a/f1cbd1357caef6c7993f7efd514d6e53d8fd6f7fe01c4714d51614c53289/scikit_image-0.26.0-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a07200fe09b9d99fcdab959859fe0f7db8df6333d6204344425d476850ce3604", size = 12942086, upload-time = "2025-12-20T17:11:33.683Z" },
- { url = "https://files.pythonhosted.org/packages/5b/6f/74d9fb87c5655bd64cf00b0c44dc3d6206d9002e5f6ba1c9aeb13236f6bf/scikit_image-0.26.0-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:92242351bccf391fc5df2d1529d15470019496d2498d615beb68da85fe7fdf37", size = 13265667, upload-time = "2025-12-20T17:11:36.11Z" },
- { url = "https://files.pythonhosted.org/packages/a7/73/faddc2413ae98d863f6fa2e3e14da4467dd38e788e1c23346cf1a2b06b97/scikit_image-0.26.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:52c496f75a7e45844d951557f13c08c81487c6a1da2e3c9c8a39fcde958e02cc", size = 14001966, upload-time = "2025-12-20T17:11:38.55Z" },
- { url = "https://files.pythonhosted.org/packages/02/94/9f46966fa042b5d57c8cd641045372b4e0df0047dd400e77ea9952674110/scikit_image-0.26.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:20ef4a155e2e78b8ab973998e04d8a361d49d719e65412405f4dadd9155a61d9", size = 14359526, upload-time = "2025-12-20T17:11:41.087Z" },
- { url = "https://files.pythonhosted.org/packages/5d/b4/2840fe38f10057f40b1c9f8fb98a187a370936bf144a4ac23452c5ef1baf/scikit_image-0.26.0-cp313-cp313t-win_amd64.whl", hash = "sha256:c9087cf7d0e7f33ab5c46d2068d86d785e70b05400a891f73a13400f1e1faf6a", size = 12287629, upload-time = "2025-12-20T17:11:43.11Z" },
- { url = "https://files.pythonhosted.org/packages/22/ba/73b6ca70796e71f83ab222690e35a79612f0117e5aaf167151b7d46f5f2c/scikit_image-0.26.0-cp313-cp313t-win_arm64.whl", hash = "sha256:27d58bc8b2acd351f972c6508c1b557cfed80299826080a4d803dd29c51b707e", size = 11647755, upload-time = "2025-12-20T17:11:45.279Z" },
- { url = "https://files.pythonhosted.org/packages/51/44/6b744f92b37ae2833fd423cce8f806d2368859ec325a699dc30389e090b9/scikit_image-0.26.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:63af3d3a26125f796f01052052f86806da5b5e54c6abef152edb752683075a9c", size = 12365810, upload-time = "2025-12-20T17:11:47.357Z" },
- { url = "https://files.pythonhosted.org/packages/40/f5/83590d9355191f86ac663420fec741b82cc547a4afe7c4c1d986bf46e4db/scikit_image-0.26.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:ce00600cd70d4562ed59f80523e18cdcc1fae0e10676498a01f73c255774aefd", size = 12075717, upload-time = "2025-12-20T17:11:49.483Z" },
- { url = "https://files.pythonhosted.org/packages/72/48/253e7cf5aee6190459fe136c614e2cbccc562deceb4af96e0863f1b8ee29/scikit_image-0.26.0-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6381edf972b32e4f54085449afde64365a57316637496c1325a736987083e2ab", size = 13161520, upload-time = "2025-12-20T17:11:51.58Z" },
- { url = "https://files.pythonhosted.org/packages/73/c3/cec6a3cbaadfdcc02bd6ff02f3abfe09eaa7f4d4e0a525a1e3a3f4bce49c/scikit_image-0.26.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c6624a76c6085218248154cc7e1500e6b488edcd9499004dd0d35040607d7505", size = 13684340, upload-time = "2025-12-20T17:11:53.708Z" },
- { url = "https://files.pythonhosted.org/packages/d4/0d/39a776f675d24164b3a267aa0db9f677a4cb20127660d8bf4fd7fef66817/scikit_image-0.26.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:f775f0e420faac9c2aa6757135f4eb468fb7b70e0b67fa77a5e79be3c30ee331", size = 14203839, upload-time = "2025-12-20T17:11:55.89Z" },
- { url = "https://files.pythonhosted.org/packages/ee/25/2514df226bbcedfe9b2caafa1ba7bc87231a0c339066981b182b08340e06/scikit_image-0.26.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ede4d6d255cc5da9faeb2f9ba7fedbc990abbc652db429f40a16b22e770bb578", size = 14770021, upload-time = "2025-12-20T17:11:58.014Z" },
- { url = "https://files.pythonhosted.org/packages/8d/5b/0671dc91c0c79340c3fe202f0549c7d3681eb7640fe34ab68a5f090a7c7f/scikit_image-0.26.0-cp314-cp314-win_amd64.whl", hash = "sha256:0660b83968c15293fd9135e8d860053ee19500d52bf55ca4fb09de595a1af650", size = 12023490, upload-time = "2025-12-20T17:12:00.013Z" },
- { url = "https://files.pythonhosted.org/packages/65/08/7c4cb59f91721f3de07719085212a0b3962e3e3f2d1818cbac4eeb1ea53e/scikit_image-0.26.0-cp314-cp314-win_arm64.whl", hash = "sha256:b8d14d3181c21c11170477a42542c1addc7072a90b986675a71266ad17abc37f", size = 11473782, upload-time = "2025-12-20T17:12:01.983Z" },
- { url = "https://files.pythonhosted.org/packages/49/41/65c4258137acef3d73cb561ac55512eacd7b30bb4f4a11474cad526bc5db/scikit_image-0.26.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:cde0bbd57e6795eba83cb10f71a677f7239271121dc950bc060482834a668ad1", size = 12686060, upload-time = "2025-12-20T17:12:03.886Z" },
- { url = "https://files.pythonhosted.org/packages/e7/32/76971f8727b87f1420a962406388a50e26667c31756126444baf6668f559/scikit_image-0.26.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:163e9afb5b879562b9aeda0dd45208a35316f26cc7a3aed54fd601604e5cf46f", size = 12422628, upload-time = "2025-12-20T17:12:05.921Z" },
- { url = "https://files.pythonhosted.org/packages/37/0d/996febd39f757c40ee7b01cdb861867327e5c8e5f595a634e8201462d958/scikit_image-0.26.0-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:724f79fd9b6cb6f4a37864fe09f81f9f5d5b9646b6868109e1b100d1a7019e59", size = 12962369, upload-time = "2025-12-20T17:12:07.912Z" },
- { url = "https://files.pythonhosted.org/packages/48/b4/612d354f946c9600e7dea012723c11d47e8d455384e530f6daaaeb9bf62c/scikit_image-0.26.0-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3268f13310e6857508bd87202620df996199a016a1d281b309441d227c822394", size = 13272431, upload-time = "2025-12-20T17:12:10.255Z" },
- { url = "https://files.pythonhosted.org/packages/0a/6e/26c00b466e06055a086de2c6e2145fe189ccdc9a1d11ccc7de020f2591ad/scikit_image-0.26.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:fac96a1f9b06cd771cbbb3cd96c5332f36d4efd839b1d8b053f79e5887acde62", size = 14016362, upload-time = "2025-12-20T17:12:12.793Z" },
- { url = "https://files.pythonhosted.org/packages/47/88/00a90402e1775634043c2a0af8a3c76ad450866d9fa444efcc43b553ba2d/scikit_image-0.26.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:2c1e7bd342f43e7a97e571b3f03ba4c1293ea1a35c3f13f41efdc8a81c1dc8f2", size = 14364151, upload-time = "2025-12-20T17:12:14.909Z" },
- { url = "https://files.pythonhosted.org/packages/da/ca/918d8d306bd43beacff3b835c6d96fac0ae64c0857092f068b88db531a7c/scikit_image-0.26.0-cp314-cp314t-win_amd64.whl", hash = "sha256:b702c3bb115e1dcf4abf5297429b5c90f2189655888cbed14921f3d26f81d3a4", size = 12413484, upload-time = "2025-12-20T17:12:17.046Z" },
- { url = "https://files.pythonhosted.org/packages/dc/cd/4da01329b5a8d47ff7ec3c99a2b02465a8017b186027590dc7425cee0b56/scikit_image-0.26.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0608aa4a9ec39e0843de10d60edb2785a30c1c47819b67866dd223ebd149acaf", size = 11769501, upload-time = "2025-12-20T17:12:19.339Z" },
-]
-
-[[package]]
-name = "scipy"
-version = "1.15.3"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version < '3.11' and sys_platform == 'linux'",
- "python_full_version < '3.11' and sys_platform != 'linux'",
-]
-dependencies = [
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" } },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/0f/37/6964b830433e654ec7485e45a00fc9a27cf868d622838f6b6d9c5ec0d532/scipy-1.15.3.tar.gz", hash = "sha256:eae3cf522bc7df64b42cad3925c876e1b0b6c35c1337c93e12c0f366f55b0eaf", size = 59419214, upload-time = "2025-05-08T16:13:05.955Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/78/2f/4966032c5f8cc7e6a60f1b2e0ad686293b9474b65246b0c642e3ef3badd0/scipy-1.15.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:a345928c86d535060c9c2b25e71e87c39ab2f22fc96e9636bd74d1dbf9de448c", size = 38702770, upload-time = "2025-05-08T16:04:20.849Z" },
- { url = "https://files.pythonhosted.org/packages/a0/6e/0c3bf90fae0e910c274db43304ebe25a6b391327f3f10b5dcc638c090795/scipy-1.15.3-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:ad3432cb0f9ed87477a8d97f03b763fd1d57709f1bbde3c9369b1dff5503b253", size = 30094511, upload-time = "2025-05-08T16:04:27.103Z" },
- { url = "https://files.pythonhosted.org/packages/ea/b1/4deb37252311c1acff7f101f6453f0440794f51b6eacb1aad4459a134081/scipy-1.15.3-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:aef683a9ae6eb00728a542b796f52a5477b78252edede72b8327a886ab63293f", size = 22368151, upload-time = "2025-05-08T16:04:31.731Z" },
- { url = "https://files.pythonhosted.org/packages/38/7d/f457626e3cd3c29b3a49ca115a304cebb8cc6f31b04678f03b216899d3c6/scipy-1.15.3-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:1c832e1bd78dea67d5c16f786681b28dd695a8cb1fb90af2e27580d3d0967e92", size = 25121732, upload-time = "2025-05-08T16:04:36.596Z" },
- { url = "https://files.pythonhosted.org/packages/db/0a/92b1de4a7adc7a15dcf5bddc6e191f6f29ee663b30511ce20467ef9b82e4/scipy-1.15.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:263961f658ce2165bbd7b99fa5135195c3a12d9bef045345016b8b50c315cb82", size = 35547617, upload-time = "2025-05-08T16:04:43.546Z" },
- { url = "https://files.pythonhosted.org/packages/8e/6d/41991e503e51fc1134502694c5fa7a1671501a17ffa12716a4a9151af3df/scipy-1.15.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e2abc762b0811e09a0d3258abee2d98e0c703eee49464ce0069590846f31d40", size = 37662964, upload-time = "2025-05-08T16:04:49.431Z" },
- { url = "https://files.pythonhosted.org/packages/25/e1/3df8f83cb15f3500478c889be8fb18700813b95e9e087328230b98d547ff/scipy-1.15.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ed7284b21a7a0c8f1b6e5977ac05396c0d008b89e05498c8b7e8f4a1423bba0e", size = 37238749, upload-time = "2025-05-08T16:04:55.215Z" },
- { url = "https://files.pythonhosted.org/packages/93/3e/b3257cf446f2a3533ed7809757039016b74cd6f38271de91682aa844cfc5/scipy-1.15.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5380741e53df2c566f4d234b100a484b420af85deb39ea35a1cc1be84ff53a5c", size = 40022383, upload-time = "2025-05-08T16:05:01.914Z" },
- { url = "https://files.pythonhosted.org/packages/d1/84/55bc4881973d3f79b479a5a2e2df61c8c9a04fcb986a213ac9c02cfb659b/scipy-1.15.3-cp310-cp310-win_amd64.whl", hash = "sha256:9d61e97b186a57350f6d6fd72640f9e99d5a4a2b8fbf4b9ee9a841eab327dc13", size = 41259201, upload-time = "2025-05-08T16:05:08.166Z" },
- { url = "https://files.pythonhosted.org/packages/96/ab/5cc9f80f28f6a7dff646c5756e559823614a42b1939d86dd0ed550470210/scipy-1.15.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:993439ce220d25e3696d1b23b233dd010169b62f6456488567e830654ee37a6b", size = 38714255, upload-time = "2025-05-08T16:05:14.596Z" },
- { url = "https://files.pythonhosted.org/packages/4a/4a/66ba30abe5ad1a3ad15bfb0b59d22174012e8056ff448cb1644deccbfed2/scipy-1.15.3-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:34716e281f181a02341ddeaad584205bd2fd3c242063bd3423d61ac259ca7eba", size = 30111035, upload-time = "2025-05-08T16:05:20.152Z" },
- { url = "https://files.pythonhosted.org/packages/4b/fa/a7e5b95afd80d24313307f03624acc65801846fa75599034f8ceb9e2cbf6/scipy-1.15.3-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:3b0334816afb8b91dab859281b1b9786934392aa3d527cd847e41bb6f45bee65", size = 22384499, upload-time = "2025-05-08T16:05:24.494Z" },
- { url = "https://files.pythonhosted.org/packages/17/99/f3aaddccf3588bb4aea70ba35328c204cadd89517a1612ecfda5b2dd9d7a/scipy-1.15.3-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:6db907c7368e3092e24919b5e31c76998b0ce1684d51a90943cb0ed1b4ffd6c1", size = 25152602, upload-time = "2025-05-08T16:05:29.313Z" },
- { url = "https://files.pythonhosted.org/packages/56/c5/1032cdb565f146109212153339f9cb8b993701e9fe56b1c97699eee12586/scipy-1.15.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:721d6b4ef5dc82ca8968c25b111e307083d7ca9091bc38163fb89243e85e3889", size = 35503415, upload-time = "2025-05-08T16:05:34.699Z" },
- { url = "https://files.pythonhosted.org/packages/bd/37/89f19c8c05505d0601ed5650156e50eb881ae3918786c8fd7262b4ee66d3/scipy-1.15.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39cb9c62e471b1bb3750066ecc3a3f3052b37751c7c3dfd0fd7e48900ed52982", size = 37652622, upload-time = "2025-05-08T16:05:40.762Z" },
- { url = "https://files.pythonhosted.org/packages/7e/31/be59513aa9695519b18e1851bb9e487de66f2d31f835201f1b42f5d4d475/scipy-1.15.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:795c46999bae845966368a3c013e0e00947932d68e235702b5c3f6ea799aa8c9", size = 37244796, upload-time = "2025-05-08T16:05:48.119Z" },
- { url = "https://files.pythonhosted.org/packages/10/c0/4f5f3eeccc235632aab79b27a74a9130c6c35df358129f7ac8b29f562ac7/scipy-1.15.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:18aaacb735ab38b38db42cb01f6b92a2d0d4b6aabefeb07f02849e47f8fb3594", size = 40047684, upload-time = "2025-05-08T16:05:54.22Z" },
- { url = "https://files.pythonhosted.org/packages/ab/a7/0ddaf514ce8a8714f6ed243a2b391b41dbb65251affe21ee3077ec45ea9a/scipy-1.15.3-cp311-cp311-win_amd64.whl", hash = "sha256:ae48a786a28412d744c62fd7816a4118ef97e5be0bee968ce8f0a2fba7acf3bb", size = 41246504, upload-time = "2025-05-08T16:06:00.437Z" },
- { url = "https://files.pythonhosted.org/packages/37/4b/683aa044c4162e10ed7a7ea30527f2cbd92e6999c10a8ed8edb253836e9c/scipy-1.15.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6ac6310fdbfb7aa6612408bd2f07295bcbd3fda00d2d702178434751fe48e019", size = 38766735, upload-time = "2025-05-08T16:06:06.471Z" },
- { url = "https://files.pythonhosted.org/packages/7b/7e/f30be3d03de07f25dc0ec926d1681fed5c732d759ac8f51079708c79e680/scipy-1.15.3-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:185cd3d6d05ca4b44a8f1595af87f9c372bb6acf9c808e99aa3e9aa03bd98cf6", size = 30173284, upload-time = "2025-05-08T16:06:11.686Z" },
- { url = "https://files.pythonhosted.org/packages/07/9c/0ddb0d0abdabe0d181c1793db51f02cd59e4901da6f9f7848e1f96759f0d/scipy-1.15.3-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:05dc6abcd105e1a29f95eada46d4a3f251743cfd7d3ae8ddb4088047f24ea477", size = 22446958, upload-time = "2025-05-08T16:06:15.97Z" },
- { url = "https://files.pythonhosted.org/packages/af/43/0bce905a965f36c58ff80d8bea33f1f9351b05fad4beaad4eae34699b7a1/scipy-1.15.3-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:06efcba926324df1696931a57a176c80848ccd67ce6ad020c810736bfd58eb1c", size = 25242454, upload-time = "2025-05-08T16:06:20.394Z" },
- { url = "https://files.pythonhosted.org/packages/56/30/a6f08f84ee5b7b28b4c597aca4cbe545535c39fe911845a96414700b64ba/scipy-1.15.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c05045d8b9bfd807ee1b9f38761993297b10b245f012b11b13b91ba8945f7e45", size = 35210199, upload-time = "2025-05-08T16:06:26.159Z" },
- { url = "https://files.pythonhosted.org/packages/0b/1f/03f52c282437a168ee2c7c14a1a0d0781a9a4a8962d84ac05c06b4c5b555/scipy-1.15.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:271e3713e645149ea5ea3e97b57fdab61ce61333f97cfae392c28ba786f9bb49", size = 37309455, upload-time = "2025-05-08T16:06:32.778Z" },
- { url = "https://files.pythonhosted.org/packages/89/b1/fbb53137f42c4bf630b1ffdfc2151a62d1d1b903b249f030d2b1c0280af8/scipy-1.15.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6cfd56fc1a8e53f6e89ba3a7a7251f7396412d655bca2aa5611c8ec9a6784a1e", size = 36885140, upload-time = "2025-05-08T16:06:39.249Z" },
- { url = "https://files.pythonhosted.org/packages/2e/2e/025e39e339f5090df1ff266d021892694dbb7e63568edcfe43f892fa381d/scipy-1.15.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0ff17c0bb1cb32952c09217d8d1eed9b53d1463e5f1dd6052c7857f83127d539", size = 39710549, upload-time = "2025-05-08T16:06:45.729Z" },
- { url = "https://files.pythonhosted.org/packages/e6/eb/3bf6ea8ab7f1503dca3a10df2e4b9c3f6b3316df07f6c0ded94b281c7101/scipy-1.15.3-cp312-cp312-win_amd64.whl", hash = "sha256:52092bc0472cfd17df49ff17e70624345efece4e1a12b23783a1ac59a1b728ed", size = 40966184, upload-time = "2025-05-08T16:06:52.623Z" },
- { url = "https://files.pythonhosted.org/packages/73/18/ec27848c9baae6e0d6573eda6e01a602e5649ee72c27c3a8aad673ebecfd/scipy-1.15.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:2c620736bcc334782e24d173c0fdbb7590a0a436d2fdf39310a8902505008759", size = 38728256, upload-time = "2025-05-08T16:06:58.696Z" },
- { url = "https://files.pythonhosted.org/packages/74/cd/1aef2184948728b4b6e21267d53b3339762c285a46a274ebb7863c9e4742/scipy-1.15.3-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:7e11270a000969409d37ed399585ee530b9ef6aa99d50c019de4cb01e8e54e62", size = 30109540, upload-time = "2025-05-08T16:07:04.209Z" },
- { url = "https://files.pythonhosted.org/packages/5b/d8/59e452c0a255ec352bd0a833537a3bc1bfb679944c4938ab375b0a6b3a3e/scipy-1.15.3-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:8c9ed3ba2c8a2ce098163a9bdb26f891746d02136995df25227a20e71c396ebb", size = 22383115, upload-time = "2025-05-08T16:07:08.998Z" },
- { url = "https://files.pythonhosted.org/packages/08/f5/456f56bbbfccf696263b47095291040655e3cbaf05d063bdc7c7517f32ac/scipy-1.15.3-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:0bdd905264c0c9cfa74a4772cdb2070171790381a5c4d312c973382fc6eaf730", size = 25163884, upload-time = "2025-05-08T16:07:14.091Z" },
- { url = "https://files.pythonhosted.org/packages/a2/66/a9618b6a435a0f0c0b8a6d0a2efb32d4ec5a85f023c2b79d39512040355b/scipy-1.15.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79167bba085c31f38603e11a267d862957cbb3ce018d8b38f79ac043bc92d825", size = 35174018, upload-time = "2025-05-08T16:07:19.427Z" },
- { url = "https://files.pythonhosted.org/packages/b5/09/c5b6734a50ad4882432b6bb7c02baf757f5b2f256041da5df242e2d7e6b6/scipy-1.15.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9deabd6d547aee2c9a81dee6cc96c6d7e9a9b1953f74850c179f91fdc729cb7", size = 37269716, upload-time = "2025-05-08T16:07:25.712Z" },
- { url = "https://files.pythonhosted.org/packages/77/0a/eac00ff741f23bcabd352731ed9b8995a0a60ef57f5fd788d611d43d69a1/scipy-1.15.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:dde4fc32993071ac0c7dd2d82569e544f0bdaff66269cb475e0f369adad13f11", size = 36872342, upload-time = "2025-05-08T16:07:31.468Z" },
- { url = "https://files.pythonhosted.org/packages/fe/54/4379be86dd74b6ad81551689107360d9a3e18f24d20767a2d5b9253a3f0a/scipy-1.15.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f77f853d584e72e874d87357ad70f44b437331507d1c311457bed8ed2b956126", size = 39670869, upload-time = "2025-05-08T16:07:38.002Z" },
- { url = "https://files.pythonhosted.org/packages/87/2e/892ad2862ba54f084ffe8cc4a22667eaf9c2bcec6d2bff1d15713c6c0703/scipy-1.15.3-cp313-cp313-win_amd64.whl", hash = "sha256:b90ab29d0c37ec9bf55424c064312930ca5f4bde15ee8619ee44e69319aab163", size = 40988851, upload-time = "2025-05-08T16:08:33.671Z" },
- { url = "https://files.pythonhosted.org/packages/1b/e9/7a879c137f7e55b30d75d90ce3eb468197646bc7b443ac036ae3fe109055/scipy-1.15.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:3ac07623267feb3ae308487c260ac684b32ea35fd81e12845039952f558047b8", size = 38863011, upload-time = "2025-05-08T16:07:44.039Z" },
- { url = "https://files.pythonhosted.org/packages/51/d1/226a806bbd69f62ce5ef5f3ffadc35286e9fbc802f606a07eb83bf2359de/scipy-1.15.3-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:6487aa99c2a3d509a5227d9a5e889ff05830a06b2ce08ec30df6d79db5fcd5c5", size = 30266407, upload-time = "2025-05-08T16:07:49.891Z" },
- { url = "https://files.pythonhosted.org/packages/e5/9b/f32d1d6093ab9eeabbd839b0f7619c62e46cc4b7b6dbf05b6e615bbd4400/scipy-1.15.3-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:50f9e62461c95d933d5c5ef4a1f2ebf9a2b4e83b0db374cb3f1de104d935922e", size = 22540030, upload-time = "2025-05-08T16:07:54.121Z" },
- { url = "https://files.pythonhosted.org/packages/e7/29/c278f699b095c1a884f29fda126340fcc201461ee8bfea5c8bdb1c7c958b/scipy-1.15.3-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:14ed70039d182f411ffc74789a16df3835e05dc469b898233a245cdfd7f162cb", size = 25218709, upload-time = "2025-05-08T16:07:58.506Z" },
- { url = "https://files.pythonhosted.org/packages/24/18/9e5374b617aba742a990581373cd6b68a2945d65cc588482749ef2e64467/scipy-1.15.3-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a769105537aa07a69468a0eefcd121be52006db61cdd8cac8a0e68980bbb723", size = 34809045, upload-time = "2025-05-08T16:08:03.929Z" },
- { url = "https://files.pythonhosted.org/packages/e1/fe/9c4361e7ba2927074360856db6135ef4904d505e9b3afbbcb073c4008328/scipy-1.15.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9db984639887e3dffb3928d118145ffe40eff2fa40cb241a306ec57c219ebbbb", size = 36703062, upload-time = "2025-05-08T16:08:09.558Z" },
- { url = "https://files.pythonhosted.org/packages/b7/8e/038ccfe29d272b30086b25a4960f757f97122cb2ec42e62b460d02fe98e9/scipy-1.15.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:40e54d5c7e7ebf1aa596c374c49fa3135f04648a0caabcb66c52884b943f02b4", size = 36393132, upload-time = "2025-05-08T16:08:15.34Z" },
- { url = "https://files.pythonhosted.org/packages/10/7e/5c12285452970be5bdbe8352c619250b97ebf7917d7a9a9e96b8a8140f17/scipy-1.15.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:5e721fed53187e71d0ccf382b6bf977644c533e506c4d33c3fb24de89f5c3ed5", size = 38979503, upload-time = "2025-05-08T16:08:21.513Z" },
- { url = "https://files.pythonhosted.org/packages/81/06/0a5e5349474e1cbc5757975b21bd4fad0e72ebf138c5592f191646154e06/scipy-1.15.3-cp313-cp313t-win_amd64.whl", hash = "sha256:76ad1fb5f8752eabf0fa02e4cc0336b4e8f021e2d5f061ed37d6d264db35e3ca", size = 40308097, upload-time = "2025-05-08T16:08:27.627Z" },
-]
-
-[[package]]
-name = "scipy"
-version = "1.17.0"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version >= '3.13' and sys_platform == 'linux'",
- "python_full_version == '3.12.*' and sys_platform == 'linux'",
- "python_full_version == '3.11.*' and sys_platform == 'linux'",
- "python_full_version >= '3.13' and sys_platform != 'linux'",
- "python_full_version == '3.12.*' and sys_platform != 'linux'",
- "python_full_version == '3.11.*' and sys_platform != 'linux'",
-]
-dependencies = [
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" } },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/56/3e/9cca699f3486ce6bc12ff46dc2031f1ec8eb9ccc9a320fdaf925f1417426/scipy-1.17.0.tar.gz", hash = "sha256:2591060c8e648d8b96439e111ac41fd8342fdeff1876be2e19dea3fe8930454e", size = 30396830, upload-time = "2026-01-10T21:34:23.009Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/1e/4b/c89c131aa87cad2b77a54eb0fb94d633a842420fa7e919dc2f922037c3d8/scipy-1.17.0-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:2abd71643797bd8a106dff97894ff7869eeeb0af0f7a5ce02e4227c6a2e9d6fd", size = 31381316, upload-time = "2026-01-10T21:24:33.42Z" },
- { url = "https://files.pythonhosted.org/packages/5e/5f/a6b38f79a07d74989224d5f11b55267714707582908a5f1ae854cf9a9b84/scipy-1.17.0-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:ef28d815f4d2686503e5f4f00edc387ae58dfd7a2f42e348bb53359538f01558", size = 27966760, upload-time = "2026-01-10T21:24:38.911Z" },
- { url = "https://files.pythonhosted.org/packages/c1/20/095ad24e031ee8ed3c5975954d816b8e7e2abd731e04f8be573de8740885/scipy-1.17.0-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:272a9f16d6bb4667e8b50d25d71eddcc2158a214df1b566319298de0939d2ab7", size = 20138701, upload-time = "2026-01-10T21:24:43.249Z" },
- { url = "https://files.pythonhosted.org/packages/89/11/4aad2b3858d0337756f3323f8960755704e530b27eb2a94386c970c32cbe/scipy-1.17.0-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:7204fddcbec2fe6598f1c5fdf027e9f259106d05202a959a9f1aecf036adc9f6", size = 22480574, upload-time = "2026-01-10T21:24:47.266Z" },
- { url = "https://files.pythonhosted.org/packages/85/bd/f5af70c28c6da2227e510875cadf64879855193a687fb19951f0f44cfd6b/scipy-1.17.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fc02c37a5639ee67d8fb646ffded6d793c06c5622d36b35cfa8fe5ececb8f042", size = 32862414, upload-time = "2026-01-10T21:24:52.566Z" },
- { url = "https://files.pythonhosted.org/packages/ef/df/df1457c4df3826e908879fe3d76bc5b6e60aae45f4ee42539512438cfd5d/scipy-1.17.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dac97a27520d66c12a34fd90a4fe65f43766c18c0d6e1c0a80f114d2260080e4", size = 35112380, upload-time = "2026-01-10T21:24:58.433Z" },
- { url = "https://files.pythonhosted.org/packages/5f/bb/88e2c16bd1dd4de19d80d7c5e238387182993c2fb13b4b8111e3927ad422/scipy-1.17.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ebb7446a39b3ae0fe8f416a9a3fdc6fba3f11c634f680f16a239c5187bc487c0", size = 34922676, upload-time = "2026-01-10T21:25:04.287Z" },
- { url = "https://files.pythonhosted.org/packages/02/ba/5120242cc735f71fc002cff0303d536af4405eb265f7c60742851e7ccfe9/scipy-1.17.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:474da16199f6af66601a01546144922ce402cb17362e07d82f5a6cf8f963e449", size = 37507599, upload-time = "2026-01-10T21:25:09.851Z" },
- { url = "https://files.pythonhosted.org/packages/52/c8/08629657ac6c0da198487ce8cd3de78e02cfde42b7f34117d56a3fe249dc/scipy-1.17.0-cp311-cp311-win_amd64.whl", hash = "sha256:255c0da161bd7b32a6c898e7891509e8a9289f0b1c6c7d96142ee0d2b114c2ea", size = 36380284, upload-time = "2026-01-10T21:25:15.632Z" },
- { url = "https://files.pythonhosted.org/packages/6c/4a/465f96d42c6f33ad324a40049dfd63269891db9324aa66c4a1c108c6f994/scipy-1.17.0-cp311-cp311-win_arm64.whl", hash = "sha256:85b0ac3ad17fa3be50abd7e69d583d98792d7edc08367e01445a1e2076005379", size = 24370427, upload-time = "2026-01-10T21:25:20.514Z" },
- { url = "https://files.pythonhosted.org/packages/0b/11/7241a63e73ba5a516f1930ac8d5b44cbbfabd35ac73a2d08ca206df007c4/scipy-1.17.0-cp312-cp312-macosx_10_14_x86_64.whl", hash = "sha256:0d5018a57c24cb1dd828bcf51d7b10e65986d549f52ef5adb6b4d1ded3e32a57", size = 31364580, upload-time = "2026-01-10T21:25:25.717Z" },
- { url = "https://files.pythonhosted.org/packages/ed/1d/5057f812d4f6adc91a20a2d6f2ebcdb517fdbc87ae3acc5633c9b97c8ba5/scipy-1.17.0-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:88c22af9e5d5a4f9e027e26772cc7b5922fab8bcc839edb3ae33de404feebd9e", size = 27969012, upload-time = "2026-01-10T21:25:30.921Z" },
- { url = "https://files.pythonhosted.org/packages/e3/21/f6ec556c1e3b6ec4e088da667d9987bb77cc3ab3026511f427dc8451187d/scipy-1.17.0-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:f3cd947f20fe17013d401b64e857c6b2da83cae567adbb75b9dcba865abc66d8", size = 20140691, upload-time = "2026-01-10T21:25:34.802Z" },
- { url = "https://files.pythonhosted.org/packages/7a/fe/5e5ad04784964ba964a96f16c8d4676aa1b51357199014dce58ab7ec5670/scipy-1.17.0-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:e8c0b331c2c1f531eb51f1b4fc9ba709521a712cce58f1aa627bc007421a5306", size = 22463015, upload-time = "2026-01-10T21:25:39.277Z" },
- { url = "https://files.pythonhosted.org/packages/4a/69/7c347e857224fcaf32a34a05183b9d8a7aca25f8f2d10b8a698b8388561a/scipy-1.17.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5194c445d0a1c7a6c1a4a4681b6b7c71baad98ff66d96b949097e7513c9d6742", size = 32724197, upload-time = "2026-01-10T21:25:44.084Z" },
- { url = "https://files.pythonhosted.org/packages/d1/fe/66d73b76d378ba8cc2fe605920c0c75092e3a65ae746e1e767d9d020a75a/scipy-1.17.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9eeb9b5f5997f75507814ed9d298ab23f62cf79f5a3ef90031b1ee2506abdb5b", size = 35009148, upload-time = "2026-01-10T21:25:50.591Z" },
- { url = "https://files.pythonhosted.org/packages/af/07/07dec27d9dc41c18d8c43c69e9e413431d20c53a0339c388bcf72f353c4b/scipy-1.17.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:40052543f7bbe921df4408f46003d6f01c6af109b9e2c8a66dd1cf6cf57f7d5d", size = 34798766, upload-time = "2026-01-10T21:25:59.41Z" },
- { url = "https://files.pythonhosted.org/packages/81/61/0470810c8a093cdacd4ba7504b8a218fd49ca070d79eca23a615f5d9a0b0/scipy-1.17.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0cf46c8013fec9d3694dc572f0b54100c28405d55d3e2cb15e2895b25057996e", size = 37405953, upload-time = "2026-01-10T21:26:07.75Z" },
- { url = "https://files.pythonhosted.org/packages/92/ce/672ed546f96d5d41ae78c4b9b02006cedd0b3d6f2bf5bb76ea455c320c28/scipy-1.17.0-cp312-cp312-win_amd64.whl", hash = "sha256:0937a0b0d8d593a198cededd4c439a0ea216a3f36653901ea1f3e4be949056f8", size = 36328121, upload-time = "2026-01-10T21:26:16.509Z" },
- { url = "https://files.pythonhosted.org/packages/9d/21/38165845392cae67b61843a52c6455d47d0cc2a40dd495c89f4362944654/scipy-1.17.0-cp312-cp312-win_arm64.whl", hash = "sha256:f603d8a5518c7426414d1d8f82e253e454471de682ce5e39c29adb0df1efb86b", size = 24314368, upload-time = "2026-01-10T21:26:23.087Z" },
- { url = "https://files.pythonhosted.org/packages/0c/51/3468fdfd49387ddefee1636f5cf6d03ce603b75205bf439bbf0e62069bfd/scipy-1.17.0-cp313-cp313-macosx_10_14_x86_64.whl", hash = "sha256:65ec32f3d32dfc48c72df4291345dae4f048749bc8d5203ee0a3f347f96c5ce6", size = 31344101, upload-time = "2026-01-10T21:26:30.25Z" },
- { url = "https://files.pythonhosted.org/packages/b2/9a/9406aec58268d437636069419e6977af953d1e246df941d42d3720b7277b/scipy-1.17.0-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:1f9586a58039d7229ce77b52f8472c972448cded5736eaf102d5658bbac4c269", size = 27950385, upload-time = "2026-01-10T21:26:36.801Z" },
- { url = "https://files.pythonhosted.org/packages/4f/98/e7342709e17afdfd1b26b56ae499ef4939b45a23a00e471dfb5375eea205/scipy-1.17.0-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:9fad7d3578c877d606b1150135c2639e9de9cecd3705caa37b66862977cc3e72", size = 20122115, upload-time = "2026-01-10T21:26:42.107Z" },
- { url = "https://files.pythonhosted.org/packages/fd/0e/9eeeb5357a64fd157cbe0302c213517c541cc16b8486d82de251f3c68ede/scipy-1.17.0-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:423ca1f6584fc03936972b5f7c06961670dbba9f234e71676a7c7ccf938a0d61", size = 22442402, upload-time = "2026-01-10T21:26:48.029Z" },
- { url = "https://files.pythonhosted.org/packages/c9/10/be13397a0e434f98e0c79552b2b584ae5bb1c8b2be95db421533bbca5369/scipy-1.17.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fe508b5690e9eaaa9467fc047f833af58f1152ae51a0d0aed67aa5801f4dd7d6", size = 32696338, upload-time = "2026-01-10T21:26:55.521Z" },
- { url = "https://files.pythonhosted.org/packages/63/1e/12fbf2a3bb240161651c94bb5cdd0eae5d4e8cc6eaeceb74ab07b12a753d/scipy-1.17.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6680f2dfd4f6182e7d6db161344537da644d1cf85cf293f015c60a17ecf08752", size = 34977201, upload-time = "2026-01-10T21:27:03.501Z" },
- { url = "https://files.pythonhosted.org/packages/19/5b/1a63923e23ccd20bd32156d7dd708af5bbde410daa993aa2500c847ab2d2/scipy-1.17.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:eec3842ec9ac9de5917899b277428886042a93db0b227ebbe3a333b64ec7643d", size = 34777384, upload-time = "2026-01-10T21:27:11.423Z" },
- { url = "https://files.pythonhosted.org/packages/39/22/b5da95d74edcf81e540e467202a988c50fef41bd2011f46e05f72ba07df6/scipy-1.17.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d7425fcafbc09a03731e1bc05581f5fad988e48c6a861f441b7ab729a49a55ea", size = 37379586, upload-time = "2026-01-10T21:27:20.171Z" },
- { url = "https://files.pythonhosted.org/packages/b9/b6/8ac583d6da79e7b9e520579f03007cb006f063642afd6b2eeb16b890bf93/scipy-1.17.0-cp313-cp313-win_amd64.whl", hash = "sha256:87b411e42b425b84777718cc41516b8a7e0795abfa8e8e1d573bf0ef014f0812", size = 36287211, upload-time = "2026-01-10T21:28:43.122Z" },
- { url = "https://files.pythonhosted.org/packages/55/fb/7db19e0b3e52f882b420417644ec81dd57eeef1bd1705b6f689d8ff93541/scipy-1.17.0-cp313-cp313-win_arm64.whl", hash = "sha256:357ca001c6e37601066092e7c89cca2f1ce74e2a520ca78d063a6d2201101df2", size = 24312646, upload-time = "2026-01-10T21:28:49.893Z" },
- { url = "https://files.pythonhosted.org/packages/20/b6/7feaa252c21cc7aff335c6c55e1b90ab3e3306da3f048109b8b639b94648/scipy-1.17.0-cp313-cp313t-macosx_10_14_x86_64.whl", hash = "sha256:ec0827aa4d36cb79ff1b81de898e948a51ac0b9b1c43e4a372c0508c38c0f9a3", size = 31693194, upload-time = "2026-01-10T21:27:27.454Z" },
- { url = "https://files.pythonhosted.org/packages/76/bb/bbb392005abce039fb7e672cb78ac7d158700e826b0515cab6b5b60c26fb/scipy-1.17.0-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:819fc26862b4b3c73a60d486dbb919202f3d6d98c87cf20c223511429f2d1a97", size = 28365415, upload-time = "2026-01-10T21:27:34.26Z" },
- { url = "https://files.pythonhosted.org/packages/37/da/9d33196ecc99fba16a409c691ed464a3a283ac454a34a13a3a57c0d66f3a/scipy-1.17.0-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:363ad4ae2853d88ebcde3ae6ec46ccca903ea9835ee8ba543f12f575e7b07e4e", size = 20537232, upload-time = "2026-01-10T21:27:40.306Z" },
- { url = "https://files.pythonhosted.org/packages/56/9d/f4b184f6ddb28e9a5caea36a6f98e8ecd2a524f9127354087ce780885d83/scipy-1.17.0-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:979c3a0ff8e5ba254d45d59ebd38cde48fce4f10b5125c680c7a4bfe177aab07", size = 22791051, upload-time = "2026-01-10T21:27:46.539Z" },
- { url = "https://files.pythonhosted.org/packages/9b/9d/025cccdd738a72140efc582b1641d0dd4caf2e86c3fb127568dc80444e6e/scipy-1.17.0-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:130d12926ae34399d157de777472bf82e9061c60cc081372b3118edacafe1d00", size = 32815098, upload-time = "2026-01-10T21:27:54.389Z" },
- { url = "https://files.pythonhosted.org/packages/48/5f/09b879619f8bca15ce392bfc1894bd9c54377e01d1b3f2f3b595a1b4d945/scipy-1.17.0-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6e886000eb4919eae3a44f035e63f0fd8b651234117e8f6f29bad1cd26e7bc45", size = 35031342, upload-time = "2026-01-10T21:28:03.012Z" },
- { url = "https://files.pythonhosted.org/packages/f2/9a/f0f0a9f0aa079d2f106555b984ff0fbb11a837df280f04f71f056ea9c6e4/scipy-1.17.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:13c4096ac6bc31d706018f06a49abe0485f96499deb82066b94d19b02f664209", size = 34893199, upload-time = "2026-01-10T21:28:10.832Z" },
- { url = "https://files.pythonhosted.org/packages/90/b8/4f0f5cf0c5ea4d7548424e6533e6b17d164f34a6e2fb2e43ffebb6697b06/scipy-1.17.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:cacbaddd91fcffde703934897c5cd2c7cb0371fac195d383f4e1f1c5d3f3bd04", size = 37438061, upload-time = "2026-01-10T21:28:19.684Z" },
- { url = "https://files.pythonhosted.org/packages/f9/cc/2bd59140ed3b2fa2882fb15da0a9cb1b5a6443d67cfd0d98d4cec83a57ec/scipy-1.17.0-cp313-cp313t-win_amd64.whl", hash = "sha256:edce1a1cf66298cccdc48a1bdf8fb10a3bf58e8b58d6c3883dd1530e103f87c0", size = 36328593, upload-time = "2026-01-10T21:28:28.007Z" },
- { url = "https://files.pythonhosted.org/packages/13/1b/c87cc44a0d2c7aaf0f003aef2904c3d097b422a96c7e7c07f5efd9073c1b/scipy-1.17.0-cp313-cp313t-win_arm64.whl", hash = "sha256:30509da9dbec1c2ed8f168b8d8aa853bc6723fede1dbc23c7d43a56f5ab72a67", size = 24625083, upload-time = "2026-01-10T21:28:35.188Z" },
- { url = "https://files.pythonhosted.org/packages/1a/2d/51006cd369b8e7879e1c630999a19d1fbf6f8b5ed3e33374f29dc87e53b3/scipy-1.17.0-cp314-cp314-macosx_10_14_x86_64.whl", hash = "sha256:c17514d11b78be8f7e6331b983a65a7f5ca1fd037b95e27b280921fe5606286a", size = 31346803, upload-time = "2026-01-10T21:28:57.24Z" },
- { url = "https://files.pythonhosted.org/packages/d6/2e/2349458c3ce445f53a6c93d4386b1c4c5c0c540917304c01222ff95ff317/scipy-1.17.0-cp314-cp314-macosx_12_0_arm64.whl", hash = "sha256:4e00562e519c09da34c31685f6acc3aa384d4d50604db0f245c14e1b4488bfa2", size = 27967182, upload-time = "2026-01-10T21:29:04.107Z" },
- { url = "https://files.pythonhosted.org/packages/5e/7c/df525fbfa77b878d1cfe625249529514dc02f4fd5f45f0f6295676a76528/scipy-1.17.0-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:f7df7941d71314e60a481e02d5ebcb3f0185b8d799c70d03d8258f6c80f3d467", size = 20139125, upload-time = "2026-01-10T21:29:10.179Z" },
- { url = "https://files.pythonhosted.org/packages/33/11/fcf9d43a7ed1234d31765ec643b0515a85a30b58eddccc5d5a4d12b5f194/scipy-1.17.0-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:aabf057c632798832f071a8dde013c2e26284043934f53b00489f1773b33527e", size = 22443554, upload-time = "2026-01-10T21:29:15.888Z" },
- { url = "https://files.pythonhosted.org/packages/80/5c/ea5d239cda2dd3d31399424967a24d556cf409fbea7b5b21412b0fd0a44f/scipy-1.17.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a38c3337e00be6fd8a95b4ed66b5d988bac4ec888fd922c2ea9fe5fb1603dd67", size = 32757834, upload-time = "2026-01-10T21:29:23.406Z" },
- { url = "https://files.pythonhosted.org/packages/b8/7e/8c917cc573310e5dc91cbeead76f1b600d3fb17cf0969db02c9cf92e3cfa/scipy-1.17.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00fb5f8ec8398ad90215008d8b6009c9db9fa924fd4c7d6be307c6f945f9cd73", size = 34995775, upload-time = "2026-01-10T21:29:31.915Z" },
- { url = "https://files.pythonhosted.org/packages/c5/43/176c0c3c07b3f7df324e7cdd933d3e2c4898ca202b090bd5ba122f9fe270/scipy-1.17.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:f2a4942b0f5f7c23c7cd641a0ca1955e2ae83dedcff537e3a0259096635e186b", size = 34841240, upload-time = "2026-01-10T21:29:39.995Z" },
- { url = "https://files.pythonhosted.org/packages/44/8c/d1f5f4b491160592e7f084d997de53a8e896a3ac01cd07e59f43ca222744/scipy-1.17.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:dbf133ced83889583156566d2bdf7a07ff89228fe0c0cb727f777de92092ec6b", size = 37394463, upload-time = "2026-01-10T21:29:48.723Z" },
- { url = "https://files.pythonhosted.org/packages/9f/ec/42a6657f8d2d087e750e9a5dde0b481fd135657f09eaf1cf5688bb23c338/scipy-1.17.0-cp314-cp314-win_amd64.whl", hash = "sha256:3625c631a7acd7cfd929e4e31d2582cf00f42fcf06011f59281271746d77e061", size = 37053015, upload-time = "2026-01-10T21:30:51.418Z" },
- { url = "https://files.pythonhosted.org/packages/27/58/6b89a6afd132787d89a362d443a7bddd511b8f41336a1ae47f9e4f000dc4/scipy-1.17.0-cp314-cp314-win_arm64.whl", hash = "sha256:9244608d27eafe02b20558523ba57f15c689357c85bdcfe920b1828750aa26eb", size = 24951312, upload-time = "2026-01-10T21:30:56.771Z" },
- { url = "https://files.pythonhosted.org/packages/e9/01/f58916b9d9ae0112b86d7c3b10b9e685625ce6e8248df139d0fcb17f7397/scipy-1.17.0-cp314-cp314t-macosx_10_14_x86_64.whl", hash = "sha256:2b531f57e09c946f56ad0b4a3b2abee778789097871fc541e267d2eca081cff1", size = 31706502, upload-time = "2026-01-10T21:29:56.326Z" },
- { url = "https://files.pythonhosted.org/packages/59/8e/2912a87f94a7d1f8b38aabc0faf74b82d3b6c9e22be991c49979f0eceed8/scipy-1.17.0-cp314-cp314t-macosx_12_0_arm64.whl", hash = "sha256:13e861634a2c480bd237deb69333ac79ea1941b94568d4b0efa5db5e263d4fd1", size = 28380854, upload-time = "2026-01-10T21:30:01.554Z" },
- { url = "https://files.pythonhosted.org/packages/bd/1c/874137a52dddab7d5d595c1887089a2125d27d0601fce8c0026a24a92a0b/scipy-1.17.0-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:eb2651271135154aa24f6481cbae5cc8af1f0dd46e6533fb7b56aa9727b6a232", size = 20552752, upload-time = "2026-01-10T21:30:05.93Z" },
- { url = "https://files.pythonhosted.org/packages/3f/f0/7518d171cb735f6400f4576cf70f756d5b419a07fe1867da34e2c2c9c11b/scipy-1.17.0-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:c5e8647f60679790c2f5c76be17e2e9247dc6b98ad0d3b065861e082c56e078d", size = 22803972, upload-time = "2026-01-10T21:30:10.651Z" },
- { url = "https://files.pythonhosted.org/packages/7c/74/3498563a2c619e8a3ebb4d75457486c249b19b5b04a30600dfd9af06bea5/scipy-1.17.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5fb10d17e649e1446410895639f3385fd2bf4c3c7dfc9bea937bddcbc3d7b9ba", size = 32829770, upload-time = "2026-01-10T21:30:16.359Z" },
- { url = "https://files.pythonhosted.org/packages/48/d1/7b50cedd8c6c9d6f706b4b36fa8544d829c712a75e370f763b318e9638c1/scipy-1.17.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8547e7c57f932e7354a2319fab613981cde910631979f74c9b542bb167a8b9db", size = 35051093, upload-time = "2026-01-10T21:30:22.987Z" },
- { url = "https://files.pythonhosted.org/packages/e2/82/a2d684dfddb87ba1b3ea325df7c3293496ee9accb3a19abe9429bce94755/scipy-1.17.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:33af70d040e8af9d5e7a38b5ed3b772adddd281e3062ff23fec49e49681c38cf", size = 34909905, upload-time = "2026-01-10T21:30:28.704Z" },
- { url = "https://files.pythonhosted.org/packages/ef/5e/e565bd73991d42023eb82bb99e51c5b3d9e2c588ca9d4b3e2cc1d3ca62a6/scipy-1.17.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f9eb55bb97d00f8b7ab95cb64f873eb0bf54d9446264d9f3609130381233483f", size = 37457743, upload-time = "2026-01-10T21:30:34.819Z" },
- { url = "https://files.pythonhosted.org/packages/58/a8/a66a75c3d8f1fb2b83f66007d6455a06a6f6cf5618c3dc35bc9b69dd096e/scipy-1.17.0-cp314-cp314t-win_amd64.whl", hash = "sha256:1ff269abf702f6c7e67a4b7aad981d42871a11b9dd83c58d2d2ea624efbd1088", size = 37098574, upload-time = "2026-01-10T21:30:40.782Z" },
- { url = "https://files.pythonhosted.org/packages/56/a5/df8f46ef7da168f1bc52cd86e09a9de5c6f19cc1da04454d51b7d4f43408/scipy-1.17.0-cp314-cp314t-win_arm64.whl", hash = "sha256:031121914e295d9791319a1875444d55079885bbae5bdc9c5e0f2ee5f09d34ff", size = 25246266, upload-time = "2026-01-10T21:30:45.923Z" },
-]
-
-[[package]]
-name = "sentencepiece"
-version = "0.2.1"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/15/15/2e7a025fc62d764b151ae6d0f2a92f8081755ebe8d4a64099accc6f77ba6/sentencepiece-0.2.1.tar.gz", hash = "sha256:8138cec27c2f2282f4a34d9a016e3374cd40e5c6e9cb335063db66a0a3b71fad", size = 3228515, upload-time = "2025-08-12T07:00:51.718Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/af/31/5b7cccb307b485db1a2372d6d2980b0a65d067f8be5ca943a103b4acd5b3/sentencepiece-0.2.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e10fa50bdbaa5e2445dbd387979980d391760faf0ec99a09bd7780ff37eaec44", size = 1942557, upload-time = "2025-08-12T06:59:12.379Z" },
- { url = "https://files.pythonhosted.org/packages/1f/41/0ac923a8e685ad290c5afc8ae55c5844977b8d75076fcc04302b9a324274/sentencepiece-0.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f27ae6deea72efdb6f361750c92f6c21fd0ad087445082770cc34015213c526", size = 1325384, upload-time = "2025-08-12T06:59:14.334Z" },
- { url = "https://files.pythonhosted.org/packages/fc/ef/3751555d67daf9003384978f169d31c775cb5c7baf28633caaf1eb2b2b4d/sentencepiece-0.2.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:60937c959e6f44159fdd9f56fbdd302501f96114a5ba436829496d5f32d8de3f", size = 1253317, upload-time = "2025-08-12T06:59:16.247Z" },
- { url = "https://files.pythonhosted.org/packages/46/a5/742c69b7bd144eb32b6e5fd50dbd8abbbc7a95fce2fe16e50156fa400e3b/sentencepiece-0.2.1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d8b1d91545578852f128650b8cce4ec20f93d39b378ff554ebe66290f2dabb92", size = 1316379, upload-time = "2025-08-12T06:59:17.825Z" },
- { url = "https://files.pythonhosted.org/packages/c8/89/8deeafbba2871e8fa10f20f17447786f4ac38085925335728d360eaf4cae/sentencepiece-0.2.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:27e38eee653abc3d387862e67bc5c8b6f428cd604e688b85d29170b7e725c26c", size = 1387926, upload-time = "2025-08-12T06:59:19.395Z" },
- { url = "https://files.pythonhosted.org/packages/c3/ca/67fe73005f0ab617c6a970b199754e28e524b6873aa7025224fad3cda252/sentencepiece-0.2.1-cp310-cp310-win32.whl", hash = "sha256:251874d720ac7f28024a168501f3c7bb15d1802245f6e66de565f18bbb9b5eaa", size = 999550, upload-time = "2025-08-12T06:59:20.844Z" },
- { url = "https://files.pythonhosted.org/packages/6d/33/dc5b54042050d2dda4229c3ce1f862541c99966390b6aa20f54d520d2dc2/sentencepiece-0.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:e52144670738b4b477fade6c2a9b6af71a8d0094514c9853ac9f6fc1fcfabae7", size = 1054613, upload-time = "2025-08-12T06:59:22.255Z" },
- { url = "https://files.pythonhosted.org/packages/fa/19/1ea47f46ff97fe04422b78997da1a37cd632f414aae042d27a9009c5b733/sentencepiece-0.2.1-cp310-cp310-win_arm64.whl", hash = "sha256:9076430ac25dfa7147d9d05751dbc66a04bc1aaac371c07f84952979ea59f0d0", size = 1033884, upload-time = "2025-08-12T06:59:24.194Z" },
- { url = "https://files.pythonhosted.org/packages/d8/15/46afbab00733d81788b64be430ca1b93011bb9388527958e26cc31832de5/sentencepiece-0.2.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6356d0986b8b8dc351b943150fcd81a1c6e6e4d439772e8584c64230e58ca987", size = 1942560, upload-time = "2025-08-12T06:59:25.82Z" },
- { url = "https://files.pythonhosted.org/packages/fa/79/7c01b8ef98a0567e9d84a4e7a910f8e7074fcbf398a5cd76f93f4b9316f9/sentencepiece-0.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8f8ba89a3acb3dc1ae90f65ec1894b0b9596fdb98ab003ff38e058f898b39bc7", size = 1325385, upload-time = "2025-08-12T06:59:27.722Z" },
- { url = "https://files.pythonhosted.org/packages/bb/88/2b41e07bd24f33dcf2f18ec3b74247aa4af3526bad8907b8727ea3caba03/sentencepiece-0.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:02593eca45440ef39247cee8c47322a34bdcc1d8ae83ad28ba5a899a2cf8d79a", size = 1253319, upload-time = "2025-08-12T06:59:29.306Z" },
- { url = "https://files.pythonhosted.org/packages/a0/54/38a1af0c6210a3c6f95aa46d23d6640636d020fba7135cd0d9a84ada05a7/sentencepiece-0.2.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0a0d15781a171d188b661ae4bde1d998c303f6bd8621498c50c671bd45a4798e", size = 1316162, upload-time = "2025-08-12T06:59:30.914Z" },
- { url = "https://files.pythonhosted.org/packages/ef/66/fb191403ade791ad2c3c1e72fe8413e63781b08cfa3aa4c9dfc536d6e795/sentencepiece-0.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f5a3e0d9f445ed9d66c0fec47d4b23d12cfc858b407a03c194c1b26c2ac2a63", size = 1387785, upload-time = "2025-08-12T06:59:32.491Z" },
- { url = "https://files.pythonhosted.org/packages/a9/2d/3bd9b08e70067b2124518b308db6a84a4f8901cc8a4317e2e4288cdd9b4d/sentencepiece-0.2.1-cp311-cp311-win32.whl", hash = "sha256:6d297a1748d429ba8534eebe5535448d78b8acc32d00a29b49acf28102eeb094", size = 999555, upload-time = "2025-08-12T06:59:34.475Z" },
- { url = "https://files.pythonhosted.org/packages/32/b8/f709977f5fda195ae1ea24f24e7c581163b6f142b1005bc3d0bbfe4d7082/sentencepiece-0.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:82d9ead6591015f009cb1be1cb1c015d5e6f04046dbb8c9588b931e869a29728", size = 1054617, upload-time = "2025-08-12T06:59:36.461Z" },
- { url = "https://files.pythonhosted.org/packages/7a/40/a1fc23be23067da0f703709797b464e8a30a1c78cc8a687120cd58d4d509/sentencepiece-0.2.1-cp311-cp311-win_arm64.whl", hash = "sha256:39f8651bd10974eafb9834ce30d9bcf5b73e1fc798a7f7d2528f9820ca86e119", size = 1033877, upload-time = "2025-08-12T06:59:38.391Z" },
- { url = "https://files.pythonhosted.org/packages/4a/be/32ce495aa1d0e0c323dcb1ba87096037358edee539cac5baf8755a6bd396/sentencepiece-0.2.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:57cae326c8727de58c85977b175af132a7138d84c764635d7e71bbee7e774133", size = 1943152, upload-time = "2025-08-12T06:59:40.048Z" },
- { url = "https://files.pythonhosted.org/packages/88/7e/ff23008899a58678e98c6ff592bf4d368eee5a71af96d0df6b38a039dd4f/sentencepiece-0.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:56dd39a3c4d6493db3cdca7e8cc68c6b633f0d4195495cbadfcf5af8a22d05a6", size = 1325651, upload-time = "2025-08-12T06:59:41.536Z" },
- { url = "https://files.pythonhosted.org/packages/19/84/42eb3ce4796777a1b5d3699dfd4dca85113e68b637f194a6c8d786f16a04/sentencepiece-0.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d9381351182ff9888cc80e41c632e7e274b106f450de33d67a9e8f6043da6f76", size = 1253645, upload-time = "2025-08-12T06:59:42.903Z" },
- { url = "https://files.pythonhosted.org/packages/89/fa/d3d5ebcba3cb9e6d3775a096251860c41a6bc53a1b9461151df83fe93255/sentencepiece-0.2.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:99f955df238021bf11f0fc37cdb54fd5e5b5f7fd30ecc3d93fb48b6815437167", size = 1316273, upload-time = "2025-08-12T06:59:44.476Z" },
- { url = "https://files.pythonhosted.org/packages/04/88/14f2f4a2b922d8b39be45bf63d79e6cd3a9b2f248b2fcb98a69b12af12f5/sentencepiece-0.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0cdfecef430d985f1c2bcbfff3defd1d95dae876fbd0173376012d2d7d24044b", size = 1387881, upload-time = "2025-08-12T06:59:46.09Z" },
- { url = "https://files.pythonhosted.org/packages/fd/b8/903e5ccb77b4ef140605d5d71b4f9e0ad95d456d6184688073ed11712809/sentencepiece-0.2.1-cp312-cp312-win32.whl", hash = "sha256:a483fd29a34c3e34c39ac5556b0a90942bec253d260235729e50976f5dba1068", size = 999540, upload-time = "2025-08-12T06:59:48.023Z" },
- { url = "https://files.pythonhosted.org/packages/2d/81/92df5673c067148c2545b1bfe49adfd775bcc3a169a047f5a0e6575ddaca/sentencepiece-0.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:4cdc7c36234fda305e85c32949c5211faaf8dd886096c7cea289ddc12a2d02de", size = 1054671, upload-time = "2025-08-12T06:59:49.895Z" },
- { url = "https://files.pythonhosted.org/packages/fe/02/c5e3bc518655d714622bec87d83db9cdba1cd0619a4a04e2109751c4f47f/sentencepiece-0.2.1-cp312-cp312-win_arm64.whl", hash = "sha256:daeb5e9e9fcad012324807856113708614d534f596d5008638eb9b40112cd9e4", size = 1033923, upload-time = "2025-08-12T06:59:51.952Z" },
- { url = "https://files.pythonhosted.org/packages/ba/4a/85fbe1706d4d04a7e826b53f327c4b80f849cf1c7b7c5e31a20a97d8f28b/sentencepiece-0.2.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dcd8161eee7b41aae57ded06272905dbd680a0a04b91edd0f64790c796b2f706", size = 1943150, upload-time = "2025-08-12T06:59:53.588Z" },
- { url = "https://files.pythonhosted.org/packages/c2/83/4cfb393e287509fc2155480b9d184706ef8d9fa8cbf5505d02a5792bf220/sentencepiece-0.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:c6c8f42949f419ff8c7e9960dbadcfbc982d7b5efc2f6748210d3dd53a7de062", size = 1325651, upload-time = "2025-08-12T06:59:55.073Z" },
- { url = "https://files.pythonhosted.org/packages/8d/de/5a007fb53b1ab0aafc69d11a5a3dd72a289d5a3e78dcf2c3a3d9b14ffe93/sentencepiece-0.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:097f3394e99456e9e4efba1737c3749d7e23563dd1588ce71a3d007f25475fff", size = 1253641, upload-time = "2025-08-12T06:59:56.562Z" },
- { url = "https://files.pythonhosted.org/packages/2c/d2/f552be5928105588f4f4d66ee37dd4c61460d8097e62d0e2e0eec41bc61d/sentencepiece-0.2.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d7b670879c370d350557edabadbad1f6561a9e6968126e6debca4029e5547820", size = 1316271, upload-time = "2025-08-12T06:59:58.109Z" },
- { url = "https://files.pythonhosted.org/packages/96/df/0cfe748ace5485be740fed9476dee7877f109da32ed0d280312c94ec259f/sentencepiece-0.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c7f0fd2f2693309e6628aeeb2e2faf6edd221134dfccac3308ca0de01f8dab47", size = 1387882, upload-time = "2025-08-12T07:00:00.701Z" },
- { url = "https://files.pythonhosted.org/packages/ac/dd/f7774d42a881ced8e1739f393ab1e82ece39fc9abd4779e28050c2e975b5/sentencepiece-0.2.1-cp313-cp313-win32.whl", hash = "sha256:92b3816aa2339355fda2c8c4e021a5de92180b00aaccaf5e2808972e77a4b22f", size = 999541, upload-time = "2025-08-12T07:00:02.709Z" },
- { url = "https://files.pythonhosted.org/packages/dd/e9/932b9eae6fd7019548321eee1ab8d5e3b3d1294df9d9a0c9ac517c7b636d/sentencepiece-0.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:10ed3dab2044c47f7a2e7b4969b0c430420cdd45735d78c8f853191fa0e3148b", size = 1054669, upload-time = "2025-08-12T07:00:04.915Z" },
- { url = "https://files.pythonhosted.org/packages/c9/3a/76488a00ea7d6931689cda28726a1447d66bf1a4837943489314593d5596/sentencepiece-0.2.1-cp313-cp313-win_arm64.whl", hash = "sha256:ac650534e2251083c5f75dde4ff28896ce7c8904133dc8fef42780f4d5588fcd", size = 1033922, upload-time = "2025-08-12T07:00:06.496Z" },
- { url = "https://files.pythonhosted.org/packages/4a/b6/08fe2ce819e02ccb0296f4843e3f195764ce9829cbda61b7513f29b95718/sentencepiece-0.2.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:8dd4b477a7b069648d19363aad0cab9bad2f4e83b2d179be668efa672500dc94", size = 1946052, upload-time = "2025-08-12T07:00:08.136Z" },
- { url = "https://files.pythonhosted.org/packages/ab/d9/1ea0e740591ff4c6fc2b6eb1d7510d02f3fb885093f19b2f3abd1363b402/sentencepiece-0.2.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0c0f672da370cc490e4c59d89e12289778310a0e71d176c541e4834759e1ae07", size = 1327408, upload-time = "2025-08-12T07:00:09.572Z" },
- { url = "https://files.pythonhosted.org/packages/99/7e/1fb26e8a21613f6200e1ab88824d5d203714162cf2883248b517deb500b7/sentencepiece-0.2.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:ad8493bea8432dae8d6830365352350f3b4144415a1d09c4c8cb8d30cf3b6c3c", size = 1254857, upload-time = "2025-08-12T07:00:11.021Z" },
- { url = "https://files.pythonhosted.org/packages/bc/85/c72fd1f3c7a6010544d6ae07f8ddb38b5e2a7e33bd4318f87266c0bbafbf/sentencepiece-0.2.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b81a24733726e3678d2db63619acc5a8dccd074f7aa7a54ecd5ca33ca6d2d596", size = 1315722, upload-time = "2025-08-12T07:00:12.989Z" },
- { url = "https://files.pythonhosted.org/packages/4a/e8/661e5bd82a8aa641fd6c1020bd0e890ef73230a2b7215ddf9c8cd8e941c2/sentencepiece-0.2.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0a81799d0a68d618e89063fb423c3001a034c893069135ffe51fee439ae474d6", size = 1387452, upload-time = "2025-08-12T07:00:15.088Z" },
- { url = "https://files.pythonhosted.org/packages/99/5e/ae66c361023a470afcbc1fbb8da722c72ea678a2fcd9a18f1a12598c7501/sentencepiece-0.2.1-cp313-cp313t-win32.whl", hash = "sha256:89a3ea015517c42c0341d0d962f3e6aaf2cf10d71b1932d475c44ba48d00aa2b", size = 1002501, upload-time = "2025-08-12T07:00:16.966Z" },
- { url = "https://files.pythonhosted.org/packages/c1/03/d332828c4ff764e16c1b56c2c8f9a33488bbe796b53fb6b9c4205ddbf167/sentencepiece-0.2.1-cp313-cp313t-win_amd64.whl", hash = "sha256:33f068c9382dc2e7c228eedfd8163b52baa86bb92f50d0488bf2b7da7032e484", size = 1057555, upload-time = "2025-08-12T07:00:18.573Z" },
- { url = "https://files.pythonhosted.org/packages/88/14/5aee0bf0864df9bd82bd59e7711362908e4935e3f9cdc1f57246b5d5c9b9/sentencepiece-0.2.1-cp313-cp313t-win_arm64.whl", hash = "sha256:b3616ad246f360e52c85781e47682d31abfb6554c779e42b65333d4b5f44ecc0", size = 1036042, upload-time = "2025-08-12T07:00:20.209Z" },
- { url = "https://files.pythonhosted.org/packages/24/9c/89eb8b2052f720a612478baf11c8227dcf1dc28cd4ea4c0c19506b5af2a2/sentencepiece-0.2.1-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:5d0350b686c320068702116276cfb26c066dc7e65cfef173980b11bb4d606719", size = 1943147, upload-time = "2025-08-12T07:00:21.809Z" },
- { url = "https://files.pythonhosted.org/packages/82/0b/a1432bc87f97c2ace36386ca23e8bd3b91fb40581b5e6148d24b24186419/sentencepiece-0.2.1-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:c7f54a31cde6fa5cb030370566f68152a742f433f8d2be458463d06c208aef33", size = 1325624, upload-time = "2025-08-12T07:00:23.289Z" },
- { url = "https://files.pythonhosted.org/packages/ea/99/bbe054ebb5a5039457c590e0a4156ed073fb0fe9ce4f7523404dd5b37463/sentencepiece-0.2.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c83b85ab2d6576607f31df77ff86f28182be4a8de6d175d2c33ca609925f5da1", size = 1253670, upload-time = "2025-08-12T07:00:24.69Z" },
- { url = "https://files.pythonhosted.org/packages/19/ad/d5c7075f701bd97971d7c2ac2904f227566f51ef0838dfbdfdccb58cd212/sentencepiece-0.2.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1855f57db07b51fb51ed6c9c452f570624d2b169b36f0f79ef71a6e6c618cd8b", size = 1316247, upload-time = "2025-08-12T07:00:26.435Z" },
- { url = "https://files.pythonhosted.org/packages/fb/03/35fbe5f3d9a7435eebd0b473e09584bd3cc354ce118b960445b060d33781/sentencepiece-0.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:01e6912125cb45d3792f530a4d38f8e21bf884d6b4d4ade1b2de5cf7a8d2a52b", size = 1387894, upload-time = "2025-08-12T07:00:28.339Z" },
- { url = "https://files.pythonhosted.org/packages/dc/aa/956ef729aafb6c8f9c443104c9636489093bb5c61d6b90fc27aa1a865574/sentencepiece-0.2.1-cp314-cp314-win32.whl", hash = "sha256:c415c9de1447e0a74ae3fdb2e52f967cb544113a3a5ce3a194df185cbc1f962f", size = 1096698, upload-time = "2025-08-12T07:00:29.764Z" },
- { url = "https://files.pythonhosted.org/packages/b8/cb/fe400d8836952cc535c81a0ce47dc6875160e5fedb71d2d9ff0e9894c2a6/sentencepiece-0.2.1-cp314-cp314-win_amd64.whl", hash = "sha256:881b2e44b14fc19feade3cbed314be37de639fc415375cefaa5bc81a4be137fd", size = 1155115, upload-time = "2025-08-12T07:00:32.865Z" },
- { url = "https://files.pythonhosted.org/packages/32/89/047921cf70f36c7b6b6390876b2399b3633ab73b8d0cb857e5a964238941/sentencepiece-0.2.1-cp314-cp314-win_arm64.whl", hash = "sha256:2005242a16d2dc3ac5fe18aa7667549134d37854823df4c4db244752453b78a8", size = 1133890, upload-time = "2025-08-12T07:00:34.763Z" },
- { url = "https://files.pythonhosted.org/packages/a1/11/5b414b9fae6255b5fb1e22e2ed3dc3a72d3a694e5703910e640ac78346bb/sentencepiece-0.2.1-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:a19adcec27c524cb7069a1c741060add95f942d1cbf7ad0d104dffa0a7d28a2b", size = 1946081, upload-time = "2025-08-12T07:00:36.97Z" },
- { url = "https://files.pythonhosted.org/packages/77/eb/7a5682bb25824db8545f8e5662e7f3e32d72a508fdce086029d89695106b/sentencepiece-0.2.1-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:e37e4b4c4a11662b5db521def4e44d4d30ae69a1743241412a93ae40fdcab4bb", size = 1327406, upload-time = "2025-08-12T07:00:38.669Z" },
- { url = "https://files.pythonhosted.org/packages/03/b0/811dae8fb9f2784e138785d481469788f2e0d0c109c5737372454415f55f/sentencepiece-0.2.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:477c81505db072b3ab627e7eab972ea1025331bd3a92bacbf798df2b75ea86ec", size = 1254846, upload-time = "2025-08-12T07:00:40.611Z" },
- { url = "https://files.pythonhosted.org/packages/ef/23/195b2e7ec85ebb6a547969f60b723c7aca5a75800ece6cc3f41da872d14e/sentencepiece-0.2.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:010f025a544ef770bb395091d57cb94deb9652d8972e0d09f71d85d5a0816c8c", size = 1315721, upload-time = "2025-08-12T07:00:42.914Z" },
- { url = "https://files.pythonhosted.org/packages/7e/aa/553dbe4178b5f23eb28e59393dddd64186178b56b81d9b8d5c3ff1c28395/sentencepiece-0.2.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:733e59ff1794d26db706cd41fc2d7ca5f6c64a820709cb801dc0ea31780d64ab", size = 1387458, upload-time = "2025-08-12T07:00:44.56Z" },
- { url = "https://files.pythonhosted.org/packages/66/7c/08ff0012507297a4dd74a5420fdc0eb9e3e80f4e88cab1538d7f28db303d/sentencepiece-0.2.1-cp314-cp314t-win32.whl", hash = "sha256:d3233770f78e637dc8b1fda2cd7c3b99ec77e7505041934188a4e7fe751de3b0", size = 1099765, upload-time = "2025-08-12T07:00:46.058Z" },
- { url = "https://files.pythonhosted.org/packages/91/d5/2a69e1ce15881beb9ddfc7e3f998322f5cedcd5e4d244cb74dade9441663/sentencepiece-0.2.1-cp314-cp314t-win_amd64.whl", hash = "sha256:5e4366c97b68218fd30ea72d70c525e6e78a6c0a88650f57ac4c43c63b234a9d", size = 1157807, upload-time = "2025-08-12T07:00:47.673Z" },
- { url = "https://files.pythonhosted.org/packages/f3/16/54f611fcfc2d1c46cbe3ec4169780b2cfa7cf63708ef2b71611136db7513/sentencepiece-0.2.1-cp314-cp314t-win_arm64.whl", hash = "sha256:105e36e75cbac1292642045458e8da677b2342dcd33df503e640f0b457cb6751", size = 1136264, upload-time = "2025-08-12T07:00:49.485Z" },
-]
-
-[[package]]
-name = "sentry-sdk"
-version = "2.49.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "certifi" },
- { name = "urllib3" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/02/94/23ac26616a883f492428d9ee9ad6eee391612125326b784dbfc30e1e7bab/sentry_sdk-2.49.0.tar.gz", hash = "sha256:c1878599cde410d481c04ef50ee3aedd4f600e4d0d253f4763041e468b332c30", size = 387228, upload-time = "2026-01-08T09:56:25.642Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/88/43/1c586f9f413765201234541857cb82fda076f4b0f7bad4a0ec248da39cf3/sentry_sdk-2.49.0-py2.py3-none-any.whl", hash = "sha256:6ea78499133874445a20fe9c826c9e960070abeb7ae0cdf930314ab16bb97aa0", size = 415693, upload-time = "2026-01-08T09:56:21.872Z" },
-]
-
-[[package]]
-name = "setuptools"
-version = "80.9.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz", hash = "sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c", size = 1319958, upload-time = "2025-05-27T00:56:51.443Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/a3/dc/17031897dae0efacfea57dfd3a82fdd2a2aeb58e0ff71b77b87e44edc772/setuptools-80.9.0-py3-none-any.whl", hash = "sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922", size = 1201486, upload-time = "2025-05-27T00:56:49.664Z" },
-]
-
-[[package]]
-name = "shellingham"
-version = "1.5.4"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de", size = 10310, upload-time = "2023-10-24T04:13:40.426Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", size = 9755, upload-time = "2023-10-24T04:13:38.866Z" },
-]
-
-[[package]]
-name = "six"
-version = "1.17.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" },
-]
-
-[[package]]
-name = "smmap"
-version = "5.0.2"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz", hash = "sha256:26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5", size = 22329, upload-time = "2025-01-02T07:14:40.909Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/04/be/d09147ad1ec7934636ad912901c5fd7667e1c858e19d355237db0d0cd5e4/smmap-5.0.2-py3-none-any.whl", hash = "sha256:b30115f0def7d7531d22a0fb6502488d879e75b260a9db4d0819cfb25403af5e", size = 24303, upload-time = "2025-01-02T07:14:38.724Z" },
-]
-
-[[package]]
-name = "sniffio"
-version = "1.3.1"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc", size = 20372, upload-time = "2024-02-25T23:20:04.057Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235, upload-time = "2024-02-25T23:20:01.196Z" },
-]
-
-[[package]]
-name = "soundfile"
-version = "0.13.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "cffi" },
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/e1/41/9b873a8c055582859b239be17902a85339bec6a30ad162f98c9b0288a2cc/soundfile-0.13.1.tar.gz", hash = "sha256:b2c68dab1e30297317080a5b43df57e302584c49e2942defdde0acccc53f0e5b", size = 46156, upload-time = "2025-01-25T09:17:04.831Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/64/28/e2a36573ccbcf3d57c00626a21fe51989380636e821b341d36ccca0c1c3a/soundfile-0.13.1-py2.py3-none-any.whl", hash = "sha256:a23c717560da2cf4c7b5ae1142514e0fd82d6bbd9dfc93a50423447142f2c445", size = 25751, upload-time = "2025-01-25T09:16:44.235Z" },
- { url = "https://files.pythonhosted.org/packages/ea/ab/73e97a5b3cc46bba7ff8650a1504348fa1863a6f9d57d7001c6b67c5f20e/soundfile-0.13.1-py2.py3-none-macosx_10_9_x86_64.whl", hash = "sha256:82dc664d19831933fe59adad199bf3945ad06d84bc111a5b4c0d3089a5b9ec33", size = 1142250, upload-time = "2025-01-25T09:16:47.583Z" },
- { url = "https://files.pythonhosted.org/packages/a0/e5/58fd1a8d7b26fc113af244f966ee3aecf03cb9293cb935daaddc1e455e18/soundfile-0.13.1-py2.py3-none-macosx_11_0_arm64.whl", hash = "sha256:743f12c12c4054921e15736c6be09ac26b3b3d603aef6fd69f9dde68748f2593", size = 1101406, upload-time = "2025-01-25T09:16:49.662Z" },
- { url = "https://files.pythonhosted.org/packages/58/ae/c0e4a53d77cf6e9a04179535766b3321b0b9ced5f70522e4caf9329f0046/soundfile-0.13.1-py2.py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:9c9e855f5a4d06ce4213f31918653ab7de0c5a8d8107cd2427e44b42df547deb", size = 1235729, upload-time = "2025-01-25T09:16:53.018Z" },
- { url = "https://files.pythonhosted.org/packages/57/5e/70bdd9579b35003a489fc850b5047beeda26328053ebadc1fb60f320f7db/soundfile-0.13.1-py2.py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:03267c4e493315294834a0870f31dbb3b28a95561b80b134f0bd3cf2d5f0e618", size = 1313646, upload-time = "2025-01-25T09:16:54.872Z" },
- { url = "https://files.pythonhosted.org/packages/fe/df/8c11dc4dfceda14e3003bb81a0d0edcaaf0796dd7b4f826ea3e532146bba/soundfile-0.13.1-py2.py3-none-win32.whl", hash = "sha256:c734564fab7c5ddf8e9be5bf70bab68042cd17e9c214c06e365e20d64f9a69d5", size = 899881, upload-time = "2025-01-25T09:16:56.663Z" },
- { url = "https://files.pythonhosted.org/packages/14/e9/6b761de83277f2f02ded7e7ea6f07828ec78e4b229b80e4ca55dd205b9dc/soundfile-0.13.1-py2.py3-none-win_amd64.whl", hash = "sha256:1e70a05a0626524a69e9f0f4dd2ec174b4e9567f4d8b6c11d38b5c289be36ee9", size = 1019162, upload-time = "2025-01-25T09:16:59.573Z" },
-]
-
-[[package]]
-name = "sympy"
-version = "1.14.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "mpmath" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/83/d3/803453b36afefb7c2bb238361cd4ae6125a569b4db67cd9e79846ba2d68c/sympy-1.14.0.tar.gz", hash = "sha256:d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517", size = 7793921, upload-time = "2025-04-27T18:05:01.611Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/a2/09/77d55d46fd61b4a135c444fc97158ef34a095e5681d0a6c10b75bf356191/sympy-1.14.0-py3-none-any.whl", hash = "sha256:e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5", size = 6299353, upload-time = "2025-04-27T18:04:59.103Z" },
-]
-
-[[package]]
-name = "tenacity"
-version = "9.1.2"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/0a/d4/2b0cd0fe285e14b36db076e78c93766ff1d529d70408bd1d2a5a84f1d929/tenacity-9.1.2.tar.gz", hash = "sha256:1169d376c297e7de388d18b4481760d478b0e99a777cad3a9c86e556f4b697cb", size = 48036, upload-time = "2025-04-02T08:25:09.966Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/e5/30/643397144bfbfec6f6ef821f36f33e57d35946c44a2352d3c9f0ae847619/tenacity-9.1.2-py3-none-any.whl", hash = "sha256:f77bf36710d8b73a50b2dd155c97b870017ad21afe6ab300326b0371b3b05138", size = 28248, upload-time = "2025-04-02T08:25:07.678Z" },
-]
-
-[[package]]
-name = "tifffile"
-version = "2025.5.10"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version < '3.11' and sys_platform == 'linux'",
- "python_full_version < '3.11' and sys_platform != 'linux'",
-]
-dependencies = [
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" } },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/44/d0/18fed0fc0916578a4463f775b0fbd9c5fed2392152d039df2fb533bfdd5d/tifffile-2025.5.10.tar.gz", hash = "sha256:018335d34283aa3fd8c263bae5c3c2b661ebc45548fde31504016fcae7bf1103", size = 365290, upload-time = "2025-05-10T19:22:34.386Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/5d/06/bd0a6097da704a7a7c34a94cfd771c3ea3c2f405dd214e790d22c93f6be1/tifffile-2025.5.10-py3-none-any.whl", hash = "sha256:e37147123c0542d67bc37ba5cdd67e12ea6fbe6e86c52bee037a9eb6a064e5ad", size = 226533, upload-time = "2025-05-10T19:22:27.279Z" },
-]
-
-[[package]]
-name = "tifffile"
-version = "2026.1.14"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version >= '3.13' and sys_platform == 'linux'",
- "python_full_version == '3.12.*' and sys_platform == 'linux'",
- "python_full_version == '3.11.*' and sys_platform == 'linux'",
- "python_full_version >= '3.13' and sys_platform != 'linux'",
- "python_full_version == '3.12.*' and sys_platform != 'linux'",
- "python_full_version == '3.11.*' and sys_platform != 'linux'",
-]
-dependencies = [
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" } },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/5d/19/a41ab0dc1b314da952d99957289944c3b8b76021399c72693e4c1fddc6c3/tifffile-2026.1.14.tar.gz", hash = "sha256:a423c583e1eecd9ca255642d47f463efa8d7f2365a0e110eb0167570493e0c8c", size = 373639, upload-time = "2026-01-14T22:40:43.551Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/a3/4d/3fd60d3a37b544cb59463add86e4dfbb485880225115341281906a7b140e/tifffile-2026.1.14-py3-none-any.whl", hash = "sha256:29cf4adb43562a4624fc959018ab1b44e0342015d3db4581b983fe40e05f5924", size = 232213, upload-time = "2026-01-14T22:40:41.553Z" },
-]
-
-[[package]]
-name = "tokenizers"
-version = "0.22.2"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "huggingface-hub" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/73/6f/f80cfef4a312e1fb34baf7d85c72d4411afde10978d4657f8cdd811d3ccc/tokenizers-0.22.2.tar.gz", hash = "sha256:473b83b915e547aa366d1eee11806deaf419e17be16310ac0a14077f1e28f917", size = 372115, upload-time = "2026-01-05T10:45:15.988Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/92/97/5dbfabf04c7e348e655e907ed27913e03db0923abb5dfdd120d7b25630e1/tokenizers-0.22.2-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:544dd704ae7238755d790de45ba8da072e9af3eea688f698b137915ae959281c", size = 3100275, upload-time = "2026-01-05T10:41:02.158Z" },
- { url = "https://files.pythonhosted.org/packages/2e/47/174dca0502ef88b28f1c9e06b73ce33500eedfac7a7692108aec220464e7/tokenizers-0.22.2-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:1e418a55456beedca4621dbab65a318981467a2b188e982a23e117f115ce5001", size = 2981472, upload-time = "2026-01-05T10:41:00.276Z" },
- { url = "https://files.pythonhosted.org/packages/d6/84/7990e799f1309a8b87af6b948f31edaa12a3ed22d11b352eaf4f4b2e5753/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2249487018adec45d6e3554c71d46eb39fa8ea67156c640f7513eb26f318cec7", size = 3290736, upload-time = "2026-01-05T10:40:32.165Z" },
- { url = "https://files.pythonhosted.org/packages/78/59/09d0d9ba94dcd5f4f1368d4858d24546b4bdc0231c2354aa31d6199f0399/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25b85325d0815e86e0bac263506dd114578953b7b53d7de09a6485e4a160a7dd", size = 3168835, upload-time = "2026-01-05T10:40:38.847Z" },
- { url = "https://files.pythonhosted.org/packages/47/50/b3ebb4243e7160bda8d34b731e54dd8ab8b133e50775872e7a434e524c28/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfb88f22a209ff7b40a576d5324bf8286b519d7358663db21d6246fb17eea2d5", size = 3521673, upload-time = "2026-01-05T10:40:56.614Z" },
- { url = "https://files.pythonhosted.org/packages/e0/fa/89f4cb9e08df770b57adb96f8cbb7e22695a4cb6c2bd5f0c4f0ebcf33b66/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c774b1276f71e1ef716e5486f21e76333464f47bece56bbd554485982a9e03e", size = 3724818, upload-time = "2026-01-05T10:40:44.507Z" },
- { url = "https://files.pythonhosted.org/packages/64/04/ca2363f0bfbe3b3d36e95bf67e56a4c88c8e3362b658e616d1ac185d47f2/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:df6c4265b289083bf710dff49bc51ef252f9d5be33a45ee2bed151114a56207b", size = 3379195, upload-time = "2026-01-05T10:40:51.139Z" },
- { url = "https://files.pythonhosted.org/packages/2e/76/932be4b50ef6ccedf9d3c6639b056a967a86258c6d9200643f01269211ca/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:369cc9fc8cc10cb24143873a0d95438bb8ee257bb80c71989e3ee290e8d72c67", size = 3274982, upload-time = "2026-01-05T10:40:58.331Z" },
- { url = "https://files.pythonhosted.org/packages/1d/28/5f9f5a4cc211b69e89420980e483831bcc29dade307955cc9dc858a40f01/tokenizers-0.22.2-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:29c30b83d8dcd061078b05ae0cb94d3c710555fbb44861139f9f83dcca3dc3e4", size = 9478245, upload-time = "2026-01-05T10:41:04.053Z" },
- { url = "https://files.pythonhosted.org/packages/6c/fb/66e2da4704d6aadebf8cb39f1d6d1957df667ab24cff2326b77cda0dcb85/tokenizers-0.22.2-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:37ae80a28c1d3265bb1f22464c856bd23c02a05bb211e56d0c5301a435be6c1a", size = 9560069, upload-time = "2026-01-05T10:45:10.673Z" },
- { url = "https://files.pythonhosted.org/packages/16/04/fed398b05caa87ce9b1a1bb5166645e38196081b225059a6edaff6440fac/tokenizers-0.22.2-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:791135ee325f2336f498590eb2f11dc5c295232f288e75c99a36c5dbce63088a", size = 9899263, upload-time = "2026-01-05T10:45:12.559Z" },
- { url = "https://files.pythonhosted.org/packages/05/a1/d62dfe7376beaaf1394917e0f8e93ee5f67fea8fcf4107501db35996586b/tokenizers-0.22.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:38337540fbbddff8e999d59970f3c6f35a82de10053206a7562f1ea02d046fa5", size = 10033429, upload-time = "2026-01-05T10:45:14.333Z" },
- { url = "https://files.pythonhosted.org/packages/fd/18/a545c4ea42af3df6effd7d13d250ba77a0a86fb20393143bbb9a92e434d4/tokenizers-0.22.2-cp39-abi3-win32.whl", hash = "sha256:a6bf3f88c554a2b653af81f3204491c818ae2ac6fbc09e76ef4773351292bc92", size = 2502363, upload-time = "2026-01-05T10:45:20.593Z" },
- { url = "https://files.pythonhosted.org/packages/65/71/0670843133a43d43070abeb1949abfdef12a86d490bea9cd9e18e37c5ff7/tokenizers-0.22.2-cp39-abi3-win_amd64.whl", hash = "sha256:c9ea31edff2968b44a88f97d784c2f16dc0729b8b143ed004699ebca91f05c48", size = 2747786, upload-time = "2026-01-05T10:45:18.411Z" },
- { url = "https://files.pythonhosted.org/packages/72/f4/0de46cfa12cdcbcd464cc59fde36912af405696f687e53a091fb432f694c/tokenizers-0.22.2-cp39-abi3-win_arm64.whl", hash = "sha256:9ce725d22864a1e965217204946f830c37876eee3b2ba6fc6255e8e903d5fcbc", size = 2612133, upload-time = "2026-01-05T10:45:17.232Z" },
- { url = "https://files.pythonhosted.org/packages/84/04/655b79dbcc9b3ac5f1479f18e931a344af67e5b7d3b251d2dcdcd7558592/tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:753d47ebd4542742ef9261d9da92cd545b2cacbb48349a1225466745bb866ec4", size = 3282301, upload-time = "2026-01-05T10:40:34.858Z" },
- { url = "https://files.pythonhosted.org/packages/46/cd/e4851401f3d8f6f45d8480262ab6a5c8cb9c4302a790a35aa14eeed6d2fd/tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e10bf9113d209be7cd046d40fbabbaf3278ff6d18eb4da4c500443185dc1896c", size = 3161308, upload-time = "2026-01-05T10:40:40.737Z" },
- { url = "https://files.pythonhosted.org/packages/6f/6e/55553992a89982cd12d4a66dddb5e02126c58677ea3931efcbe601d419db/tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:64d94e84f6660764e64e7e0b22baa72f6cd942279fdbb21d46abd70d179f0195", size = 3718964, upload-time = "2026-01-05T10:40:46.56Z" },
- { url = "https://files.pythonhosted.org/packages/59/8c/b1c87148aa15e099243ec9f0cf9d0e970cc2234c3257d558c25a2c5304e6/tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f01a9c019878532f98927d2bacb79bbb404b43d3437455522a00a30718cdedb5", size = 3373542, upload-time = "2026-01-05T10:40:52.803Z" },
-]
-
-[[package]]
-name = "tomli"
-version = "2.4.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/82/30/31573e9457673ab10aa432461bee537ce6cef177667deca369efb79df071/tomli-2.4.0.tar.gz", hash = "sha256:aa89c3f6c277dd275d8e243ad24f3b5e701491a860d5121f2cdd399fbb31fc9c", size = 17477, upload-time = "2026-01-11T11:22:38.165Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/3c/d9/3dc2289e1f3b32eb19b9785b6a006b28ee99acb37d1d47f78d4c10e28bf8/tomli-2.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b5ef256a3fd497d4973c11bf142e9ed78b150d36f5773f1ca6088c230ffc5867", size = 153663, upload-time = "2026-01-11T11:21:45.27Z" },
- { url = "https://files.pythonhosted.org/packages/51/32/ef9f6845e6b9ca392cd3f64f9ec185cc6f09f0a2df3db08cbe8809d1d435/tomli-2.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5572e41282d5268eb09a697c89a7bee84fae66511f87533a6f88bd2f7b652da9", size = 148469, upload-time = "2026-01-11T11:21:46.873Z" },
- { url = "https://files.pythonhosted.org/packages/d6/c2/506e44cce89a8b1b1e047d64bd495c22c9f71f21e05f380f1a950dd9c217/tomli-2.4.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:551e321c6ba03b55676970b47cb1b73f14a0a4dce6a3e1a9458fd6d921d72e95", size = 236039, upload-time = "2026-01-11T11:21:48.503Z" },
- { url = "https://files.pythonhosted.org/packages/b3/40/e1b65986dbc861b7e986e8ec394598187fa8aee85b1650b01dd925ca0be8/tomli-2.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5e3f639a7a8f10069d0e15408c0b96a2a828cfdec6fca05296ebcdcc28ca7c76", size = 243007, upload-time = "2026-01-11T11:21:49.456Z" },
- { url = "https://files.pythonhosted.org/packages/9c/6f/6e39ce66b58a5b7ae572a0f4352ff40c71e8573633deda43f6a379d56b3e/tomli-2.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1b168f2731796b045128c45982d3a4874057626da0e2ef1fdd722848b741361d", size = 240875, upload-time = "2026-01-11T11:21:50.755Z" },
- { url = "https://files.pythonhosted.org/packages/aa/ad/cb089cb190487caa80204d503c7fd0f4d443f90b95cf4ef5cf5aa0f439b0/tomli-2.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:133e93646ec4300d651839d382d63edff11d8978be23da4cc106f5a18b7d0576", size = 246271, upload-time = "2026-01-11T11:21:51.81Z" },
- { url = "https://files.pythonhosted.org/packages/0b/63/69125220e47fd7a3a27fd0de0c6398c89432fec41bc739823bcc66506af6/tomli-2.4.0-cp311-cp311-win32.whl", hash = "sha256:b6c78bdf37764092d369722d9946cb65b8767bfa4110f902a1b2542d8d173c8a", size = 96770, upload-time = "2026-01-11T11:21:52.647Z" },
- { url = "https://files.pythonhosted.org/packages/1e/0d/a22bb6c83f83386b0008425a6cd1fa1c14b5f3dd4bad05e98cf3dbbf4a64/tomli-2.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:d3d1654e11d724760cdb37a3d7691f0be9db5fbdaef59c9f532aabf87006dbaa", size = 107626, upload-time = "2026-01-11T11:21:53.459Z" },
- { url = "https://files.pythonhosted.org/packages/2f/6d/77be674a3485e75cacbf2ddba2b146911477bd887dda9d8c9dfb2f15e871/tomli-2.4.0-cp311-cp311-win_arm64.whl", hash = "sha256:cae9c19ed12d4e8f3ebf46d1a75090e4c0dc16271c5bce1c833ac168f08fb614", size = 94842, upload-time = "2026-01-11T11:21:54.831Z" },
- { url = "https://files.pythonhosted.org/packages/3c/43/7389a1869f2f26dba52404e1ef13b4784b6b37dac93bac53457e3ff24ca3/tomli-2.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:920b1de295e72887bafa3ad9f7a792f811847d57ea6b1215154030cf131f16b1", size = 154894, upload-time = "2026-01-11T11:21:56.07Z" },
- { url = "https://files.pythonhosted.org/packages/e9/05/2f9bf110b5294132b2edf13fe6ca6ae456204f3d749f623307cbb7a946f2/tomli-2.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d6d9a4aee98fac3eab4952ad1d73aee87359452d1c086b5ceb43ed02ddb16b8", size = 149053, upload-time = "2026-01-11T11:21:57.467Z" },
- { url = "https://files.pythonhosted.org/packages/e8/41/1eda3ca1abc6f6154a8db4d714a4d35c4ad90adc0bcf700657291593fbf3/tomli-2.4.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:36b9d05b51e65b254ea6c2585b59d2c4cb91c8a3d91d0ed0f17591a29aaea54a", size = 243481, upload-time = "2026-01-11T11:21:58.661Z" },
- { url = "https://files.pythonhosted.org/packages/d2/6d/02ff5ab6c8868b41e7d4b987ce2b5f6a51d3335a70aa144edd999e055a01/tomli-2.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1c8a885b370751837c029ef9bc014f27d80840e48bac415f3412e6593bbc18c1", size = 251720, upload-time = "2026-01-11T11:22:00.178Z" },
- { url = "https://files.pythonhosted.org/packages/7b/57/0405c59a909c45d5b6f146107c6d997825aa87568b042042f7a9c0afed34/tomli-2.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8768715ffc41f0008abe25d808c20c3d990f42b6e2e58305d5da280ae7d1fa3b", size = 247014, upload-time = "2026-01-11T11:22:01.238Z" },
- { url = "https://files.pythonhosted.org/packages/2c/0e/2e37568edd944b4165735687cbaf2fe3648129e440c26d02223672ee0630/tomli-2.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b438885858efd5be02a9a133caf5812b8776ee0c969fea02c45e8e3f296ba51", size = 251820, upload-time = "2026-01-11T11:22:02.727Z" },
- { url = "https://files.pythonhosted.org/packages/5a/1c/ee3b707fdac82aeeb92d1a113f803cf6d0f37bdca0849cb489553e1f417a/tomli-2.4.0-cp312-cp312-win32.whl", hash = "sha256:0408e3de5ec77cc7f81960c362543cbbd91ef883e3138e81b729fc3eea5b9729", size = 97712, upload-time = "2026-01-11T11:22:03.777Z" },
- { url = "https://files.pythonhosted.org/packages/69/13/c07a9177d0b3bab7913299b9278845fc6eaaca14a02667c6be0b0a2270c8/tomli-2.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:685306e2cc7da35be4ee914fd34ab801a6acacb061b6a7abca922aaf9ad368da", size = 108296, upload-time = "2026-01-11T11:22:04.86Z" },
- { url = "https://files.pythonhosted.org/packages/18/27/e267a60bbeeee343bcc279bb9e8fbed0cbe224bc7b2a3dc2975f22809a09/tomli-2.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:5aa48d7c2356055feef06a43611fc401a07337d5b006be13a30f6c58f869e3c3", size = 94553, upload-time = "2026-01-11T11:22:05.854Z" },
- { url = "https://files.pythonhosted.org/packages/34/91/7f65f9809f2936e1f4ce6268ae1903074563603b2a2bd969ebbda802744f/tomli-2.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:84d081fbc252d1b6a982e1870660e7330fb8f90f676f6e78b052ad4e64714bf0", size = 154915, upload-time = "2026-01-11T11:22:06.703Z" },
- { url = "https://files.pythonhosted.org/packages/20/aa/64dd73a5a849c2e8f216b755599c511badde80e91e9bc2271baa7b2cdbb1/tomli-2.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9a08144fa4cba33db5255f9b74f0b89888622109bd2776148f2597447f92a94e", size = 149038, upload-time = "2026-01-11T11:22:07.56Z" },
- { url = "https://files.pythonhosted.org/packages/9e/8a/6d38870bd3d52c8d1505ce054469a73f73a0fe62c0eaf5dddf61447e32fa/tomli-2.4.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c73add4bb52a206fd0c0723432db123c0c75c280cbd67174dd9d2db228ebb1b4", size = 242245, upload-time = "2026-01-11T11:22:08.344Z" },
- { url = "https://files.pythonhosted.org/packages/59/bb/8002fadefb64ab2669e5b977df3f5e444febea60e717e755b38bb7c41029/tomli-2.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1fb2945cbe303b1419e2706e711b7113da57b7db31ee378d08712d678a34e51e", size = 250335, upload-time = "2026-01-11T11:22:09.951Z" },
- { url = "https://files.pythonhosted.org/packages/a5/3d/4cdb6f791682b2ea916af2de96121b3cb1284d7c203d97d92d6003e91c8d/tomli-2.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bbb1b10aa643d973366dc2cb1ad94f99c1726a02343d43cbc011edbfac579e7c", size = 245962, upload-time = "2026-01-11T11:22:11.27Z" },
- { url = "https://files.pythonhosted.org/packages/f2/4a/5f25789f9a460bd858ba9756ff52d0830d825b458e13f754952dd15fb7bb/tomli-2.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4cbcb367d44a1f0c2be408758b43e1ffb5308abe0ea222897d6bfc8e8281ef2f", size = 250396, upload-time = "2026-01-11T11:22:12.325Z" },
- { url = "https://files.pythonhosted.org/packages/aa/2f/b73a36fea58dfa08e8b3a268750e6853a6aac2a349241a905ebd86f3047a/tomli-2.4.0-cp313-cp313-win32.whl", hash = "sha256:7d49c66a7d5e56ac959cb6fc583aff0651094ec071ba9ad43df785abc2320d86", size = 97530, upload-time = "2026-01-11T11:22:13.865Z" },
- { url = "https://files.pythonhosted.org/packages/3b/af/ca18c134b5d75de7e8dc551c5234eaba2e8e951f6b30139599b53de9c187/tomli-2.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:3cf226acb51d8f1c394c1b310e0e0e61fecdd7adcb78d01e294ac297dd2e7f87", size = 108227, upload-time = "2026-01-11T11:22:15.224Z" },
- { url = "https://files.pythonhosted.org/packages/22/c3/b386b832f209fee8073c8138ec50f27b4460db2fdae9ffe022df89a57f9b/tomli-2.4.0-cp313-cp313-win_arm64.whl", hash = "sha256:d20b797a5c1ad80c516e41bc1fb0443ddb5006e9aaa7bda2d71978346aeb9132", size = 94748, upload-time = "2026-01-11T11:22:16.009Z" },
- { url = "https://files.pythonhosted.org/packages/f3/c4/84047a97eb1004418bc10bdbcfebda209fca6338002eba2dc27cc6d13563/tomli-2.4.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:26ab906a1eb794cd4e103691daa23d95c6919cc2fa9160000ac02370cc9dd3f6", size = 154725, upload-time = "2026-01-11T11:22:17.269Z" },
- { url = "https://files.pythonhosted.org/packages/a8/5d/d39038e646060b9d76274078cddf146ced86dc2b9e8bbf737ad5983609a0/tomli-2.4.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:20cedb4ee43278bc4f2fee6cb50daec836959aadaf948db5172e776dd3d993fc", size = 148901, upload-time = "2026-01-11T11:22:18.287Z" },
- { url = "https://files.pythonhosted.org/packages/73/e5/383be1724cb30f4ce44983d249645684a48c435e1cd4f8b5cded8a816d3c/tomli-2.4.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:39b0b5d1b6dd03684b3fb276407ebed7090bbec989fa55838c98560c01113b66", size = 243375, upload-time = "2026-01-11T11:22:19.154Z" },
- { url = "https://files.pythonhosted.org/packages/31/f0/bea80c17971c8d16d3cc109dc3585b0f2ce1036b5f4a8a183789023574f2/tomli-2.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a26d7ff68dfdb9f87a016ecfd1e1c2bacbe3108f4e0f8bcd2228ef9a766c787d", size = 250639, upload-time = "2026-01-11T11:22:20.168Z" },
- { url = "https://files.pythonhosted.org/packages/2c/8f/2853c36abbb7608e3f945d8a74e32ed3a74ee3a1f468f1ffc7d1cb3abba6/tomli-2.4.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:20ffd184fb1df76a66e34bd1b36b4a4641bd2b82954befa32fe8163e79f1a702", size = 246897, upload-time = "2026-01-11T11:22:21.544Z" },
- { url = "https://files.pythonhosted.org/packages/49/f0/6c05e3196ed5337b9fe7ea003e95fd3819a840b7a0f2bf5a408ef1dad8ed/tomli-2.4.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:75c2f8bbddf170e8effc98f5e9084a8751f8174ea6ccf4fca5398436e0320bc8", size = 254697, upload-time = "2026-01-11T11:22:23.058Z" },
- { url = "https://files.pythonhosted.org/packages/f3/f5/2922ef29c9f2951883525def7429967fc4d8208494e5ab524234f06b688b/tomli-2.4.0-cp314-cp314-win32.whl", hash = "sha256:31d556d079d72db7c584c0627ff3a24c5d3fb4f730221d3444f3efb1b2514776", size = 98567, upload-time = "2026-01-11T11:22:24.033Z" },
- { url = "https://files.pythonhosted.org/packages/7b/31/22b52e2e06dd2a5fdbc3ee73226d763b184ff21fc24e20316a44ccc4d96b/tomli-2.4.0-cp314-cp314-win_amd64.whl", hash = "sha256:43e685b9b2341681907759cf3a04e14d7104b3580f808cfde1dfdb60ada85475", size = 108556, upload-time = "2026-01-11T11:22:25.378Z" },
- { url = "https://files.pythonhosted.org/packages/48/3d/5058dff3255a3d01b705413f64f4306a141a8fd7a251e5a495e3f192a998/tomli-2.4.0-cp314-cp314-win_arm64.whl", hash = "sha256:3d895d56bd3f82ddd6faaff993c275efc2ff38e52322ea264122d72729dca2b2", size = 96014, upload-time = "2026-01-11T11:22:26.138Z" },
- { url = "https://files.pythonhosted.org/packages/b8/4e/75dab8586e268424202d3a1997ef6014919c941b50642a1682df43204c22/tomli-2.4.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:5b5807f3999fb66776dbce568cc9a828544244a8eb84b84b9bafc080c99597b9", size = 163339, upload-time = "2026-01-11T11:22:27.143Z" },
- { url = "https://files.pythonhosted.org/packages/06/e3/b904d9ab1016829a776d97f163f183a48be6a4deb87304d1e0116a349519/tomli-2.4.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c084ad935abe686bd9c898e62a02a19abfc9760b5a79bc29644463eaf2840cb0", size = 159490, upload-time = "2026-01-11T11:22:28.399Z" },
- { url = "https://files.pythonhosted.org/packages/e3/5a/fc3622c8b1ad823e8ea98a35e3c632ee316d48f66f80f9708ceb4f2a0322/tomli-2.4.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f2e3955efea4d1cfbcb87bc321e00dc08d2bcb737fd1d5e398af111d86db5df", size = 269398, upload-time = "2026-01-11T11:22:29.345Z" },
- { url = "https://files.pythonhosted.org/packages/fd/33/62bd6152c8bdd4c305ad9faca48f51d3acb2df1f8791b1477d46ff86e7f8/tomli-2.4.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e0fe8a0b8312acf3a88077a0802565cb09ee34107813bba1c7cd591fa6cfc8d", size = 276515, upload-time = "2026-01-11T11:22:30.327Z" },
- { url = "https://files.pythonhosted.org/packages/4b/ff/ae53619499f5235ee4211e62a8d7982ba9e439a0fb4f2f351a93d67c1dd2/tomli-2.4.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:413540dce94673591859c4c6f794dfeaa845e98bf35d72ed59636f869ef9f86f", size = 273806, upload-time = "2026-01-11T11:22:32.56Z" },
- { url = "https://files.pythonhosted.org/packages/47/71/cbca7787fa68d4d0a9f7072821980b39fbb1b6faeb5f5cf02f4a5559fa28/tomli-2.4.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:0dc56fef0e2c1c470aeac5b6ca8cc7b640bb93e92d9803ddaf9ea03e198f5b0b", size = 281340, upload-time = "2026-01-11T11:22:33.505Z" },
- { url = "https://files.pythonhosted.org/packages/f5/00/d595c120963ad42474cf6ee7771ad0d0e8a49d0f01e29576ee9195d9ecdf/tomli-2.4.0-cp314-cp314t-win32.whl", hash = "sha256:d878f2a6707cc9d53a1be1414bbb419e629c3d6e67f69230217bb663e76b5087", size = 108106, upload-time = "2026-01-11T11:22:34.451Z" },
- { url = "https://files.pythonhosted.org/packages/de/69/9aa0c6a505c2f80e519b43764f8b4ba93b5a0bbd2d9a9de6e2b24271b9a5/tomli-2.4.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2add28aacc7425117ff6364fe9e06a183bb0251b03f986df0e78e974047571fd", size = 120504, upload-time = "2026-01-11T11:22:35.764Z" },
- { url = "https://files.pythonhosted.org/packages/b3/9f/f1668c281c58cfae01482f7114a4b88d345e4c140386241a1a24dcc9e7bc/tomli-2.4.0-cp314-cp314t-win_arm64.whl", hash = "sha256:2b1e3b80e1d5e52e40e9b924ec43d81570f0e7d09d11081b797bc4692765a3d4", size = 99561, upload-time = "2026-01-11T11:22:36.624Z" },
- { url = "https://files.pythonhosted.org/packages/23/d1/136eb2cb77520a31e1f64cbae9d33ec6df0d78bdf4160398e86eec8a8754/tomli-2.4.0-py3-none-any.whl", hash = "sha256:1f776e7d669ebceb01dee46484485f43a4048746235e683bcdffacdf1fb4785a", size = 14477, upload-time = "2026-01-11T11:22:37.446Z" },
-]
-
-[[package]]
-name = "torch"
-version = "2.9.1"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version >= '3.13' and sys_platform == 'linux'",
- "python_full_version == '3.12.*' and sys_platform == 'linux'",
- "python_full_version == '3.11.*' and sys_platform == 'linux'",
- "python_full_version < '3.11' and sys_platform == 'linux'",
-]
-dependencies = [
- { name = "filelock" },
- { name = "fsspec" },
- { name = "jinja2" },
- { name = "networkx", version = "3.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "networkx", version = "3.6.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "nvidia-cublas-cu12", marker = "platform_machine == 'x86_64'" },
- { name = "nvidia-cuda-cupti-cu12", marker = "platform_machine == 'x86_64'" },
- { name = "nvidia-cuda-nvrtc-cu12", marker = "platform_machine == 'x86_64'" },
- { name = "nvidia-cuda-runtime-cu12", marker = "platform_machine == 'x86_64'" },
- { name = "nvidia-cudnn-cu12", marker = "platform_machine == 'x86_64'" },
- { name = "nvidia-cufft-cu12", marker = "platform_machine == 'x86_64'" },
- { name = "nvidia-cufile-cu12", marker = "platform_machine == 'x86_64'" },
- { name = "nvidia-curand-cu12", marker = "platform_machine == 'x86_64'" },
- { name = "nvidia-cusolver-cu12", marker = "platform_machine == 'x86_64'" },
- { name = "nvidia-cusparse-cu12", marker = "platform_machine == 'x86_64'" },
- { name = "nvidia-cusparselt-cu12", marker = "platform_machine == 'x86_64'" },
- { name = "nvidia-nccl-cu12", marker = "platform_machine == 'x86_64'" },
- { name = "nvidia-nvjitlink-cu12", marker = "platform_machine == 'x86_64'" },
- { name = "nvidia-nvshmem-cu12", marker = "platform_machine == 'x86_64'" },
- { name = "nvidia-nvtx-cu12", marker = "platform_machine == 'x86_64'" },
- { name = "setuptools", marker = "python_full_version >= '3.12'" },
- { name = "sympy" },
- { name = "triton", marker = "platform_machine == 'x86_64'" },
- { name = "typing-extensions" },
-]
-wheels = [
- { url = "https://files.pythonhosted.org/packages/5f/56/9577683b23072075ed2e40d725c52c2019d71a972fab8e083763da8e707e/torch-2.9.1-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:1cc208435f6c379f9b8fdfd5ceb5be1e3b72a6bdf1cb46c0d2812aa73472db9e", size = 104207681, upload-time = "2025-11-12T15:19:56.48Z" },
- { url = "https://files.pythonhosted.org/packages/38/45/be5a74f221df8f4b609b78ff79dc789b0cc9017624544ac4dd1c03973150/torch-2.9.1-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:9fd35c68b3679378c11f5eb73220fdcb4e6f4592295277fbb657d31fd053237c", size = 899794036, upload-time = "2025-11-12T15:21:01.886Z" },
- { url = "https://files.pythonhosted.org/packages/15/db/c064112ac0089af3d2f7a2b5bfbabf4aa407a78b74f87889e524b91c5402/torch-2.9.1-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:62b3fd888277946918cba4478cf849303da5359f0fb4e3bfb86b0533ba2eaf8d", size = 104220430, upload-time = "2025-11-12T15:20:31.705Z" },
- { url = "https://files.pythonhosted.org/packages/56/be/76eaa36c9cd032d3b01b001e2c5a05943df75f26211f68fae79e62f87734/torch-2.9.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:d033ff0ac3f5400df862a51bdde9bad83561f3739ea0046e68f5401ebfa67c1b", size = 899821446, upload-time = "2025-11-12T15:20:15.544Z" },
- { url = "https://files.pythonhosted.org/packages/0f/27/07c645c7673e73e53ded71705045d6cb5bae94c4b021b03aa8d03eee90ab/torch-2.9.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:da5f6f4d7f4940a173e5572791af238cb0b9e21b1aab592bd8b26da4c99f1cd6", size = 104126592, upload-time = "2025-11-12T15:20:41.62Z" },
- { url = "https://files.pythonhosted.org/packages/19/17/e377a460603132b00760511299fceba4102bd95db1a0ee788da21298ccff/torch-2.9.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:27331cd902fb4322252657f3902adf1c4f6acad9dcad81d8df3ae14c7c4f07c4", size = 899742281, upload-time = "2025-11-12T15:22:17.602Z" },
- { url = "https://files.pythonhosted.org/packages/20/60/8fc5e828d050bddfab469b3fe78e5ab9a7e53dda9c3bdc6a43d17ce99e63/torch-2.9.1-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:c29455d2b910b98738131990394da3e50eea8291dfeb4b12de71ecf1fdeb21cb", size = 104135743, upload-time = "2025-11-12T15:21:34.936Z" },
- { url = "https://files.pythonhosted.org/packages/f2/b7/6d3f80e6918213babddb2a37b46dbb14c15b14c5f473e347869a51f40e1f/torch-2.9.1-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:524de44cd13931208ba2c4bde9ec7741fd4ae6bfd06409a604fc32f6520c2bc9", size = 899749493, upload-time = "2025-11-12T15:24:36.356Z" },
- { url = "https://files.pythonhosted.org/packages/4b/f7/7a18745edcd7b9ca2381aa03353647bca8aace91683c4975f19ac233809d/torch-2.9.1-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:30a3e170a84894f3652434b56d59a64a2c11366b0ed5776fab33c2439396bf9a", size = 104142929, upload-time = "2025-11-12T15:21:48.319Z" },
- { url = "https://files.pythonhosted.org/packages/f4/dd/f1c0d879f2863ef209e18823a988dc7a1bf40470750e3ebe927efdb9407f/torch-2.9.1-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:8301a7b431e51764629208d0edaa4f9e4c33e6df0f2f90b90e261d623df6a4e2", size = 899748978, upload-time = "2025-11-12T15:23:04.568Z" },
- { url = "https://files.pythonhosted.org/packages/81/c9/2628f408f0518b3bae49c95f5af3728b6ab498c8624ab1e03a43dd53d650/torch-2.9.1-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:19d144d6b3e29921f1fc70503e9f2fc572cde6a5115c0c0de2f7ca8b1483e8b6", size = 104134804, upload-time = "2025-11-12T15:22:35.222Z" },
- { url = "https://files.pythonhosted.org/packages/28/fc/5bc91d6d831ae41bf6e9e6da6468f25330522e92347c9156eb3f1cb95956/torch-2.9.1-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:c432d04376f6d9767a9852ea0def7b47a7bbc8e7af3b16ac9cf9ce02b12851c9", size = 899747132, upload-time = "2025-11-12T15:23:36.068Z" },
- { url = "https://files.pythonhosted.org/packages/86/5c/5b2e5d84f5b9850cd1e71af07524d8cbb74cba19379800f1f9f7c997fc70/torch-2.9.1-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:0a2bd769944991c74acf0c4ef23603b9c777fdf7637f115605a4b2d8023110c7", size = 104145788, upload-time = "2025-11-12T15:23:52.109Z" },
- { url = "https://files.pythonhosted.org/packages/a9/8c/3da60787bcf70add986c4ad485993026ac0ca74f2fc21410bc4eb1bb7695/torch-2.9.1-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:07c8a9660bc9414c39cac530ac83b1fb1b679d7155824144a40a54f4a47bfa73", size = 899735500, upload-time = "2025-11-12T15:24:08.788Z" },
-]
-
-[[package]]
-name = "torch"
-version = "2.12.1"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version >= '3.13' and sys_platform != 'linux'",
- "python_full_version == '3.12.*' and sys_platform != 'linux'",
- "python_full_version == '3.11.*' and sys_platform != 'linux'",
- "python_full_version < '3.11' and sys_platform != 'linux'",
-]
-dependencies = [
- { name = "filelock" },
- { name = "fsspec" },
- { name = "jinja2" },
- { name = "networkx", version = "3.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "networkx", version = "3.6.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "setuptools" },
- { name = "sympy" },
- { name = "typing-extensions" },
-]
-wheels = [
- { url = "https://files.pythonhosted.org/packages/db/ed/ff0c4f8cef63977a646dc80e40c05cae873f4097b12dc87e1cd7e1cecf42/torch-2.12.1-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:ec56e82be6a8b0c036771a77f7d32ad3c299770571af9815b3dafe61434389d5", size = 87967927, upload-time = "2026-06-17T21:08:43.16Z" },
- { url = "https://files.pythonhosted.org/packages/e3/51/4010c8fa6f9d1f42c054a321970ca95ec58e4e4494f5b53a34c3f3c9e310/torch-2.12.1-cp310-cp310-win_amd64.whl", hash = "sha256:2af3d9cc866e0a15ae7635ff0a9c61d6624a353ad657f5bcd8d86c26cdc64693", size = 122949863, upload-time = "2026-06-17T21:08:39.016Z" },
- { url = "https://files.pythonhosted.org/packages/59/38/7028d3be540f1dcdf41660a2b01d0c51d2cb73915fe370d84e4d277a6d47/torch-2.12.1-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:ef81f503912effea2ce3d9b12a2e3a6ed488943e91271c90c7a829f60baf6aa2", size = 87975425, upload-time = "2026-06-17T21:08:34.094Z" },
- { url = "https://files.pythonhosted.org/packages/46/61/c63f0158446f3a98ea672b004d761b848911eba567ea4a624c7db5aadc04/torch-2.12.1-cp311-cp311-win_amd64.whl", hash = "sha256:a513506cfda3c1c78dabeb6574c1597538c0254b3d39af174dde35d8177f4ce3", size = 122953086, upload-time = "2026-06-17T21:08:27.69Z" },
- { url = "https://files.pythonhosted.org/packages/f0/54/efb7ebca77970012b0cc21687a55d70eb2ba514b2c2b8e18d9fb1222f3be/torch-2.12.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:d2dd0f2c5f7ccbddaf34cade0deaf476808368f902b9cdb7f36a2ab42301bc0e", size = 87991951, upload-time = "2026-06-17T21:07:49.309Z" },
- { url = "https://files.pythonhosted.org/packages/9e/49/c549461daa008159d006a76a991fbc2f26fa8bac27a4030c858463dcb20f/torch-2.12.1-cp312-cp312-win_amd64.whl", hash = "sha256:e86550597877fb272ddc52db2f85b82cb601ea7bd932576a0340152cae2200b3", size = 122988095, upload-time = "2026-06-17T21:07:44.9Z" },
- { url = "https://files.pythonhosted.org/packages/ff/4a/0300261818e1560d72cc160ac826005507e8b7ca0a35788b591436d05b4a/torch-2.12.1-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:c75e93173c700bccd6bfcc4a9d19ce242ab6dacd1f1781483027a16239b9e650", size = 87992358, upload-time = "2026-06-17T21:07:40.299Z" },
- { url = "https://files.pythonhosted.org/packages/d1/fa/824ddb662af55b2eabc0dbb7b57c7c0b1bcd93693754a2b8509ec4d16490/torch-2.12.1-cp313-cp313-win_amd64.whl", hash = "sha256:f92609e3b3ce72f25e2eb780d043ced2480c1a86c47c852604fc7a9108648386", size = 122987777, upload-time = "2026-06-17T21:07:09.49Z" },
- { url = "https://files.pythonhosted.org/packages/63/b7/1b49fe7086ea36839cc80abc43174c43d0ab6f676c0891c871c162f44fe3/torch-2.12.1-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:e9b6f7d2dd66ea87a3ae620069d31335d594c06effb1a383bdd21cfe61e44ece", size = 88010025, upload-time = "2026-06-17T21:07:03.934Z" },
- { url = "https://files.pythonhosted.org/packages/21/7c/f3a601fc1b1f663ff269bfe553654e638651939aa6563e8daa7167c33098/torch-2.12.1-cp314-cp314-win_amd64.whl", hash = "sha256:f6dc4caf7eb4adb38a2d9f536b51db56310fdd1254e69a2d96767e1367c892b3", size = 122987254, upload-time = "2026-06-17T21:06:33.199Z" },
- { url = "https://files.pythonhosted.org/packages/e6/8c/b8087556cf81ddd808dbeb34afb8396d7ae7a1694ab489f08b1a0004e7d0/torch-2.12.1-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:2afbb2bdaa8a95040e733f05492ddf133c3967c9b7ce0abd218d704b6cab437d", size = 88303173, upload-time = "2026-06-17T21:05:06.603Z" },
- { url = "https://files.pythonhosted.org/packages/70/db/e384c12aba30320ca92aaaf557456cbcb26f04b4df307728bb8f019f5000/torch-2.12.1-cp314-cp314t-win_amd64.whl", hash = "sha256:dd15595f8fc764cffde8c6361a3beb6ef69a028c851b1b3e70e077f615980d4e", size = 123231142, upload-time = "2026-06-17T21:05:27.061Z" },
-]
-
-[[package]]
-name = "torchaudio"
-version = "2.9.1"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version >= '3.13' and sys_platform == 'linux'",
- "python_full_version == '3.12.*' and sys_platform == 'linux'",
- "python_full_version == '3.11.*' and sys_platform == 'linux'",
- "python_full_version < '3.11' and sys_platform == 'linux'",
-]
-dependencies = [
- { name = "torch", version = "2.9.1", source = { registry = "https://pypi.org/simple" } },
-]
-wheels = [
- { url = "https://files.pythonhosted.org/packages/6d/1b/680ca01211a39746aedf54e475783f846fbd7961dfeb17bce7d123f931f0/torchaudio-2.9.1-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:31ec46b718b7caa0182221bfb42e2ad223947b752a996dcdc0388c34a678c966", size = 472829, upload-time = "2025-11-12T15:25:46.519Z" },
- { url = "https://files.pythonhosted.org/packages/c1/ee/d71e6d78d203d72f99c426fbbf2bcd801cf084d8f1891bb1f42c95bc5ec5/torchaudio-2.9.1-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:ee11695b367f64638b4a0340cc9abb9be2173c6537bfe4ab286c6fbff68a1444", size = 2055454, upload-time = "2025-11-12T15:25:50.519Z" },
- { url = "https://files.pythonhosted.org/packages/a6/52/66830da8b638368bc0aef064f3307c88d28b526ff8e60a1fda681466b1b3/torchaudio-2.9.1-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:d192cf3b1b677f6666dad60caf0ce7bab66965751570c694645dd905a6c61724", size = 474291, upload-time = "2025-11-12T15:25:45.21Z" },
- { url = "https://files.pythonhosted.org/packages/cb/6f/d8f1f36c9f63ddef78f00f8f8ddb9638128ceb5f6824c28bead5af48fc63/torchaudio-2.9.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:8327e21f51dced2b6de3ac6a63f04bae9be9bc213e151f85c76164568c7ebc3d", size = 2058677, upload-time = "2025-11-12T15:25:53.09Z" },
- { url = "https://files.pythonhosted.org/packages/ef/2d/32e8bec360459107f9b451cc1a5b6fdd5f1d3e653e65a111502084f21e3a/torchaudio-2.9.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:742f9d24db5f1f46d8c7e29c599fe55b866d92c4a8181fcb95eab12da225ceb0", size = 474604, upload-time = "2025-11-12T15:25:49.122Z" },
- { url = "https://files.pythonhosted.org/packages/fe/0d/b5af1d55ede1ca07769a2cf71256073d8958e2a5521fc734fc19f5343283/torchaudio-2.9.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:4533fdafba73d7bcfcb5f1225b2cc8974a290ed0fe54c44638d6f440e91b8999", size = 2059899, upload-time = "2025-11-12T15:26:19.363Z" },
- { url = "https://files.pythonhosted.org/packages/76/e2/fe55b3882157fd57aa131f5bcad90f0329be90827e1c0e0c482662ddef38/torchaudio-2.9.1-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:ba2799ceec5e4373a0aa26df30d608f1eaaefd8ac4a7ae0c3446f63106f5b5a5", size = 474349, upload-time = "2025-11-12T15:26:02.78Z" },
- { url = "https://files.pythonhosted.org/packages/74/d3/0b090c03cac5a20691507e0945589a696fb10402ccd2457eea47dbf8a71b/torchaudio-2.9.1-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:bc3c8e9a240bfad8bc61f769324a4f3ce5d60eec161369d457c595c35dbb10c7", size = 2060343, upload-time = "2025-11-12T15:26:03.88Z" },
- { url = "https://files.pythonhosted.org/packages/ce/45/dd9ad6af9bb595095cd98028d270f933760968b92a3497282e31289ef3b4/torchaudio-2.9.1-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:eeae7ca60b64c4bfb78fbd104a089d072b151423d5d2f90da1da00787f03b800", size = 476577, upload-time = "2025-11-12T15:26:09.54Z" },
- { url = "https://files.pythonhosted.org/packages/79/97/c49aeb01d8a9ced2b8215a38b69b8eafd1afe295a487a73b7030c6ff3396/torchaudio-2.9.1-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:5f445e896215e6f7bba497dc68aab1e6cb077ae0ab3a90095067f16df6a9bb98", size = 2062158, upload-time = "2025-11-12T15:26:10.487Z" },
- { url = "https://files.pythonhosted.org/packages/05/1c/e05a32ee6868dc05463242db672f23dba5d042423fefcf294db4dac343a8/torchaudio-2.9.1-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:9c0d004f784c49078017f8217fdc901df0eb9724e50fb269b3a6c99b1d4eae75", size = 474566, upload-time = "2025-11-12T15:26:08.628Z" },
- { url = "https://files.pythonhosted.org/packages/15/52/8cec1fe90f05b888f9060467e1eb8c27f9295b8729a83d443e3bd7c471d3/torchaudio-2.9.1-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:d2743b28ff5538d5fdf2ff6657d392852ccdfe640ede46f566b2907ca32d8dca", size = 2060358, upload-time = "2025-11-12T15:26:12.885Z" },
- { url = "https://files.pythonhosted.org/packages/57/99/5fcd46a80086030899badeb5a934fab337c88325b3f68c60faa0b672d4d2/torchaudio-2.9.1-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:35c96ed1011b50eaf17948da173b09450cdc5bb7f908687571adb4a4c072c05e", size = 476577, upload-time = "2025-11-12T15:26:17.355Z" },
- { url = "https://files.pythonhosted.org/packages/a4/4c/bc428f71d5ef728fba2ecb151a3a6d187e6f0b9446b76e4f87e46d2206a3/torchaudio-2.9.1-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:c220c4acf9914cce2dc81c3624d7c84008ef436dc31bcbb89e8f4416d3615a34", size = 2062170, upload-time = "2025-11-12T15:26:20.837Z" },
-]
-
-[[package]]
-name = "torchaudio"
-version = "2.11.0"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version >= '3.13' and sys_platform != 'linux'",
- "python_full_version == '3.12.*' and sys_platform != 'linux'",
- "python_full_version == '3.11.*' and sys_platform != 'linux'",
- "python_full_version < '3.11' and sys_platform != 'linux'",
-]
-wheels = [
- { url = "https://files.pythonhosted.org/packages/8c/d9/357eb5fe4e19a861e6fa1af4d9f535e8fa8692336e6cf436e8a21262e054/torchaudio-2.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6ebb59c694909eccb5d61b7cc199d297692012c43286e36d92983aa7bad7586d", size = 684145, upload-time = "2026-03-23T18:13:46.671Z" },
- { url = "https://files.pythonhosted.org/packages/cf/f4/8ce2417eac66296e45b7aaa69858403fb6a52b1323f8635ec37b4b0f1fa3/torchaudio-2.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:7e2da1df4f6fe885c46db350a0dc90a0dff4b54541dff8846faa904d255e2bfe", size = 328661, upload-time = "2026-03-23T18:13:45.77Z" },
- { url = "https://files.pythonhosted.org/packages/94/77/0eec7f175d88f312296bd5b11c23bd58da37c1021f53da3db4df449ce3ee/torchaudio-2.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:492dd64645e9d0bb843e94f1d9a4d1e31426262ffc594fafecc1697df9df5eb9", size = 684142, upload-time = "2026-03-23T18:13:36.805Z" },
- { url = "https://files.pythonhosted.org/packages/c9/75/b6d03fc75b409bdaec597274d1bdd4213db716ed16f6801386b31d59c551/torchaudio-2.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:bb59ba4452bbbe95d75ad3ef18df9824955625f36698ce9a5998a4a9f3c1ba1d", size = 328658, upload-time = "2026-03-23T18:13:44.545Z" },
- { url = "https://files.pythonhosted.org/packages/f1/b1/77658817acacd01a72b714440c62f419efc4d90170e704e8e7a2c0918988/torchaudio-2.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a1cf1acc883bee9cb906a933572fed6a8a933f86ef34e9ea7d803f72317e8c1b", size = 684226, upload-time = "2026-03-23T18:13:40.023Z" },
- { url = "https://files.pythonhosted.org/packages/23/a8/941277ecc39f7a0a169d554302a1f1afd87c1d94a8aec828891916cea59a/torchaudio-2.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:478110f981e5d40a8d82221732c57a56c85a1d5895fb8fe646e86ee15eded3bd", size = 328663, upload-time = "2026-03-23T18:13:19.218Z" },
- { url = "https://files.pythonhosted.org/packages/fb/9e/f76fcd9877c8c78f258ee34e0fb8291fdb91e6218d582d9ca66b1e4bd4ae/torchaudio-2.11.0-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:e3f9696a9ef1d49acc452159b052370c636406d072e9d8f10895fda87b591ea9", size = 679904, upload-time = "2026-03-23T18:13:28.329Z" },
- { url = "https://files.pythonhosted.org/packages/e2/8b/2bbb3dca6ff28cba0de250874d5ef4fc2822c47a934b59b3974cff3219ef/torchaudio-2.11.0-cp313-cp313-win_amd64.whl", hash = "sha256:986f4df5ed17b003dc52489468601720090e65f964f8bebccf90eb45bba75744", size = 328662, upload-time = "2026-03-23T18:13:18.308Z" },
- { url = "https://files.pythonhosted.org/packages/fe/ce/52c652d30af7d6e96c8f1735d26131e94708e3f38d852b8fa97958804dd8/torchaudio-2.11.0-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:bda09ea630ae7207384fb0f28c35e4f8c0d82dd6eba020b6b335ad0caa9fed49", size = 680814, upload-time = "2026-03-23T18:13:17.08Z" },
- { url = "https://files.pythonhosted.org/packages/3e/98/5d4790e2d6548768999acd34999d5aeefce8bcc23a07afaa5f03e723f557/torchaudio-2.11.0-cp313-cp313t-win_amd64.whl", hash = "sha256:ed404c4399ad7f172c86a47c1b25293d322d1d58e26b10b0456a86cf67d37d84", size = 328661, upload-time = "2026-03-23T18:13:34.359Z" },
- { url = "https://files.pythonhosted.org/packages/39/fe/ffa618b4f0d9732d7df7a2fa2bd48657d896599bc224e5af3c70d46c546b/torchaudio-2.11.0-cp314-cp314-macosx_12_0_arm64.whl", hash = "sha256:cc09cd1f6015b8549e7fe255fb1be5346b57e7fee06541d3f3dbb012d8c4715f", size = 679901, upload-time = "2026-03-23T18:13:25.472Z" },
- { url = "https://files.pythonhosted.org/packages/83/6f/b0efb44e0bfe8dd4d78d76ae3be280354e1fb5c8631c782785d74cd8a7b1/torchaudio-2.11.0-cp314-cp314-win_amd64.whl", hash = "sha256:1424638adb8bb40087bc7b6eb103e8e4fe398210f09076f33b7b5e61501b5d66", size = 328662, upload-time = "2026-03-23T18:13:32.243Z" },
- { url = "https://files.pythonhosted.org/packages/60/84/1c792b0b700eac9a96772cfd9f96c097b17bca3234a2fde3c64b8063660d/torchaudio-2.11.0-cp314-cp314t-macosx_12_0_arm64.whl", hash = "sha256:da2725e250866da42a12934c9a6552f65a18b7187fd7a6221387f0e605fb3b96", size = 679926, upload-time = "2026-03-23T18:13:24.452Z" },
- { url = "https://files.pythonhosted.org/packages/93/f7/ee5da8c03f1a3c7662c6c6a119f24a4b3e646da94be56dce3201e3a6ee9b/torchaudio-2.11.0-cp314-cp314t-win_amd64.whl", hash = "sha256:88fb5e29f670a33d9bac6aabb1d2734460cf6e461bde5cdc352826035851b16d", size = 328661, upload-time = "2026-03-23T18:13:20.1Z" },
-]
-
-[[package]]
-name = "torchcodec"
-version = "0.9.1"
-source = { registry = "https://pypi.org/simple" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/4a/c3/ae904a2a8cb4b6288684f022a6d5061a74435bc2d6f1c4742c16d441a9ee/torchcodec-0.9.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:72738d7870edbcd6982207609efe314352e0bf90f4e3895a549e23a49ee0673c", size = 3397284, upload-time = "2025-12-10T15:55:45.498Z" },
- { url = "https://files.pythonhosted.org/packages/30/96/c693d75e32b4f07828c2b8a4b894be7366d0e46366ff10dad5825d891148/torchcodec-0.9.1-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:53dfecabc843e4d78b77453732129bd8572dd9d022ab81a94f5305cd5e920ded", size = 2043848, upload-time = "2025-12-10T15:55:25.772Z" },
- { url = "https://files.pythonhosted.org/packages/68/dd/cbda16eb33d380c3e7b3cb6dbcfa59aa21e676ddebe3627e834be3b1c124/torchcodec-0.9.1-cp310-cp310-win_amd64.whl", hash = "sha256:d5267e6112b0d0b948d653dc3ffa486bb9a01febc81606d3dfd75cf5a4dcc9f3", size = 2170387, upload-time = "2025-12-10T15:56:09.824Z" },
- { url = "https://files.pythonhosted.org/packages/c0/37/169238bb55017b08a93530d6f4474a112780df4c05c26c78df7dd58401f1/torchcodec-0.9.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7a81d29e67cebefaec08f9c817635d1ff47205814884e527ef4b135a6c795612", size = 3899002, upload-time = "2025-12-10T15:55:49.911Z" },
- { url = "https://files.pythonhosted.org/packages/75/74/11c59e0592e555df78cfee2fd4b8ba5c725e4bf160002af88ce09de99d9d/torchcodec-0.9.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:5e959c7abf95de62f78653d416f00f7ca32936fbfd23371b23d5c8dc199f3670", size = 2048262, upload-time = "2025-12-10T15:55:29.552Z" },
- { url = "https://files.pythonhosted.org/packages/53/66/0612c7852cb7854dec45db9357397b4dbd4d6274832cc8949a8d1c0e518a/torchcodec-0.9.1-cp311-cp311-win_amd64.whl", hash = "sha256:508e0ce6da1e4af186b131cdbdd3d998bc4313e9f3a3f5b78f64aa5f9685ed88", size = 2181959, upload-time = "2025-12-10T15:56:13.191Z" },
- { url = "https://files.pythonhosted.org/packages/4b/60/3bfa459e09987af08e188811b191437c9d8215a74f4d418be6ff7df87b5c/torchcodec-0.9.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8996ec62b72c69545c30246df64df386d06d7ec7de0689be5d20dfc06aad6442", size = 4064264, upload-time = "2025-12-10T15:55:56.313Z" },
- { url = "https://files.pythonhosted.org/packages/17/c8/bfb74babec98aff11ab4f239b0901f39e1a93338b3438e842d864dc46935/torchcodec-0.9.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:a50568ce73b70395d113833fb07394c223f5546ef5d4fafe0fdcd91627fca270", size = 2061978, upload-time = "2025-12-10T15:55:33.415Z" },
- { url = "https://files.pythonhosted.org/packages/b2/12/c0bbf01b0ed52b69aaeed4af1043dc8308ccc522a47fcc082b34882e2ba2/torchcodec-0.9.1-cp312-cp312-win_amd64.whl", hash = "sha256:d9c8efe5845bde45a428f96493b4a041511f47f5bd53b333a0ad90426be4623a", size = 2187178, upload-time = "2025-12-10T15:56:16.968Z" },
- { url = "https://files.pythonhosted.org/packages/6f/c7/67fc8417f9efa8a25c00a44f0d674761a0bad9c45e9725e3fd116b3c48ed/torchcodec-0.9.1-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:5c9cdcba50c75be70ef6ec919ec1f7f14d9d5163d93cf6bd94403e134f03734c", size = 4034415, upload-time = "2025-12-10T15:56:02.04Z" },
- { url = "https://files.pythonhosted.org/packages/68/05/06240f661e9aa08b20765305e3b88f60bff706bbe54ac35830af74612443/torchcodec-0.9.1-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:0643c5e9c3a51fdafdea87935d5b0a38e99626c664f47a150482d77ab370a877", size = 2067767, upload-time = "2025-12-10T15:55:37.27Z" },
- { url = "https://files.pythonhosted.org/packages/13/a2/d78cd65863fb805d9e35fe90ae7574eab86ff0ae63438208bd07d2cf1fd2/torchcodec-0.9.1-cp313-cp313-win_amd64.whl", hash = "sha256:df0b5a15998fd7457625c2af2a6276e0e710fac158d145045340dbbcd1cfdb65", size = 2186788, upload-time = "2025-12-10T15:56:20.204Z" },
- { url = "https://files.pythonhosted.org/packages/01/02/f8ae9443d3bcbe8a8d6d0bbc3992296e5476e5afa1f244100a3a7967a36c/torchcodec-0.9.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:b9bc5a5dff925df96d11bf90bd0ce964b8086bb11ae09adf353518192b5da483", size = 3812248, upload-time = "2025-12-10T15:56:06.382Z" },
- { url = "https://files.pythonhosted.org/packages/59/a1/8462b55571286847ea31edb7634583125400824267db9ba8301f4ce3f137/torchcodec-0.9.1-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:65634bb28b3155cf99f980dac31ecedb414c07b8156f8473ec9fb74bedbd2a1f", size = 2068456, upload-time = "2025-12-10T15:55:40.577Z" },
- { url = "https://files.pythonhosted.org/packages/f2/63/752d0fc1c6e8f799ae880ca1087510def663a7f9aa1a70074ae334c6908f/torchcodec-0.9.1-cp314-cp314-win_amd64.whl", hash = "sha256:2d01c8b3685a3a38f050ed2b526808a2938dba6f56cb9f9e967884fd858bba15", size = 2188320, upload-time = "2025-12-10T15:56:24.63Z" },
-]
-
-[[package]]
-name = "torchvision"
-version = "0.24.1"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version >= '3.13' and sys_platform == 'linux'",
- "python_full_version == '3.12.*' and sys_platform == 'linux'",
- "python_full_version == '3.11.*' and sys_platform == 'linux'",
- "python_full_version < '3.11' and sys_platform == 'linux'",
-]
-dependencies = [
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "pillow" },
- { name = "torch", version = "2.9.1", source = { registry = "https://pypi.org/simple" } },
-]
-wheels = [
- { url = "https://files.pythonhosted.org/packages/6b/49/a35df863e7c153aad82af7505abd8264a5b510306689712ef86bea862822/torchvision-0.24.1-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:54ed17c3d30e718e08d8da3fd5b30ea44b0311317e55647cb97077a29ecbc25b", size = 2386226, upload-time = "2025-11-12T15:25:05.449Z" },
- { url = "https://files.pythonhosted.org/packages/49/20/f2d7cd1eea052887c1083afff0b8df5228ec93b53e03759f20b1a3c6d22a/torchvision-0.24.1-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:f476da4e085b7307aaab6f540219617d46d5926aeda24be33e1359771c83778f", size = 8046093, upload-time = "2025-11-12T15:25:09.425Z" },
- { url = "https://files.pythonhosted.org/packages/0c/69/49aae86edb75fe16460b59a191fcc0f568c2378f780bb063850db0fe007a/torchvision-0.24.1-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:1e39619de698e2821d71976c92c8a9e50cdfd1e993507dfb340f2688bfdd8283", size = 2387757, upload-time = "2025-11-12T15:25:06.795Z" },
- { url = "https://files.pythonhosted.org/packages/11/c9/1dfc3db98797b326f1d0c3f3bb61c83b167a813fc7eab6fcd2edb8c7eb9d/torchvision-0.24.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:a0f106663e60332aa4fcb1ca2159ef8c3f2ed266b0e6df88de261048a840e0df", size = 8047682, upload-time = "2025-11-12T15:25:21.125Z" },
- { url = "https://files.pythonhosted.org/packages/9d/43/600e5cfb0643d10d633124f5982d7abc2170dfd7ce985584ff16edab3e76/torchvision-0.24.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:7fb7590c737ebe3e1c077ad60c0e5e2e56bb26e7bccc3b9d04dbfc34fd09f050", size = 2386737, upload-time = "2025-11-12T15:25:08.288Z" },
- { url = "https://files.pythonhosted.org/packages/93/b1/db2941526ecddd84884132e2742a55c9311296a6a38627f9e2627f5ac889/torchvision-0.24.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:66a98471fc18cad9064123106d810a75f57f0838eee20edc56233fd8484b0cc7", size = 8049868, upload-time = "2025-11-12T15:25:13.058Z" },
- { url = "https://files.pythonhosted.org/packages/30/65/ac0a3f9be6abdbe4e1d82c915d7e20de97e7fd0e9a277970508b015309f3/torchvision-0.24.1-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:db2125c46f9cb25dc740be831ce3ce99303cfe60439249a41b04fd9f373be671", size = 2338718, upload-time = "2025-11-12T15:25:26.19Z" },
- { url = "https://files.pythonhosted.org/packages/10/b5/5bba24ff9d325181508501ed7f0c3de8ed3dd2edca0784d48b144b6c5252/torchvision-0.24.1-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:f035f0cacd1f44a8ff6cb7ca3627d84c54d685055961d73a1a9fb9827a5414c8", size = 8049661, upload-time = "2025-11-12T15:25:22.558Z" },
- { url = "https://files.pythonhosted.org/packages/a9/fe/ff27d2ed1b524078164bea1062f23d2618a5fc3208e247d6153c18c91a76/torchvision-0.24.1-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:f231f6a4f2aa6522713326d0d2563538fa72d613741ae364f9913027fa52ea35", size = 2341708, upload-time = "2025-11-12T15:25:25.08Z" },
- { url = "https://files.pythonhosted.org/packages/b1/b9/d6c903495cbdfd2533b3ef6f7b5643ff589ea062f8feb5c206ee79b9d9e5/torchvision-0.24.1-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:1540a9e7f8cf55fe17554482f5a125a7e426347b71de07327d5de6bfd8d17caa", size = 8177239, upload-time = "2025-11-12T15:25:18.554Z" },
- { url = "https://files.pythonhosted.org/packages/5f/34/ecb786bffe0159a3b49941a61caaae089853132f3cd1e8f555e3621f7e6f/torchvision-0.24.1-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:1b495edd3a8f9911292424117544f0b4ab780452e998649425d1f4b2bed6695f", size = 2338844, upload-time = "2025-11-12T15:25:32.625Z" },
- { url = "https://files.pythonhosted.org/packages/51/99/a84623786a6969504c87f2dc3892200f586ee13503f519d282faab0bb4f0/torchvision-0.24.1-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:ab211e1807dc3e53acf8f6638df9a7444c80c0ad050466e8d652b3e83776987b", size = 8175144, upload-time = "2025-11-12T15:25:31.355Z" },
- { url = "https://files.pythonhosted.org/packages/d0/7f/372de60bf3dd8f5593bd0d03f4aecf0d1fd58f5bc6943618d9d913f5e6d5/torchvision-0.24.1-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:af9201184c2712d808bd4eb656899011afdfce1e83721c7cb08000034df353fe", size = 2341704, upload-time = "2025-11-12T15:25:29.857Z" },
- { url = "https://files.pythonhosted.org/packages/36/9b/0f3b9ff3d0225ee2324ec663de0e7fb3eb855615ca958ac1875f22f1f8e5/torchvision-0.24.1-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:9ef95d819fd6df81bc7cc97b8f21a15d2c0d3ac5dbfaab5cbc2d2ce57114b19e", size = 8177422, upload-time = "2025-11-12T15:25:37.357Z" },
-]
-
-[[package]]
-name = "torchvision"
-version = "0.27.1"
-source = { registry = "https://pypi.org/simple" }
-resolution-markers = [
- "python_full_version >= '3.13' and sys_platform != 'linux'",
- "python_full_version == '3.12.*' and sys_platform != 'linux'",
- "python_full_version == '3.11.*' and sys_platform != 'linux'",
- "python_full_version < '3.11' and sys_platform != 'linux'",
-]
-dependencies = [
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "pillow" },
- { name = "torch", version = "2.12.1", source = { registry = "https://pypi.org/simple" } },
-]
-wheels = [
- { url = "https://files.pythonhosted.org/packages/c9/10/8e3e5a70dded1f86368bc987d93fa0436e73a79060aead75a8783b040ebd/torchvision-0.27.1-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:68ba63b48af92f06db995adb23d8411993dba1dee705a4e92411b83a00930b7f", size = 1852109, upload-time = "2026-06-17T21:09:34.966Z" },
- { url = "https://files.pythonhosted.org/packages/7e/6b/09d2d6f04c3465a346202624a09cfcfb954f2b334d19de886a63056f86f9/torchvision-0.27.1-cp310-cp310-win_amd64.whl", hash = "sha256:d0b00ae58379e6c936ce4816b1b8b94cefb1bd1c2a88eccbadfc993de7a430ca", size = 3493503, upload-time = "2026-06-17T21:09:28.426Z" },
- { url = "https://files.pythonhosted.org/packages/64/46/bc0ebd93282aeedc1759f054a252c6fadf14b42a0535db3233c85cce4ae5/torchvision-0.27.1-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:ad8743a9c12c8c124ad0a1491e54c3ca0c749e91e374e3d92136060b22c9e0f4", size = 1852118, upload-time = "2026-06-17T21:09:32.448Z" },
- { url = "https://files.pythonhosted.org/packages/eb/7c/e254f8e242a921adc2cc62c11674fa8a16d33e0a1b6c6f5436cb91628ee7/torchvision-0.27.1-cp311-cp311-win_amd64.whl", hash = "sha256:f3b57a984283896f15c9698562418282f828332886c77315bf269936e6ba0280", size = 3807497, upload-time = "2026-06-17T21:09:31.234Z" },
- { url = "https://files.pythonhosted.org/packages/88/82/2e8fdc19e4f0bbe31d403a55d78318bcea4afcd3083e1e4700ef61ebb893/torchvision-0.27.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:448abfc3baba984da4577f737209e445da6be93e3b5f4799d90162bf61e3f485", size = 1852105, upload-time = "2026-06-17T21:09:33.695Z" },
- { url = "https://files.pythonhosted.org/packages/d0/95/27aca854da7e536a339f46bab1ef67823ac2ac97c59ab2b3203b373d46cf/torchvision-0.27.1-cp312-cp312-win_amd64.whl", hash = "sha256:0b6e3aa98b7433506bbce1d0d05cb13ec787fc6eb8c5fbd998b26ce05f047543", size = 4079076, upload-time = "2026-06-17T21:09:15.907Z" },
- { url = "https://files.pythonhosted.org/packages/32/bb/b21e0f598ca191bb2a9e9fda2fee37c06ad113313b43c6769dbefa0e921d/torchvision-0.27.1-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:d60311a6d08df905f9656a3a312f0a8f55f0d46321bc737bad30a8dec9644309", size = 1852110, upload-time = "2026-06-17T21:09:22.577Z" },
- { url = "https://files.pythonhosted.org/packages/b9/b3/4386976ff77eda55f0aed504a288564f3ff8d170b6db49ee22e172eddfac/torchvision-0.27.1-cp313-cp313-win_amd64.whl", hash = "sha256:18bc906235bfa901c135acd239f05b8c8ab90d502830cf1ef2cba3301e1f8a23", size = 4150710, upload-time = "2026-06-17T21:09:14.457Z" },
- { url = "https://files.pythonhosted.org/packages/ff/74/1d237c61f665bf46d02e15f67c9d40be42b1b634f87164b9cefd257450e7/torchvision-0.27.1-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:9f5ef59ad60e695796eca6b64e97cb9b21b9d5463cac5ac0ef86cfb72b6e5db9", size = 1852112, upload-time = "2026-06-17T21:09:21.445Z" },
- { url = "https://files.pythonhosted.org/packages/52/49/a23e199faf29e42a90f7d6b76437ade5d17e3185da3c64d368973ba8243e/torchvision-0.27.1-cp314-cp314-win_amd64.whl", hash = "sha256:b3e9bc71854fddbf94ddb69ed8d88983945f3f28f78ee104214b0088669af66a", size = 4177297, upload-time = "2026-06-17T21:09:10.273Z" },
- { url = "https://files.pythonhosted.org/packages/ba/48/b3240eaf0fe3676dcf677ce8930ef477fe77d7f69ebe58ca8d0941384952/torchvision-0.27.1-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:c2fd9902f23b56b6ac667213171672fb6c89287ff011918b04af053852a2c4eb", size = 1852118, upload-time = "2026-06-17T21:09:20.223Z" },
- { url = "https://files.pythonhosted.org/packages/90/aa/d6179812ec52b70a7a8f5e99fe7937895d28c535106df1ca0d03f5f51425/torchvision-0.27.1-cp314-cp314t-win_amd64.whl", hash = "sha256:12deaee20d0d9dec6302025d3f93354266befeb692f5c50bca0137b395598b9e", size = 4284412, upload-time = "2026-06-17T21:09:08.989Z" },
-]
-
-[[package]]
-name = "tqdm"
-version = "4.67.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "colorama", marker = "sys_platform == 'win32'" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz", hash = "sha256:f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2", size = 169737, upload-time = "2024-11-24T20:12:22.481Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/d0/30/dc54f88dd4a2b5dc8a0279bdd7270e735851848b762aeb1c1184ed1f6b14/tqdm-4.67.1-py3-none-any.whl", hash = "sha256:26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2", size = 78540, upload-time = "2024-11-24T20:12:19.698Z" },
-]
-
-[[package]]
-name = "transformers"
-version = "4.57.6"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "filelock" },
- { name = "huggingface-hub" },
- { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
- { name = "numpy", version = "2.4.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
- { name = "packaging" },
- { name = "pyyaml" },
- { name = "regex" },
- { name = "requests" },
- { name = "safetensors" },
- { name = "tokenizers" },
- { name = "tqdm" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/c4/35/67252acc1b929dc88b6602e8c4a982e64f31e733b804c14bc24b47da35e6/transformers-4.57.6.tar.gz", hash = "sha256:55e44126ece9dc0a291521b7e5492b572e6ef2766338a610b9ab5afbb70689d3", size = 10134912, upload-time = "2026-01-16T10:38:39.284Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/03/b8/e484ef633af3887baeeb4b6ad12743363af7cce68ae51e938e00aaa0529d/transformers-4.57.6-py3-none-any.whl", hash = "sha256:4c9e9de11333ddfe5114bc872c9f370509198acf0b87a832a0ab9458e2bd0550", size = 11993498, upload-time = "2026-01-16T10:38:31.289Z" },
-]
-
-[[package]]
-name = "triton"
-version = "3.5.1"
-source = { registry = "https://pypi.org/simple" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/fd/6e/676ab5019b4dde8b9b7bab71245102fc02778ef3df48218b298686b9ffd6/triton-3.5.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5fc53d849f879911ea13f4a877243afc513187bc7ee92d1f2c0f1ba3169e3c94", size = 170320692, upload-time = "2025-11-11T17:40:46.074Z" },
- { url = "https://files.pythonhosted.org/packages/b0/72/ec90c3519eaf168f22cb1757ad412f3a2add4782ad3a92861c9ad135d886/triton-3.5.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:61413522a48add32302353fdbaaf92daaaab06f6b5e3229940d21b5207f47579", size = 170425802, upload-time = "2025-11-11T17:40:53.209Z" },
- { url = "https://files.pythonhosted.org/packages/f2/50/9a8358d3ef58162c0a415d173cfb45b67de60176e1024f71fbc4d24c0b6d/triton-3.5.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d2c6b915a03888ab931a9fd3e55ba36785e1fe70cbea0b40c6ef93b20fc85232", size = 170470207, upload-time = "2025-11-11T17:41:00.253Z" },
- { url = "https://files.pythonhosted.org/packages/27/46/8c3bbb5b0a19313f50edcaa363b599e5a1a5ac9683ead82b9b80fe497c8d/triton-3.5.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f3f4346b6ebbd4fad18773f5ba839114f4826037c9f2f34e0148894cd5dd3dba", size = 170470410, upload-time = "2025-11-11T17:41:06.319Z" },
- { url = "https://files.pythonhosted.org/packages/37/92/e97fcc6b2c27cdb87ce5ee063d77f8f26f19f06916aa680464c8104ef0f6/triton-3.5.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0b4d2c70127fca6a23e247f9348b8adde979d2e7a20391bfbabaac6aebc7e6a8", size = 170579924, upload-time = "2025-11-11T17:41:12.455Z" },
- { url = "https://files.pythonhosted.org/packages/a4/e6/c595c35e5c50c4bc56a7bac96493dad321e9e29b953b526bbbe20f9911d0/triton-3.5.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d0637b1efb1db599a8e9dc960d53ab6e4637db7d4ab6630a0974705d77b14b60", size = 170480488, upload-time = "2025-11-11T17:41:18.222Z" },
- { url = "https://files.pythonhosted.org/packages/16/b5/b0d3d8b901b6a04ca38df5e24c27e53afb15b93624d7fd7d658c7cd9352a/triton-3.5.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bac7f7d959ad0f48c0e97d6643a1cc0fd5786fe61cb1f83b537c6b2d54776478", size = 170582192, upload-time = "2025-11-11T17:41:23.963Z" },
-]
-
-[[package]]
-name = "typer"
-version = "0.21.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "click" },
- { name = "rich" },
- { name = "shellingham" },
- { name = "typing-extensions" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/36/bf/8825b5929afd84d0dabd606c67cd57b8388cb3ec385f7ef19c5cc2202069/typer-0.21.1.tar.gz", hash = "sha256:ea835607cd752343b6b2b7ce676893e5a0324082268b48f27aa058bdb7d2145d", size = 110371, upload-time = "2026-01-06T11:21:10.989Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/a0/1d/d9257dd49ff2ca23ea5f132edf1281a0c4f9de8a762b9ae399b670a59235/typer-0.21.1-py3-none-any.whl", hash = "sha256:7985e89081c636b88d172c2ee0cfe33c253160994d47bdfdc302defd7d1f1d01", size = 47381, upload-time = "2026-01-06T11:21:09.824Z" },
-]
-
-[[package]]
-name = "typing-extensions"
-version = "4.15.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" },
-]
-
-[[package]]
-name = "typing-inspection"
-version = "0.4.2"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "typing-extensions" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464", size = 75949, upload-time = "2025-10-01T02:14:41.687Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" },
-]
-
-[[package]]
-name = "tzdata"
-version = "2025.3"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/5e/a7/c202b344c5ca7daf398f3b8a477eeb205cf3b6f32e7ec3a6bac0629ca975/tzdata-2025.3.tar.gz", hash = "sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7", size = 196772, upload-time = "2025-12-13T17:45:35.667Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/c7/b0/003792df09decd6849a5e39c28b513c06e84436a54440380862b5aeff25d/tzdata-2025.3-py2.py3-none-any.whl", hash = "sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1", size = 348521, upload-time = "2025-12-13T17:45:33.889Z" },
-]
-
-[[package]]
-name = "urllib3"
-version = "2.6.3"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/c7/24/5f1b3bdffd70275f6661c76461e25f024d5a38a46f04aaca912426a2b1d3/urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed", size = 435556, upload-time = "2026-01-07T16:24:43.925Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/39/08/aaaad47bc4e9dc8c725e68f9d04865dbcb2052843ff09c97b08904852d84/urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4", size = 131584, upload-time = "2026-01-07T16:24:42.685Z" },
-]
-
-[[package]]
-name = "virtualenv"
-version = "20.36.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "distlib" },
- { name = "filelock" },
- { name = "platformdirs" },
- { name = "typing-extensions", marker = "python_full_version < '3.11'" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/aa/a3/4d310fa5f00863544e1d0f4de93bddec248499ccf97d4791bc3122c9d4f3/virtualenv-20.36.1.tar.gz", hash = "sha256:8befb5c81842c641f8ee658481e42641c68b5eab3521d8e092d18320902466ba", size = 6032239, upload-time = "2026-01-09T18:21:01.296Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/6a/2a/dc2228b2888f51192c7dc766106cd475f1b768c10caaf9727659726f7391/virtualenv-20.36.1-py3-none-any.whl", hash = "sha256:575a8d6b124ef88f6f51d56d656132389f961062a9177016a50e4f507bbcc19f", size = 6008258, upload-time = "2026-01-09T18:20:59.425Z" },
-]
-
-[[package]]
-name = "wandb"
-version = "0.27.0"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "click" },
- { name = "gitpython" },
- { name = "packaging" },
- { name = "platformdirs" },
- { name = "protobuf" },
- { name = "pydantic" },
- { name = "pyyaml" },
- { name = "requests" },
- { name = "sentry-sdk" },
- { name = "typing-extensions" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/8e/31/fe53d06b75ef0a7f2f0ee5931a89f7aedc27d233840b1839616860fed256/wandb-0.27.0.tar.gz", hash = "sha256:579e75300173059f9334e1f513a79ef15f6d9ea5c74e20d695633648cdd02031", size = 41090732, upload-time = "2026-05-14T03:44:08.894Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/ea/5e/2c199e70e636ecfd217cde0bc7469f4511e1d03d0685eb92bfdfce391430/wandb-0.27.0-py3-none-macosx_12_0_arm64.whl", hash = "sha256:c156be4851485f3c4160cb6eb2e8991b4cdeffbccefc5636d33cf5e254847365", size = 24886476, upload-time = "2026-05-14T03:43:27.569Z" },
- { url = "https://files.pythonhosted.org/packages/0b/cd/a617c871cd304a9804e56a7ec2ec2c65685bf0091a2b9f91910175a149e2/wandb-0.27.0-py3-none-macosx_12_0_x86_64.whl", hash = "sha256:20179f38afb0158859a4141d29ac650d3fdbd0cf801a74ce25565c934f03776c", size = 26045779, upload-time = "2026-05-14T03:43:31.999Z" },
- { url = "https://files.pythonhosted.org/packages/10/0a/d3f159a201530b84b72ca5f98c68d1f351c2d9a1864558ed76c811407fae/wandb-0.27.0-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:626497d7975fa898d0a4a239da7a510483495ca3514510dbe75004a25963af4d", size = 25480764, upload-time = "2026-05-14T03:43:35.922Z" },
- { url = "https://files.pythonhosted.org/packages/5f/6a/8721fcdf71d42639191040a77a585d2982402b1754700cb2ecfc2ca1470a/wandb-0.27.0-py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:f772da7005cc26a2a32b729a16982a583dc68b3d493df6a09d0aa5c5ca5a2060", size = 27256204, upload-time = "2026-05-14T03:43:39.765Z" },
- { url = "https://files.pythonhosted.org/packages/00/5e/279d167ba79fb7a8a43401c9f25efd0f6663ee9bd1eaf5a8578530198888/wandb-0.27.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:63acfc5b994e4a90e4a2fbdee6d45e664da3dd865bb1419942c8995c06c41cf1", size = 25647469, upload-time = "2026-05-14T03:43:44.817Z" },
- { url = "https://files.pythonhosted.org/packages/94/51/a69ac59300e3c813939d0764348959ed2a21e14c668cb1cebcb04010da6a/wandb-0.27.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:17aae6e4a88cd05c00ea8f546220918e3ebb6f8c1c36b70ef04a5ac75f0d7160", size = 27599005, upload-time = "2026-05-14T03:43:50.926Z" },
- { url = "https://files.pythonhosted.org/packages/5f/40/bf510c8758727df020f83b717ebc1fcc1739ed7f6ae1796ebef60bf6f592/wandb-0.27.0-py3-none-win32.whl", hash = "sha256:0bd5659417e386bf6538b5e2ffe6885774c6197f0e4853bfed517d5b0db457f1", size = 25036164, upload-time = "2026-05-14T03:43:54.839Z" },
- { url = "https://files.pythonhosted.org/packages/54/ff/69f88e7d90c22b79bcb911143c13e59742ee192080b21015ff83a5a1f60a/wandb-0.27.0-py3-none-win_amd64.whl", hash = "sha256:89d584b73166eecee96fb446f18d0e45b1aa45aba6a3696296f3f06d7454516b", size = 25036170, upload-time = "2026-05-14T03:43:59.227Z" },
- { url = "https://files.pythonhosted.org/packages/f6/38/f7efd7a87297a55c7e9a331a1dbb5b19e54aeacc11fe6f43f8636a73987c/wandb-0.27.0-py3-none-win_arm64.whl", hash = "sha256:a6c129c311edf210a2b4f2f4acc557eff522628125f5f28ed27df19c16c07079", size = 22972710, upload-time = "2026-05-14T03:44:03.275Z" },
-]
-
-[[package]]
-name = "websockets"
-version = "16.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/04/24/4b2031d72e840ce4c1ccb255f693b15c334757fc50023e4db9537080b8c4/websockets-16.0.tar.gz", hash = "sha256:5f6261a5e56e8d5c42a4497b364ea24d94d9563e8fbd44e78ac40879c60179b5", size = 179346, upload-time = "2026-01-10T09:23:47.181Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/20/74/221f58decd852f4b59cc3354cccaf87e8ef695fede361d03dc9a7396573b/websockets-16.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:04cdd5d2d1dacbad0a7bf36ccbcd3ccd5a30ee188f2560b7a62a30d14107b31a", size = 177343, upload-time = "2026-01-10T09:22:21.28Z" },
- { url = "https://files.pythonhosted.org/packages/19/0f/22ef6107ee52ab7f0b710d55d36f5a5d3ef19e8a205541a6d7ffa7994e5a/websockets-16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8ff32bb86522a9e5e31439a58addbb0166f0204d64066fb955265c4e214160f0", size = 175021, upload-time = "2026-01-10T09:22:22.696Z" },
- { url = "https://files.pythonhosted.org/packages/10/40/904a4cb30d9b61c0e278899bf36342e9b0208eb3c470324a9ecbaac2a30f/websockets-16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:583b7c42688636f930688d712885cf1531326ee05effd982028212ccc13e5957", size = 175320, upload-time = "2026-01-10T09:22:23.94Z" },
- { url = "https://files.pythonhosted.org/packages/9d/2f/4b3ca7e106bc608744b1cdae041e005e446124bebb037b18799c2d356864/websockets-16.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7d837379b647c0c4c2355c2499723f82f1635fd2c26510e1f587d89bc2199e72", size = 183815, upload-time = "2026-01-10T09:22:25.469Z" },
- { url = "https://files.pythonhosted.org/packages/86/26/d40eaa2a46d4302becec8d15b0fc5e45bdde05191e7628405a19cf491ccd/websockets-16.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:df57afc692e517a85e65b72e165356ed1df12386ecb879ad5693be08fac65dde", size = 185054, upload-time = "2026-01-10T09:22:27.101Z" },
- { url = "https://files.pythonhosted.org/packages/b0/ba/6500a0efc94f7373ee8fefa8c271acdfd4dca8bd49a90d4be7ccabfc397e/websockets-16.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:2b9f1e0d69bc60a4a87349d50c09a037a2607918746f07de04df9e43252c77a3", size = 184565, upload-time = "2026-01-10T09:22:28.293Z" },
- { url = "https://files.pythonhosted.org/packages/04/b4/96bf2cee7c8d8102389374a2616200574f5f01128d1082f44102140344cc/websockets-16.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:335c23addf3d5e6a8633f9f8eda77efad001671e80b95c491dd0924587ece0b3", size = 183848, upload-time = "2026-01-10T09:22:30.394Z" },
- { url = "https://files.pythonhosted.org/packages/02/8e/81f40fb00fd125357814e8c3025738fc4ffc3da4b6b4a4472a82ba304b41/websockets-16.0-cp310-cp310-win32.whl", hash = "sha256:37b31c1623c6605e4c00d466c9d633f9b812ea430c11c8a278774a1fde1acfa9", size = 178249, upload-time = "2026-01-10T09:22:32.083Z" },
- { url = "https://files.pythonhosted.org/packages/b4/5f/7e40efe8df57db9b91c88a43690ac66f7b7aa73a11aa6a66b927e44f26fa/websockets-16.0-cp310-cp310-win_amd64.whl", hash = "sha256:8e1dab317b6e77424356e11e99a432b7cb2f3ec8c5ab4dabbcee6add48f72b35", size = 178685, upload-time = "2026-01-10T09:22:33.345Z" },
- { url = "https://files.pythonhosted.org/packages/f2/db/de907251b4ff46ae804ad0409809504153b3f30984daf82a1d84a9875830/websockets-16.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:31a52addea25187bde0797a97d6fc3d2f92b6f72a9370792d65a6e84615ac8a8", size = 177340, upload-time = "2026-01-10T09:22:34.539Z" },
- { url = "https://files.pythonhosted.org/packages/f3/fa/abe89019d8d8815c8781e90d697dec52523fb8ebe308bf11664e8de1877e/websockets-16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:417b28978cdccab24f46400586d128366313e8a96312e4b9362a4af504f3bbad", size = 175022, upload-time = "2026-01-10T09:22:36.332Z" },
- { url = "https://files.pythonhosted.org/packages/58/5d/88ea17ed1ded2079358b40d31d48abe90a73c9e5819dbcde1606e991e2ad/websockets-16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:af80d74d4edfa3cb9ed973a0a5ba2b2a549371f8a741e0800cb07becdd20f23d", size = 175319, upload-time = "2026-01-10T09:22:37.602Z" },
- { url = "https://files.pythonhosted.org/packages/d2/ae/0ee92b33087a33632f37a635e11e1d99d429d3d323329675a6022312aac2/websockets-16.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:08d7af67b64d29823fed316505a89b86705f2b7981c07848fb5e3ea3020c1abe", size = 184631, upload-time = "2026-01-10T09:22:38.789Z" },
- { url = "https://files.pythonhosted.org/packages/c8/c5/27178df583b6c5b31b29f526ba2da5e2f864ecc79c99dae630a85d68c304/websockets-16.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7be95cfb0a4dae143eaed2bcba8ac23f4892d8971311f1b06f3c6b78952ee70b", size = 185870, upload-time = "2026-01-10T09:22:39.893Z" },
- { url = "https://files.pythonhosted.org/packages/87/05/536652aa84ddc1c018dbb7e2c4cbcd0db884580bf8e95aece7593fde526f/websockets-16.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d6297ce39ce5c2e6feb13c1a996a2ded3b6832155fcfc920265c76f24c7cceb5", size = 185361, upload-time = "2026-01-10T09:22:41.016Z" },
- { url = "https://files.pythonhosted.org/packages/6d/e2/d5332c90da12b1e01f06fb1b85c50cfc489783076547415bf9f0a659ec19/websockets-16.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1c1b30e4f497b0b354057f3467f56244c603a79c0d1dafce1d16c283c25f6e64", size = 184615, upload-time = "2026-01-10T09:22:42.442Z" },
- { url = "https://files.pythonhosted.org/packages/77/fb/d3f9576691cae9253b51555f841bc6600bf0a983a461c79500ace5a5b364/websockets-16.0-cp311-cp311-win32.whl", hash = "sha256:5f451484aeb5cafee1ccf789b1b66f535409d038c56966d6101740c1614b86c6", size = 178246, upload-time = "2026-01-10T09:22:43.654Z" },
- { url = "https://files.pythonhosted.org/packages/54/67/eaff76b3dbaf18dcddabc3b8c1dba50b483761cccff67793897945b37408/websockets-16.0-cp311-cp311-win_amd64.whl", hash = "sha256:8d7f0659570eefb578dacde98e24fb60af35350193e4f56e11190787bee77dac", size = 178684, upload-time = "2026-01-10T09:22:44.941Z" },
- { url = "https://files.pythonhosted.org/packages/84/7b/bac442e6b96c9d25092695578dda82403c77936104b5682307bd4deb1ad4/websockets-16.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:71c989cbf3254fbd5e84d3bff31e4da39c43f884e64f2551d14bb3c186230f00", size = 177365, upload-time = "2026-01-10T09:22:46.787Z" },
- { url = "https://files.pythonhosted.org/packages/b0/fe/136ccece61bd690d9c1f715baaeefd953bb2360134de73519d5df19d29ca/websockets-16.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:8b6e209ffee39ff1b6d0fa7bfef6de950c60dfb91b8fcead17da4ee539121a79", size = 175038, upload-time = "2026-01-10T09:22:47.999Z" },
- { url = "https://files.pythonhosted.org/packages/40/1e/9771421ac2286eaab95b8575b0cb701ae3663abf8b5e1f64f1fd90d0a673/websockets-16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:86890e837d61574c92a97496d590968b23c2ef0aeb8a9bc9421d174cd378ae39", size = 175328, upload-time = "2026-01-10T09:22:49.809Z" },
- { url = "https://files.pythonhosted.org/packages/18/29/71729b4671f21e1eaa5d6573031ab810ad2936c8175f03f97f3ff164c802/websockets-16.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9b5aca38b67492ef518a8ab76851862488a478602229112c4b0d58d63a7a4d5c", size = 184915, upload-time = "2026-01-10T09:22:51.071Z" },
- { url = "https://files.pythonhosted.org/packages/97/bb/21c36b7dbbafc85d2d480cd65df02a1dc93bf76d97147605a8e27ff9409d/websockets-16.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e0334872c0a37b606418ac52f6ab9cfd17317ac26365f7f65e203e2d0d0d359f", size = 186152, upload-time = "2026-01-10T09:22:52.224Z" },
- { url = "https://files.pythonhosted.org/packages/4a/34/9bf8df0c0cf88fa7bfe36678dc7b02970c9a7d5e065a3099292db87b1be2/websockets-16.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a0b31e0b424cc6b5a04b8838bbaec1688834b2383256688cf47eb97412531da1", size = 185583, upload-time = "2026-01-10T09:22:53.443Z" },
- { url = "https://files.pythonhosted.org/packages/47/88/4dd516068e1a3d6ab3c7c183288404cd424a9a02d585efbac226cb61ff2d/websockets-16.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:485c49116d0af10ac698623c513c1cc01c9446c058a4e61e3bf6c19dff7335a2", size = 184880, upload-time = "2026-01-10T09:22:55.033Z" },
- { url = "https://files.pythonhosted.org/packages/91/d6/7d4553ad4bf1c0421e1ebd4b18de5d9098383b5caa1d937b63df8d04b565/websockets-16.0-cp312-cp312-win32.whl", hash = "sha256:eaded469f5e5b7294e2bdca0ab06becb6756ea86894a47806456089298813c89", size = 178261, upload-time = "2026-01-10T09:22:56.251Z" },
- { url = "https://files.pythonhosted.org/packages/c3/f0/f3a17365441ed1c27f850a80b2bc680a0fa9505d733fe152fdf5e98c1c0b/websockets-16.0-cp312-cp312-win_amd64.whl", hash = "sha256:5569417dc80977fc8c2d43a86f78e0a5a22fee17565d78621b6bb264a115d4ea", size = 178693, upload-time = "2026-01-10T09:22:57.478Z" },
- { url = "https://files.pythonhosted.org/packages/cc/9c/baa8456050d1c1b08dd0ec7346026668cbc6f145ab4e314d707bb845bf0d/websockets-16.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:878b336ac47938b474c8f982ac2f7266a540adc3fa4ad74ae96fea9823a02cc9", size = 177364, upload-time = "2026-01-10T09:22:59.333Z" },
- { url = "https://files.pythonhosted.org/packages/7e/0c/8811fc53e9bcff68fe7de2bcbe75116a8d959ac699a3200f4847a8925210/websockets-16.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:52a0fec0e6c8d9a784c2c78276a48a2bdf099e4ccc2a4cad53b27718dbfd0230", size = 175039, upload-time = "2026-01-10T09:23:01.171Z" },
- { url = "https://files.pythonhosted.org/packages/aa/82/39a5f910cb99ec0b59e482971238c845af9220d3ab9fa76dd9162cda9d62/websockets-16.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e6578ed5b6981005df1860a56e3617f14a6c307e6a71b4fff8c48fdc50f3ed2c", size = 175323, upload-time = "2026-01-10T09:23:02.341Z" },
- { url = "https://files.pythonhosted.org/packages/bd/28/0a25ee5342eb5d5f297d992a77e56892ecb65e7854c7898fb7d35e9b33bd/websockets-16.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:95724e638f0f9c350bb1c2b0a7ad0e83d9cc0c9259f3ea94e40d7b02a2179ae5", size = 184975, upload-time = "2026-01-10T09:23:03.756Z" },
- { url = "https://files.pythonhosted.org/packages/f9/66/27ea52741752f5107c2e41fda05e8395a682a1e11c4e592a809a90c6a506/websockets-16.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c0204dc62a89dc9d50d682412c10b3542d748260d743500a85c13cd1ee4bde82", size = 186203, upload-time = "2026-01-10T09:23:05.01Z" },
- { url = "https://files.pythonhosted.org/packages/37/e5/8e32857371406a757816a2b471939d51c463509be73fa538216ea52b792a/websockets-16.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:52ac480f44d32970d66763115edea932f1c5b1312de36df06d6b219f6741eed8", size = 185653, upload-time = "2026-01-10T09:23:06.301Z" },
- { url = "https://files.pythonhosted.org/packages/9b/67/f926bac29882894669368dc73f4da900fcdf47955d0a0185d60103df5737/websockets-16.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6e5a82b677f8f6f59e8dfc34ec06ca6b5b48bc4fcda346acd093694cc2c24d8f", size = 184920, upload-time = "2026-01-10T09:23:07.492Z" },
- { url = "https://files.pythonhosted.org/packages/3c/a1/3d6ccdcd125b0a42a311bcd15a7f705d688f73b2a22d8cf1c0875d35d34a/websockets-16.0-cp313-cp313-win32.whl", hash = "sha256:abf050a199613f64c886ea10f38b47770a65154dc37181bfaff70c160f45315a", size = 178255, upload-time = "2026-01-10T09:23:09.245Z" },
- { url = "https://files.pythonhosted.org/packages/6b/ae/90366304d7c2ce80f9b826096a9e9048b4bb760e44d3b873bb272cba696b/websockets-16.0-cp313-cp313-win_amd64.whl", hash = "sha256:3425ac5cf448801335d6fdc7ae1eb22072055417a96cc6b31b3861f455fbc156", size = 178689, upload-time = "2026-01-10T09:23:10.483Z" },
- { url = "https://files.pythonhosted.org/packages/f3/1d/e88022630271f5bd349ed82417136281931e558d628dd52c4d8621b4a0b2/websockets-16.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:8cc451a50f2aee53042ac52d2d053d08bf89bcb31ae799cb4487587661c038a0", size = 177406, upload-time = "2026-01-10T09:23:12.178Z" },
- { url = "https://files.pythonhosted.org/packages/f2/78/e63be1bf0724eeb4616efb1ae1c9044f7c3953b7957799abb5915bffd38e/websockets-16.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:daa3b6ff70a9241cf6c7fc9e949d41232d9d7d26fd3522b1ad2b4d62487e9904", size = 175085, upload-time = "2026-01-10T09:23:13.511Z" },
- { url = "https://files.pythonhosted.org/packages/bb/f4/d3c9220d818ee955ae390cf319a7c7a467beceb24f05ee7aaaa2414345ba/websockets-16.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:fd3cb4adb94a2a6e2b7c0d8d05cb94e6f1c81a0cf9dc2694fb65c7e8d94c42e4", size = 175328, upload-time = "2026-01-10T09:23:14.727Z" },
- { url = "https://files.pythonhosted.org/packages/63/bc/d3e208028de777087e6fb2b122051a6ff7bbcca0d6df9d9c2bf1dd869ae9/websockets-16.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:781caf5e8eee67f663126490c2f96f40906594cb86b408a703630f95550a8c3e", size = 185044, upload-time = "2026-01-10T09:23:15.939Z" },
- { url = "https://files.pythonhosted.org/packages/ad/6e/9a0927ac24bd33a0a9af834d89e0abc7cfd8e13bed17a86407a66773cc0e/websockets-16.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:caab51a72c51973ca21fa8a18bd8165e1a0183f1ac7066a182ff27107b71e1a4", size = 186279, upload-time = "2026-01-10T09:23:17.148Z" },
- { url = "https://files.pythonhosted.org/packages/b9/ca/bf1c68440d7a868180e11be653c85959502efd3a709323230314fda6e0b3/websockets-16.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:19c4dc84098e523fd63711e563077d39e90ec6702aff4b5d9e344a60cb3c0cb1", size = 185711, upload-time = "2026-01-10T09:23:18.372Z" },
- { url = "https://files.pythonhosted.org/packages/c4/f8/fdc34643a989561f217bb477cbc47a3a07212cbda91c0e4389c43c296ebf/websockets-16.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:a5e18a238a2b2249c9a9235466b90e96ae4795672598a58772dd806edc7ac6d3", size = 184982, upload-time = "2026-01-10T09:23:19.652Z" },
- { url = "https://files.pythonhosted.org/packages/dd/d1/574fa27e233764dbac9c52730d63fcf2823b16f0856b3329fc6268d6ae4f/websockets-16.0-cp314-cp314-win32.whl", hash = "sha256:a069d734c4a043182729edd3e9f247c3b2a4035415a9172fd0f1b71658a320a8", size = 177915, upload-time = "2026-01-10T09:23:21.458Z" },
- { url = "https://files.pythonhosted.org/packages/8a/f1/ae6b937bf3126b5134ce1f482365fde31a357c784ac51852978768b5eff4/websockets-16.0-cp314-cp314-win_amd64.whl", hash = "sha256:c0ee0e63f23914732c6d7e0cce24915c48f3f1512ec1d079ed01fc629dab269d", size = 178381, upload-time = "2026-01-10T09:23:22.715Z" },
- { url = "https://files.pythonhosted.org/packages/06/9b/f791d1db48403e1f0a27577a6beb37afae94254a8c6f08be4a23e4930bc0/websockets-16.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:a35539cacc3febb22b8f4d4a99cc79b104226a756aa7400adc722e83b0d03244", size = 177737, upload-time = "2026-01-10T09:23:24.523Z" },
- { url = "https://files.pythonhosted.org/packages/bd/40/53ad02341fa33b3ce489023f635367a4ac98b73570102ad2cdd770dacc9a/websockets-16.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:b784ca5de850f4ce93ec85d3269d24d4c82f22b7212023c974c401d4980ebc5e", size = 175268, upload-time = "2026-01-10T09:23:25.781Z" },
- { url = "https://files.pythonhosted.org/packages/74/9b/6158d4e459b984f949dcbbb0c5d270154c7618e11c01029b9bbd1bb4c4f9/websockets-16.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:569d01a4e7fba956c5ae4fc988f0d4e187900f5497ce46339c996dbf24f17641", size = 175486, upload-time = "2026-01-10T09:23:27.033Z" },
- { url = "https://files.pythonhosted.org/packages/e5/2d/7583b30208b639c8090206f95073646c2c9ffd66f44df967981a64f849ad/websockets-16.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:50f23cdd8343b984957e4077839841146f67a3d31ab0d00e6b824e74c5b2f6e8", size = 185331, upload-time = "2026-01-10T09:23:28.259Z" },
- { url = "https://files.pythonhosted.org/packages/45/b0/cce3784eb519b7b5ad680d14b9673a31ab8dcb7aad8b64d81709d2430aa8/websockets-16.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:152284a83a00c59b759697b7f9e9cddf4e3c7861dd0d964b472b70f78f89e80e", size = 186501, upload-time = "2026-01-10T09:23:29.449Z" },
- { url = "https://files.pythonhosted.org/packages/19/60/b8ebe4c7e89fb5f6cdf080623c9d92789a53636950f7abacfc33fe2b3135/websockets-16.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:bc59589ab64b0022385f429b94697348a6a234e8ce22544e3681b2e9331b5944", size = 186062, upload-time = "2026-01-10T09:23:31.368Z" },
- { url = "https://files.pythonhosted.org/packages/88/a8/a080593f89b0138b6cba1b28f8df5673b5506f72879322288b031337c0b8/websockets-16.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:32da954ffa2814258030e5a57bc73a3635463238e797c7375dc8091327434206", size = 185356, upload-time = "2026-01-10T09:23:32.627Z" },
- { url = "https://files.pythonhosted.org/packages/c2/b6/b9afed2afadddaf5ebb2afa801abf4b0868f42f8539bfe4b071b5266c9fe/websockets-16.0-cp314-cp314t-win32.whl", hash = "sha256:5a4b4cc550cb665dd8a47f868c8d04c8230f857363ad3c9caf7a0c3bf8c61ca6", size = 178085, upload-time = "2026-01-10T09:23:33.816Z" },
- { url = "https://files.pythonhosted.org/packages/9f/3e/28135a24e384493fa804216b79a6a6759a38cc4ff59118787b9fb693df93/websockets-16.0-cp314-cp314t-win_amd64.whl", hash = "sha256:b14dc141ed6d2dde437cddb216004bcac6a1df0935d79656387bd41632ba0bbd", size = 178531, upload-time = "2026-01-10T09:23:35.016Z" },
- { url = "https://files.pythonhosted.org/packages/72/07/c98a68571dcf256e74f1f816b8cc5eae6eb2d3d5cfa44d37f801619d9166/websockets-16.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:349f83cd6c9a415428ee1005cadb5c2c56f4389bc06a9af16103c3bc3dcc8b7d", size = 174947, upload-time = "2026-01-10T09:23:36.166Z" },
- { url = "https://files.pythonhosted.org/packages/7e/52/93e166a81e0305b33fe416338be92ae863563fe7bce446b0f687b9df5aea/websockets-16.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:4a1aba3340a8dca8db6eb5a7986157f52eb9e436b74813764241981ca4888f03", size = 175260, upload-time = "2026-01-10T09:23:37.409Z" },
- { url = "https://files.pythonhosted.org/packages/56/0c/2dbf513bafd24889d33de2ff0368190a0e69f37bcfa19009ef819fe4d507/websockets-16.0-pp311-pypy311_pp73-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f4a32d1bd841d4bcbffdcb3d2ce50c09c3909fbead375ab28d0181af89fd04da", size = 176071, upload-time = "2026-01-10T09:23:39.158Z" },
- { url = "https://files.pythonhosted.org/packages/a5/8f/aea9c71cc92bf9b6cc0f7f70df8f0b420636b6c96ef4feee1e16f80f75dd/websockets-16.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0298d07ee155e2e9fda5be8a9042200dd2e3bb0b8a38482156576f863a9d457c", size = 176968, upload-time = "2026-01-10T09:23:41.031Z" },
- { url = "https://files.pythonhosted.org/packages/9a/3f/f70e03f40ffc9a30d817eef7da1be72ee4956ba8d7255c399a01b135902a/websockets-16.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:a653aea902e0324b52f1613332ddf50b00c06fdaf7e92624fbf8c77c78fa5767", size = 178735, upload-time = "2026-01-10T09:23:42.259Z" },
- { url = "https://files.pythonhosted.org/packages/6f/28/258ebab549c2bf3e64d2b0217b973467394a9cea8c42f70418ca2c5d0d2e/websockets-16.0-py3-none-any.whl", hash = "sha256:1637db62fad1dc833276dded54215f2c7fa46912301a24bd94d45d46a011ceec", size = 171598, upload-time = "2026-01-10T09:23:45.395Z" },
-]