MCPcopy Index your code
hub / github.com/NVlabs/Sana

github.com/NVlabs/Sana @v2.0.0 sqlite

repository ↗ · DeepWiki ↗ · release v2.0.0 ↗
3,080 symbols 11,604 edges 274 files 841 documented · 27%
README

logo

📚 Docs | SANA | SANA-1.5 | SANA-Sprint | SANA-Video | SANA-WM | Sol-RL Demo | 🤗 HuggingFace | ComfyUI | SGLang | Cosmos-RL

ICLR 2025 Oral | ICML 2025 | ICCV 2025 Highlight | ICLR 2026 Oral

SANA is an efficiency-oriented codebase for high-resolution image and video generation, providing complete training and inference pipelines. This repository contains code for SANA, SANA-1.5, SANA-Sprint, SANA-Video, SANA-WM, and Sol-RL. More details can be found in our 📚 documentation.

Join our Discord to engage in discussions with the community! If you have any questions, run into issues, or are interested in contributing, don't hesitate to reach out!

teaser_page1

News

  • 🔥 [2026/05] 🌍 SANA-WM: 2.6B Controllable World Model is released! Supports 720p, 1-min video generation with 6-DoF camera control. A new baseline for World Modeling and Embodied AI. See Project | Doc | Paper | Reactor Demo.
  • 🔥 [2026/04] ⚡ Sol-RL: NVFP4 Rollout, BF16 Training RL is available! All training recipes for SANA, FLUX.1, and SD3.5-L, together with bundled post-training datasets, are released. See Sol-RL doc | Page | Paper.
  • 🔥 [2026/03] 📺 SANA-Video 720p model with LTX-VAE is released. Use it with LTX2 Refiner to upscale the videos to 2K resolution! See Model Zoo, SANA-Video doc and Blog about refiner.
  • 🔥 [2026/03] 💪 Post Training Infra: SANA × Cosmos-RL — We partner with Cosmos-RL to provide a complete RL infrastructure for SANA. You can now post-train (SFT/RL) SANA-Image and SANA-Video with state-of-the-art algorithms (e.g. Diffusion-NFT, Flow-GRPO), preset configs, reward services, and flexible datasets. See SANA on Cosmos-RL and our Cosmos-RL integration doc.
  • 🔥 [2026/02] 🚀 SANA is now supported in SGLang! High-performance serving with OpenAI-compatible API. [Guidance]
  • 🔥 [2026/01/26] SANA-Video is accepted as Oral by ICLR-2026. 🎉🎉🎉
  • 🔥 [2025/12/09] 🎬 LongSANA: 27FPS real-time minute-length video generation model, training and inference code are all released. Thanks to LongLive Team. Refer to: [Train] | [Test] | [Weight]
  • 🔥 [2025/11/24] 🪶 Blog: how Causal Linear Attention unlocks infinite context for LLMs and long video generation.
  • 🔥 [2025/11/9] 🎬 Introduction video shows how Block Causal Linear Attention and Causal Mix-FFN work?
  • 🔥 [2025/11/6] 📺SANA-Video is merged into diffusers. How to use.
  • 🔥 [2025/10/27] 📺SANA-Video is released. [README] | [Weights] support Text-to-Video, TextImage-to-Video.
  • 🔥 [2025/10/13] 📺SANA-Video is coming, 1). a 5s Linear DiT Video model, and 2). real-time minute-length video generation (with LongLive). [paper] | [Page]

