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
RuntimeError: "sigmoid_cpu" not implemented for 'Half', when run command 'python grounding_dino_demo.py' #479
Comments
Use cuda or remove |
Works perfectly, thanks! |
I'm sorry but I want to know how to use cuda for this script? I can use cuda for anything else, I think cuda will also work well for this project, but it's not. Should I need some extra settings? |
(sam) loubron@loubron-PC:~/disk/sam/Grounded-Segment-Anything$ python grounding_dino_demo.py
UserWarning: Failed to load image Python extension: libc10_hip.so: cannot open shared object file: No such file or directory
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:3190.)
final text_encoder_type: bert-base-uncased
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.weight', 'cls.predictions.transform.dense.bias', 'cls.predictions.transform.dense.weight', 'cls.predictions.transform.LayerNorm.bias', 'cls.predictions.bias']
FutureWarning: The
device
argument is deprecated and will be removed in v5 of Transformers.UserWarning: None of the inputs have requires_grad=True. Gradients will be None
Traceback (most recent call last):
File "grounding_dino_demo.py", line 21, in
boxes, logits, phrases = predict(
File "/home/loubron/disk/Grounded-Segment-Anything-main/GroundingDINO/groundingdino/util/inference.py", line 69, in predict
prediction_logits = outputs["pred_logits"].cpu().sigmoid()[0] # prediction_logits.shape = (nq, 256)
RuntimeError: "sigmoid_cpu" not implemented for 'Half'
The text was updated successfully, but these errors were encountered: