Add DSR reference checkpoints (baseline + in_context_36 ep80 EMA) and model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: unconditional-image-generation
|
| 3 |
+
tags:
|
| 4 |
+
- diffusion-transformer
|
| 5 |
+
- imagenet
|
| 6 |
+
- registers
|
| 7 |
+
- outlier-tokens
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# DSR — RAE-DiT-XL ImageNet-256 reference checkpoints
|
| 11 |
+
|
| 12 |
+
Stage-2 diffusion-transformer checkpoints accompanying
|
| 13 |
+
**[DSR: Dual-Stage Registers](https://github.com/a-little-hoof/DSR)**
|
| 14 |
+
(*Taming Outlier Tokens in Diffusion Transformers*), released so the outlier-token
|
| 15 |
+
visualizations can be reproduced without retraining.
|
| 16 |
+
|
| 17 |
+
Both are EMA weights of a **DiT-XL** (depth 28, hidden 1152, 16 heads, patch 1,
|
| 18 |
+
`in_channels` 768) operating in the SigLIP2-B RAE latent space (16×16×768,
|
| 19 |
+
ImageNet-256 class-conditional), matching the DSR repo's
|
| 20 |
+
`configs/stage2/sampling/ImageNet256/DiT-XL_SigLIP2-B_data_lognormal.yaml`.
|
| 21 |
+
|
| 22 |
+
| File | Model | Training config (DSR repo) | Notes |
|
| 23 |
+
|---|---|---|---|
|
| 24 |
+
| `dit_xl_siglip2b_lognormal_ema.pt` | baseline, no registers | `DiT-XL_SigLIP2-B_data_lognormal` | full training run |
|
| 25 |
+
| `dit_xl_siglip2b_lognormal_in_context_36_ep80_ema.pt` | + 36 in-context diffusion registers at block 8 | `*_data_lognormal-in_context_36` | **epoch-80 snapshot** (early): samples look under-trained; intended for comparing token-norm structure, where the register effect is already fully developed |
|
| 26 |
+
|
| 27 |
+
## Usage
|
| 28 |
+
|
| 29 |
+
The DSR notebook [`reproduce_outlier_tokens.ipynb`](https://github.com/a-little-hoof/DSR)
|
| 30 |
+
downloads these automatically when no local checkpoint is found. Manual loading:
|
| 31 |
+
|
| 32 |
+
```python
|
| 33 |
+
import torch
|
| 34 |
+
from huggingface_hub import hf_hub_download
|
| 35 |
+
|
| 36 |
+
path = hf_hub_download("smallAI/DSR-DiT-XL-ImageNet256",
|
| 37 |
+
"dit_xl_siglip2b_lognormal_ema.pt")
|
| 38 |
+
state_dict = torch.load(path, map_location="cpu", weights_only=True)
|
| 39 |
+
# build LightningDiT from the DSR repo's sampling config, then:
|
| 40 |
+
# model.load_state_dict(state_dict, strict=True)
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
Both files are plain `state_dict`s (no optimizer state) and load with
|
| 44 |
+
`torch.load(..., weights_only=True)`.
|
| 45 |
+
|
| 46 |
+
## What they demonstrate
|
| 47 |
+
|
| 48 |
+
Sampling the baseline while recording per-token L2 norms at every block shows outlier
|
| 49 |
+
tokens — max/median patch-token norm rising to ~20× in blocks ~14–24, at fixed spatial
|
| 50 |
+
positions shared across samples. In the register model the patch tokens stay near-flat
|
| 51 |
+
and the 36 register tokens carry the outlier mass instead. See the DSR repository for
|
| 52 |
+
the full method and the notebook that produces these figures.
|
| 53 |
+
|
| 54 |
+
## License / intended use
|
| 55 |
+
|
| 56 |
+
Released for research reproducibility. The models were trained on ImageNet-1k; use of
|
| 57 |
+
these weights must comply with the ImageNet terms of access.
|
dit_xl_siglip2b_lognormal_ema.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:572276ef69ec48e1fb910289c8b48ac4b49a3d4db0f9c32bc4afc97f1d363261
|
| 3 |
+
size 2709223719
|
dit_xl_siglip2b_lognormal_in_context_36_ep80_ema.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e5062a0a801133d00bdb5156a73a61c59436217dbf52fc0a2e56bb4d4a5c020d
|
| 3 |
+
size 2709763825
|