GithubHelp home page GithubHelp logo

秋叶整合版安装GroundingDino失败:can not install groundingdion : Command '['ninja', '-v']' returned non-zero exit status 1. about sd-webui-segment-anything HOT 7 CLOSED

continue-revolution avatar continue-revolution commented on August 15, 2024
秋叶整合版安装GroundingDino失败:can not install groundingdion : Command '['ninja', '-v']' returned non-zero exit status 1.

from sd-webui-segment-anything.

Comments (7)

SmilingDumbass avatar SmilingDumbass commented on August 15, 2024

有一定程序基础但是python一无所知。。
再用aki整合版安装GroundingDino的时候永远报错,尝试直接git下GroundingDino项目然后pip安装是可以成功的,但是aki整合版是用了独立的python项目,我不知道怎么直接安装进来,就直接吧安装好的本地目录下的GroundingDino直接粘贴进aki的整合py310的项目目录里面是可以跳过安装的步骤,但是会出现_C的错误,然后我看我CUDA_HOME路径可以成功输出也是特意降级成了11.8版本,依然无果,正常运行插件进行安装GroundingDino永远会报错,现在不知道该怎么解决

from sd-webui-segment-anything.

continue-revolution avatar continue-revolution commented on August 15, 2024

去你发的报错里面的超链接提issue

from sd-webui-segment-anything.

hcwesson avatar hcwesson commented on August 15, 2024

我不确定这种情况是否适用,但我通过修改scripts/dino.py中的安装命令来覆盖pip所使用的C/C++编译器版本,从而解决了这个问题。每个CUDA版本都有一个最大的gcc/g++版本与其兼容。在我的例子中,使用CUDA 11.8意味着我需要使用gcc-11来安装GroundingDINO。

这是我正在使用的补丁:

diff --git a/scripts/dino.py b/scripts/dino.py
index 55ec3cb..cfdee92 100644
--- a/scripts/dino.py
+++ b/scripts/dino.py
@@ -33,9 +33,7 @@ def install_goundingdino():
     if launch.is_installed("groundingdino"):
         return True
     try:
-        launch.run_pip(
-            f"install git+https://github.com/IDEA-Research/GroundingDINO",
-            f"sd-webui-segment-anything requirement: groundingdino")
+        launch.run("CXX=g++-11 CC=gcc-11 LD=g++-11 pip install git+https://github.com/IDEA-Research/GroundingDINO")
         print("GroundingDINO install success.")
         return True
     except Exception:

请注意,这可能需要在 Windows 上进行修改,或者可能根本无法工作。我的环境有些不标准,因为我在 Linux 上使用 Vladmandic/automatic 分支,并使用 conda 管理我的环境中的 CUDA 版本。

如果您在 Linux 上运行,但您的 CUDA 版本不是 11.8,您可以通过将每个 g++-11 替换为系统上适当版本的 GCC 命令来使用补丁。查看此兼容性表以找到要使用的正确版本的 gcc:https://gist.github.com/ax3l/9489132

(对于我在语法上的任何错误,我表示歉意;我不会说/写普通话,所以这是用 GPT-4 翻译的。)

from sd-webui-segment-anything.

continue-revolution avatar continue-revolution commented on August 15, 2024

Thank you @hcwesson very much for your help towards the others. If applicable, you can also post your original response to help those who are English speakers.

from sd-webui-segment-anything.

hcwesson avatar hcwesson commented on August 15, 2024

Absolutely @continue-revolution, and thank you for your terrific work on this project!

English version:
I'm not sure if it's applicable in this case, but I was able to solve this problem by modifying the installation command in scripts/dino.py to override the C/C++ compiler version used by pip. Each CUDA version has a maximum version of gcc/g++ that it can be used with. In my case, using CUDA 11.8 meant I needed to install GroundingDINO with gcc-11.

Here's the patch I'm using:

diff --git a/scripts/dino.py b/scripts/dino.py
index 55ec3cb..cfdee92 100644
--- a/scripts/dino.py
+++ b/scripts/dino.py
@@ -33,9 +33,7 @@ def install_goundingdino():
     if launch.is_installed("groundingdino"):
         return True
     try:
-        launch.run_pip(
-            f"install git+https://github.com/IDEA-Research/GroundingDINO",
-            f"sd-webui-segment-anything requirement: groundingdino")
+        launch.run("CXX=g++-11 CC=gcc-11 LD=g++-11 pip install git+https://github.com/IDEA-Research/GroundingDINO")
         print("GroundingDINO install success.")
         return True
     except Exception:

Please note that this will likely need to be modified in Windows, or may not work at all. My environment is a little non-standard as I'm using the Vladmandic/automatic fork on Linux along with conda to manage my CUDA version.

If you're running on Linux but your version of CUDA isn't 11.8, you might be able to use the patch by replacing each g++-11 with a command for the appropriate version of GCC on your system.
Check this compatability table to find the correct version of gcc to use: https://gist.github.com/ax3l/9489132

from sd-webui-segment-anything.

YanXiaoAI avatar YanXiaoAI commented on August 15, 2024

有一定程序基础但是python一无所知。。 再用aki整合版安装GroundingDino的时候永远报错,尝试直接git下GroundingDino项目然后pip安装是可以成功的,但是aki整合版是用了独立的python项目,我不知道怎么直接安装进来,就直接吧安装好的本地目录下的GroundingDino直接粘贴进aki的整合py310的项目目录里面是可以跳过安装的步骤,但是会出现_C的错误,然后我看我CUDA_HOME路径可以成功输出也是特意降级成了11.8版本,依然无果,正常运行插件进行安装GroundingDino永远会报错,现在不知道该怎么解决

您现在解决这个问题了吗?

from sd-webui-segment-anything.

continue-revolution avatar continue-revolution commented on August 15, 2024

closed via https://github.com/continue-revolution/sd-webui-segment-anything/releases/tag/v1.5.0

from sd-webui-segment-anything.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.