Downloads · 30 days
15
37% of all-time downloads
austin-k-wang/SanaSprint1.6B-RWTD-HPSv2
SanaSprint1.6B-RWTD-HPSv2 is a text-to-image model from austin-k-wang. Use it when you need an image from a text prompt. It is set up for peft. The card lists the license as apache-2.0.
This repository contains a Reward-Weighted Transport Distillation (RWTD) LoRA adapter for SANA-Sprint 1.6B 1024px.
Downloads · 30 days
15
37% of all-time downloads
All-time downloads
41
Public
Repo size
74.6 MB
Likes
2
Public
Click a slice to open those files.
.safetensors74.6 MB · 100%
From the Hugging Face model README
This repository contains a Reward-Weighted Transport Distillation (RWTD) LoRA adapter for SANA-Sprint 1.6B 1024px.
The model was aligned using the HPS v2.1 reward. Only the adapter is included; the base model, text encoder, and VAE are downloaded separately. The adapter is obtained by post-training SANA Sprint 1.6B with the method presented in Aligning One-Step Generative Models with Reward-Weighted Transport Distillation.
The adapter was evaluated on all 1,632 Parti-Prompts, with five images generated per prompt and 8,160 images in total.
Evaluation settings:
This adapter targets the native SanaMSCM implementation from
NVlabs/Sana. It is not directly compatible
with DiffusionPipeline.load_lora_weights().
git clone https://github.com/NVlabs/Sana.git
cd Sana
./environment_setup.sh sana
conda activate sana
pip install "peft==0.18.0" huggingface_hub
Run the following from the root of the cloned NVlabs/Sana repository. A
CUDA-capable GPU is required.
import torch
from huggingface_hub import hf_hub_download
from peft import PeftModel
from torchvision.utils import save_image
from app.sana_sprint_pipeline import SanaSprintPipeline
BASE_MODEL_ID = "Efficient-Large-Model/Sana_Sprint_1.6B_1024px"
ADAPTER_ID = "austin-k-wang/SanaSprint1.6B-RWTD-HPSv2"
CONFIG_PATH = (
"configs/sana_sprint_config/1024ms/"
"SanaSprint_1600M_1024px_allqknorm_bf16_scm_ladd.yaml"
)
if not torch.cuda.is_available():
raise RuntimeError("A CUDA-capable GPU is required.")
device = torch.device("cuda:0")
base_checkpoint = hf_hub_download(
repo_id=BASE_MODEL_ID,
filename="checkpoints/Sana_Sprint_1.6B_1024px.pth",
)
pipeline = SanaSprintPipeline(CONFIG_PATH, device=device)
pipeline.config.max_timesteps = 1.5708
pipeline.from_pretrained(base_checkpoint)
pipeline.model = PeftModel.from_pretrained(
pipeline.model,
ADAPTER_ID,
is_trainable=False,
)
pipeline.model = pipeline.model.merge_and_unload()
pipeline.eval().requires_grad_(False)
generator = torch.Generator(device=device).manual_seed(42)
image = pipeline(
prompt="a cinematic photograph of a red panda reading a book",
height=1024,
width=1024,
guidance_scale=4.5,
num_inference_steps=1,
generator=generator,
)
save_image(
image,
"sana_sprint_rwtd_hpsv2.png",
normalize=True,
value_range=(-1, 1),
)
This adapter inherits the limitations and biases of SANA-Sprint 1.6B. It does not guarantee correct object counts, spatial relationships, colors, text, or anatomy. Results may change with different seeds, timesteps, guidance scales, or dependency versions.
The model should not be treated as a factual representation of people or events. Users are responsible for evaluating it for their intended application and implementing appropriate safeguards.
The adapter is released under the Apache License 2.0. Use remains subject to the licenses and terms of the base model and supporting components.
@misc{xie2024sana,
title={Sana: Efficient High-Resolution Image Synthesis with Linear Diffusion Transformer},
author={Enze Xie and Junsong Chen and Junyu Chen and Han Cai and Haotian Tang and Yujun Lin and Zhekai Zhang and Muyang Li and Ligeng Zhu and Yao Lu and Song Han},
year={2024},
eprint={2410.10629},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2410.10629}
}
@misc{chen2025sanasprint,
title={SANA-Sprint: One-Step Diffusion with Continuous-Time Consistency Distillation},
author={Junsong Chen and Shuchen Xue and Yuyang Zhao and Jincheng Yu and Sayak Paul and Junyu Chen and Han Cai and Enze Xie and Song Han},
year={2025},
eprint={2503.09641},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2503.09641}
}
The RWTD citation will be added once the paper details go public.