onnxruntime/onnxruntime
Tianlei Wu 62da3b1ca4
SDXL Latent Consistency Model (LCM) optimization (#18526)
Add support of LCM model
(https://huggingface.co/latent-consistency/lcm-sdxl) in SDXL demo.

Since LCM model does not need classifier-free guidance, so there is no
need to use negative prompt. The input and output shape is different
from original SDXL model: no need to double the batch dimension.

We also save metadata to image, and update image filename to include
scheduler and steps.

#### Latency (miliseconds) of generating 1024x1024 images in
A100-SXM4-80GB GPU

Engines are built with static input shape, and CUDA graph is enabled.
For dynamic shape input, the latency could be slower.

Batch Size | Pipeline | Steps | ORT_CUDA | ORT_TRT | TRT 8.6
-- | -- | -- | -- | -- | --
1 | LCM SDXL | 4 | 275 | 249 | 258
1 | LCM SDXL | 8 | 460 | 423 | 430
1 | SDXL Base | 30 | 2566 | 2535 | 2569
4 | LCM  SDXL | 4 | 925 | 887 | 1032
4 | LCM  SDXL | 8 | 1539 | 1493 | 1662
4 | SDXL Base | 30 | 9227 | 9408 | 9678
2023-11-21 21:27:49 -08:00
..
contrib_ops Add missing flags DISABLE_FLOAT8_TYPES in GemmFloat8 custom operator for CUDA < 11.8 (#18162) 2023-11-21 14:37:48 +01:00
core [js/webgpu] enable f16 for concat (#18528) 2023-11-21 14:26:00 -08:00
python SDXL Latent Consistency Model (LCM) optimization (#18526) 2023-11-21 21:27:49 -08:00
test Add missing flags DISABLE_FLOAT8_TYPES in GemmFloat8 custom operator for CUDA < 11.8 (#18162) 2023-11-21 14:37:48 +01:00
tool/etw
wasm [js/web/training] Add CreateTrainingSession (#17891) 2023-10-26 09:22:10 -07:00
__init__.py Removed all the deprecated python training code and related tests and utils (#18333) 2023-11-17 18:19:21 -08:00
ReformatSource.ps1
ReformatSourcePython.bat
VSCodeCoverage.runsettings