WASasquatch / was-node-suite-comfyui

An extensive node suite for ComfyUI with over 210 new nodes
MIT License
1.15k stars 170 forks source link

It runs very slowly when removing image backgrounds via rembg. #441

Closed water110 closed 2 weeks ago

water110 commented 2 months ago

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?

WASasquatch commented 2 months ago

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

water110 commented 2 months ago

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]'.