Text-to-Video
Sana
English
Chinese
SANA
SANA-Video
SANA-Video-2.0
720p
diffusion
DMD
few-step
LTX-2.3
Instructions to use Efficient-Large-Model/SANA-Video_2.0_5B_720p_4step with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Sana
How to use Efficient-Large-Model/SANA-Video_2.0_5B_720p_4step with Sana:
# Load the model and infer image from text import torch from app.sana_pipeline import SanaPipeline from torchvision.utils import save_image sana = SanaPipeline("configs/sana_config/1024ms/Sana_1600M_img1024.yaml") sana.from_pretrained("hf://Efficient-Large-Model/SANA-Video_2.0_5B_720p_4step") image = sana( prompt='a cyberpunk cat with a neon sign that says "Sana"', height=1024, width=1024, guidance_scale=5.0, pag_guidance_scale=2.0, num_inference_steps=18, ) - Notebooks
- Google Colab
- Kaggle
Add files using upload-large-folder tool
Browse files- .gitattributes +2 -0
- LICENSE +201 -0
- README.md +199 -0
- checkpoints/SANA_Video_2.0_5B_720p_4step.pth +3 -0
- config.yaml +94 -0
- demo/sana_video2_5b_720p_4step_rooster_seed4.mp4 +3 -0
- demo/sana_video2_5b_720p_4step_rooster_seed4_poster.png +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
demo/sana_video2_5b_720p_4step_rooster_seed4_poster.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
demo/sana_video2_5b_720p_4step_rooster_seed4.mp4 filter=lfs diff=lfs merge=lfs -text
|
LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity. For the purposes of this definition,
|
| 18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 19 |
+
direction or management of such entity, whether by contract or
|
| 20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 22 |
+
|
| 23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 24 |
+
exercising permissions granted by this License.
|
| 25 |
+
|
| 26 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 27 |
+
including but not limited to software source code, documentation
|
| 28 |
+
source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical
|
| 31 |
+
transformation or translation of a Source form, including but
|
| 32 |
+
not limited to compiled object code, generated documentation,
|
| 33 |
+
and conversions to other media types.
|
| 34 |
+
|
| 35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 36 |
+
Object form, made available under the License, as indicated by a
|
| 37 |
+
copyright notice that is included in or attached to the work
|
| 38 |
+
(an example is provided in the Appendix below).
|
| 39 |
+
|
| 40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 41 |
+
form, that is based on (or derived from) the Work and for which the
|
| 42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 44 |
+
of this License, Derivative Works shall not include works that remain
|
| 45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 46 |
+
the Work and Derivative Works thereof.
|
| 47 |
+
|
| 48 |
+
"Contribution" shall mean any work of authorship, including
|
| 49 |
+
the original version of the Work and any modifications or additions
|
| 50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 54 |
+
means any form of electronic, verbal, or written communication sent
|
| 55 |
+
to the Licensor or its representatives, including but not limited to
|
| 56 |
+
communication on electronic mailing lists, source code control systems,
|
| 57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 59 |
+
excluding communication that is conspicuously marked or otherwise
|
| 60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 61 |
+
|
| 62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 64 |
+
subsequently incorporated within the Work.
|
| 65 |
+
|
| 66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 71 |
+
Work and such Derivative Works in Source or Object form.
|
| 72 |
+
|
| 73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 76 |
+
(except as stated in this section) patent license to make, have made,
|
| 77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 78 |
+
where such license applies only to those patent claims licensable
|
| 79 |
+
by such Contributor that are necessarily infringed by their
|
| 80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 82 |
+
institute patent litigation against any entity (including a
|
| 83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 84 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 85 |
+
or contributory patent infringement, then any patent licenses
|
| 86 |
+
granted to You under this License for that Work shall terminate
|
| 87 |
+
as of the date such litigation is filed.
|
| 88 |
+
|
| 89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 90 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 91 |
+
modifications, and in Source or Object form, provided that You
|
| 92 |
+
meet the following conditions:
|
| 93 |
+
|
| 94 |
+
(a) You must give any other recipients of the Work or
|
| 95 |
+
Derivative Works a copy of this License; and
|
| 96 |
+
|
| 97 |
+
(b) You must cause any modified files to carry prominent notices
|
| 98 |
+
stating that You changed the files; and
|
| 99 |
+
|
| 100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 101 |
+
that You distribute, all copyright, patent, trademark, and
|
| 102 |
+
attribution notices from the Source form of the Work,
|
| 103 |
+
excluding those notices that do not pertain to any part of
|
| 104 |
+
the Derivative Works; and
|
| 105 |
+
|
| 106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 107 |
+
distribution, then any Derivative Works that You distribute must
|
| 108 |
+
include a readable copy of the attribution notices contained
|
| 109 |
+
within such NOTICE file, excluding those notices that do not
|
| 110 |
+
pertain to any part of the Derivative Works, in at least one
|
| 111 |
+
of the following places: within a NOTICE text file distributed
|
| 112 |
+
as part of the Derivative Works; within the Source form or
|
| 113 |
+
documentation, if provided along with the Derivative Works; or,
|
| 114 |
+
within a display generated by the Derivative Works, if and
|
| 115 |
+
wherever such third-party notices normally appear. The contents
|
| 116 |
+
of the NOTICE file are for informational purposes only and
|
| 117 |
+
do not modify the License. You may add Your own attribution
|
| 118 |
+
notices within Derivative Works that You distribute, alongside
|
| 119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 120 |
+
that such additional attribution notices cannot be construed
|
| 121 |
+
as modifying the License.
|
| 122 |
+
|
| 123 |
+
You may add Your own copyright statement to Your modifications and
|
| 124 |
+
may provide additional or different license terms and conditions
|
| 125 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 126 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 127 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 128 |
+
the conditions stated in this License.
|
| 129 |
+
|
| 130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 132 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 133 |
+
this License, without any additional terms or conditions.
|
| 134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 135 |
+
the terms of any separate license agreement you may have executed
|
| 136 |
+
with Licensor regarding such Contributions.
|
| 137 |
+
|
| 138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 140 |
+
except as required for reasonable and customary use in describing the
|
| 141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 142 |
+
|
| 143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 144 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 147 |
+
implied, including, without limitation, any warranties or conditions
|
| 148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 150 |
+
appropriateness of using or redistributing the Work and assume any
|
| 151 |
+
risks associated with Your exercise of permissions under this License.
|
| 152 |
+
|
| 153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 154 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 155 |
+
unless required by applicable law (such as deliberate and grossly
|
| 156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 157 |
+
liable to You for damages, including any direct, indirect, special,
|
| 158 |
+
incidental, or consequential damages of any character arising as a
|
| 159 |
+
result of this License or out of the use or inability to use the
|
| 160 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 161 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 162 |
+
other commercial damages or losses), even if such Contributor
|
| 163 |
+
has been advised of the possibility of such damages.
|
| 164 |
+
|
| 165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 168 |
+
or other liability obligations and/or rights consistent with this
|
| 169 |
+
License. However, in accepting such obligations, You may act only
|
| 170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 171 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 172 |
+
defend, and hold each Contributor harmless for any liability
|
| 173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 174 |
+
of your accepting any such warranty or additional liability.
|
| 175 |
+
|
| 176 |
+
END OF TERMS AND CONDITIONS
|
| 177 |
+
|
| 178 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 179 |
+
|
| 180 |
+
To apply the Apache License to your work, attach the following
|
| 181 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 182 |
+
replaced with your own identifying information. (Don't include
|
| 183 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 184 |
+
comment syntax for the file format. We also recommend that a
|
| 185 |
+
file or class name and description of purpose be included on the
|
| 186 |
+
same "printed page" as the copyright notice for easier
|
| 187 |
+
identification within third-party archives.
|
| 188 |
+
|
| 189 |
+
Copyright 2024 Nvidia
|
| 190 |
+
|
| 191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 192 |
+
you may not use this file except in compliance with the License.
|
| 193 |
+
You may obtain a copy of the License at
|
| 194 |
+
|
| 195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 196 |
+
|
| 197 |
+
Unless required by applicable law or agreed to in writing, software
|
| 198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 200 |
+
See the License for the specific language governing permissions and
|
| 201 |
+
limitations under the License.
|
README.md
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: sana
|
| 4 |
+
pipeline_tag: text-to-video
|
| 5 |
+
base_model: Efficient-Large-Model/SANA-Video_2.0_5B_720p
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
- zh
|
| 9 |
+
tags:
|
| 10 |
+
- text-to-video
|
| 11 |
+
- SANA
|
| 12 |
+
- SANA-Video
|
| 13 |
+
- SANA-Video-2.0
|
| 14 |
+
- 720p
|
| 15 |
+
- diffusion
|
| 16 |
+
- DMD
|
| 17 |
+
- few-step
|
| 18 |
+
- LTX-2.3
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# SANA-Video 2.0 5B 720p — 4-Step Preview
|
| 22 |
+
|
| 23 |
+
> **Research preview:** This distilled checkpoint is an early T2V-only preview.
|
| 24 |
+
> For the original 50-step T2V + TI2V release, use
|
| 25 |
+
> [`SANA-Video_2.0_5B_720p`](https://huggingface.co/Efficient-Large-Model/SANA-Video_2.0_5B_720p).
|
| 26 |
+
|
| 27 |
+
[Project page](https://nvlabs.github.io/Sana/Video2/) ·
|
| 28 |
+
[Online demo](https://huggingface.co/spaces/Efficient-Large-Model/sana-video2-5b-720p-demo) ·
|
| 29 |
+
[Documentation](https://nvlabs.github.io/Sana/docs/sana_video2/) ·
|
| 30 |
+
[GitHub](https://github.com/NVlabs/Sana) ·
|
| 31 |
+
[Paper](https://arxiv.org/abs/2607.21553)
|
| 32 |
+
|
| 33 |
+
SANA-Video 2.0 is an efficient diffusion transformer for high-resolution video
|
| 34 |
+
generation. This preview provides a full-model EMA checkpoint distilled for
|
| 35 |
+
four-stage text-to-video generation at 720p. It combines gated bidirectional
|
| 36 |
+
linear-attention layers with periodic dense softmax-attention anchors and
|
| 37 |
+
shared Attention Residual aggregation.
|
| 38 |
+
|
| 39 |
+
## Model details
|
| 40 |
+
|
| 41 |
+
| Property | Value |
|
| 42 |
+
| --- | --- |
|
| 43 |
+
| Architecture | `SanaVideo2_5B` |
|
| 44 |
+
| Parameters | 4,466,980,960 model parameters (4.47B) |
|
| 45 |
+
| Transformer | 32 layers, hidden size 2,560 |
|
| 46 |
+
| Attention | 75% gated linear attention, 25% dense softmax anchors |
|
| 47 |
+
| Attention Residuals | Shared, timestep-independent aggregation every 8 layers |
|
| 48 |
+
| Task | Text-to-video only |
|
| 49 |
+
| Output bucket | 736 × 1280, 81 frames, 16 FPS (about 5.06 seconds) |
|
| 50 |
+
| Model construction | Source tower at 480; explicit dynamic 736 × 1280 bucket |
|
| 51 |
+
| Text encoder | `google/gemma-2-2b-it` |
|
| 52 |
+
| VAE | LTX 2.3, 128 latent channels, stride `(8, 32, 32)` |
|
| 53 |
+
| Inference | BF16, CFG 1, 4 stages, `sana_shift6_dpm`, no motion suffix |
|
| 54 |
+
| License | Apache 2.0 |
|
| 55 |
+
|
| 56 |
+
## Checkpoint lineage and format
|
| 57 |
+
|
| 58 |
+
The selected checkpoint is the global-step-1000 DMD EMA export initialized
|
| 59 |
+
from the SANA-Video 2.0 SFT model after merging the ReFL step-500 adapter. DMD
|
| 60 |
+
then updates the full transformer; this release is therefore a full model,
|
| 61 |
+
**not a LoRA adapter**.
|
| 62 |
+
|
| 63 |
+
The checkpoint contains a `state_dict_ema` tensor mapping only. It does not
|
| 64 |
+
contain optimizer, learning-rate scheduler, gradient-scaler, or training-loop
|
| 65 |
+
state. The inference entry point unwraps `state_dict_ema`, removes an optional
|
| 66 |
+
`model.` key prefix, and casts the transformer to BF16.
|
| 67 |
+
|
| 68 |
+
## Files
|
| 69 |
+
|
| 70 |
+
- `checkpoints/SANA_Video_2.0_5B_720p_4step.pth`: distilled EMA transformer
|
| 71 |
+
- `config.yaml`: clean 5B source-tower config with the preview frame/FPS defaults
|
| 72 |
+
- `demo/`: verified seed-4 MP4 and poster generated from this checkpoint
|
| 73 |
+
- `LICENSE`: Apache License 2.0
|
| 74 |
+
|
| 75 |
+
## Verified 4-step example
|
| 76 |
+
|
| 77 |
+
This 1280 × 736, 81-frame, 16 FPS sample was generated from the released
|
| 78 |
+
checkpoint with seed 4 and the exact command shown below.
|
| 79 |
+
|
| 80 |
+
<p align="center">
|
| 81 |
+
<a href="https://huggingface.co/Efficient-Large-Model/SANA-Video_2.0_5B_720p_4step/resolve/main/demo/sana_video2_5b_720p_4step_rooster_seed4.mp4">
|
| 82 |
+
<img src="https://huggingface.co/Efficient-Large-Model/SANA-Video_2.0_5B_720p_4step/resolve/main/demo/sana_video2_5b_720p_4step_rooster_seed4_poster.png" width="90%" alt="SANA-Video 2.0 5B four-step preview: a cartoon rooster holding a beer bottle in a floral vintage room"/>
|
| 83 |
+
</a>
|
| 84 |
+
</p>
|
| 85 |
+
|
| 86 |
+
<p align="center">
|
| 87 |
+
<a href="https://huggingface.co/Efficient-Large-Model/SANA-Video_2.0_5B_720p_4step/resolve/main/demo/sana_video2_5b_720p_4step_rooster_seed4.mp4">▶ Watch or download the verified four-step video</a>
|
| 88 |
+
</p>
|
| 89 |
+
|
| 90 |
+
> **Prompt:** In a cozy, vintage room adorned with floral wallpaper, a cartoon
|
| 91 |
+
> rooster sits comfortably in a floral-patterned armchair, sipping from a bottle
|
| 92 |
+
> of beer. The rooster, with its vibrant red comb and wattle, displays a range of
|
| 93 |
+
> expressions—smiling, nodding, and opening its beak wide in a cheerful manner.
|
| 94 |
+
> The setting includes wooden furniture and another beer bottle on the table,
|
| 95 |
+
> adding to the relaxed atmosphere. The camera captures the rooster from a
|
| 96 |
+
> close-up angle, emphasizing its animated movements and lively demeanor.
|
| 97 |
+
|
| 98 |
+
## Four-stage sampling contract
|
| 99 |
+
|
| 100 |
+
This model does not use a truncated DPM-Solver trajectory. At each fixed stage,
|
| 101 |
+
the model predicts velocity `v`, computes `x0 = x - sigma * v`, and—except at
|
| 102 |
+
the terminal stage—re-noises `x0` at the next sigma with a fresh draw from the
|
| 103 |
+
same seeded generator.
|
| 104 |
+
|
| 105 |
+
| Stage | Physical sigma | API timestep | Model embedding timestep |
|
| 106 |
+
| ---: | ---: | ---: | ---: |
|
| 107 |
+
| 1 | 0.9998332262 | 999.8332262 | 999 |
|
| 108 |
+
| 2 | 0.9471688271 | 947.1688271 | 947 |
|
| 109 |
+
| 3 | 0.8568977118 | 856.8977118 | 856 |
|
| 110 |
+
| 4 | 0.6663702130 | 666.3702130 | 666 |
|
| 111 |
+
|
| 112 |
+
The rollout uses one BF16 initial-noise draw and three BF16 transition-noise
|
| 113 |
+
draws. `flow_shift` is not applied by this sampler.
|
| 114 |
+
|
| 115 |
+
## Inference
|
| 116 |
+
|
| 117 |
+
Until the upstream PR is merged, use the preview branch:
|
| 118 |
+
|
| 119 |
+
```bash
|
| 120 |
+
git clone https://github.com/Efficient-Large-Model/Sana.git
|
| 121 |
+
cd Sana
|
| 122 |
+
git checkout feat/sana-video2-4step-preview
|
| 123 |
+
bash environment_setup.sh sana
|
| 124 |
+
conda activate sana
|
| 125 |
+
```
|
| 126 |
+
|
| 127 |
+
Place the Diffusers-format LTX 2.3 VAE at
|
| 128 |
+
`output/pretrained_models/LTX-2.3-Diffusers/`, or update
|
| 129 |
+
`vae.vae_pretrained` in the config.
|
| 130 |
+
|
| 131 |
+
The following command uses the exact public preview settings:
|
| 132 |
+
|
| 133 |
+
```bash
|
| 134 |
+
bash inference_video_scripts/inference_sana_video.sh \
|
| 135 |
+
--np 1 \
|
| 136 |
+
--config configs/sana_video2/SanaVideo2_5B_720p.yaml \
|
| 137 |
+
--model_path hf://Efficient-Large-Model/SANA-Video_2.0_5B_720p_4step/checkpoints/SANA_Video_2.0_5B_720p_4step.pth \
|
| 138 |
+
--txt_file=asset/samples/sana_video2_5b_720p_demo.txt \
|
| 139 |
+
--task=t2v \
|
| 140 |
+
--model.image_size=480 \
|
| 141 |
+
--custom_height_width='[736,1280]' \
|
| 142 |
+
--sampling_algo=fastvideo_dmd_4step \
|
| 143 |
+
--generator_sigma_profile=sana_shift6_dpm \
|
| 144 |
+
--cfg_scale=1.0 \
|
| 145 |
+
--flow_shift=1.0 \
|
| 146 |
+
--motion_score=0 \
|
| 147 |
+
--negative_prompt=None \
|
| 148 |
+
--num_frames=81 \
|
| 149 |
+
--step=4 \
|
| 150 |
+
--fps=16 \
|
| 151 |
+
--seed=4 \
|
| 152 |
+
--work_dir output/sana_video2_t2v_720p_4step_preview
|
| 153 |
+
```
|
| 154 |
+
|
| 155 |
+
The selected global-step-1000 checkpoint was evaluated on the full VBench T2V
|
| 156 |
+
suite: 4,730 prompts across all 16 dimensions, using the same four-stage
|
| 157 |
+
sampling contract, 736×1280 resolution, 81 frames, 16 FPS, and CFG 1.
|
| 158 |
+
|
| 159 |
+
## Intended use
|
| 160 |
+
|
| 161 |
+
This model is intended for research, evaluation, and creative generation of
|
| 162 |
+
short videos from text. It can also serve as a full-model starting point for
|
| 163 |
+
further research under the license terms. It is not intended for first-frame
|
| 164 |
+
image conditioning; use the base release for TI2V.
|
| 165 |
+
|
| 166 |
+
The model is not intended to produce factual evidence, identify people, make
|
| 167 |
+
high-impact automated decisions, or generate content that violates privacy,
|
| 168 |
+
copyright, applicable law, or platform policies.
|
| 169 |
+
|
| 170 |
+
## Limitations and bias
|
| 171 |
+
|
| 172 |
+
- This is a research preview and has less extensive release validation than the
|
| 173 |
+
original 50-step model.
|
| 174 |
+
- Generated motion, anatomy, text rendering, object permanence, and physical
|
| 175 |
+
interactions may be inconsistent, especially for crowded or highly dynamic
|
| 176 |
+
scenes.
|
| 177 |
+
- Prompt following can degrade for long, ambiguous, or compositionally complex
|
| 178 |
+
instructions.
|
| 179 |
+
- Outputs can reflect social and cultural biases present in training data and
|
| 180 |
+
in the separately loaded text encoder.
|
| 181 |
+
- The model does not independently verify whether generated content is factual,
|
| 182 |
+
safe, or free of third-party rights.
|
| 183 |
+
|
| 184 |
+
Users should review outputs before publication, disclose synthetic media where
|
| 185 |
+
appropriate, and add safeguards suited to their application.
|
| 186 |
+
|
| 187 |
+
## Resources
|
| 188 |
+
|
| 189 |
+
- [SANA repository](https://github.com/NVlabs/Sana)
|
| 190 |
+
- [SANA-Video 2.0 project page](https://nvlabs.github.io/Sana/Video2/)
|
| 191 |
+
- [SANA-Video 2.0 documentation](https://nvlabs.github.io/Sana/docs/sana_video2/)
|
| 192 |
+
- [Original 50-step 5B 720p model](https://huggingface.co/Efficient-Large-Model/SANA-Video_2.0_5B_720p)
|
| 193 |
+
- [Four-step online preview](https://huggingface.co/spaces/Efficient-Large-Model/sana-video2-5b-720p-demo)
|
| 194 |
+
|
| 195 |
+
## Citation
|
| 196 |
+
|
| 197 |
+
If you use SANA-Video, please cite the SANA-Video work linked from the
|
| 198 |
+
[project page](https://nvlabs.github.io/Sana/Video2/). SANA-Video 2.0-specific
|
| 199 |
+
citation information will be added when it becomes available.
|
checkpoints/SANA_Video_2.0_5B_720p_4step.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:206a4f5c5ebeb4076aa2331afca0a63201015dfdc25f42224bbc5d2cc443059b
|
| 3 |
+
size 17871905340
|
config.yaml
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
task: t2v
|
| 2 |
+
work_dir: output/sana_video2_5b_720p_4step
|
| 3 |
+
report_to: none
|
| 4 |
+
tracker_project_name: sana-video-2
|
| 5 |
+
data:
|
| 6 |
+
data_dir:
|
| 7 |
+
video: data/video_toy_data
|
| 8 |
+
image_size: 720
|
| 9 |
+
type: SanaZipDataset
|
| 10 |
+
transform: default_train_video
|
| 11 |
+
aspect_ratio_type: ASPECT_RATIO_VIDEO_720_MS_DIV32
|
| 12 |
+
caption_selection_type: proportion
|
| 13 |
+
caption_proportion:
|
| 14 |
+
prompt: 1
|
| 15 |
+
num_frames: 81
|
| 16 |
+
target_fps: 16
|
| 17 |
+
resample_fps: false
|
| 18 |
+
model:
|
| 19 |
+
model: SanaVideo2_5B
|
| 20 |
+
image_size: 480
|
| 21 |
+
mixed_precision: bf16
|
| 22 |
+
fp32_attention: true
|
| 23 |
+
load_from: null
|
| 24 |
+
multi_scale: false
|
| 25 |
+
linear_head_dim: 128
|
| 26 |
+
softmax_head_dim: 256
|
| 27 |
+
softmax_ratio: 0.25
|
| 28 |
+
ffn_type: SwiGLU
|
| 29 |
+
mlp_ratio: 4.0
|
| 30 |
+
use_pe: true
|
| 31 |
+
pos_embed_type: wan_rope
|
| 32 |
+
qk_norm: true
|
| 33 |
+
cross_norm: true
|
| 34 |
+
class_dropout_prob: 0.1
|
| 35 |
+
attn_res_block_size: 8
|
| 36 |
+
vae:
|
| 37 |
+
vae_type: LTX2VAE_diffusers
|
| 38 |
+
vae_pretrained: output/pretrained_models/LTX-2.3-Diffusers
|
| 39 |
+
weight_dtype: bfloat16
|
| 40 |
+
vae_latent_dim: 128
|
| 41 |
+
vae_downsample_rate: 32
|
| 42 |
+
vae_stride: [8, 32, 32]
|
| 43 |
+
sample_posterior: false
|
| 44 |
+
use_causal_encode: true
|
| 45 |
+
text_encoder:
|
| 46 |
+
text_encoder_name: gemma-2-2b-it
|
| 47 |
+
caption_channels: 2304
|
| 48 |
+
y_norm: true
|
| 49 |
+
y_norm_scale_factor: 0.01
|
| 50 |
+
model_max_length: 300
|
| 51 |
+
chi_prompt:
|
| 52 |
+
- 'Given a user prompt, generate an "Enhanced prompt" that provides detailed visual descriptions suitable for image generation. Evaluate the level of detail in the user prompt:'
|
| 53 |
+
- '- If the prompt is simple, focus on adding specifics about colors, shapes, sizes, textures, and spatial relationships to create vivid and concrete scenes.'
|
| 54 |
+
- '- If the prompt is already detailed, refine and enhance the existing details slightly without overcomplicating.'
|
| 55 |
+
- 'Here are examples of how to transform or refine prompts:'
|
| 56 |
+
- '- User Prompt: A cat sleeping -> Enhanced: A small, fluffy white cat curled up in a round shape, sleeping peacefully on a warm sunny windowsill, surrounded by pots of blooming red flowers.'
|
| 57 |
+
- '- User Prompt: A busy city street -> Enhanced: A bustling city street scene at dusk, featuring glowing street lamps, a diverse crowd of people in colorful clothing, and a double-decker bus passing by towering glass skyscrapers.'
|
| 58 |
+
- 'Please generate only the enhanced description for the prompt below and avoid including any additional commentary or evaluations:'
|
| 59 |
+
- 'User Prompt: '
|
| 60 |
+
scheduler:
|
| 61 |
+
train_sampling_steps: 1000
|
| 62 |
+
predict_flow_v: true
|
| 63 |
+
noise_schedule: linear_flow
|
| 64 |
+
pred_sigma: false
|
| 65 |
+
learn_sigma: false
|
| 66 |
+
flow_shift: 6.0
|
| 67 |
+
inference_flow_shift: 1.0
|
| 68 |
+
weighting_scheme: logit_normal
|
| 69 |
+
logit_mean: 0.0
|
| 70 |
+
logit_std: 0.95
|
| 71 |
+
vis_sampler: fastvideo_dmd_4step
|
| 72 |
+
train:
|
| 73 |
+
use_fsdp: true
|
| 74 |
+
num_workers: 8
|
| 75 |
+
seed: 4
|
| 76 |
+
train_batch_size: 1
|
| 77 |
+
num_epochs: 10
|
| 78 |
+
gradient_accumulation_steps: 1
|
| 79 |
+
grad_checkpointing: true
|
| 80 |
+
gradient_clip: 0.1
|
| 81 |
+
joint_training_interval: 0
|
| 82 |
+
optimizer:
|
| 83 |
+
type: AdamW
|
| 84 |
+
lr: 5.0e-5
|
| 85 |
+
betas: [0.9, 0.999]
|
| 86 |
+
eps: 1.0e-10
|
| 87 |
+
weight_decay: 0.0
|
| 88 |
+
auto_lr: null
|
| 89 |
+
lr_schedule: constant
|
| 90 |
+
lr_schedule_args:
|
| 91 |
+
num_warmup_steps: 500
|
| 92 |
+
log_interval: 10
|
| 93 |
+
save_model_steps: 1000
|
| 94 |
+
save_model_epochs: 1
|
demo/sana_video2_5b_720p_4step_rooster_seed4.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:153c34d1284414db231ae33eba51151a8916de65792055c2f4bfc09efb2d49f5
|
| 3 |
+
size 6148452
|
demo/sana_video2_5b_720p_4step_rooster_seed4_poster.png
ADDED
|
Git LFS Details
|