Instructions to use Ouinche/taesdxl-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Ouinche/taesdxl-MLX with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download Ouinche/taesdxl-MLX --local-dir taesdxl-MLX
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
TAESDXL · MLX
Ready-to-use TAESDXL (Tiny AutoEncoder for SDXL, by Ollin Boer Bohan) for pure-MLX decoding on Apple Silicon, packaged for DiffusionBear.
TAESDXL is a ~2.5 M-parameter decoder that shares the SDXL-VAE latent space. It turns SDXL latents into an image in a fraction of a second and with almost no memory, instead of running the full 84 M-parameter SDXL VAE. DiffusionBear uses it for the fast-decode path of its SDXL models (Juggernaut XL Lightning, RealVis XL…).
Contents
| File | Size | Format | Used by |
|---|---|---|---|
diffusion_pytorch_model.safetensors + config.json |
9.8 MB | original diffusers layout, fp32 (unchanged copy of madebyollin/taesdxl) |
DiffusionBear (models/taesdxl/), loaded by its pure-MLX decoder, no PyTorch at runtime |
taesdxl_decoder_mlx.safetensors |
2.5 MB | decoder only, MLX NHWC conv layout, fp16 | taesdxl_mlx.py (standalone, ~50 lines) |
taesdxl_mlx.py |
2 KB | minimal MLX decoder + loader | Python MLX |
Verification
Round trip of a 1024×1024 photo: TAESDXL encoder (diffusers, PyTorch) → latents (1, 128, 128, 4) → decoder.
Left: input · middle: reference PyTorch AutoencoderTiny decode · right: MLX decode.
| Check | Result |
|---|---|
| MLX (DiffusionBear decoder, fp32) vs PyTorch decode | max abs diff 0.0000, PSNR 133.5 dB (bit-for-bit within float noise) |
taesdxl_mlx.py fp16 vs fp32 MLX decode |
PSNR 67.6 dB |
| Round trip vs input image | PSNR 28.6 dB (same as PyTorch: this is the TAESD quality ceiling) |
Performance (1024×1024 decode)
| Machine | Decoder | First call (load + mx.compile) |
Warm decode | Memory |
|---|---|---|---|---|
| VM Apple M4 Pro (virtualised), 16 GB | DiffusionBear, fp32 | 2.15 s | 0.25 s | MLX peak 1.5 GiB (activations) |
| VM Apple M4 Pro (virtualised), 16 GB | taesdxl_mlx.py, fp16 |
– | 0.10 s | – |
| Apple M1, 16 GB | – | not measured yet | ~0.5 s (DiffusionBear estimate) | – |
Weights take 10 MB on disk and ~10 MB of RAM. The full SDXL VAE needs ~160 MB of weights and several GiB of activations at 1024².
Usage
DiffusionBear
DiffusionBear looks for models/taesdxl/diffusion_pytorch_model.safetensors in its model folder. If the file is there, the fast-VAE option decodes SDXL images with TAESDXL. If it is missing, DiffusionBear falls back to the full VAE.
hf download Ouinche/taesdxl-MLX diffusion_pytorch_model.safetensors config.json \
--local-dir "<DiffusionBear model folder>/models/taesdxl"
Python MLX
import mlx.core as mx
from huggingface_hub import hf_hub_download
import importlib.util, sys
repo = "Ouinche/taesdxl-MLX"
weights = hf_hub_download(repo, "taesdxl_decoder_mlx.safetensors")
spec = importlib.util.spec_from_file_location("taesdxl_mlx", hf_hub_download(repo, "taesdxl_mlx.py"))
taesdxl_mlx = importlib.util.module_from_spec(spec); spec.loader.exec_module(taesdxl_mlx)
decoder = taesdxl_mlx.load_taesdxl_decoder(weights) # fp16, compiled
# latents: SDXL UNet output, NHWC (B, H/8, W/8, 4)
rgb = decoder(latents.astype(mx.float16)) # RGB in [0, 1]
image = (mx.clip(rgb, 0, 1) * 255).astype(mx.uint8)
Like the original TAESDXL, the decoder takes UNet latents as they are; no division by the SDXL-VAE scaling factor is needed.
License and attribution
- Original model: madebyollin/taesdxl · code madebyollin/taesd, © Ollin Boer Bohan, MIT License.
- This repository redistributes those weights unchanged (
diffusion_pytorch_model.safetensors) plus an MLX re-layout of the decoder (taesdxl_decoder_mlx.safetensors), under the same MIT License. - MLX packaging and verification: DiffusionBear · source github.com/OuincheWinch/DiffusionBear.
- Downloads last month
- 34
Quantized
Model tree for Ouinche/taesdxl-MLX
Base model
madebyollin/taesdxl
