Coder Social home page Coder Social logo

Comments (17)

psykokwak-com avatar psykokwak-com commented on May 20, 2024 1

Ok,
Here is what I did :

C:\Users\Jyce\Desktop\stable-diffusion-webui\venv\Scripts>pip.exe uninstall groundingdino
Found existing installation: groundingdino 0.1.0
Uninstalling groundingdino-0.1.0:
  Would remove:
    c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages\groundingdino-0.1.0.dist-info\*
    c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages\groundingdino\*
Proceed (Y/n)? Y
  Successfully uninstalled groundingdino-0.1.0

But I don't understand which library is referred to in the Grounded-Segment-Anything ticket.

from sd-webui-segment-anything.

continue-revolution avatar continue-revolution commented on May 20, 2024 1

If I remove the "CUDA_HOME" from webui-user.bat it works!

Great! Seems that installing cuda is the key to success.

from sd-webui-segment-anything.

continue-revolution avatar continue-revolution commented on May 20, 2024

I think C++ did not compile due to some problem. This is GroundingDINO's problem. I will submit an issue there.

from sd-webui-segment-anything.

continue-revolution avatar continue-revolution commented on May 20, 2024

IDEA-Research/Grounded-Segment-Anything#53

Uninstall GroundingDINO via pip uninstall groundingdino and check the above issue for solution.

In your specific case, run pip uninstall groundingdino may not work because you are using some virtual environment. Either try initiating your virtual environment and run the command, or go to venv\lib\site-packages\ and remove all directories that contains name groundingdino.

from sd-webui-segment-anything.

continue-revolution avatar continue-revolution commented on May 20, 2024

Ok, Here is what I did :

C:\Users\Jyce\Desktop\stable-diffusion-webui\venv\Scripts>pip.exe uninstall groundingdino
Found existing installation: groundingdino 0.1.0
Uninstalling groundingdino-0.1.0:
  Would remove:
    c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages\groundingdino-0.1.0.dist-info\*
    c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages\groundingdino\*
Proceed (Y/n)? Y
  Successfully uninstalled groundingdino-0.1.0

But I don't understand which library is referred to in the Grounded-Segment-Anything ticket.

They are referring to groundingdino. If you search _C inside their issue you will see a bunch of similar issues related to this. If this one does not work, look for another. I would expect at least one of them should work. If none of them is working, submit an issue there and let me know here.

Another related repository: https://github.com/IDEA-Research/GroundingDINO
You may also check issues here to see if anything is relevant.

from sd-webui-segment-anything.

psykokwak-com avatar psykokwak-com commented on May 20, 2024

Thanks.
I will check and let you know.

from sd-webui-segment-anything.

psykokwak-com avatar psykokwak-com commented on May 20, 2024

I checked the similar issues but found no solution.
I'm not an expert on that kind of stuff (cuda, python and so on).
I'm afraid I cannot find the solution alone :(

from sd-webui-segment-anything.

continue-revolution avatar continue-revolution commented on May 20, 2024

Try adding your CUDA_HOME to your environment variable and add 'set CUDA_HOME="<your cuda path>”' into your webui.dat file to the second line.

If this is not working, let me know your cuda version, cuda home and torch version. I will see what my windows cuda home looks like, and guess whether you have put in the current cuda path. Also people mention old cuda+torch is not working, so I’m not sure.

from sd-webui-segment-anything.

continue-revolution avatar continue-revolution commented on May 20, 2024

If it’s not working when I wake up, I’ll try to install it on my windows to see what is going wrong.

from sd-webui-segment-anything.

psykokwak-com avatar psykokwak-com commented on May 20, 2024

I have not installed the CUDA drivers.
I guess A1111 uses the CUDA from "C:\Users\Jyce\Desktop\stable-diffusion-webui\venv\Lib\site-packages\torch\lib" ?
I tried to put this line :
set CUDA_HOME="C:\Users\Jyce\Desktop\stable-diffusion-webui\venv\Lib\site-packages\torch\lib"
But it changes nothing.

