2301_76761127/ltx-video-npu
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

Lightricks/LTX-Video 13B on Ascend NPU

This repository validates the complete learned LTX-Video 13B Transformer3D path: every learned transformer block receives real latent and text-conditioning tensors and executes on Ascend NPU. Synthetic conditioning deliberately omits the unrelated T5/VAE pipeline assets while still loading and executing the complete selected 13B checkpoint rather than a layer sample or isolated operator.

Fixed sources and precision

  • Official model page: https://ai.gitcode.com/hf_mirrors/Lightricks/LTX-Video
  • Fixed model source: https://gitcode.com/hf_mirrors/Lightricks/LTX-Video.git
  • Model revision: 8984fa25007f376c1a299016d0957a37a2f797bb
  • Selected checkpoint: ltxv-13b-0.9.8-dev.safetensors
  • Checkpoint size: 28,579,183,340 bytes
  • Checkpoint SHA-256 from the fixed manifest: 56b39a874ef9d0c7ad4099954f0ee4fa7e600ce83a24b3736f9e12223e7c71be
  • Selected metadata: model_index.json (412 bytes)
  • Precision: official BF16/FP16-family checkpoint; no FP8, distilled, LoRA, upscaler, quantized, or alternate-version weight is used
  • Official source: https://github.com/Lightricks/LTX-Video.git
  • Source commit: 4b2d053057623ddd4d0a1d3e9cd28890e9ef487f
  • Weight license: LTX-Video Open Weights License 0.X

The public repository vendors only the runtime Python source required by the forward under source/LTX-Video, together with LICENSE and SOURCE-REVISION. It intentionally contains no nested .git, documentation media, examples, tests, or unrelated training assets.

Use the fixed GitCode revision and hydrate only the selected primary checkpoint plus its tiny metadata file. Do not enable normal LFS checkout for the aggregate repository:

MODEL_REV=8984fa25007f376c1a299016d0957a37a2f797bb
MODEL_REPO=https://gitcode.com/hf_mirrors/Lightricks/LTX-Video.git
GIT_LFS_SKIP_SMUDGE=1 git clone --filter=blob:none --no-checkout "$MODEL_REPO" model-source
git -C model-source fetch --depth 1 origin "$MODEL_REV"
git -C model-source checkout --detach FETCH_HEAD
git -C model-source lfs fetch origin "$MODEL_REV" \
  --include='ltxv-13b-0.9.8-dev.safetensors' --exclude=''
git -C model-source lfs checkout --include='ltxv-13b-0.9.8-dev.safetensors'
mkdir -p model
cp model-source/ltxv-13b-0.9.8-dev.safetensors model/
cp model-source/model_index.json model/

Verified runtime and dependency restore

The successful ModelAgent matrix is CANN 8.5.1, PyTorch 2.9.0, and torch-npu 2.9.0.post1. Keep those platform packages and restore only the pinned user-space closure into an independent target:

Fresh empty-target import was verified in the 2026-08-20 ModelAgent container with transformers==4.51.3 and tokenizers==0.21.4. The explicit tokenizers pin is part of the reproducible closure.

python3 -m pip install --target ./pydeps \
  --no-deps --no-build-isolation \
  -r requirements.txt \
  -i https://pypi.tuna.tsinghua.edu.cn/simple
test ! -e ./pydeps/torch
test ! -e ./pydeps/torch_npu

PYTHONPATH="$PWD/pydeps${PYTHONPATH:+:$PYTHONPATH}" python3 inference.py \
  --checkpoint "$PWD/model/ltxv-13b-0.9.8-dev.safetensors" \
  --source "$PWD/source/LTX-Video" --device npu:0 --output result.json

CPU is used only to deserialize the fixed checkpoint. Learned transformer computation is entirely NPU; no CPU/CUDA bridge or fallback is present.

Diffusers 0.39.0 dispatches RMSNorm through a fused NPU kernel that requires a gamma tensor even when the official LTX module was constructed with elementwise_affine=False (weight=None). For that exact no-gamma case, the entry keeps the official RMS definition—float32 variance, rsqrt, then conversion back to the input dtype—entirely on NPU and rejects any device escape. Affine RMSNorm instances continue to use the upstream implementation.

The exact official runtime source is vendored in this repository at source/LTX-Video; no hidden AUX checkout is required. The install reuses platform Torch/torch-npu and must not install or shadow another Torch build.

Verified all-NPU result

The final ModelAgent run completed all 48 transformer layers with the model, all five conditioning/latent inputs, and the output on npu:0. PID 42214 held 26,082 MiB HBM; the output shape was [1, 16, 128], elapsed time was 12.047 seconds, and the process exited successfully. The result is a full transformer forward, not a sampled layer or isolated operator test.

Evidence

The final repository contains one model-specific migration workflow, one device image from the final inference PID, and one JSON result image from that same run:

Model-specific Ascend migration workflow

Final Ascend NPU process

Final full-model result

本仓为 2301_76761127 队伍交付件(与备份账号合并提交)。