Update lcm/README
Browse files- lcm/README.md +7 -5
lcm/README.md
CHANGED
@@ -6,17 +6,18 @@ language:
|
|
6 |
tags:
|
7 |
- stable-diffusion
|
8 |
- stable-diffusion-xl
|
|
|
9 |
- tensorrt
|
10 |
- text-to-image
|
11 |
---
|
12 |
|
13 |
-
# Stable Diffusion XL 1.0 TensorRT
|
14 |
|
15 |
## Introduction
|
16 |
|
17 |
This repository hosts the Latent Consistency Model(LCM) TensorRT versions of **Stable Diffusion XL 1.0** created in collaboration with [NVIDIA](https://huggingface.co/nvidia). The optimized versions give substantial improvements in speed and efficiency.
|
18 |
|
19 |
-
See the [usage instructions](#usage-example) for how to run the SDXL pipeline with the ONNX files hosted in this repository.
|
20 |
|
21 |
## Model Description
|
22 |
|
@@ -26,7 +27,7 @@ See the [usage instructions](#usage-example) for how to run the SDXL pipeline wi
|
|
26 |
- **Model Description:** This is a Latent Consistency Model (LCM) version of the [SDXL base 1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0) and [SDXL refiner 1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0) models for [NVIDIA TensorRT](https://developer.nvidia.com/tensorrt) optimized inference
|
27 |
|
28 |
|
29 |
-
## Performance
|
30 |
|
31 |
#### Timings for 4 steps at 1024x1024
|
32 |
|
@@ -38,7 +39,7 @@ See the [usage instructions](#usage-example) for how to run the SDXL pipeline wi
|
|
38 |
|
39 |
## Usage Example
|
40 |
|
41 |
-
1. Following the [setup instructions](https://github.com/rajeevsrao/TensorRT/blob/release/
|
42 |
```shell
|
43 |
git clone https://github.com/rajeevsrao/TensorRT.git
|
44 |
cd TensorRT
|
@@ -50,7 +51,7 @@ docker run --rm -it --gpus all -v $PWD:/workspace nvcr.io/nvidia/pytorch:23.11-p
|
|
50 |
```shell
|
51 |
git lfs install
|
52 |
git clone https://huggingface.co/stabilityai/stable-diffusion-xl-1.0-tensorrt
|
53 |
-
cd stable-diffusion-xl-1.0-tensorrt
|
54 |
git lfs pull
|
55 |
cd ..
|
56 |
```
|
@@ -64,6 +65,7 @@ python3 -m pip install --pre --upgrade --extra-index-url https://pypi.nvidia.com
|
|
64 |
```
|
65 |
|
66 |
4. Perform TensorRT optimized inference
|
|
|
67 |
```
|
68 |
python3 demo_txt2img_xl.py \
|
69 |
""Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"" \
|
|
|
6 |
tags:
|
7 |
- stable-diffusion
|
8 |
- stable-diffusion-xl
|
9 |
+
- stable-diffusion-xl-lcm
|
10 |
- tensorrt
|
11 |
- text-to-image
|
12 |
---
|
13 |
|
14 |
+
# Stable Diffusion XL 1.0 LCM TensorRT
|
15 |
|
16 |
## Introduction
|
17 |
|
18 |
This repository hosts the Latent Consistency Model(LCM) TensorRT versions of **Stable Diffusion XL 1.0** created in collaboration with [NVIDIA](https://huggingface.co/nvidia). The optimized versions give substantial improvements in speed and efficiency.
|
19 |
|
20 |
+
See the [usage instructions](#usage-example) for how to run the SDXL pipeline with the ONNX files hosted in this repository.
|
21 |
|
22 |
## Model Description
|
23 |
|
|
|
27 |
- **Model Description:** This is a Latent Consistency Model (LCM) version of the [SDXL base 1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0) and [SDXL refiner 1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0) models for [NVIDIA TensorRT](https://developer.nvidia.com/tensorrt) optimized inference
|
28 |
|
29 |
|
30 |
+
## Performance
|
31 |
|
32 |
#### Timings for 4 steps at 1024x1024
|
33 |
|
|
|
39 |
|
40 |
## Usage Example
|
41 |
|
42 |
+
1. Following the [setup instructions](https://github.com/rajeevsrao/TensorRT/blob/release/9.2/demo/Diffusion/README.md) on launching a TensorRT NGC container.
|
43 |
```shell
|
44 |
git clone https://github.com/rajeevsrao/TensorRT.git
|
45 |
cd TensorRT
|
|
|
51 |
```shell
|
52 |
git lfs install
|
53 |
git clone https://huggingface.co/stabilityai/stable-diffusion-xl-1.0-tensorrt
|
54 |
+
cd stable-diffusion-xl-1.0-tensorrt/lcm
|
55 |
git lfs pull
|
56 |
cd ..
|
57 |
```
|
|
|
65 |
```
|
66 |
|
67 |
4. Perform TensorRT optimized inference
|
68 |
+
* The first invocation produces plan files in --engine-dir specific to the accelerator being run on and are reused for later invocations.
|
69 |
```
|
70 |
python3 demo_txt2img_xl.py \
|
71 |
""Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"" \
|