Here is the versions I use :

python: 3.10.6  •  torch: 1.13.1+cu117  •  xformers: 0.0.16rc425  •  gradio: 3.23.0  •  commit: 22bcc7be

from sd-webui-segment-anything.

continue-revolution avatar continue-revolution commented on May 20, 2024

This is definitely not correct. Give me some time to try which path is possibly correct.

from sd-webui-segment-anything.

continue-revolution avatar continue-revolution commented on May 20, 2024

It seems that you should install CUDA driver. Download cuda driver from https://developer.nvidia.com/cuda-11-7-0-download-archive?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exe_local and check whether you have CUDA_HOME on your environment variable path.

Another way that might work and I recommend you to try before installing cuda driver is to set CUDA_HOME='<your virtual environment>', in your case, it should be set CUDA_HOME="C:\Users\Jyce\Desktop\stable-diffusion-webui\venv". I'm not sure whether it will work, because this is from my observation of my linux environment.

Let me know if this helps. If this does not help, I'll try to find another way.

from sd-webui-segment-anything.

psykokwak-com avatar psykokwak-com commented on May 20, 2024

I just installed CUDA then added

set CUDA_HOME="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7"

into my "webui-user.bat" file.

Then I deleted the "venv" folder and launched "webui-user.bat" to start from a fresh new install.
And now I have the following error when starting groundingdino :

Installing sd-webui-segment-anything requirement: groundingdino
Traceback (most recent call last):
  File "C:\Users\Jyce\Desktop\stable-diffusion-webui\extensions\sd-webui-segment-anything\scripts\dino.py", line 36, in install_goundingdino
    launch.run_pip(
  File "C:\Users\Jyce\Desktop\stable-diffusion-webui\launch.py", line 129, in run_pip
    return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
  File "C:\Users\Jyce\Desktop\stable-diffusion-webui\launch.py", line 97, in run
    raise RuntimeError(message)
RuntimeError: Couldn't install sd-webui-segment-anything requirement: groundingdino.
Command: "C:\Users\Jyce\Desktop\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install git+https://github.com/IDEA-Research/GroundingDINO --prefer-binary
Error code: 1
stdout: Collecting git+https://github.com/IDEA-Research/GroundingDINO
  Cloning https://github.com/IDEA-Research/GroundingDINO to c:\users\jyce\appdata\local\temp\pip-req-build-97dni1y_
  Resolved https://github.com/IDEA-Research/GroundingDINO to commit c43cdb3a9583a3044711c034bfa2829ed20a88c0
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: torch in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from groundingdino==0.1.0) (1.13.1+cu117)
Requirement already satisfied: torchvision in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from groundingdino==0.1.0) (0.14.1+cu117)
Requirement already satisfied: transformers in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from groundingdino==0.1.0) (4.25.1)
Requirement already satisfied: addict in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from groundingdino==0.1.0) (2.4.0)
Requirement already satisfied: yapf in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from groundingdino==0.1.0) (0.32.0)
Requirement already satisfied: timm in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from groundingdino==0.1.0) (0.6.7)
Requirement already satisfied: numpy in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from groundingdino==0.1.0) (1.23.3)
Requirement already satisfied: opencv-python in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from groundingdino==0.1.0) (4.7.0.72)
Collecting supervision==0.4.0
  Using cached supervision-0.4.0-py3-none-any.whl (25 kB)
