SaeedRazavi commited on
Commit
3d3511f
·
verified ·
1 Parent(s): 6c35005

Add model card

Browse files
Files changed (1) hide show
  1. README.md +79 -0
README.md ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - diffusion
5
+ - image-generation
6
+ - text-to-image
7
+ - representation-alignment
8
+ ---
9
+
10
+ # RECON checkpoints
11
+
12
+ Checkpoints trained with the RECON code ([saeidrazavi/RECON-DEV-V2](https://github.com/saeidrazavi/RECON-DEV-V2)).
13
+ RECON trains diffusion transformers with REPA-style representation alignment and **semantic tokens**:
14
+ at block `encoder_depth` the model predicts the features of a frozen vision encoder (the *teacher*),
15
+ pools them into K tokens and appends them to the sequence for the remaining blocks. Sampling pools
16
+ the tokens from the model's own prediction, so no teacher is needed at inference.
17
+
18
+ | File | Task | Model | Data | Steps |
19
+ |---|---|---|---|---|
20
+ | `c2i/ep-00080.pt` | Class-to-image | SiT-XL/2 | ImageNet 256×256 | 400,320 (80 epochs) |
21
+ | `t2i-mscoco/0150000.pt` | Text-to-image | MMDiT | MS-COCO 256×256 | 150,000 |
22
+
23
+ Each file is a full training checkpoint with the keys `model`, `ema`, `opt`, `args` and `steps`.
24
+ The evaluation scripts use the EMA weights and read the model configuration from `args`, so no
25
+ configuration flags are needed. Training can resume from these files.
26
+
27
+ ## Results
28
+
29
+ **Class-to-image** (`c2i/ep-00080.pt`): 50k samples, SDE sampler with 250 steps, no guidance,
30
+ `--seed 0`, ADM reference batch.
31
+
32
+ | FID | IS | Precision | Recall |
33
+ |---|---|---|---|
34
+ | 3.2661 | 206.43 | 0.8215 | 0.5556 |
35
+
36
+ **Text-to-image** (`t2i-mscoco/0150000.pt`): 40,192 MS-COCO val captions, ODE sampler (Heun) with
37
+ 50 steps, U-ViT FID reference.
38
+
39
+ | CFG scale | FID | CLIP score |
40
+ |---|---|---|
41
+ | 1.0 | 8.2671 | 0.2311 |
42
+ | 2.0 | 4.5077 | 0.2465 |
43
+
44
+ ## Training settings
45
+
46
+ | Setting | Class-to-image | Text-to-image |
47
+ |---|---|---|
48
+ | Model | SiT-XL/2 | MMDiT |
49
+ | VAE (latents) | `sdvae-ft-mse-f8d4` | `sdvae-ft-ema-f8d4` |
50
+ | Text condition | — | CLIP ViT-L/14 features (U-ViT preprocessing) |
51
+ | Teacher | `dinov2-vit-b` | `dinov2-vit-b` |
52
+ | Batch size / learning rate | 256 / 1e-4 | 256 / 1e-4 |
53
+ | Mixed precision | bf16 | fp16 |
54
+ | EMA decay | 0.9999 | 0.9999 |
55
+ | `--proj-coeff` | 1.5 | 1.5 |
56
+ | `--encoder-depth` | 8 | 8 |
57
+ | Semantic tokens | K=1, `zeropad` head, visible for t ≤ 0.5 | K=1, `zeropad` head, visible for t ≤ 0.5 |
58
+ | Caption dropout (`--cfg-prob`) | — | 0.1 |
59
+
60
+ ## Usage
61
+
62
+ Set up the code and data as in the code repository's README. Then download the checkpoints
63
+ (this repository is private, so run `hf auth login` first):
64
+
65
+ ```bash
66
+ uv run hf download SaeedRazavi/RECON-DEV-V2 c2i/ep-00080.pt t2i-mscoco/0150000.pt --local-dir checkpoints/recon
67
+ ```
68
+
69
+ Evaluate them:
70
+
71
+ ```bash
72
+ # Class-to-image
73
+ REFERENCE_NPZ=data/imagenet/VIRTUAL_imagenet256_labeled.npz \
74
+ uv run accelerate launch --num_processes 4 --mixed_precision bf16 c2i_eval.py \
75
+ --ckpt checkpoints/recon/c2i/ep-00080.pt
76
+
77
+ # Text-to-image at CFG 2.0 (reads data/mscoco256 as in training; add --cfg-scale 1.0 for no guidance)
78
+ uv run accelerate launch --num_processes 4 t2i_eval.py --ckpt checkpoints/recon/t2i-mscoco/0150000.pt
79
+ ```