Q. TensorRT가 뭐임?

A.


블라드좌가 Olive와 ONNX를 쓰느니 TensorRT 쓰고만다고 한 그것.


주소: https://github.com/AUTOMATIC1111/stable-diffusion-webui-tensorrt


설치법

1. 다른 확장 설치하는것과 똑같이 위 주소로 확장을 설치한다.

2. https://developer.nvidia.com/nvidia-tensorrt-8x-download nvidia tensorrt 홈페이지에 가서 로그인을 하고


Zip Packages for Windows에서 두개중 위에거를 다운받는다.

혹시 자기가 torch 2.1.0+cu121 개발버전을 쓰는 얼리어답터라면 아래거를 받는다.


3. webui경로/extensions/stable-diffusion-webui-tensorrt 에 다운받은 zip파일의 압축을 푼다. TensorRT로 시작하는 이름의 폴더가 제대로 위치하는지 확인할것


그리고 이제


How to use

1. Slect the model you want to optimize and make a picture with it, including needed loras and hypernetworks.

2. Go to a TensorRT tab that appears if the extension loads properly.

3. In Convert to ONNX tab, press Convert Unet to ONNX.

    This takes a short while.

    After the conversion has finished, you will find an .onnx file with model in models/Unet-onnx directory.

4. In Convert ONNX to TensorRT tab, configure the necessary parameters (including writing full path to onnx model) and press Convert ONNX to TensorRT.

    This takes very long - from 15 minues to an hour.

    This takes up a lot of VRAM: you might want to press "Show command for conversion" and run the command yourself after shutting down webui.

    After the conversion has finished, you will find a .trt file with model in models/Unet-trt directory.

5. In settings, in Stable Diffusion page, use SD Unet option to select newly generated TensorRT model.

6. Generate pictures.


이걸 따라하면 되는데 자고 일어나서 해볼예정


※ 이거 자동좌 현재버전에서 안됨. dev 브랜치에서 해야함