Baseten

40% faster Stable Diffusion XL inference with NVIDIA TensorRT

Feb 22, 2024
40% faster Stable Diffusion XL inference with NVIDIA TensorRT
SummaryAI, from the source post

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