Skip to content

Commit 1c0e3fd

Browse files
committed
Add HuggingFace Stable Diffusion pipeline demo
Signed-off-by: Kevin Chen <kevinch@nvidia.com>
1 parent 08a6ef9 commit 1c0e3fd

File tree

2 files changed

+1326
-0
lines changed

2 files changed

+1326
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Introduction
2+
3+
This demo notebook showcases the acceleration of Stable Diffusion pipeline using TensorRT through HuggingFace pipelines.
4+
5+
# Setup
6+
7+
### Clone the TensorRT OSS repository
8+
9+
```bash
10+
git clone git@github.com:NVIDIA/TensorRT.git -b release/8.6 --single-branch
11+
cd TensorRT/demo/experimental/HuggingFace-Diffusers
12+
```
13+
14+
### Launch TensorRT NGC container
15+
16+
Install nvidia-docker using [these intructions](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker). Launch the docker container with the following command:
17+
18+
```bash
19+
docker run --rm -it --gpus all -p 8888:8888 -v $PWD:/workspace nvcr.io/nvidia/tensorrt:23.04-py3 /bin/bash
20+
```
21+
22+
### Run Jupyter Notebook
23+
24+
Install `jupyter` with:
25+
26+
```bash
27+
pip install jupyter
28+
```
29+
30+
Launch the notebook within the container with:
31+
32+
```bash
33+
jupyter notebook --ip 0.0.0.0 TensorRT-diffusers-txt2img.ipynb --allow-root --no-browser
34+
```
35+
36+
Follow the console output for the link to run the notebook on your host machine.

0 commit comments

Comments
 (0)