ltx-video-2b-phi-lattice-v2
4-bit phi-lattice v2 pack of the diffusers LTXVideoTransformer3DModel in Lightricks/LTX-Video (transformer/, 28 blocks, hidden size 2048, 1,922,039,808 linear weights).
The upstream transformer shards are FP32 (7,693,541,888 tensor bytes, 7,337.13 MiB). This archive is 976.67 MiB on disk and 976.35 MiB resident in low_vram_4bit (3.76x versus the BF16 tensor image, 7.51x versus FP32).
All 287 / 287 nn.Linear layers are packed. K % 64 == 0 on every one of them, including proj_in (K=128) and the timestep MLP. Each of those layers keeps its BF16 bias inside the quantized_layers entry. Norms and scale_shift_table stay BF16 in protected_tensors.
| Checkpoint | Disk / resident | Linear weights (weights only, no biases) |
|---|---|---|
| Upstream FP32 shards | 7,337.13 MiB | 7,332.00 MiB |
| Same tensors in BF16 | 3,668.57 MiB | 3,666.00 MiB |
ltx_video_2b_transformer_phi_v2_packed_4bit.pt | 976.67 MiB / 976.35 MiB | 973.90 MiB (3.76x vs BF16) |
Against the original FP32 transformer weights: SQNR 19.15 dB, exact zeros 278,876,464 (14.51%). sha256: b11dabd468202b56e4e9272a809152b0a50185c88eb56dfac84c174eb0a9658d (1,024,108,304 bytes). torch.load(..., weights_only=True) is safe.
The weights are a quantized derivative of Lightricks/LTX-Video transformer/. Use follows the upstream open-weights terms shipped next to this file (LTX-Video-Open-Weights-License-0.X.txt and ltx-video-2b-v0.9.5.license.txt). The 13B checkpoints in that repository are not in this pack.
The loader default is ltx_video_2b_transformer_phi_v2_ff4_attn_bf16.pt (2,352.80 MiB, sha256: 48870cbc8fc0a7b0dd32c4204a2ae4c29c109426b91c5864aca7c8c44ea6f6eb). Attention, the timestep MLP, caption projection, proj_in and proj_out stay BF16. The 56 feed-forward matrices stay 4-bit (939,524,096 weights, SQNR 19.11 dB). A full pipeline with this pack is 12,235.5 MiB resident against 13,551.5 MiB for the upstream BF16 pipeline. The 976.67 MiB file above is the earlier pack in which every linear was 4-bit.
Comparison with the original transformer
All 715 / 715 upstream tensors are in the archive: 287 packed linears, 287 BF16 biases, 141 protected tensors. Dequantized weights versus FP32: SQNR 19.15 dB, cosine 0.9939. The biases versus FP32: cosine 0.9999987, worst absolute error 0.00387. proj_out.weight is the low outlier at 15.27 dB; the other linears are 16.78–19.44 dB.
One transformer step (latent 1×2×4, seed 0, timestep 250) with the original UMT5-XXL FP32 state of the same caption, packed BF16 versus the original FP32 transformer:
| Caption | Sample cosine | max |Δ| |
|---|---|---|
a neon alley in the rain | 0.9659 | 1.066 |
| Tokyo neon walk | 0.9588 | 1.314 |
| Snow leopard | 0.9589 | 1.095 |
| Sea turtle over coral | 0.9618 | 1.158 |
End-to-end comparison (upstream BF16 | phi-lattice v2)
ZeroGPU harness phi-verification-lab Tab 6, protocol pinned before the runs: 768x512, 65 frames (2.71s @ 24 fps), 50 steps, guidance 3.0, identical seeds and identical CPU-sampled initial latents on both sides (i2v: 97 frames, seed 309, CC0 source photo in assets/inputs/).
Source photo (i2v, seed 309): red fox, CC0 / Public Domain (rawpixel 6024493)
Image-to-video (97 frames, seed 309) — PSNR 38.00 dB, SSIM 0.9830
t2v: a neon alley in the rain (seed 77) — PSNR 22.42 dB, SSIM 0.9240
t2v: Tokyo neon walk (seed 202) — PSNR 20.13 dB, SSIM 0.8032
t2v: snow leopard (seed 309) — PSNR 15.81 dB, SSIM 0.5866
End-to-end quantitative benchmark
| Scene (seed) | PSNR | SSIM | Pixel MAE | Temporal consistency | Verdict vs pinned gate (PSNR ≥ 13.5 / SSIM ≥ 0.72) |
|---|---|---|---|---|---|
| i2v photo (309) | 38.00 dB | 0.9830 | 1.76 | 0.8493 | PASS / PASS |
| neon alley (77) | 22.42 dB | 0.9240 | 7.29 | 0.4585 | PASS / PASS |
| Tokyo neon walk (202) | 20.13 dB | 0.8032 | 17.02 | 0.7296 | PASS / PASS |
| snow leopard (309) | 15.81 dB | 0.5866 | 26.41 | 0.3062 | PASS / FAIL |
Metric definitions (as in the wan2.1 card): PSNR / SSIM / MAE are frame-by-frame against the upstream BF16 rollout under the identical seed; temporal consistency is the mean cosine between frame-to-frame deltas of the packed and reference rolls.
Interpretation. These four videos are the attention-BF16 pack. Keeping attention and the projections in BF16 stops the 50-step rollout from jumping to a different composition: the fox, neon alley and Tokyo pass the SSIM gate. Snow leopard still leaves the reference pose, because the feed-forward matrices remain 4-bit.
CLIPScore (openai/clip-vit-base-patch32, eight frames, 2.5 * max(cosine, 0)). A is the upstream rollout, B is this pack. The score is how well the picture matches the prompt, not how close it is to A.
| Scene | A | B |
|---|---|---|
| fox | 0.801 | 0.803 |
| neon alley | 0.638 | 0.720 |
| Tokyo | 0.724 | 0.777 |
| snow leopard | 0.828 | 0.831 |
Source-checkpoint provenance (established 2026-11-08). All protected tensors of this pack are bit-exact BF16 casts of Lightricks/LTX-Video transformer/ (main repo) — 5/5 probes equal. The pack is not derived from Lightricks/LTX-Video-0.9.5: pairing it with the 0.9.5 pipeline (transformer/VAE/text encoder of a different checkpoint) collapses generation (PSNR 8.2-10.4 dB, SSIM 0.08-0.12, video degrades to noise — recorded in benchmark_results.json provenance.diagnostic_runs). Use this pack with the Lightricks/LTX-Video pipeline.
Independent verification
ZeroGPU harness: phi-verification-lab (Tab 5, model ltx). 2026-11-08 run, archived in tests/verification_ltx_2026-11-08.log:
- archive sha256 vs pin:
MATCH;287quantized /141protected,K % 64 == 0on all; low_vram_4bitvsunrolled_bf16forward (latent1x2x4, timestep250, seed0): resident976.36 MiB,max |dy| = 0.000000, cosine1.00000024, top1 match; peak allocated1418.22 MiBpacked vs3748.63 MiBunrolled;- Triton selftest on real layers incl. the
K=128edge caseproj_in [2048x128]: W bit-exact vs dequant reference,relL2 <= 6.4e-07vs strict cuBLAS.
The forward baseline is this archive's own unrolled_bf16 (loader-consistency check, not an upstream comparison); upstream weight-level numbers are in the section above, end-to-end generation parity is tracked separately.
Quick start
import importlib.util
from huggingface_hub import hf_hub_download
repo_id = "ununununununununununununununununununun/ltx-video-2b-phi-lattice-v2"
loader_path = hf_hub_download(repo_id, "phi_loader.py")
spec = importlib.util.spec_from_file_location("phi_loader", loader_path)
phi_loader = importlib.util.module_from_spec(spec)
spec.loader.exec_module(phi_loader)
transformer = phi_loader.load_ltx_from_packed_4bit(repo_id=repo_id, mode="low_vram_4bit")
mode="unrolled_bf16" materializes BF16 directly on the target device. mode="triton_4bit" uses phi_lut_gemm.py on CUDA.