Hippotes commited on
Commit
7d624d7
·
verified ·
1 Parent(s): 299db6e

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,6 @@ 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
+ vae_finetune/assets/alpha.png filter=lfs diff=lfs merge=lfs -text
37
+ vae_finetune/assets/noise.png filter=lfs diff=lfs merge=lfs -text
38
+ vae_finetune/assets/zoom.png filter=lfs diff=lfs merge=lfs -text
vae_finetune/README.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ming-Image VAE decoder finetune
2
+
3
+ A finetuned decoder for the Ming-Image VAE (same weights as the Qwen-Image-Layered RGBA VAE). The encoder is untouched, latents are identical and the file is a drop-in replacement in ComfyUI.
4
+
5
+ The stock decoder leaves an 8 px block pattern and fine grain in flat areas such as skies, walls and design backgrounds. This finetune removes that pattern, keeps texture on skin, foliage and fabric, and even decodes transparency more accurately.
6
+
7
+ ## Results
8
+
9
+ On 50 hold-out pictures, fp16 compute.
10
+
11
+ | | Stock | Finetune |
12
+ |---|---|---|
13
+ | PSNR (dB) | 31.60 | 32.06 |
14
+ | LPIPS (AlexNet) | 0.0497 | 0.0207 |
15
+ | 8 px grid strength in the error | 0.146 | 0.012 |
16
+ | Mean abs error on flat pixels (levels of 255) | 1.42 | 0.83 |
17
+
18
+ RGBA round trip on 10 hold-out photos with synthetic masks, alpha PSNR in dB:
19
+
20
+ | Mask | Stock | Finetune |
21
+ |---|---|---|
22
+ | Soft gradient | 24.95 | 38.12 |
23
+ | Hard shapes | 44.82 | 49.56 |
24
+ | Hair strands | 23.24 | 24.05 |
25
+ | Text | 40.68 | 43.83 |
26
+ | Mean alpha on fully transparent pixels | 0.0033 | 0.0010 |
27
+
28
+ ### Block pattern
29
+
30
+ Round-trip error on the flattest hold-out crop, amplified 10x. The bottom row averages the error by pixel position modulo 8 over all 50 photos. The stock decoder has a strong periodic bias aligned with the latent grid; the finetune is close to flat.
31
+
32
+ ![noise](assets/noise.png)
33
+
34
+ ### Texture on generations
35
+
36
+ Ming-Image generations decoded from the same latents. Top row stock, bottom row finetune.
37
+
38
+ ![zoom](assets/zoom.png)
39
+
40
+ ### Training curves
41
+
42
+ ![training](assets/training.png)
43
+
44
+ ## Training
45
+
46
+ - Trainable: decoder and post-quant conv. Frozen: encoder and quant conv.
47
+ - Data: 3,500 photos. Random crops after a 0.5x to 1.0x downscale, horizontal flips.
48
+ - Steps 0 to 5k: L1 + LPIPS, 256 px crops, batch 8, AdamW lr 2e-5, EMA 0.999.
49
+ - Steps 5k to 15k: adds a PatchGAN discriminator (hinge loss, adaptive weight x0.1).
50
+ - Steps 15k to 20k: 512 px crops, batch 4, lr 1e-5. Half of the samples get a random alpha mask (gradients, shapes, hair strands, text). Alpha L1 against the input alpha, RGB L1 weighted by alpha, LPIPS and GAN on composites over gray. GAN weight x0.2, adaptive weight capped at 0.01.
vae_finetune/assets/alpha.png ADDED

Git LFS Details

  • SHA256: 8723be03fb9e163db9e717b8eaedb0b686681c9007cc822b2675033d57ad6dbc
  • Pointer size: 132 Bytes
  • Size of remote file: 1.52 MB
vae_finetune/assets/noise.png ADDED

Git LFS Details

  • SHA256: 2cd1478248a3e301d87c20345ed7fd186a67041c1f2aee6df0bf3eb348330428
  • Pointer size: 131 Bytes
  • Size of remote file: 357 kB
vae_finetune/assets/training.png ADDED
vae_finetune/assets/zoom.png ADDED

Git LFS Details

  • SHA256: 7d627c8e72d47669c9695cc6685b435e6a11a8faf78458ec7fb857c03c3b597a
  • Pointer size: 132 Bytes
  • Size of remote file: 1.4 MB