Lawrence-cj's picture
Add verified 5B 720p release demo
a5e7426 verified
|
Raw
History Blame Contribute Delete
7.24 kB
---
license: apache-2.0
library_name: sana
pipeline_tag: text-to-video
language:
- en
- zh
tags:
- text-to-video
- image-to-video
- SANA
- SANA-Video
- SANA-Video-2.0
- 720p
- diffusion
- LTX-2.3
---
# SANA-Video 2.0 5B 720p
SANA-Video 2.0 is an efficient diffusion transformer for high-resolution video
generation. This release provides the 5B-class checkpoint jointly post-trained
for text-to-video (T2V) and text-image-to-video (TI2V) generation at 720p for
about eight seconds.
The model combines gated bidirectional linear-attention layers with periodic
dense softmax-attention anchors and shared Attention Residual aggregation. It
uses Gemma 2 2B IT for text conditioning and the LTX 2.3 VAE contract with 128
latent channels and `(8, 32, 32)` temporal/spatial compression.
## Model details
| Property | Value |
| --- | --- |
| Architecture | `SanaVideo2_5B` |
| Parameters | 4,466,980,960 trainable model parameters (4.47B) |
| Transformer | 32 layers, hidden size 2,560 |
| Attention | 75% gated linear attention, 25% dense softmax anchors |
| Attention Residuals | Shared, timestep-independent aggregation every 8 layers |
| Tasks | Text-to-video and text-image-to-video |
| Output bucket | 736 × 1280, 193 frames, 24 FPS (about 8 seconds) |
| Text encoder | `google/gemma-2-2b-it` |
| VAE | LTX 2.3, 128 latent channels, stride `(8, 32, 32)` |
| Recommended inference | BF16, CFG 8, flow shift 12, 50 steps, motion score 20 |
| License | Apache 2.0 |
The checkpoint is an inference artifact containing only the merged model
`state_dict`. It does not contain optimizer, scheduler, training-state, or
standalone LoRA tensors. The EMA base weights and ReFL post-training adapter
were merged before release. Stored tensors retain their merged source dtypes;
the official inference entry point casts the transformer to BF16.
## Files
- `checkpoints/SANA_Video_2.0_5B_720p.pth`: merged transformer checkpoint
- `config.yaml`: matching SANA training and inference configuration
- `LICENSE`: Apache License 2.0
Checkpoint SHA256:
```text
7e557554540b4cbbc515166b43a7d307285ab250cedfb48627878227a722d25a
```
## Verified release example
This sample was generated from the public checkpoint with seed 0. The encoded
result is 1280 × 736, 193 frames, 24 FPS, and 8.04 seconds long.
<p align="center">
<a href="https://huggingface.co/datasets/Efficient-Large-Model/Sana-assets/resolve/main/Video2/assets/release-demo/sana_video2_5b_720p_rooster.mp4">
<img src="https://huggingface.co/datasets/Efficient-Large-Model/Sana-assets/resolve/main/Video2/assets/release-demo/sana_video2_5b_720p_rooster_poster.png" width="90%" alt="SANA-Video 2.0 5B release demo: a cartoon rooster holding a beer bottle in a floral vintage room"/>
</a>
</p>
<p align="center">
<a href="https://huggingface.co/datasets/Efficient-Large-Model/Sana-assets/resolve/main/Video2/assets/release-demo/sana_video2_5b_720p_rooster.mp4">▶ Watch or download the generated video</a>
</p>
> **Prompt:** In a cozy, vintage room adorned with floral wallpaper, a cartoon
> rooster sits comfortably in a floral-patterned armchair, sipping from a bottle
> of beer. The rooster, with its vibrant red comb and wattle, displays a range of
> expressions—smiling, nodding, and opening its beak wide in a cheerful manner.
> The setting includes wooden furniture and another beer bottle on the table,
> adding to the relaxed atmosphere. The camera captures the rooster from a
> close-up angle, emphasizing its animated movements and lively demeanor.
## Inference
Support for this checkpoint is provided by the SANA-Video 2.0 release branch
while [NVlabs/Sana PR #439](https://github.com/NVlabs/Sana/pull/439) is under
review:
```bash
git clone https://github.com/NVlabs/Sana.git
cd Sana
git checkout release/sana-video-2.0
bash environment_setup.sh sana
conda activate sana
```
Place the Diffusers-format LTX 2.3 VAE at
`output/pretrained_models/LTX-2.3-Diffusers/`, or update
`vae.vae_pretrained` in `config.yaml`.
### Text-to-video
The command below is the exact command used for the verified release example:
```bash
bash inference_video_scripts/inference_sana_video.sh \
--np 1 \
--config configs/sana_video2/SanaVideo2_5B_720p.yaml \
--model_path hf://Efficient-Large-Model/SANA-Video_2.0_5B_720p/checkpoints/SANA_Video_2.0_5B_720p.pth \
--txt_file=asset/samples/sana_video2_5b_720p_demo.txt \
--cfg_scale 8 \
--flow_shift 12 \
--step 50 \
--fps 24 \
--motion_score 20 \
--seed 0 \
--work_dir output/sana_video2_t2v_720p_demo
```
### Text-image-to-video
Each line in `asset/samples/sample_i2v.txt` contains a prompt and an input-image
path separated by `<image>`.
```bash
bash inference_video_scripts/inference_sana_video.sh \
--np 1 \
--config configs/sana_video2/SanaVideo2_5B_720p.yaml \
--model_path hf://Efficient-Large-Model/SANA-Video_2.0_5B_720p/checkpoints/SANA_Video_2.0_5B_720p.pth \
--txt_file=asset/samples/sample_i2v.txt \
--task=ltx \
--cfg_scale 8 \
--flow_shift 12 \
--step 50 \
--fps 24 \
--motion_score 20 \
--work_dir output/sana_video2_ti2v_720p
```
The default 720p bucket is 736 × 1280 because both spatial dimensions must be
divisible by 32. Frame counts must satisfy `(num_frames - 1) % 8 == 0`.
## Intended use
This model is intended for research, evaluation, and creative generation of
short videos from text, with optional first-frame image conditioning. It can
also serve as a starting point for domain-specific fine-tuning under the
license terms.
The model is not intended to produce factual evidence, identify people, make
high-impact automated decisions, or generate content that violates privacy,
copyright, applicable law, or platform policies.
## Limitations and bias
- Generated motion, anatomy, text rendering, object permanence, and physical
interactions may be inconsistent, especially for crowded or highly dynamic
scenes.
- Prompt following can degrade for long, ambiguous, or compositionally complex
instructions.
- Image-conditioned generation can drift from fine details in the source image.
- Outputs can reflect social and cultural biases present in training data and
in the separately loaded text encoder.
- The model does not independently verify whether generated content is factual,
safe, or free of third-party rights.
Users should review outputs before publication, disclose synthetic media where
appropriate, and add safeguards suited to their application.
## Resources
- [SANA repository](https://github.com/NVlabs/Sana)
- [SANA-Video 2.0 release PR](https://github.com/NVlabs/Sana/pull/439)
- [SANA-Video 2.0 documentation](https://github.com/NVlabs/Sana/blob/release/sana-video-2.0/docs/sana_video2.md)
- [Model zoo](https://github.com/NVlabs/Sana/blob/release/sana-video-2.0/docs/model_zoo.md#sana-video-20)
- [Verified 5B 720p release video](https://huggingface.co/datasets/Efficient-Large-Model/Sana-assets/resolve/main/Video2/assets/release-demo/sana_video2_5b_720p_rooster.mp4)
## Citation
If you use SANA-Video, please cite the SANA-Video work linked from the
[project page](https://nvlabs.github.io/Sana/Video/). SANA-Video 2.0-specific
citation information will be added when it becomes available.