A1111: nVidia TensorRT Extension for Stable Diffusion (Tutorial)

Veröffentlicht am: 10 Dezember 2023
auf dem Kanal: ControlAltAI
13,198
232

nVidia TensorRT Extension is an official extension for Stable Diffusion WebUI which allows you to use the Tensor Cores in your nVidia GPU for image generation performance boost. During my testing on an RTX 4090, I observed somewhere from 20% to 50% performance improvement when using TensorRT. However, it does have its limitations and bugs. In this tutorial, I cover everything from how it works, to installing it, removing launching errors, and explaining the exact settings for the training of the TensorRT Engine Profile.

------------------------

Relevant Links:

Onnx and RT FIles (YouTube Membership): https://www.youtube.com/@controlaltai...

A1111 GitHub: https://github.com/AUTOMATIC1111/stab...
nVidia TensorRT Extension: https://github.com/NVIDIA/Stable-Diff...

Checkpoints
SDXL: Hugging Face SDXL Base: https://huggingface.co/stabilityai/st...
SDXL VAE: https://huggingface.co/stabilityai/sd...
Juggernaut XL (Vae Auto): https://civitai.com/models/133005?mod...
DreamShaper (VAE Auto): https://civitai.com/models/4384?model...

Python and Git:
Python 3.10.11: https://www.python.org/downloads/rele...
Git Windows: https://git-scm.com/download/win

------------------------

Dev Branch Commands:
git branch -a
git checkout dev

Error Fixing Commands:
venv\scripts\activate.bat
pip uninstall tensorrt
pip cache purge
pip install --pre --extra-index-url https://pypi.nvidia.com tensorrt==9.0.1.post11.dev4
pip uninstall -y nvidia-cudnn-cu11
pip install onnxruntime
pip install colored
pip install onnx
venv\Scripts\deactivate.bat
webui.bat

Xformers Command:
pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121

PIP Upgrade Command:
python.exe -m pip install --upgrade pip

Cuda 12.1 Torch 2.1.1 Cdmmand:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

------------------------

Timestamps:

0:00 Intro.
0:58 About TensorRT.
3:52 A1111 Dev Branch Install.
7:39 Fixing Errors.
14:25 nVidia CP Setting.
15:27 RT Engine Configuration.
21:03 Exporting Process.
23:00 Testing with ADetailer.


Auf dieser Seite können Sie das Online-Video A1111: nVidia TensorRT Extension for Stable Diffusion (Tutorial) mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer ControlAltAI 10 Dezember 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 13,198 Mal angesehen und es wurde von 232 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!