Closed wming3 closed 4 months ago
The onnxruntime-gpu 1.18.0(https://github.com/Microsoft/onnxruntime/releases/tag/v1.18.0) can satisfy python version >=3.8. It seems that your pip version is too old. You can upgrade it by running:
pip install pip -U
pip version: 24.0
依然报: ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.18.0 (from versions: none) ERROR: No matching distribution found for onnxruntime-gpu==1.18.0
Try using python 3.10? Our experimental environment is python 3.9.18, but we tested python version 3.10 will not affect the result quality and inference speed.
3.10 也不行,问题在于 包onnxruntime-gpu==1.18.0 没有找到,你提到的 (https://github.com/Microsoft/onnxruntime/releases/tag/v1.18.0),下面有一些安装软件,能直接用么?
尝试过清华、阿狸镜像 也没有搜到 这个包,onnxruntime-gpu 1.18.0 应该从哪里获取?
Emmm....perhaps we don't necessarily need the latest version 1.18.0. You can directly download the latest GPU version of onnx-runtime that your pip can find. Please follow the instructions in Python Installs
in https://onnxruntime.ai/docs/install/.
“pip install onnxruntime” 是好的 “pip install onnxruntime-gpu” 会包不存在 “pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/” 也是报不存在
pip install -r requirements.txt
ERROR: Ignored the following versions that require a different python version: 1.14.0 Requires-Python >=3.10; 1.14.0rc1 Requires-Python >=3.10; 1.14.0rc2 Requires-Python >=3.10 ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.18.0 (from versions: none) ERROR: No matching distribution found for onnxruntime-gpu==1.18.0
Check using pip list which versions are mismatch. Here is the working one on Windows 11
(venv) C:\sd\LivePortrait>pip list Package Version
aiofiles 23.2.1 albucore 0.0.12 albumentations 1.4.10 altair 5.3.0 annotated-types 0.7.0 anyio 4.4.0 attrs 23.2.0 certifi 2024.7.4 charset-normalizer 3.3.2 click 8.1.7 colorama 0.4.6 coloredlogs 15.0.1 contourpy 1.2.1 cycler 0.12.1 dnspython 2.6.1 docstring_parser 0.16 email_validator 2.2.0 exceptiongroup 1.2.1 fastapi 0.111.0 fastapi-cli 0.0.4 ffmpeg 1.4 ffmpy 0.3.2 filelock 3.15.4 flatbuffers 24.3.25 fonttools 4.53.0 fsspec 2024.6.1 gradio 4.37.1 gradio_client 1.0.2 h11 0.14.0 httpcore 1.0.5 httptools 0.6.1 httpx 0.27.0 huggingface-hub 0.23.4 humanfriendly 10.0 idna 3.7 imageio 2.34.2 imageio-ffmpeg 0.5.1 importlib_resources 6.4.0 intel-openmp 2021.4.0 Jinja2 3.1.4 joblib 1.4.2 jsonschema 4.22.0 jsonschema-specifications 2023.12.1 kiwisolver 1.4.5 lazy_loader 0.4 lmdb 1.4.1 markdown-it-py 3.0.0 MarkupSafe 2.1.5 matplotlib 3.9.0 mdurl 0.1.2 mkl 2021.4.0 mpmath 1.3.0 networkx 3.3 numpy 1.26.4 onnx 1.16.1 onnxruntime-gpu 1.18.0 opencv-python 4.10.0.84 opencv-python-headless 4.10.0.84 orjson 3.10.6 packaging 24.1 pandas 2.2.2 pillow 10.4.0 pip 22.2.1 protobuf 5.27.2 pydantic 2.8.2 pydantic_core 2.20.1 pydub 0.25.1 Pygments 2.18.0 pyparsing 3.1.2 pyreadline3 3.4.1 python-dateutil 2.9.0.post0 python-dotenv 1.0.1 python-multipart 0.0.9 pytz 2024.1 PyYAML 6.0.1 referencing 0.35.1 requests 2.32.3 rich 13.7.1 rpds-py 0.18.1 ruff 0.5.0 scikit-image 0.24.0 scikit-learn 1.5.1 scipy 1.13.1 semantic-version 2.10.0 setuptools 63.2.0 shellingham 1.5.4 shtab 1.7.1 six 1.16.0 sniffio 1.3.1 starlette 0.37.2 sympy 1.12.1 tbb 2021.13.0 threadpoolctl 3.5.0 tifffile 2024.7.2 tomli 2.0.1 tomlkit 0.12.0 toolz 0.12.1 torch 2.3.0+cu118 torchaudio 2.3.0+cu118 torchvision 0.18.0+cu118 tqdm 4.66.4 typer 0.12.3 typing_extensions 4.12.2 tyro 0.8.5 tzdata 2024.1 ujson 5.10.0 urllib3 2.2.2 uvicorn 0.30.1 watchfiles 0.22.0 websockets 11.0.3
pip install -r requirements.txt
ERROR: Ignored the following versions that require a different python version: 1.14.0 Requires-Python >=3.10; 1.14.0rc1 Requires-Python >=3.10; 1.14.0rc2 Requires-Python >=3.10 ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.18.0 (from versions: none) ERROR: No matching distribution found for onnxruntime-gpu==1.18.0
What is the python version
Check using python --version
I'm running into this with:
Python 3.10.14 pip 24.1.1 Apple M1 Max
Same issue, tried with Python 3.9.6 3.11.1
ERROR: Ignored the following versions that require a different python version: 1.14.0 Requires-Python >=3.10; 1.14.0rc1 Requires-Python >=3.10; 1.14.0rc2 Requires-Python >=3.10 ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.18.0 (from versions: none) ERROR: No matching distribution found for onnxruntime-gpu==1.18.0
ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11; 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10; 1.7.2 Requires-Python >=3.7,<3.11; 1.7.3 Requires-Python >=3.7,<3.11; 1.8.0 Requires-Python >=3.8,<3.11; 1.8.0rc1 Requires-Python >=3.8,<3.11; 1.8.0rc2 Requires-Python >=3.8,<3.11; 1.8.0rc3 Requires-Python >=3.8,<3.11; 1.8.0rc4 Requires-Python >=3.8,<3.11; 1.8.1 Requires-Python >=3.8,<3.11 ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.18.0 (from versions: none) ERROR: No matching distribution found for onnxruntime-gpu==1.18.0
I'm running into this with:
Python 3.10.14 pip 24.1.1 Apple M1 Max
Digging a bit deeper, onnxruntime-gpu is not available for MacOS. I attempted to run this using the default onnxruntime
package, but hit gpu/cuda-related issues.
You can fetch the source code of ONNX Runtime from GitHub and compile it for M1 Mac.
Use the following command:
pip install onnxruntime-silicon
or
fix requirements.txt file and run pip install -r requirements.txt
--extra-index-url https://download.pytorch.org/whl/cu118
torch==2.3.0
torchvision==0.18.0
torchaudio==2.3.0
numpy==1.26.4
pyyaml==6.0.1
opencv-python==4.10.0.84
scipy==1.13.1
imageio==2.34.2
lmdb==1.4.1
tqdm==4.66.4
rich==13.7.1
ffmpeg==1.4
onnxruntime-silicon
onnx==1.16.1
scikit-image==0.24.0
albumentations==1.4.10
matplotlib==3.9.0
imageio-ffmpeg==0.5.1
tyro==0.8.5
gradio==4.37.1
I could pip install, but encountered an error when running python command. It seems that I need to rewrite some torch code to support Apple Silicon GPU, but I'm not sure how to do it yet.
File "/Users/user/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/torch/cuda/__init__.py", line 284, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
@mk668a I also occurs the same error🤔
File "/Users/user/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/torch/cuda/__init__.py", line 284, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
best way is using cuda 11.8, python 3.10.11, c++ tools and ffmpeg and installing into a venv
all shown in new tutorial
Hey there,
I wanted to point out that there's been some impressive work for CPU inference by ONNX model done on https://github.com/KwaiVGI/LivePortrait/issues/126. They've managed to get support for the M1 CPU. You might want to follow their progress as well. Great work is happening there : ) @nitinmukesh @mk668a @wming3 @CodyBontecou @mohapsat
Thank you for your patience, everyone. We are excited to inform you that LivePortrait now supports macOS with Apple Silicon! You can find more details here.
@nitinmukesh @mk668a @wming3 @CodyBontecou @mohapsat
great🔥
pip install -r requirements.txt
ERROR: Ignored the following versions that require a different python version: 1.14.0 Requires-Python >=3.10; 1.14.0rc1 Requires-Python >=3.10; 1.14.0rc2 Requires-Python >=3.10 ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.18.0 (from versions: none) ERROR: No matching distribution found for onnxruntime-gpu==1.18.0