Text-to-Image
PyTorch
Safetensors
diffusion-transformer
rectified-flow
from-scratch
ivanmikhnenkov commited on
Commit
37672ee
·
verified ·
1 Parent(s): def994c

add README.md

Browse files
Files changed (1) hide show
  1. README.md +62 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ pipeline_tag: text-to-image
4
+ library_name: pytorch
5
+ tags:
6
+ - diffusion-transformer
7
+ - rectified-flow
8
+ - text-to-image
9
+ - from-scratch
10
+ base_model:
11
+ - black-forest-labs/FLUX.2-dev
12
+ - google/flan-t5-base
13
+ datasets:
14
+ - LucasFang/FLUX-Reason-6M
15
+ - bghira/photo-concept-bucket
16
+ - detection-datasets/coco
17
+ ---
18
+
19
+ # tinydit-256
20
+
21
+ A 210M-parameter text-to-image diffusion transformer trained from scratch on one GPU (3.5 days, 400k steps,
22
+ 4.2M images at 256² area with aspect-ratio buckets). Frozen FLUX.2 autoencoder (32-channel latent) and frozen
23
+ flan-t5-base text encoder; the transformer, recipe, data pipeline and evaluation are original.
24
+
25
+ - Code, figures and every design decision with sources: https://github.com/ivanmikhnenkov/tinydit (tag `v1-pretrain`)
26
+ - Try it: https://huggingface.co/spaces/ivanmikhnenkov/tinydit
27
+ - Author: https://ivanmikhnenkov.com
28
+
29
+ ## Results (held-out prompts, 20 Euler steps, CFG 4, shift 2.8)
30
+
31
+ | FID | FD-DINOv2 | object accuracy (COCO classes, Faster R-CNN) | CLIP | PickScore | HPSv2.1 |
32
+ |---|---|---|---|---|---|
33
+ | 27.0 | 218 | 90% | 0.322 | 20.9 | 0.254 |
34
+
35
+ Strengths: single objects, animals, scenes, colours and simple relations, five aspect ratios. Known limits: readable
36
+ text, close faces, crowds, counts above three.
37
+
38
+ ## Files
39
+
40
+ - `model.safetensors`: EMA weights (bf16), step 400k
41
+ - `config.json`: architecture and sampler defaults
42
+ - `stats.json`: per-channel latent mean/std; latents are whitened with these after encoding and un-whitened before decoding
43
+
44
+ ## Usage
45
+
46
+ Clone the GitHub repo, fetch the frozen FLUX.2 VAE (gated, needs your own HF token; it is not redistributed here)
47
+ and flan-t5-base, then:
48
+
49
+ ```bash
50
+ python -m tinydit.sample --ckpt model.safetensors --config run1 --sets NOVEL=prompts/novel.txt --out out.png --shape 320x208
51
+ ```
52
+
53
+ or run the local playground (`python -m tinydit.playground`) for interactive prompts, sampling trajectories and
54
+ attention maps. Architecture: adaLN-single DiT, dim 896 × 16 blocks, 2D RoPE, QK-norm, SwiGLU, 16 register tokens
55
+ and 2 learned null key/value slots per cross-attention; rectified flow with a 2.8 timestep shift, cosine and
56
+ dispersive auxiliary losses.
57
+
58
+ ## License
59
+
60
+ Weights are released under CC BY-NC 4.0. They depend at inference on the FLUX.2 autoencoder (FLUX.2-dev
61
+ non-commercial licence, gated) and were trained in part on images generated by FLUX.1-dev (FLUX-Reason-6M);
62
+ use is non-commercial accordingly.