SiD-DiT: Score Distillation of Flow Matching Models

Model Card

SiD-DiT is a score-distillation pipeline for pretrained text-to-image flow-matching models. We introduce a general framework that can accelerate sampling in flow-matching models by distilling pretrained flow-matching teachers into high-quality few-step students, providing a principled way to unify acceleration techniques across both diffusion- and flow-based generators.

Installation

# download model files from this repo
git clone https://huggingface.co/YGu1998/SiD-DiT-SANA-0.6B-RectifiedFlow
# install packages

cd SiD_pipelines
pip install -r requirements.txt
cd ..

Inference with SiD-DiT

import torch
from SiD_pipelines import SiDSanaPipeline


if torch.cuda.is_available():
    torch_dtype = torch.bfloat16
    device = "cuda"
else:
    torch_dtype = torch.float32
    device = "cpu"

model_repo_id = "YGu1998/SiD-DiT-SANA-0.6B-RectifiedFlow"

prompt = ["a studio portrait of an elderly woman smiling, soft window light, 85mm lens"]

pipe = SiDSanaPipeline.from_pretrained(
    model_repo_id,
    torch_dtype=torch_dtype,
).to(device)

generator = torch.Generator(device=device).manual_seed(42)


image = pipe(
    prompt=prompt,
    guidance_scale=1.0,
    num_inference_steps=4,
    width=512,
    height=512,
    generator=generator,
    time_scale=1000,
).images[0]

image.save("example.png")

License

  • Base model: SANA / SANA-Sprint (e.g., Efficient-Large-Model/Sana_Sprint_0.6B_1024px, Efficient-Large-Model/Sana_Sprint_1.6B_1024px, or their TrigFlow variants)
  • Base license: NVIDIA custom model license (e.g., NSCL / NVIDIA Open Model License and related NVIDIA terms, including Gemma terms where applicable)

This checkpoint is a fine-tuned derivative of SANA and therefore remains governed by the original NVIDIA model license and associated terms. It is released for research use and internal evaluation. Any commercial or production use of this checkpoint must comply with NVIDIA’s licensing terms and any applicable Gemma terms; nothing in this repository grants additional rights beyond those upstream licenses.

Downloads last month
103
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for YGu1998/SiD-DiT-SANA-0.6B-RectifiedFlow

Unable to build the model tree, the base model loops to the model itself. Learn more.

Spaces using YGu1998/SiD-DiT-SANA-0.6B-RectifiedFlow 3

Collection including YGu1998/SiD-DiT-SANA-0.6B-RectifiedFlow