40% faster Stable Diffusion XL inference with NVIDIA TensorRT
Feb 22, 2024

Summary
This post details the process of optimizing Stable Diffusion XL (SDXL) inference by 40% using NVIDIA TensorRT. It breaks down the SDXL architecture into its core components (CLIP, UNet, Refiner, VAE) and explains how each was individually optimized by exporting to ONNX, generating optimized TensorRT engines, and integrating them back into the pipeline. Performance benchmarks on A10G, A100, and H100 GPUs are provided, along with considerations for production deployment and future optimization avenues such as optimized attention and VAE implementations.
More from the Baseten AI Model Deployment and Serving Platform trail
- LangChain trains custom models for LangSmith Engine with Baseten Loops
- DeepSeek-V4.1-Flash: more efficient prefill for coding agents
- Blaxel is joining Baseten to build the future of agentic infrastructure
- How Baseten makes pyannote’s diarization models 9.6x faster
- Optimizing delta weight syncs for managed rollouts