NVIDIA / Stable-Diffusion-WebUI-TensorRT
- суббота, 21 октября 2023 г. в 00:00:03
TensorRT Extension for Stable Diffusion Web UI
This extension enables the best performance on NVIDIA RTX GPUs for Stable Diffusion with TensorRT.
You need to install the extension and generate optimized engines before using the extension. Please follow the instructions below to set everything up.
Supports Stable Diffusion 1.5 and 2.1. Native SDXL support coming in a future release. Please use the dev branch if you would like to use it today. Note that the Dev branch is not intended for production work and may break other things that you are currently using.
Example instructions for Automatic1111:
Happy prompting!
TensorRT uses optimized engines for specific resolutions and batch sizes. You can generate as many optimized engines as desired. Types:
Each preset can be adjusted with the “Advanced Settings” option. More detailed instructions can be found here.
HIRES FIX: If using the hires.fix option in Automatic1111 you must build engines that match both the starting and ending resolutions. For instance, if initial size is 512 x 512
and hires.fix upscales to 1024 x 1024
, you must either generate two engines, one at 512 and one at 1024, or generate a single dynamic engine that covers the whole range.
Having two seperate engines will heavily impact performance at the moment. Stay tuned for updates.
Resolution: When generating images the resolution needs to be a multiple of 64. This applies to hires.fix as well, requiring the low and high-res to be divisible by 64.
Failing CMD arguments:
medvram
and lowvram
Have caused issues when compiling the engine and running it.api
Has caused the model.json
to not be updated. Resulting in SD Unets not appearing after compilation.Failing installation or TensorRT tab not appearing in UI: This is most likely due to a failed install. To resolve this manually use this guide.
Driver:
We always recommend keeping the driver up-to-date for system wide performance improvments.