leffff commited on
Commit
73b7aad
·
verified ·
1 Parent(s): ba1cbcf

4-NFE Sana-600M students: CM, LADD, DMD, PDD adapters + samples

Browse files
.gitattributes CHANGED
@@ -33,3 +33,9 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ samples/cm_samples.png filter=lfs diff=lfs merge=lfs -text
37
+ samples/comparison.png filter=lfs diff=lfs merge=lfs -text
38
+ samples/diversity.png filter=lfs diff=lfs merge=lfs -text
39
+ samples/dmd_samples.png filter=lfs diff=lfs merge=lfs -text
40
+ samples/ladd_samples.png filter=lfs diff=lfs merge=lfs -text
41
+ samples/pdd_samples.png filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Efficient-Large-Model/Sana_600M_512px_diffusers
4
+ library_name: peft
5
+ tags:
6
+ - diffusion
7
+ - distillation
8
+ - sana
9
+ - lora
10
+ - text-to-image
11
+ ---
12
+
13
+ # Diffusion Distillation Workshop: 4-step Sana-600M students
14
+
15
+ LoRA adapters that distill [Sana-600M-512px](https://huggingface.co/Efficient-Large-Model/Sana_600M_512px_diffusers) from 40 NFE (20 steps with CFG 4.5) into **4-NFE students** using four methods. They were trained with the workshop notebook on one H100. Data: [`leffff/diffusion-distillation-workshop`](https://huggingface.co/datasets/leffff/diffusion-distillation-workshop).
16
+
17
+ | file | method | sampler (4 NFE) | training | CLIP ↑ | diversity | latent MSE to teacher |
18
+ |---|---|---|---|---|---|---|
19
+ | teacher | — | 20 Euler steps + CFG (40 NFE) | — | 32.29 | 0.075 | 0 |
20
+ | teacher | — | 4 Euler steps + CFG (8 NFE) | — | 30.73 | 0.117 | 0.54 |
21
+ | `adapter_cm.pt` | multistep (phased) consistency distillation | Euler | 5 min, 933 it × 16 | 32.67 | 0.088 | 0.41 |
22
+ | `adapter_ladd.pt` | LADD (adversarial, teacher-feature discriminator) | x0 + renoise | 5 min, 853 it × 16 | 31.95 | 0.101 | 1.42 |
23
+ | `adapter_dmd.pt` | DMD2 (reverse KL, fake score, backward simulation) | x0 + renoise | 30 min, 3101 it × 16, LR 1e-5 | 31.25 | 0.091 | 1.01 |
24
+ | `adapter_pdd.pt` | Parallel Decoding Distillation (N=32, L=8, midpoint) | 4 block-Euler steps | 5 min, 866 it × 16 | 32.88 | 0.093 | 0.42 |
25
+
26
+ Metrics: 6 eval prompts × 4 seeds, CLIP ViT-B/32. Trajectory methods (CM, PDD) keep the teacher's noise→image map (low MSE); distribution methods (LADD, DMD) do not.
27
+
28
+ Note on DMD: the same config with LR 5e-5 (3100 it × 16) reached CLIP 32.37. That adapter is not included here.
29
+
30
+ ![comparison](samples/comparison.png)
31
+
32
+ ## Format
33
+
34
+ Each `.pt` file is a dict produced by the notebook's `save_adapter`: a peft LoRA state dict (`get_peft_model_state_dict`; r=32 for CM/LADD/PDD, r=128 for DMD; targets `to_q, to_k, to_v, to_out.0, conv_inverted, conv_point, proj_out.base`). `adapter_pdd.pt` also contains `grid.w` / `grid.b`: PDD's 32 output heads.
35
+
36
+ ## Usage (in the workshop notebook)
37
+
38
+ ```python
39
+ from huggingface_hub import hf_hub_download
40
+ import shutil
41
+ for m in ["cm", "ladd", "dmd", "pdd"]:
42
+ shutil.copy(hf_hub_download("leffff/diffusion-distillation-workshop-adapters", f"adapter_{m}.pt"), f"{CACHE_DIR}/adapter_{m}.pt")
43
+ load_adapter(m)
44
+ ```
adapter_cm.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d3efbcfcb534193464da30aeef54ece0d1f0c7019ba449f489677282f5923d69
3
+ size 105621507
adapter_dmd.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a6c13d7e8bbc137bfe4ee12297dc5f15aa12d1dfc077593c265d296d2b529878
3
+ size 421928507
adapter_ladd.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3d8f7e535e9bd7bb600c78e18914403ab82a0081654c6570a584f7fac41dbd87
3
+ size 105622643
adapter_pdd.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2aad2c37358cdbaaa69b772b11111702cfcfb69f4f67e3469940769b2422e993
3
+ size 110345343
samples/cm_samples.png ADDED

Git LFS Details

  • SHA256: 63cc8819964cabbae0e950a84a17566843ecb73ea8650c2444058212aacd37f8
  • Pointer size: 132 Bytes
  • Size of remote file: 1.27 MB
samples/comparison.png ADDED

Git LFS Details

  • SHA256: c145e296ed23a6fe79d3feb028c9e9de69618496c9f23ad6040a788a3f320653
  • Pointer size: 132 Bytes
  • Size of remote file: 2.63 MB
samples/diversity.png ADDED

Git LFS Details

  • SHA256: f38c895c9dde400e6408b989c9842d9894a23dd949b4c4a31c9c83922ad0c1fa
  • Pointer size: 132 Bytes
  • Size of remote file: 3.2 MB
samples/dmd_samples.png ADDED

Git LFS Details

  • SHA256: bc1375fdfae391352f3b02b4f2653cbbefbc78d550e3a07e04a8edc38be2793b
  • Pointer size: 132 Bytes
  • Size of remote file: 1.33 MB
samples/ladd_samples.png ADDED

Git LFS Details

  • SHA256: 53cf40091d7d6499c493cdf32833ab7c24e7c63d76352bf06d9eeb21cf991f3d
  • Pointer size: 132 Bytes
  • Size of remote file: 1.42 MB
samples/pdd_samples.png ADDED

Git LFS Details

  • SHA256: a8e95884183928aa5599c632e948db6694d70de92e49d0d905a5780c03c22bf5
  • Pointer size: 132 Bytes
  • Size of remote file: 1.72 MB