Comments (7)
有一定程序基础但是python一无所知。。
再用aki整合版安装GroundingDino的时候永远报错,尝试直接git下GroundingDino项目然后pip安装是可以成功的,但是aki整合版是用了独立的python项目,我不知道怎么直接安装进来,就直接吧安装好的本地目录下的GroundingDino直接粘贴进aki的整合py310的项目目录里面是可以跳过安装的步骤,但是会出现_C的错误,然后我看我CUDA_HOME路径可以成功输出也是特意降级成了11.8版本,依然无果,正常运行插件进行安装GroundingDino永远会报错,现在不知道该怎么解决
from sd-webui-segment-anything.
去你发的报错里面的超链接提issue
from sd-webui-segment-anything.
我不确定这种情况是否适用,但我通过修改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.
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.
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.
有一定程序基础但是python一无所知。。 再用aki整合版安装GroundingDino的时候永远报错,尝试直接git下GroundingDino项目然后pip安装是可以成功的,但是aki整合版是用了独立的python项目,我不知道怎么直接安装进来,就直接吧安装好的本地目录下的GroundingDino直接粘贴进aki的整合py310的项目目录里面是可以跳过安装的步骤,但是会出现_C的错误,然后我看我CUDA_HOME路径可以成功输出也是特意降级成了11.8版本,依然无果,正常运行插件进行安装GroundingDino永远会报错,现在不知道该怎么解决
您现在解决这个问题了吗?
from sd-webui-segment-anything.
closed via https://github.com/continue-revolution/sd-webui-segment-anything/releases/tag/v1.5.0
from sd-webui-segment-anything.
Related Issues (20)
- Sam model not found. HOT 1
- [Feature]: 'GroundingDINO_ HOT 1
- [Bug]: What is https://star-history.com ? HOT 1
- [Feature]: SAM支持负面prompt吗 HOT 1
- How to obtain the execution progress of the current task through API
- [Feature]: Please take a look at InpaintAnything. HOT 4
- 请问如何更改分割后区域图片的颜色 HOT 2
- [Bug]: 我已经把模型放到对应目录里面了,运行的时候还是会去下载安装。 HOT 1
- [Bug]: 怎样屏蔽代码里自动下载models--bert-base-uncased? HOT 3
- [Bug]: Model not working well in COLAB
- [Feature]: sam api
- [Bug]: RuntimeError: CUDA error: an illegal memory access was encountered HOT 3
- [Feature]: Support for/Integration with Forge UI HOT 1
- i want to know how to make the mask picture to Transparent basemap HOT 1
- [Feature]: Can the interactive segmentation canvas be put in its own tab on auto11? HOT 1
- [Feature]: API 中如何啟用cpu-only模式 HOT 2
- [Bug]: AttributeError: 'NoneType' object has no attribute 'mode' HOT 1
- [Feature]: Can I add auto-cleanup of video memory when using API requests? HOT 1
- [Feature]: Added option to change SAM model folder location HOT 1
- [Bug]: 安装后会显示没有sam模型,手动安装groundingdino_swinb后会显示keyError
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sd-webui-segment-anything.