AcademiaSD commited on
Commit
2447e0b
·
verified ·
1 Parent(s): a357bd4

Upload 3 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ 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
+ comparison.jpg filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: comfyui
4
+ pipeline_tag: text-to-image
5
+ tags:
6
+ - qwen-image
7
+ - qwen-image-2.1
8
+ - taesd
9
+ - tiny-autoencoder
10
+ - vae
11
+ - comfyui
12
+ - preview
13
+ ---
14
+
15
+ # TAE Qwen-Image 2.1 · AcademiaSD
16
+
17
+ <p align="center">
18
+ <b>Tiny AutoEncoder (TAESD-style decoder) for fast, sharp live previews of Qwen-Image 2.1 in ComfyUI.</b>
19
+ </p>
20
+
21
+ ![Original · TAE · Latent2RGB](comparison.jpg)
22
+
23
+ <p align="center"><i>Left: Qwen-Image 2.1 VAE · Center: <b>TAEQwenImage21_AcademiaSD</b> · Right: Latent2RGB (ComfyUI's default preview for this model)</i></p>
24
+
25
+ ComfyUI previews Qwen-Image 2.1 only with Latent2RGB, a linear 64→3 color projection that looks blurry and blocky. This decoder is distilled from the Qwen-Image 2.1 VAE: it turns the sampler's latents into a real preview image in about 15 ms, with no need for the full VAE.
26
+
27
+ | | |
28
+ | :--- | :--- |
29
+ | File | `TAEQwenImage21_AcademiaSD.safetensors` |
30
+ | Size | 3.3 MB (fp16) |
31
+ | Parameters | 1.63 M |
32
+ | Input | Qwen-Image 2.1 latents, 64 channels, as the sampler sees them (`x0`) |
33
+ | Output | RGB at 16× the latent resolution, range [0, 1] |
34
+ | Decode time | ~15 ms for a 1024×1024 preview (RTX 5080, fp16) |
35
+ | Validation PSNR | **30.1 dB** vs 20.9 dB for Latent2RGB |
36
+
37
+ ---
38
+
39
+ ## 🚀 Usage in ComfyUI
40
+
41
+ 1. Download `TAEQwenImage21_AcademiaSD.safetensors` to `ComfyUI/models/vae_approx/`.
42
+ 2. Install [ComfyUI-KJNodes](https://github.com/kijai/ComfyUI-KJNodes).
43
+ 3. Add the **Model Preview Override** node between your Qwen-Image 2.1 model and the sampler.
44
+ 4. In its `tiny_vae` input, choose `TAEQwenImage21_AcademiaSD.safetensors`.
45
+
46
+ > ComfyUI's built-in **TAESD** preview method does not pick up this file: core has no tiny decoder entry for Qwen-Image 2.1 and its TAESD loader only supports 8× decoders. Use the KJNodes node.
47
+
48
+ ## 🔧 Training details
49
+
50
+ - **Teacher:** Qwen-Image 2.1 VAE (`qwen_image_2.1_vae_bf16.safetensors`).
51
+ - **Architecture:** flat TAESD decoder, `Clamp → conv → 4 × (3 blocks + 2× upsample + conv) → block → conv`, width 64.
52
+ - **Latent space:** latents normalized with ComfyUI's `QwenImage21` latent format (mean/std), the same space as the sampler's `x0`, so no extra scaling is needed.
53
+ - **Data:** 4,072 varied images, 512×512 crops, encoded once with the real VAE.
54
+ - **Training:** 30,000 steps, batch 8, 256×256 tiles, AdamW LR 5e-4 with cosine decay, L1 + FFT loss, EMA 0.999, latent noise augmentation for stable previews on the noisy `x0` of the first steps.
55
+
56
+ ## ⚠️ Limitations
57
+
58
+ - Preview only: use the real VAE for the final decode.
59
+ - Decoder only, there is no encoder.
60
+ - RGB only: the Qwen-Image 2.1 VAE also decodes an alpha channel, which this decoder skips.
61
+
62
+ ---
63
+
64
+ # 🇪🇸 Español
65
+
66
+ Tiny AutoEncoder (decoder tipo TAESD) para previsualizar **Qwen-Image 2.1** en ComfyUI con nitidez y en tiempo real. Sustituye a Latent2RGB, la previsualización por defecto, borrosa y pixelada. Destilado del VAE de Qwen-Image 2.1: decodifica una previsualización de 1024 px en unos 15 ms, con 30,1 dB de PSNR frente a 20,9 dB de Latent2RGB.
67
+
68
+ **Uso:**
69
+ 1. Descarga `TAEQwenImage21_AcademiaSD.safetensors` en `ComfyUI/models/vae_approx/`.
70
+ 2. Instala [ComfyUI-KJNodes](https://github.com/kijai/ComfyUI-KJNodes).
71
+ 3. Pon el nodo **Model Preview Override** entre el modelo de Qwen-Image 2.1 y el sampler.
72
+ 4. En su entrada `tiny_vae`, elige `TAEQwenImage21_AcademiaSD.safetensors`.
73
+
74
+ El método de previsualización **TAESD** que trae ComfyUI no lo usa, porque no tiene entrada para Qwen-Image 2.1. Usa el nodo de KJNodes.
75
+
76
+ Solo sirve para previsualizar: la imagen final se decodifica con el VAE real.
77
+
78
+ ---
79
+
80
+ ## 🙏 Credits
81
+
82
+ - TAESD architecture: [madebyollin/taesd](https://github.com/madebyollin/taesd)
83
+ - Model Preview Override node: [kijai/ComfyUI-KJNodes](https://github.com/kijai/ComfyUI-KJNodes)
84
+ - Qwen-Image 2.1: Qwen team
85
+
86
+ ## 🔗 AcademiaSD
87
+
88
+ [YouTube](https://www.youtube.com/@Academia_SD) · [X / Twitter](https://twitter.com/Academia_S_D) · [Discord](https://discord.gg/Syuaduy678) · [Ko-fi](https://ko-fi.com/academiasd)
TAEQwenImage21_AcademiaSD.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73fa2ed8e1bf9609ac0e876e4ad89aa00a6c5708021d0c843a2b58d35db84ad4
3
+ size 3259798
comparison.jpg ADDED

Git LFS Details

  • SHA256: 36b68fe1f8933fd9c8c75094de433f29a4bcc5ddee49a2c44aa7075f15cc6ac1
  • Pointer size: 131 Bytes
  • Size of remote file: 247 kB