An extension of the SANA diffusion transformer introducing two efficiency techniques: Adaptive Flow-DPM Scheduling — reducing inference latency by 6.6% (NFE: 20→12) — and Sensitivity-Based Transformer Block Pruning — trimming 27.9% of parameters and boosting throughput by 24.8%. Validated on the CelebA dataset at 256×256 resolution.
1
stars
164
commits
Python
primary language
Mar 28, 2026
updated
An extension of the SANA architecture with two novel efficiency contributions: Adaptive Flow-DPM Scheduling and Sensitivity-Based Transformer Block Pruning.
Authors: Luv Valecha (B23CS1093) · Dheeraj Kumar (B23CS1016) · Neeraj Mansingh (B23CS1095)
This project reproduces and extends the SANA diffusion transformer framework targeting extreme inference acceleration for edge-device deployment. We introduce two orthogonal efficiency techniques on top of the SANA-0.6B backbone, validated by training from scratch on the CelebA face dataset at 256×256 resolution on a single T4 GPU.
| Contribution | Improvement |
|---|---|
| Adaptive Flow-DPM Scheduling | 6.6% reduction in inference latency (NFE: 20 → 12) |
| Sensitivity-Based Block Pruning | 27.9% fewer parameters · 20.0% lower inference latency · +24.8% throughput |
SANA addresses the scalability bottlenecks of modern Diffusion Transformers (DiTs) — namely quadratic attention complexity and excessive token counts — through four key innovations:
This project builds on the SANA-0.6B variant and further pushes inference efficiency through dynamic scheduling and structural pruning.
We trained a 0.6B-parameter SANA variant from scratch on the CelebA dataset to validate architectural efficiency on a specialized face generation domain.
export NCCL_P2P_DISABLE=1
export NCCL_IB_DISABLE=1
export PYTHONPATH=$PYTHONPATH:$(pwd)
torchrun --nproc_per_node=1 train_scripts/train.py \
--config_path configs/sana_config/celeba_t4.yaml \
--resume_from latest
Standard solvers (e.g., Flow-Euler) use fixed step sizes across the diffusion trajectory t ∈ [0, 1]. We observed that image formation velocity is non-linear: critical semantic features form during middle timesteps (t ∈ [0.4, 0.7]), while the denoising tail contains largely redundant function evaluations.
Method: A velocity-aware adaptive scheduler that dynamically adjusts step size based on the L₂-norm of the predicted velocity field:
$$\Delta t_i = \eta \cdot \frac{1}{||v(t_i)||_2 + \epsilon}$$
This allocates finer resolution to high-variance regions and aggressively skips near-converged steps, reducing NFE from 20 → 12 with no significant perceptual degradation.
python ./latency.py
Large diffusion transformers frequently contain blocks that perform near-identity transformations, contributing minimally to latent evolution. We quantify this via a Block Importance (BI) score.
Method:
This reduces model depth from 28 → 20 blocks and parameters from 590M → 421M.
# Block importance analysis
python phase2_analyze.py
# Load the model, delet the blocks identified in Phase 2, and train the remaining blocks to recover image quality
python phase3_4_train.py
# Quality benchmark
python phase6_evaluate.py
# Clone the repository
git clone https://github.com/Luv-valecha/SANA
cd SANA
# Set up environment (follows base SANA setup)
./environment_setup.sh sana
| Approach | Inference Latency (s) |
|---|---|
| Baseline SANA | 10.3400 |
| Adaptive SANA | 9.6599 |
~6.6% reduction in inference latency with NFE reduced from 20 to 12.
| Metric | Baseline SANA | Pruned SANA | Change |
|---|---|---|---|
| Parameters (M) | 591.7 | 426.6 | −27.9% |
| Training Time / step (s) | 0.484 | 0.396 | −18.2% |
| Training VRAM (GB) | 11.599 | 10.364 | −10.6% |
| Throughput (img/s) | 1.5038 | 1.8771 | +24.8% |
The pruned + adaptive model preserves key facial structures and visual consistency across a range of portrait prompts, demonstrating the SANA architecture's robustness to structured pruning.
Sample prompts evaluated:
This project is built upon the SANA codebase by NVIDIA Labs and MIT HAN Lab. We thank the authors for open-sourcing their work.
Python
92.5%
HTML
4.8%
Shell
2.7%
An extension of the SANA diffusion transformer introducing two efficiency techniques: Adaptive Flow-DPM Scheduling — reducing inference latency by 6.6% (NFE: 20→12) — and Sensitivity-Based Transformer Block Pruning — trimming 27.9% of parameters and boosting throughput by 24.8%. Validated on the CelebA dataset at 256×256 resolution.
1
stars
164
commits
Python
primary language
Mar 28, 2026
updated
An extension of the SANA architecture with two novel efficiency contributions: Adaptive Flow-DPM Scheduling and Sensitivity-Based Transformer Block Pruning.
Authors: Luv Valecha (B23CS1093) · Dheeraj Kumar (B23CS1016) · Neeraj Mansingh (B23CS1095)
This project reproduces and extends the SANA diffusion transformer framework targeting extreme inference acceleration for edge-device deployment. We introduce two orthogonal efficiency techniques on top of the SANA-0.6B backbone, validated by training from scratch on the CelebA face dataset at 256×256 resolution on a single T4 GPU.
| Contribution | Improvement |
|---|---|
| Adaptive Flow-DPM Scheduling | 6.6% reduction in inference latency (NFE: 20 → 12) |
| Sensitivity-Based Block Pruning | 27.9% fewer parameters · 20.0% lower inference latency · +24.8% throughput |
SANA addresses the scalability bottlenecks of modern Diffusion Transformers (DiTs) — namely quadratic attention complexity and excessive token counts — through four key innovations:
This project builds on the SANA-0.6B variant and further pushes inference efficiency through dynamic scheduling and structural pruning.
We trained a 0.6B-parameter SANA variant from scratch on the CelebA dataset to validate architectural efficiency on a specialized face generation domain.
export NCCL_P2P_DISABLE=1
export NCCL_IB_DISABLE=1
export PYTHONPATH=$PYTHONPATH:$(pwd)
torchrun --nproc_per_node=1 train_scripts/train.py \
--config_path configs/sana_config/celeba_t4.yaml \
--resume_from latest
Standard solvers (e.g., Flow-Euler) use fixed step sizes across the diffusion trajectory t ∈ [0, 1]. We observed that image formation velocity is non-linear: critical semantic features form during middle timesteps (t ∈ [0.4, 0.7]), while the denoising tail contains largely redundant function evaluations.
Method: A velocity-aware adaptive scheduler that dynamically adjusts step size based on the L₂-norm of the predicted velocity field:
$$\Delta t_i = \eta \cdot \frac{1}{||v(t_i)||_2 + \epsilon}$$
This allocates finer resolution to high-variance regions and aggressively skips near-converged steps, reducing NFE from 20 → 12 with no significant perceptual degradation.
python ./latency.py
Large diffusion transformers frequently contain blocks that perform near-identity transformations, contributing minimally to latent evolution. We quantify this via a Block Importance (BI) score.
Method:
This reduces model depth from 28 → 20 blocks and parameters from 590M → 421M.
# Block importance analysis
python phase2_analyze.py
# Load the model, delet the blocks identified in Phase 2, and train the remaining blocks to recover image quality
python phase3_4_train.py
# Quality benchmark
python phase6_evaluate.py
# Clone the repository
git clone https://github.com/Luv-valecha/SANA
cd SANA
# Set up environment (follows base SANA setup)
./environment_setup.sh sana
| Approach | Inference Latency (s) |
|---|---|
| Baseline SANA | 10.3400 |
| Adaptive SANA | 9.6599 |
~6.6% reduction in inference latency with NFE reduced from 20 to 12.
| Metric | Baseline SANA | Pruned SANA | Change |
|---|---|---|---|
| Parameters (M) | 591.7 | 426.6 | −27.9% |
| Training Time / step (s) | 0.484 | 0.396 | −18.2% |
| Training VRAM (GB) | 11.599 | 10.364 | −10.6% |
| Throughput (img/s) | 1.5038 | 1.8771 | +24.8% |
The pruned + adaptive model preserves key facial structures and visual consistency across a range of portrait prompts, demonstrating the SANA architecture's robustness to structured pruning.
Sample prompts evaluated:
This project is built upon the SANA codebase by NVIDIA Labs and MIT HAN Lab. We thank the authors for open-sourcing their work.
Python
92.5%
HTML
4.8%
Shell
2.7%