Text-to-Image
Diffusers
Safetensors
recoilme commited on
Commit
a361215
·
1 Parent(s): ba35426
README.md CHANGED
@@ -85,7 +85,27 @@ image.show()
85
  Prompt: *cat* (Neg: low quality, bad quality, photo, low details)
86
  ![cat](media/cat.jpg)
87
 
88
- ### Image upscale
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  ```
90
  upscaled = pipe.image_upscale("media/girl.jpg")
91
  upscaled[0].show()
@@ -229,25 +249,6 @@ image = pipeline(
229
  )[0]
230
  ```
231
 
232
- ### VAE
233
-
234
- The VAE in Simple Diffusion utilizes an asymmetric VAE architecture featuring an 8x encoder and a 16x decoder. While a compression factor of 8 is maintained during training, the resolution is effectively doubled during inference through an additional upscaling block. This strategy reduces training costs by an order of magnitude and boosts inference speed without perceptual quality loss. Effectively, this acts as an integrated latent upscaler. To ensure a fair comparison with other VAEs, we downsampled the generated images to match the input resolution for metric evaluation. The SDXS VAE was not trained from scratch but was initialized from weights of FLUX 2 VAE, then redisigned and retrained. We also trained [16 ch vae](https://huggingface.co/AiArtLab/simplevae) with flux.1 quality based on aura vae.
235
-
236
- ```
237
- Wan2.2-T2V-A14B | MSE=8.908e-04 PSNR=33.21 LPIPS=0.052
238
- FLUX.1-schnell VAE | MSE=6.020e-04 PSNR=34.59 LPIPS=0.038
239
- FLUX.2-klein-9B | MSE=3.638e-04 PSNR=36.60 LPIPS=0.025
240
- sdxs-1b | MSE=3.491e-04 PSNR=36.95 LPIPS=0.027
241
-
242
- === Percents ===
243
- | Модель | MSE | PSNR | LPIPS | Edge | Skew|0 | Kurt|0 |
244
- |----------------------------|-----------|-----------|-----------|-----------|-----------|-----------|
245
- | Wan2.2-T2V-A14B | 100% | 100% | 100% | 100% | 100% | 100% |
246
- | FLUX.1-schnell VAE | 148.0% | 104.2% | 136.7% | 128.8% | 104.9% | 112.2% |
247
- | FLUX.2-klein-9B | 244.8% | 110.2% | 209.7% | 165.9% | 93.2% | 118.3% |
248
- | sdxs-1b | 255.2% | 111.2% | 193.7% | 171.6% | 93.3% | 118.2% |
249
- ```
250
- To the best of our knowledge, this VAE achieves SOTA: [eval.py](src/eval.py)
251
 
252
  ### Unet
253
 
@@ -271,8 +272,7 @@ Training was conducted with a maximum of 250 tokens, and a 10% dropout rate was
271
  Additionally, the use of a full-fledged language model allowed us to integrate an optional prompt enhancement mechanism into the pipeline.
272
 
273
  ### Retrospective and Key Takeaways
274
- ## The Journey Begins
275
- This adventure started in December 2024 after the release of the SANA model. We received a donation from Stan for fine-tuning SANA and, together with Stas, began fine-tuning and further developing it. Despite spending the entire budget, we did not achieve significant improvements. However, we were shocked by how poorly the model was trained and designed, and we became convinced that we could do better—though we were wrong.
276
  Shifting Gears
277
  By February 2025, we split our efforts and began designing our own architectures—which we are still doing today. Stas favored the DiT architecture, while I believed in UNet. Despite some differences in architectural views, we maintained close communication, shared our work, and supported each other throughout the process. We also engaged with the AIArtLab community (a virtual Telegram chat for those contributing to model development)—thank you all for your support.
278
  ## Main mistake
 
85
  Prompt: *cat* (Neg: low quality, bad quality, photo, low details)
86
  ![cat](media/cat.jpg)
87
 
88
+ ### VAE
89
+
90
+ The VAE in Simple Diffusion utilizes an asymmetric VAE architecture featuring an 8x encoder and a 16x decoder. While a compression factor of 8 is maintained during training, the resolution is effectively doubled during inference through an additional upscaling block. This strategy reduces training costs by an order of magnitude and boosts inference speed without perceptual quality loss. Effectively, this acts as an integrated latent upscaler. To ensure a fair comparison with other VAEs, we downsampled the generated images to match the input resolution for metric evaluation. The SDXS VAE was not trained from scratch but was initialized from weights of FLUX 2 VAE, then redisigned and retrained. We also trained [16 ch vae](https://huggingface.co/AiArtLab/simplevae) with flux.1 quality based on aura vae.
91
+
92
+ ```
93
+ Wan2.2-T2V-A14B | MSE=8.908e-04 PSNR=33.21 LPIPS=0.052
94
+ FLUX.1-schnell VAE | MSE=6.020e-04 PSNR=34.59 LPIPS=0.038
95
+ FLUX.2-klein-9B | MSE=3.638e-04 PSNR=36.60 LPIPS=0.025
96
+ sdxs-1b | MSE=3.530e-04 PSNR=36.92 LPIPS=0.027
97
+
98
+ === Percents ===
99
+ | Модель | MSE | PSNR | LPIPS | Edge | Skew|0 | Kurt|0 |
100
+ |----------------------------|-----------|-----------|-----------|-----------|-----------|-----------|
101
+ | Wan2.2-T2V-A14B | 100% | 100% | 100% | 100% | 100% | 100% |
102
+ | FLUX.1-schnell VAE | 148.0% | 104.2% | 136.7% | 128.8% | 104.9% | 112.2% |
103
+ | FLUX.2-klein-9B | 244.8% | 110.2% | 209.7% | 165.9% | 93.2% | 118.2% |
104
+ | sdxs-1b | 252.4% | 111.1% | 193.1% | 172.1% | 93.2% | 118.3% |
105
+ ```
106
+ To the best of our knowledge, this VAE achieves SOTA: [eval.py](src/eval.py)
107
+
108
+ ### Image upscale (vae)
109
  ```
110
  upscaled = pipe.image_upscale("media/girl.jpg")
111
  upscaled[0].show()
 
249
  )[0]
250
  ```
251
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
 
253
  ### Unet
254
 
 
272
  Additionally, the use of a full-fledged language model allowed us to integrate an optional prompt enhancement mechanism into the pipeline.
273
 
274
  ### Retrospective and Key Takeaways
275
+ Research started in December 2024 after the release of the SANA model. We received a donation from Stan for fine-tuning SANA and, together with Stas, began fine-tuning and further developing it. Despite spending the entire budget, we did not achieve significant improvements. However, we were shocked by how poorly the model was trained and designed, and we became convinced that we could do better—though we were wrong.
 
276
  Shifting Gears
277
  By February 2025, we split our efforts and began designing our own architectures—which we are still doing today. Stas favored the DiT architecture, while I believed in UNet. Despite some differences in architectural views, we maintained close communication, shared our work, and supported each other throughout the process. We also engaged with the AIArtLab community (a virtual Telegram chat for those contributing to model development)—thank you all for your support.
278
  ## Main mistake
media/123456789.png CHANGED

Git LFS Details

  • SHA256: 23cccef4940e4899124a63a96c4f9efa1eda83d488337869f0fe4a89afee7d57
  • Pointer size: 132 Bytes
  • Size of remote file: 3.11 MB

Git LFS Details

  • SHA256: 5fb010460ecc663dfe3d52378eaaaeb32dca9cabb741b990156a78c161bbdb1a
  • Pointer size: 132 Bytes
  • Size of remote file: 3.28 MB
media/girl.jpg CHANGED

Git LFS Details

  • SHA256: 732af382c624594eedd8aee643cc2a3b6408ede67795199b015e463197305872
  • Pointer size: 131 Bytes
  • Size of remote file: 342 kB

Git LFS Details

  • SHA256: 0f6d0f4af93d8f54395cebbe5915e77d3e2023b2bcc6d21f9c2df0279302f84a
  • Pointer size: 131 Bytes
  • Size of remote file: 138 kB
media/result_grid.jpg CHANGED

Git LFS Details

  • SHA256: 950d6f063f3c13d33653fc92c9fd2d143f3c6010f2fba1402157ea04163a9fa6
  • Pointer size: 132 Bytes
  • Size of remote file: 6.69 MB

Git LFS Details

  • SHA256: 6a11c623d872189c8abcfaaa8969cd251e07f60edb96386c22cad971d2ad6edc
  • Pointer size: 132 Bytes
  • Size of remote file: 6.42 MB
test.ipynb CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:14a8b19e30dd88dc0ecaaa8ee1fef716e6b0570b7e9133af42feb6465f6af25a
3
- size 17570487
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ffb8b63e9a963aee212f993c38154f7fef82b7c94325cb2266c39093d9aad108
3
+ size 13792585
vae/diffusion_pytorch_model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:780993a422cf0d783088c5116063ab6e3b1453a5256f205b78b1c67617f17b33
3
  size 383499124
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0963803789980cdf3df4d4e87b26c099ccd3ed08b78deb7a12afaba5e193c97
3
  size 383499124