Skip to content

Commit

Permalink
fixed: onnxruntime-gpu not support in mac
Browse files Browse the repository at this point in the history
  • Loading branch information
Ewall1106 committed Dec 25, 2023
1 parent 53b4b25 commit 96140bf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/comfyui/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ def install_webui():
install_git = "conda install -y -k ninja git"
install_pytorch = "python -m pip install torch torchvision torchaudio"
# fix: 依赖补丁 有些插件代码中引入了依赖包但是requirements.txt中却没有声明
install_patch = "python -m pip install opencv-python matplotlib scikit-image onnxruntime onnxruntime-gpu imageio-ffmpeg numexpr pandas"
install_patch = "python -m pip install opencv-python matplotlib scikit-image onnxruntime imageio-ffmpeg numexpr pandas"
install_conda_patch = 'conda install -y -k ffmpeg'
if is_windows():
install_patch += " onnxruntime-gpu"
# Set pip mirror to Tsinghua mirror
set_pip_mirror = "python -m pip config set global.index-url https://mirror.baidu.com/pypi/simple"

Expand Down Expand Up @@ -123,8 +125,10 @@ def update_requirements():

set_pip_mirror = "python -m pip config set global.index-url https://mirror.baidu.com/pypi/simple"
# fix: 依赖补丁 有些插件代码中引入了依赖包但是requirements.txt中却没有声明
install_patch = "python -m pip install opencv-python matplotlib scikit-image onnxruntime onnxruntime-gpu imageio-ffmpeg numexpr pandas"
install_patch = "python -m pip install opencv-python matplotlib scikit-image onnxruntime imageio-ffmpeg numexpr pandas"
install_conda_patch = 'conda install -y -k ffmpeg'
if is_windows():
install_patch += " onnxruntime-gpu"

run_cmd(f"{set_pip_mirror} && {install_conda_patch} && {install_patch} && python -m pip install -r requirements.txt --upgrade", assert_success=True, environment=True)

Expand Down

0 comments on commit 96140bf

Please sign in to comment.