Grounded-Segment-Anything icon indicating copy to clipboard operation
Grounded-Segment-Anything copied to clipboard

Grounded Segment Anything supported in sd-webui-segment-anything extension

Open continue-revolution opened this issue 2 years ago • 9 comments

I have finished supporting GroundingDINO inside my extension. See https://github.com/continue-revolution/sd-webui-segment-anything#demo for demo use. I have supported the following functionalities:

  • text prompt -> bounding boxes -> segmented images/masks -> SD inpainting
  • batch process to cut out images

If you have more ideas on how I can add more functionalities to support SD community pls let me know.

Some people may occur some install problems. I will redirect them here.

continue-revolution avatar Apr 15 '23 12:04 continue-revolution

Great Job! We will highlight it in our project! Thanks a lot!

rentainhe avatar Apr 15 '23 13:04 rentainhe

在SD秋叶包加载楼主的插件后,启用Grounded,会报错:(https://user-images.githubusercontent.com/45913389/232434794-ca010158-dc32-4680-8b72-188b81369b51.png)

kitchxia avatar Apr 17 '23 08:04 kitchxia

你的终端github被墙了

continue-revolution avatar Apr 17 '23 08:04 continue-revolution

之前另外一次报错,也是终端GITHUB被墙吗?我也试过开梯子,还是会遇到类似报错。 image

kitchxia avatar Apr 17 '23 08:04 kitchxia

这应该不是,我也不知道原因,需要GroundingDINO开发人员的帮助。

continue-revolution avatar Apr 17 '23 09:04 continue-revolution

image image 可以帮忙看看为什么会报这个错吗,同SD秋叶包加载楼主的插件后,启用GroundingDINO后报错

longjingling avatar Apr 18 '23 15:04 longjingling

@longjingling 你可能没有下载cuda,你得去nvidia官网下载跟pytorch对应版本的cuda,你看看你的pytorch是cu117还是什么版本的,版本相同才可以编译。

continue-revolution avatar Apr 18 '23 15:04 continue-revolution

image image 谢谢你的回答!不过我不管是cu118还是切换到cu117还是和之前同样的报错:NameError: name '_C' is not defined

longjingling avatar Apr 18 '23 16:04 longjingling

遵循以下步骤:

  1. nvidia官网下载匹配cuda
  2. 环境变量查看CUDA_PATH
  3. 启动本地命令行(需要是你使用webui的环境)然后跑以下代码
from torch.utils.cpp_extension import CUDA_HOME
print(CUDA_HOME)

看看有没有cuda环境 4. 卸载groundingdino,要么pip uninstall groundingdino,要么自己手动从虚拟环境删除文件夹 5. 重新启动webui

continue-revolution avatar Apr 18 '23 16:04 continue-revolution