Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: No matching distribution found for groundingdinoPlease read & provide the following #51

Closed
SiyuYan02 opened this issue Feb 28, 2024 · 8 comments · Fixed by #73
Closed
Labels
bug Something isn't working

Comments

@SiyuYan02
Copy link

Instructions To Reproduce the 🐛 Bug:

When I want to get the environment installed, I meet the error:
ERROR: Could not find a version that satisfies the requirement groundingdino (from versions: none)
ERROR: No matching distribution found for groundingdino

how can I fix this

@SiyuYan02 SiyuYan02 added the bug Something isn't working label Feb 28, 2024
@s183898
Copy link

s183898 commented Mar 7, 2024

I am also having problems with groundingdino. I am on an ssh connection to a server. In my case I get:

File "(...)/.local/lib/python3.10/site-packages/groundingdino/models/GroundingDINO/ms_deform_attn.py", line 53, in forward
   output = _C.ms_deform_attn_forward(NameError: name '_C' is not defined)

The full output:

`(...)/.local/lib/python3.10/site-packages/groundingdino/models/GroundingDINO/ms_deform_attn.py:31: UserWarning: Failed to load custom C++ ops. Running on CPU mode Only!
warnings.warn("Failed to load custom C++ ops. Running on CPU mode Only!")
(...)/.local/lib/python3.10/site-packages/torch/functional.py:507: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3549.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertModel: ['cls.seq_relationship.weight', 'cls.seq_relationship.bias', 'cls.predictions.transform.LayerNorm.bias', 'cls.predictions.transform.dense.bias', 'cls.predictions.bias', 'cls.predictions.transform.dense.weight', 'cls.predictions.transform.LayerNorm.weight']

  • This IS expected if you are initializing BertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
  • This IS NOT expected if you are initializing BertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
    /(...)/.local/lib/python3.10/site-packages/transformers/modeling_utils.py:884: FutureWarning: The device argument is deprecated and will be removed in v5 of Transformers.
    warnings.warn(
    (...)/.local/lib/python3.10/site-packages/torch/utils/checkpoint.py:460: UserWarning: torch.utils.checkpoint: please pass in use_reentrant=True or use_reentrant=False explicitly. The default value of use_reentrant will be updated to be False in the future. To maintain current behavior, pass use_reentrant=True. It is recommended that you use use_reentrant=False. Refer to docs for more details on the differences between the two variants.
    warnings.warn(
    (...)/.local/lib/python3.10/site-packages/torch/utils/checkpoint.py:90: UserWarning: None of the inputs have requires_grad=True. Gradients will be None
    warnings.warn(
    Traceback (most recent call last):
    File "(...).py", line 19, in
    masks, boxes, labels, logits = model.predict(image_pil, text_prompt)
    File "(...)/.local/lib/python3.10/site-packages/lang_sam/lang_sam.py", line 116, in predict
    boxes, logits, phrases = self.predict_dino(image_pil, text_prompt, box_threshold, text_threshold)
    File "(...)/.local/lib/python3.10/site-packages/lang_sam/lang_sam.py", line 92, in predict_dino
    boxes, logits, phrases = predict(model=self.groundingdino,
    File "(...)/.local/lib/python3.10/site-packages/groundingdino/util/inference.py", line 68, in predict
    outputs = model(image[None], captions=[caption])
    File "(...)/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
    File "(...)/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
    File "(...)/.local/lib/python3.10/site-packages/groundingdino/models/GroundingDINO/groundingdino.py", line 327, in forward
    hs, reference, hs_enc, ref_enc, init_box_proposal = self.transformer(
    File "(...)/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
    File "(...)/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
    File "(...)/(...)/.local/lib/python3.10/site-packages/groundingdino/models/GroundingDINO/transformer.py", line 258, in forward
    memory, memory_text = self.encoder(
    File "(...)/(...)/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
    File "(...)(...)/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
    File "(.(...)/.local/lib/python3.10/site-packages/groundingdino/models/GroundingDINO/transformer.py", line 576, in forward
    output = checkpoint.checkpoint(
    File "/(...)/.local/lib/python3.10/site-packages/torch/_compile.py", line 24, in inner
    return torch._dynamo.disable(fn, recursive)(*args, **kwargs)
    File "/(...)/13/1/137970/.local/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 489, in _fn
    return fn(*args, **kwargs)
    File "/(...)0/.local/lib/python3.10/site-packages/torch/_dynamo/external_utils.py", line 17, in inner
    return fn(*args, **kwargs)
    File "/(...).local/lib/python3.10/site-packages/torch/utils/checkpoint.py", line 482, in checkpoint
    return CheckpointFunction.apply(function, preserve, *args)
    File "(...)/.local/lib/python3.10/site-packages/torch/autograd/function.py", line 553, in apply
    return super().apply(*args, **kwargs) # type: ignore[misc]
    File "/(...)/.local/lib/python3.10/site-packages/torch/utils/checkpoint.py", line 261, in forward
    outputs = run_function(*args)
    File "/(...)/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
    File "/(...)/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
    File "(...)/.local/lib/python3.10/site-packages/groundingdino/models/GroundingDINO/transformer.py", line 785, in forward
    src2 = self.self_attn(
    File "/(...)0/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
    File "/(...)/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
    File "(...)/.local/lib/python3.10/site-packages/groundingdino/models/GroundingDINO/ms_deform_attn.py", line 338, in forward
    output = MultiScaleDeformableAttnFunction.apply(
    File "(...).local/lib/python3.10/site-packages/torch/autograd/function.py", line 553, in apply
    return super().apply(*args, **kwargs) # type: ignore[misc]
    File "(...)/.local/lib/python3.10/site-packages/groundingdino/models/GroundingDINO/ms_deform_attn.py", line 53, in forward
    output = _C.ms_deform_attn_forward(
    NameError: name '_C' is not defined
    `

@s183898
Copy link

s183898 commented Mar 11, 2024

My problem turned out to be mentioned on installation guide for groundingdino.

@CatDroid
Copy link

Pip subprocess error: ERROR: Ignored the following versions that require a different python version: 1.2.0 Requires-Python >=3.9 ERROR: Could not find a version that satisfies the requirement groundingdino==0.1.0 (from versions: none) ERROR: No matching distribution found for groundingdino==0.1.0

I meet the same problem .
it seems groundingdino version 0.1.0 not exists ? and groundingdino version 1.2.0 require python 3.9 ?

@CatDroid
Copy link

Branch: main
Commit: f4ca296
ERROR: Ignored the following versions that require a different python version: 1.2.0 Requires-Python >=3.9 ERROR: Could not find a version that satisfies the requirement lang-sam==0.1.0 (from versions: none) ERROR: No matching distribution found for lang-sam==0.1.0

package lang-sam==0.1.0 not in pipy or conda-forge source ?

@liuwenxin0410
Copy link

I successfully installed it with the following command.
Installation:

1.Clone the GroundingDINO repository from GitHub.

git clone https://github.com/IDEA-Research/GroundingDINO.git

Change the current directory to the GroundingDINO folder.

cd GroundingDINO/

Install the required dependencies in the current directory.
pip install -e .

@liuwenxin0410
Copy link

But In lang_sam.py file, I detect that the model = build_model(args) command of the load_model_hf function cannot be executed. why?thank you

@TimeChloe
Copy link

You can try pip install nw-groundingdino, this works for me.

@shaform
Copy link

shaform commented Sep 17, 2024

I also encounter the same issue. It seems that the conda env use python 3.8, but some of the required packages do not support python 3.8 anymore.

@luca-medeiros luca-medeiros linked a pull request Oct 12, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants