kijai / ComfyUI-LivePortraitKJ

ComfyUI nodes for LivePortrait
MIT License
1.33k stars 98 forks source link

install ComfyUI-LivePortraitKJ error(onnxruntime-gpu) #62

Open whg001 opened 1 month ago

whg001 commented 1 month ago

mac m3,have this problem。 mac not have onnxruntime-gpu

ComfyUI-Manager: EXECUTE => ['/Users/haogui/code-language/python/ai/miniconda3/envs/py3.11.5/bin/python', '-m', 'pip', 'install', 'onnxruntime-gpu']

[!] ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu (from versions: none) [!] ERROR: No matching distribution found for onnxruntime-gpu install script failed: https://github.com/kijai/ComfyUI-LivePortraitKJ

kijai commented 1 month ago

You probably just install the normal onnxruntime then with Mac, I don't know more

Grant-CP commented 1 month ago

Yes I think the normal onnxruntime package gives you onnxruntime-silicon. I don't know if there's a way to have a fallback package. I see some solutions that use setup.py but we don't use that in comfyui. Almost every repository I see that has non-essential packages says the optional package in the README and also sometimes has a command line message.

@kijai I feel like the intention of requirements.txt is that every package in there is required, so I don't feel like onnxruntime-gpu fits.

Another option would be to have a separate requirements.txt file call requirements_no_cuda.txt if you want the install to be as easy as possible for nvidia GPUs but still somewhat have support for others like MPS or AMD. See https://onnxruntime.ai/docs/install/#python-installs. Even onnxruntime-gpu is not the latest CUDA version

Grant-CP commented 1 month ago

My understanding is the Comfyui also will give an error message every start up if you have onnx-runtime without CUDA support enabled on a CUDA device. It's either Comfyui or the node that gives the DWPose preprocessor, but I've never not had the preprocessor nodes

whg001 commented 1 month ago

Yes I think the normal onnxruntime package gives you onnxruntime-silicon. I don't know if there's a way to have a fallback package. I see some solutions that use setup.py but we don't use that in comfyui. Almost every repository I see that has non-essential packages says the optional package in the README and also sometimes has a command line message.

@kijai I feel like the intention of requirements.txt is that every package in there is required, so I don't feel like onnxruntime-gpu fits.

Another option would be to have a separate requirements.txt file call requirements_no_cuda.txt if you want the install to be as easy as possible for nvidia GPUs but still somewhat have support for others like MPS or AMD. See https://onnxruntime.ai/docs/install/#python-installs. Even onnxruntime-gpu is not the latest CUDA version

thanks for you reply. i agree with your view. i will change the requirements.txt to try. onnxruntime-gpu to onnxruntime

now,LivePortraitKJ is normal thank you again for your help! Have a wonderful weekend!

whg001 commented 1 month ago

You probably just install the normal onnxruntime then with Mac, I don't know more

thanks for you reply,now i change the requirements.txt. it is normal. I completely agree with Grant-CP viewpoint.

x4080 commented 1 month ago

for mac, I dont think onnxruntime-silicon is needed anymore, this is from the github page

The official [ONNX Runtime](https://pypi.org/project/onnxruntime/) now includes arm64 binaries for MacOS as well with Core ML support. Please use the official wheel package as this repository is no longer needed.
Grant-CP commented 1 month ago

@x4080 Great thanks so much for finding that out for us. Super hellpful