---
library_name: diffusers
pipeline_tag: text-to-image
license: other
tags:
- SiD-DiT
- score-distillation
- flow-matching
- text-to-image
base_model:
- stabilityai/stable-diffusion-3.5-large
---
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
```bash
# download model files from this repo
git clone https://huggingface.co/YGu1998/SiD-DiT-SD3.5-large
# install packages
cd SiD_pipelines
pip install -r requirements.txt
cd ..
```
## Inference with SiD-DiT
```python
import torch
from SiD_pipelines import SiDSD3Pipeline
if torch.cuda.is_available():
torch_dtype = torch.bfloat16
device = "cuda"
else:
torch_dtype = torch.float32
device = "cpu"
model_repo_id = "YGu1998/SiD-DiT-SD3.5-large"
prompt = ["a studio portrait of an elderly woman smiling, soft window light, 85mm lens"]
pipe = SiDSD3Pipeline.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=1024,
height=1024,
generator=generator,
time_scale=1000,
).images[0]
image.save("example.png")
```
## License
- **Base model:** `stabilityai/stable-diffusion-3.5-large`
- **Base license:** Stability AI **Community License**
(`stabilityai-ai-community`)
This checkpoint is a **derivative work** of Stable Diffusion 3.5 Large and remains subject
to the Stability AI Community License. The base license permits research and non-commercial
use, and allows limited commercial use only for individuals or organizations whose annual
revenue falls below the thresholds specified in that license. Above those thresholds, any
commercial-purpose use (including internal business operations, hosted services, or other
production deployments) requires a separate enterprise agreement with Stability AI.
This repository does not grant additional rights beyond the Stability AI Community License.
Users are solely responsible for determining whether their organization’s revenue and
intended use comply with that license and for obtaining any required commercial agreements.