ONNX Model Zoo

peterfeltermuff/stable-diffusion-xl-1.0-tensorrt

By peterfeltermuff · ↓ 14 · ♥ 0 · Updated 2026-03-03

What's in this repo

This page lists the files in peterfeltermuff/stable-diffusion-xl-1.0-tensorrt, including model.onnx and more.

  • 13 ONNX models (.onnx files)
  • 21 files, including 13 .onnx, 1 .md, 1 .jpg
  • Last updated 2026-03-03

ONNX files

File Size Download
lcm/clip.opt/model.onnx — Download
lcm/clip2.opt/model.onnx — Download
lcm/unetxl.opt/model.onnx — Download
lcm/vae.opt/model.onnx — Download
lcmlora/clip.opt/model.onnx — Download
lcmlora/clip2.opt/model.onnx — Download
lcmlora/unetxl-8c8ce9e8b00b259425e5f3eaa4b1d705-1.00.opt/model.onnx — Download
lcmlora/vae.opt/model.onnx — Download
sdxl-1.0-base/clip.opt/model.onnx — Download
sdxl-1.0-base/clip2.opt/model.onnx — Download

Showing 10 of 13 .onnx files — see the full file list on the right.

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

Stable Diffusion XL 1.0 TensorRT

Introduction

This repository hosts the TensorRT versions(sdxl, sdxl-lcm, sdxl-lcmlora) of Stable Diffusion XL 1.0 created in collaboration with NVIDIA. The optimized versions give substantial improvements in speed and efficiency.

See the usage instructions for how to run the SDXL pipeline with the ONNX files hosted in this repository.

examples

Model Description

Performance Comparison

Timings for 30 steps at 1024x1024
Accelerator Baseline (non-optimized) NVIDIA TensorRT (optimized) Percentage improvement
A10 9399 ms 8160 ms ~13%
A100 3704 ms 2742 ms ~26%
H100 2496 ms 1471 ms ~41%
Image throughput for 30 steps at 1024x1024
Accelerator Baseline (non-optimized) NVIDIA TensorRT (optimized) Percentage improvement
A10 0.10 images/sec 0.12 images/sec ~20%
A100 0.27 images/sec 0.36 images/sec ~33%
H100 0.40 images/sec 0.68 images/sec ~70%
Timings for Latent Consistency Model(LCM) version for 4 steps at 1024x1024
Accelerator CLIP Unet VAE Total
A100 1.08 ms 192.02 ms 228.34 ms 426.16 ms
H100 0.78 ms 102.8 ms 126.95 ms 234.22 ms

Usage Example

  1. Following the setup instructions on launching a TensorRT NGC container.
git clone https://github.com/rajeevsrao/TensorRT.git
cd TensorRT
git checkout release/9.2
docker run --rm -it --gpus all -v $PWD:/workspace nvcr.io/nvidia/pytorch:23.11-py3 /bin/bash
  1. Download the SDXL TensorRT files from this repo
git lfs install 
git clone https://huggingface.co/stabilityai/stable-diffusion-xl-1.0-tensorrt
cd stable-diffusion-xl-1.0-tensorrt
git lfs pull
cd ..
  1. Install libraries and requirements
cd demo/Diffusion
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
python3 -m pip install --pre --upgrade --extra-index-url https://pypi.nvidia.com tensorrt
  1. Perform TensorRT optimized inference:
  • SDXL

    The first invocation produces plan files in engine_xl_base and engine_xl_refiner specific to the accelerator being run on and are reused for later invocations.

    python3 demo_txt2img_xl.py \
      "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" \
      --build-static-batch \
      --use-cuda-graph \
      --num-warmup-runs 1 \
      --width 1024 \
      --height 1024 \
      --denoising-steps 30 \
      --onnx-base-dir /workspace/stable-diffusion-xl-1.0-tensorrt/sdxl-1.0-base \
      --onnx-refiner-dir /workspace/stable-diffusion-xl-1.0-tensorrt/sdxl-1.0-refiner
    
  • SDXL-LCM

    The first invocation produces plan files in --engine-dir specific to the accelerator being run on and are reused for later invocations.

    python3 demo_txt2img_xl.py \
      ""Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"" \
      --version=xl-1.0 \
      --onnx-dir /workspace/stable-diffusion-xl-1.0-tensorrt/lcm \
      --engine-dir /workspace/stable-diffusion-xl-1.0-tensorrt/lcm/engine-sdxl-lcm-nocfg \
      --scheduler LCM \
      --denoising-steps 4 \
      --guidance-scale 0.0 \
      --seed 42
    
    
  • SDXL-LCMLORA

    The first invocation produces plan files in --engine-dir specific to the accelerator being run on and are reused for later invocations.

    python3 demo_txt2img_xl.py \
      ""Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"" \
      --version=xl-1.0 \
      --onnx-dir /workspace/stable-diffusion-xl-1.0-tensorrt/lcmlora \
      --engine-dir /workspace/stable-diffusion-xl-1.0-tensorrt/lcm/engine-sdxl-lcmlora-nocfg \
      --scheduler LCM \
      --lora-path latent-consistency/lcm-lora-sdxl \
      --lora-scale 1.0 \
      --denoising-steps 4 \
      --guidance-scale 0.0 \
      --seed 42
    
    

Model info

text-to-image tensorrt
tensorrt onnx stable-diffusion stable-diffusion-xl stable-diffusion-xl-lcm stable-diffusion-xl-lcmlora text-to-image en base_model:stabilityai/stable-diffusion-xl-base-1.0 base_model:quantized:stabilityai/stable-diffusion-xl-base-1.0 license:openrail++ region:us
↓ 14 ♥ 0

Created: 2026-03-03

Updated: 2026-03-03

View on Hugging Face

Files (21)

.gitattributes
README.md
examples.jpg
lcm/clip.opt/model.onnx ONNX
lcm/clip2.opt/model.onnx ONNX
lcm/unetxl.opt/dbf91c42-985c-11ee-9041-0242ac110002
lcm/unetxl.opt/model.onnx ONNX
lcm/vae.opt/model.onnx ONNX
lcmlora/clip.opt/model.onnx ONNX
lcmlora/clip2.opt/model.onnx ONNX
lcmlora/unetxl-8c8ce9e8b00b259425e5f3eaa4b1d705-1.00.opt/1376e228-9608-11ee-9b07-0242ac110002
lcmlora/unetxl-8c8ce9e8b00b259425e5f3eaa4b1d705-1.00.opt/model.onnx ONNX
lcmlora/vae.opt/model.onnx ONNX
sdxl-1.0-base/clip.opt/model.onnx ONNX
sdxl-1.0-base/clip2.opt/model.onnx ONNX
sdxl-1.0-base/unetxl.opt/435d4c0a-2d32-11ee-8476-0242c0a80101
sdxl-1.0-base/unetxl.opt/model.onnx ONNX
sdxl-1.0-refiner/clip2.opt/model.onnx ONNX
sdxl-1.0-refiner/unetxl.opt/6e186582-2d74-11ee-8aa7-0242c0a80102
sdxl-1.0-refiner/unetxl.opt/6ed855ee-2d70-11ee-af8e-0242c0a80101
sdxl-1.0-refiner/unetxl.opt/model.onnx ONNX

Related models