AUTOMATIC1111 / stable-diffusion-webui-rembg

Removes backgrounds from pictures. Extension for webui.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Very slow since onnxruntime update + CUDA CUDA_MODULE_LOADING Environmental Variable not working

FatGuy84 opened this issue · comments

Since onnxruntime updated, I was forced to update tensorrt and cuDNN to get rembg working again.

Unfortunately, it's incredibly slow (1:30) now and I am not able to get it faster again, using a RTX 3080 10GB.

During processing, the terminal is spammed by the following:
[W:onnxruntime:Default, tensorrt_execution_provider.h:63 onnxruntime::TensorrtLogger::log] [2023-03-23 15:28:50 WARNING] CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage and speed up TensorRT initialization. See "Lazy Loading" section of CUDA documentation https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#lazy-loading

So, I've tried to set the env variable following AUTOMATIC1111/stable-diffusion-webui#8459 to my web-user.bat.

Unfortunately, neither
set CUDA_MODULE_LOADING="LAZY"
nor
set CUDA_MODULE_LOADING=LAZY

Seem to set the variable.

I'd appreciate help or a information about which version combination of CUDA, cuDNN and tensorrt would get me back to the previous speed.

My current versions:
CUDA 12.1.0
cuDNN 8.8.1.3
tensorrt 8.6.0.12

Thanks in advance!