Instructions to use AiArtLab/sdxs-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use AiArtLab/sdxs-1b with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("AiArtLab/sdxs-1b", dtype=torch.bfloat16, device_map="cuda") prompt = "sdxs-1b" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
newvae
Browse files- README.md +22 -22
- media/123456789.png +2 -2
- media/girl.jpg +2 -2
- media/result_grid.jpg +2 -2
- test.ipynb +2 -2
- vae/diffusion_pytorch_model.safetensors +1 -1
README.md
CHANGED
|
@@ -85,7 +85,27 @@ image.show()
|
|
| 85 |
Prompt: *cat* (Neg: low quality, bad quality, photo, low details)
|
| 86 |

|
| 87 |
|
| 88 |
-
###
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
-
|
| 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 |

|
| 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
|
|
Git LFS Details
|
media/girl.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
media/result_grid.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
test.ipynb
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 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:
|
| 3 |
size 383499124
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d0963803789980cdf3df4d4e87b26c099ccd3ed08b78deb7a12afaba5e193c97
|
| 3 |
size 383499124
|