Open andrewtvuong opened 1 week ago
Opened this pull to show what I tried https://github.com/pythongosssss/ComfyUI-WD14-Tagger/pull/63
any luck fixing? having the same issue. WD14 tagger been a pain to run
I just started looking into this yesterday, will try to fix it when I have more time. Just starting discussions here in case I miss something.
I want to use CUDA instead of CPU to increase the speed on tag inference.
My machine Ubuntu 22.04.3 LTS (GNU/Linux 6.5.0-35-generic x86_64), CUDA 12.2
I learned from https://onnxruntime.ai/docs/install/ that if you have cuda 12 must install using
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
as of time of writing, instead of simplypip install onnxruntime-gpu
which is for cuda 11. This took me a while to figure out. Kept getting errors that didn't make sense:I had those objects. but after reading carefully and reinstalling based on the above for cuda 12 it worked. Using CUDAExecutionprovider instead of CPUExecutionprovider however did cause a new warning:
[W:onnxruntime:, transformer_memcpy.cc:74 ApplyImpl] 12 Memcpy nodes are added to the graph main_graph for CUDAExecutionProvider. It might have negative impact on performance (including unable to run CUDA graph). Set session_options.log_severity_level=1 to see the detail logs before this message.
Basically bottlenecked by CPU/GPU data transfer. Trying to figure out but have not been able to successfully.