was-node-suite-comfyui icon indicating copy to clipboard operation
was-node-suite-comfyui copied to clipboard

It runs very slowly when removing image backgrounds via rembg.

Open water110 opened this issue 1 year ago • 2 comments

When I ran it for the first time, it reported an error, but quickly removed the background and reported the error as follows:

got prompt EP Error D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1131 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "E:\FreeSoft\sd\comfyui-aki-v1.3\python\lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll" when using ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider'] Falling back to ['CUDAExecutionProvider', 'CPUExecutionProvider'] and retrying. Prompt executed in 8.80 seconds

I checked and found some feedback that it was due to TensorRT not being installed, so I installed TensorRT-8.6.1.6, and after installing it, when removing the image background via rembg again, it didn't report the error again,but the running speed was very slow and it cost Taking more than 1 minute to process。 What is the problem and how can I optimize this problem?

water110 avatar Jul 17 '24 16:07 water110

There is also rembg[gpu] package meant to run on the GPU, and then rembg that is CPU. Which do you have installed?

On Wed, Jul 17, 2024 at 9:29 AM water110 @.***> wrote:

When I ran it for the first time, it reported an error, but quickly removed the background and reported the error as follows:

got prompt EP Error D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1131 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "E:\FreeSoft\sd\comfyui-aki-v1.3\python\lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll" when using ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider'] Falling back to ['CUDAExecutionProvider', 'CPUExecutionProvider'] and retrying. Prompt executed in 8.80 seconds

I checked and found some feedback that it was due to TensorRT not being installed, so I installed TensorRT-8.6.1.6, and after installing it, when removing the image background via rembg again, it didn't report the error again,but the running speed was very slow and it cost Taking more than 1 minute to process。 What is the problem and how can I optimize this problem?

— Reply to this email directly, view it on GitHub https://github.com/WASasquatch/was-node-suite-comfyui/issues/441, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIZEZPMWSAKX7SRWNJUUKLZM2LV5AVCNFSM6AAAAABLA7NPCKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQYTIMBVGAZDEOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Sincerely, *Jordan S. C. Thompson *

WASasquatch avatar Jul 18 '24 00:07 WASasquatch

There is also rembg[gpu] package meant to run on the GPU, and then rembg that is CPU. Which do you have installed?

I installed rembg using the following command 'pip install rembg[gpu]==2.0.57', but the 'pip list 'command shows 'rembg' instead of 'rembg[gpu]'. I don’t know if I have successfully installed 'rembg[gpu]'.

water110 avatar Jul 18 '24 08:07 water110

Yeah I don't think pip shows the package selected. I am not sure if they have a way to check what device it's using, but maybe they have a way to implicitly set it to cuda.

WASasquatch avatar Oct 25 '24 15:10 WASasquatch