Heliosoph/sdxl-turbo-onnx
SDXL Turbo — ONNX
ONNX export of stabilityai/sdxl-turbo — Stability AI's Adversarial Diffusion Distillation (ADD) of Stable Diffusion XL base. 512×512 native (NOT the 1024 of full SDXL), designed to run at CFG = 1 in 1-4 inference steps.
This is a converted artifact, not a new model. All training credit belongs to Stability AI (Sauer, Lorenz, Blattmann, Rombach — ADD method, 2023).
What this repo contains
A standard ONNX SDXL diffusers pipeline layout:
model_index.json
scheduler/
text_encoder/ # CLIP-L (768-dim)
text_encoder_2/ # OpenCLIP-G (1280-dim, also emits text_embeds pooled output)
tokenizer/
tokenizer_2/
unet/ # SDXL UNet — encoder_hidden_states dim 2048 (concatenated)
vae_decoder/
vae_encoder/
LICENSE.md # Stability AI Community Licenseunet/model.onnx is paired with unet/model.onnx_data (external-weights file); both must travel together.
How it was produced
optimum-cli export onnx --model stabilityai/sdxl-turbo <output> against a pinned toolchain. No LoRA fuse step — SDXL Turbo is the distilled base, not a fine-tune.
Toolchain: optimum 1.24.0, diffusers 0.31.0, transformers 4.45.2, torch 2.4.x (CUDA 12.4). Full conversion script: `scripts/export-sdxl-turbo.ps1` in the Heliosoph repo.
Precision note: fp32 only. The optimum 1.24 / torch 2.4 / opset-14 fp16 path produces a numerically broken UNet for SDXL-class models (NaN/Inf cascades through attention softmax + group norm). Revisit fp16 when a confirmed working toolchain exists.
Inference notes
The 512 time_ids is the load-bearing difference from full SDXL bodies — feeding 1024 produces correctly-typed tensors but visibly off-aesthetic outputs (SDXL Turbo was distilled with the 512 conditioning baked in).
SDXL Turbo vs SD Turbo
SDXL Turbo is the right pick when 512 is enough output size and you want SDXL's prompt adherence at Turbo speed.
License
Stability AI Community License — LICENSE.md included in this repo and travels with redistribution.
⚠️ Commercial revenue threshold: This license is free for research, individuals, and commercial use below $1M annual revenue. Above the threshold, commercial use requires a separate Stability AI Enterprise License. By downloading you agree to these terms and to Stability's Acceptable Use Policy, which prohibits CSAM, non-consensual deepfakes, harassment, malware generation, and similar misuse. The AUP propagates with the model — your derivatives and downstream redistributions must impose the same policy.
Citation
@article{sauer2023adversarial,
title = {Adversarial Diffusion Distillation},
author = {Sauer, Axel and Lorenz, Dominik and Blattmann, Andreas and Rombach, Robin},
journal = {arXiv preprint arXiv:2311.17042},
year = {2023}
}