Requirement already satisfied: pycocotools in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from groundingdino==0.1.0) (2.0.6)
Requirement already satisfied: matplotlib in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from supervision==0.4.0->groundingdino==0.1.0) (3.7.1)
Requirement already satisfied: typing-extensions in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from torch->groundingdino==0.1.0) (4.5.0)
Requirement already satisfied: requests in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from torchvision->groundingdino==0.1.0) (2.25.1)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from torchvision->groundingdino==0.1.0) (9.4.0)
Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from transformers->groundingdino==0.1.0) (0.13.3)
Requirement already satisfied: filelock in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from transformers->groundingdino==0.1.0) (3.11.0)
Requirement already satisfied: tqdm>=4.27 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from transformers->groundingdino==0.1.0) (4.65.0)
Requirement already satisfied: packaging>=20.0 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from transformers->groundingdino==0.1.0) (23.1)
Requirement already satisfied: pyyaml>=5.1 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from transformers->groundingdino==0.1.0) (6.0)
Requirement already satisfied: regex!=2019.12.17 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from transformers->groundingdino==0.1.0) (2023.3.23)
Requirement already satisfied: huggingface-hub<1.0,>=0.10.0 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from transformers->groundingdino==0.1.0) (0.13.4)
Requirement already satisfied: fonttools>=4.22.0 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->supervision==0.4.0->groundingdino==0.1.0) (4.39.3)
Requirement already satisfied: cycler>=0.10 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->supervision==0.4.0->groundingdino==0.1.0) (0.11.0)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->supervision==0.4.0->groundingdino==0.1.0) (2.8.2)
Requirement already satisfied: pyparsing>=2.3.1 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->supervision==0.4.0->groundingdino==0.1.0) (3.0.9)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->supervision==0.4.0->groundingdino==0.1.0) (1.4.4)
Requirement already satisfied: contourpy>=1.0.1 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from matplotlib->supervision==0.4.0->groundingdino==0.1.0) (1.0.7)
Requirement already satisfied: colorama in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from tqdm>=4.27->transformers->groundingdino==0.1.0) (0.4.6)
Requirement already satisfied: idna<3,>=2.5 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from requests->torchvision->groundingdino==0.1.0) (2.10)
Requirement already satisfied: chardet<5,>=3.0.2 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from requests->torchvision->groundingdino==0.1.0) (4.0.0)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from requests->torchvision->groundingdino==0.1.0) (1.26.15)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from requests->torchvision->groundingdino==0.1.0) (2022.12.7)
Requirement already satisfied: six>=1.5 in c:\users\jyce\desktop\stable-diffusion-webui\venv\lib\site-packages (from python-dateutil>=2.7->matplotlib->supervision==0.4.0->groundingdino==0.1.0) (1.16.0)
Building wheels for collected packages: groundingdino
  Building wheel for groundingdino (setup.py): started
  Building wheel for groundingdino (setup.py): finished with status 'error'
  Running setup.py clean for groundingdino
Failed to build groundingdino
Installing collected packages: supervision, groundingdino
  Running setup.py install for groundingdino: started
  Running setup.py install for groundingdino: finished with status 'error'

stderr:   Running command git clone --filter=blob:none --quiet https://github.com/IDEA-Research/GroundingDINO 'C:\Users\Jyce\AppData\Local\Temp\pip-req-build-97dni1y_'
  error: subprocess-exited-with-error

  python setup.py bdist_wheel did not run successfully.

from sd-webui-segment-anything.

psykokwak-com avatar psykokwak-com commented on May 20, 2024

If I remove the "CUDA_HOME" from webui-user.bat it works!

from sd-webui-segment-anything.

jhuisman-hp avatar jhuisman-hp commented on May 20, 2024

I still have the same issue with cuda installed. It's unclear for me now how my webui-user.bat file should look like.

from sd-webui-segment-anything.

continue-revolution avatar continue-revolution commented on May 20, 2024

I still have the same issue with cuda installed. It's unclear for me now how my webui-user.bat file should look like.

Check you windows environment path. There should be a CUDA_PATH inside your system environment variables. If not, manually add the correct cuda toolkit path to your environment variable. My path looks like C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1 (Do not download v12.1 on windows. It won't work. I develop on linux). The author of this issue ended up not changing webui-user.bat.

from sd-webui-segment-anything.

xujipm avatar xujipm commented on May 20, 2024

I have the same problem in linux, how do I need to deal with it
python: 3.10.9  •  torch: 1.13.1+cu117  •  xformers: 0.0.16rc425  •  gradio: 3.23.0  •  commit: [22bcc7be]•  checkpoint: [0ed158bb04]

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.