Click to show all updates

  • ✅ [2025/8/20] We release a new DC-AE-Lite for faster inference and smaller memory. [How to config] | [diffusers PR] | [Weight]
  • ✅ [2025/6/25] SANA-Sprint was accepted to ICCV'25 🏖️
  • ✅ [2025/6/4] SANA-Sprint ComfyUI Node is released [Example].
  • ✅ [2025/5/8] SANA-Sprint (One-step diffusion) diffusers training code is released [Guidance].
  • ✅ [2025/5/4] SANA-1.5 (Inference-time scaling) is accepted by ICML-2025. 🎉🎉🎉
  • ✅ [2025/3/22] 🔥SANA-Sprint demo is hosted on Huggingface, try it! 🎉 [Demo Link]
  • ✅ [2025/3/22] 🔥SANA-1.5 is supported in ComfyUI! 🎉: ComfyUI Guidance | ComfyUI Work Flow SANA-1.5 4.8B
  • ✅ [2025/3/22] 🔥SANA-Sprint code & weights are released! 🎉 Include: Training & Inference code and Weights / HF are all released. [Guidance]
  • ✅ [2025/3/21] 🚀Sana + Inference Scaling is released. [Guidance]
  • ✅ [2025/3/16] 🔥SANA-1.5 code & weights are released! 🎉 Include: DDP/FSDP | TAR file WebDataset | Multi-Scale Training code and Weights | HF are all released.
  • ✅ [2025/3/14] 🏃SANA-Sprint is coming out! 🎉 A new one/few-step generator of Sana. 0.1s per 1024px image on H100, 0.3s on RTX 4090. Find out more details: [Page] | [Arxiv]. Code is coming very soon along with diffusers
  • ✅ [2025/2/10] 🚀Sana + ControlNet is released. [Guidance] | [Model] | [Demo]
  • ✅ [2025/1/30] Release CAME-8bit optimizer code. Saving more GPU memory during training. [How to config]
  • ✅ [2025/1/29] 🎉 🎉 🎉SANA 1.5 is out! Figure out how to do efficient training & inference scaling! 🚀[Tech Report]
  • ✅ [2025/1/24] 4bit-Sana is released, powered by SVDQuant and Nunchaku inference engine. Now run your Sana within 8GB GPU VRAM [Guidance] [Demo] [Model]
  • ✅ [2025/1/24] DCAE-1.1 is released, better reconstruction quality. [Model] [diffusers]
  • ✅ [2025/1/23] Sana is accepted as Oral by ICLR-2025. 🎉🎉🎉
  • ✅ [2025/1/12] DC-AE tiling makes Sana-4K inferences 4096x4096px images within 22GB GPU memory. With model offload and 8bit/4bit quantize. The 4K Sana run within 8GB GPU VRAM. [Guidance]
  • ✅ [2025/1/11] Sana code-base license changed to Apache 2.0.
  • ✅ [2025/1/10] Inference Sana with 8bit quantization.[Guidance]
  • ✅ [2025/1/8] 4K resolution Sana models is supported in Sana-ComfyUI and work flow is also prepared. [4K guidance]
  • ✅ [2025/1/8] 1.6B 4K resolution Sana models are released: [BF16 pth] or [BF16 diffusers]. 🚀 Get your 4096x4096 resolution images within 20 seconds! Find more samples in Sana page. Thanks SUPIR for their wonderful work and support.
  • ✅ [2025/1/2] Bug in the diffusers pipeline is solved. Solved PR
  • ✅ [2025/1/2] 2K resolution Sana models is supported in Sana-ComfyUI and work flow is also prepared.
  • ✅ [2024/12] 1.6B 2K resolution Sana models are released: [BF16 pth] or [BF16 diffusers]. 🚀 Get your 2K resolution images within 4 seconds! Find more samples in Sana page. Thanks SUPIR for their wonderful work and support.
  • ✅ [2024/12] diffusers supports Sana-LoRA fine-tuning! Sana-LoRA's training and convergence speed is super fast. [Guidance] or [diffusers docs].
  • ✅ [2024/12] diffusers has Sana! All Sana models in diffusers safetensors are released and diffusers pipeline SanaPipeline, SanaPAGPipeline, DPMSolverMultistepScheduler(with FlowMatching) are all supported now. We prepare a Model Card for you to choose.
  • ✅ [2024/12] 1.6B BF16 Sana model is released for stable fine-tuning.
  • ✅ [2024/12] We release the ComfyUI node for Sana. [Guidance]
  • ✅ [2024/11] All multi-linguistic (Emoji & Chinese & Engl

Core symbols most depended-on inside this repo

to
called by 1041
diffusion/model/wan/vae.py
get
called by 486
diffusion/utils/config.py
pop
called by 183
diffusion/utils/config.py
items
called by 140
diffusion/data/wids/wids_lru.py
exists
called by 104
diffusion/utils/optimizer.py
log
called by 93
diffusion/utils/misc.py
empty_cache
called by 92
train_scripts/sol_rl/train_utils.py
keys
called by 68
diffusion/data/wids/wids_lru.py

Shape

Method 1,492
Function 1,114
Class 463
Route 11

Languages

Python100%

Modules by API surface

diffusion/model/nets/sana_blocks.py119 symbols
diffusion/refiner/diffusers_ltx2_refiner.py99 symbols
diffusion/model/ltx2/causal_vae.py74 symbols
inference_video_scripts/wm/inference_sana_wm.py70 symbols
diffusion/model/wan/model.py69 symbols
diffusion/model/dc_ae/efficientvit/models/nn/ops.py64 symbols
diffusion/data/wids/wids.py63 symbols
diffusion/model/wan2_2/vae.py54 symbols
diffusion/model/dpm_solver.py53 symbols
diffusion/model/nets/sana_gdn_blocks.py43 symbols
diffusion/model/wan/vae.py41 symbols
train_scripts/sol_rl/train_utils.py39 symbols

Dependencies from manifests, versioned

accelerate1.3 · 1×
beautifulsoup4
bs4
came-pytorch
datasets2.21.0 · 1×
decord0.6.0 · 1×
diffusers0.37.0 · 1×
fire
ftfy6.0.3 · 1×

For agents

$ claude mcp add Sana \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact