delete lcm readme
Browse files- lcm/README.md +0 -80
lcm/README.md
DELETED
|
@@ -1,80 +0,0 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: openrail++
|
| 3 |
-
base_model: stabilityai/stable-diffusion-xl-base-1.0
|
| 4 |
-
language:
|
| 5 |
-
- en
|
| 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 |
-
|
| 24 |
-
- **Developed by:** Stability AI
|
| 25 |
-
- **Model type:** Diffusion-based text-to-image generative model
|
| 26 |
-
- **License:** [CreativeML Open RAIL++-M License](https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/blob/main/LICENSE.md)
|
| 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 |
-
|
| 34 |
-
| Accelerator | CLIP | Unet | VAE |Total |
|
| 35 |
-
|-------------|--------------------------|-----------------------------|------------------------|------------------------|
|
| 36 |
-
| A100 | 1.08 ms | 192.02 ms | 228.34 ms | 426.16 ms |
|
| 37 |
-
| H100 | 0.78 ms | 102.8 ms | 126.95 ms | 234.22 ms |
|
| 38 |
-
|
| 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
|
| 46 |
-
git checkout release/9.2
|
| 47 |
-
docker run --rm -it --gpus all -v $PWD:/workspace nvcr.io/nvidia/pytorch:23.11-py3 /bin/bash
|
| 48 |
-
```
|
| 49 |
-
|
| 50 |
-
2. Download the SDXL LCM TensorRT files from this repo
|
| 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 |
-
```
|
| 58 |
-
|
| 59 |
-
3. Install libraries and requirements
|
| 60 |
-
```shell
|
| 61 |
-
cd demo/Diffusion
|
| 62 |
-
python3 -m pip install --upgrade pip
|
| 63 |
-
pip3 install -r requirements.txt
|
| 64 |
-
python3 -m pip install --pre --upgrade --extra-index-url https://pypi.nvidia.com tensorrt
|
| 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"" \
|
| 72 |
-
--version=xl-1.0 \
|
| 73 |
-
--onnx-dir /workspace/stable-diffusion-xl-1.0-tensorrt/lcm \
|
| 74 |
-
--engine-dir /workspace/stable-diffusion-xl-1.0-tensorrt/engine-sdxl-lcm-nocfg \
|
| 75 |
-
--scheduler LCM \
|
| 76 |
-
--denoising-steps 4 \
|
| 77 |
-
--guidance-scale 0.0 \
|
| 78 |
-
--seed 42
|
| 79 |
-
|
| 80 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|