NVIDIA/Stable-Diffusion-WebUI-TensorRT
NVIDIA/Stable-Diffusion-WebUI-TensorRT has 1,979 GitHub stars and 163 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-12 18:14 UTC. Last push 2024-06-14.
TensorRT Extension for Stable Diffusion Web UI
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 업데이트 지연
- in 1 month
- 업데이트 지연
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalTensorRT Extension for Stable Diffusion
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,2.1, SDXL, SDXL Turbo, and LCM. For SDXL and SDXL Turbo, we recommend using a GPU with 12 GB or more VRAM for best performance due to its size and computational intensity.
Installation
Example instructions for Automatic1111:
- Start the webui.bat
- Select the Extensions tab and click on Install from URL
- Copy the link to this repository and paste it into URL for extension's git repository
- Click Install
How to use
- Click on the “Generate Default Engines” button. This step takes 2-10 minutes depending on your GPU. You can generate engines for other combinations.
- Go to Settings → User Interface → Quick Settings List, add sd_unet. Apply these settings, then reload the UI.
- Back in the main UI, select “Automatic” from the sd_unet dropdown menu at the top of the page if not already selected.
- You can now start generating images accelerated by TRT. If you need to create more Engines, go to the TensorRT tab.
Happy prompting!
LoRA
To use LoRA / LyCORIS checkpoints they first need to be converted to a TensorRT format. This can be done in the TensorRT extension in the Export LoRA tab.
- Select a LoRA checkpoint from the dropdown.
- Export. (This will not generate an engine but only convert the weights in ~20s)
- You can use the exported LoRAs as usual using the prompt embedding.
More Information
TensorRT uses optimized engines for specific resolutions and batch sizes. You can generate as many optimized engines as desired. Types:
- The "Export Default Engines” selection adds support for resolutions between
512 x 512and 768x768 for Stable Diffusion 1.5 and 2.1 with batch sizes 1 to 4. For SDXL, this selection generates an engine supporting a resolution of1024 x 1024with a batch size of1. - Static engines support a single specific output resolution and batch size.
- Dynamic engines support a range of resolutions and batch sizes, at a small cost in performance. Wider ranges will use more VRAM.
- The first time generating an engine for a checkpoint will take longer. Additional engines generated for the same checkpoint will be much faster.
Each preset can be adjusted with the “Advanced Settings” option. More detailed instructions can be found here.
Common Issues/Limitations
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 the initial size is 512 x 512 and hires.fix upscales to 1024 x 1024, you must generate a single dynamic engine that covers the whole range.
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:
medvramandlowvramHave caused issues when compiling the engine.apiHas caused themodel.jsonto 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.
Requirements
Driver:
Linux: >= 450.80.02
- Windows: >= 452.39
We always recommend keeping the driver up-to-date for system wide performance improvements.
관련 프로젝트 살펴보기
freeCodeCamp/freeCodeCamp
freeCodeCamp.org의 오픈 소스 코드베이스와 커리큘럼입니다. 수학, 프로그래밍, 컴퓨터 과학을 무료로 배울 수 있습니다.
459,069 스타donnemartin/system-design-primer
대규모 시스템 설계 방법을 배우고 시스템 설계 면접을 준비할 수 있습니다. Anki 플래시카드가 포함되어 있습니다.
377,742 스타react/react
웹과 네이티브 사용자 인터페이스를 위한 라이브러리.
252,567 스타vuejs/vue
Vue 2 저장소입니다. Vue 3은 https://github.com/vuejs/core를 방문하세요.
212,527 스타