You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(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']
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).
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:
loubron23
changed the title
RuntimeError: "sigmoid_cpu" not implemented for 'Half' when RUN
RuntimeError: "sigmoid_cpu" not implemented for 'Half', when run command 'python grounding_dino_demo.py'
Mar 28, 2024
Use cuda or remove # if FP16_INFERENCE # image = image.half() # model = model.half() in the grounding_dino_demo.py
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: