Open sl-gong opened 1 year ago
Hello, it seems like a warning more than error? Would you like to share more info with us about this~
I have same question, and no output
I have same question, and no output
I have same question, but when I change DEVICE = "cuda:5" to DEVICE = "cuda", it works.
I have same question, but when I change DEVICE = "cuda:5" to DEVICE = "cuda", it works. Is that the sentence you changed: export CUDA_VISIBLE_DEVICES=0 python grounded_sam_demo.py \ --config GroundingDINO/groundingdino/config/GroundingDINO_SwinT_OGC.py \ --grounded_checkpoint groundingdino_swint_ogc.pth \ --sam_checkpoint sam_vit_h_4b8939.pth \ --input_image assets/demo1.jpg \ --output_dir "outputs" \ --box_threshold 0.3 \ --text_threshold 0.25 \ --text_prompt "bear" \ --device "cuda"
I have same question, but when I change DEVICE = "cuda:5" to DEVICE = "cuda", it works.
It's something wrong with the custom operator MultiscaleDeformable Attention
, it did not support to set specific CUDA device for inference, to solve this problem you can set the CUDA_VISIBLE_DEVICES
before running the demo:
CUDA_VISIBLE_DEVICES=5
python demo.py
/home/agmap/users/conda/gsam/lib/python3.10/site-packages/torch/functional.py:504: 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:3483.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] final text_encoder_type: bert-base-uncased Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertModel: ['cls.predictions.transform.dense.bias', 'cls.predictions.decoder.weight', 'cls.predictions.transform.dense.weight', 'cls.seq_relationship.weight', 'cls.predictions.transform.LayerNorm.weight', 'cls.seq_relationship.bias', 'cls.predictions.transform.LayerNorm.bias', 'cls.predictions.bias']
device
argument is deprecated and will be removed in v5 of Transformers. warnings.warn( /home/agmap/users/conda/gsam/lib/python3.10/site-packages/torch/utils/checkpoint.py:31: UserWarning: None of the inputs have requires_grad=True. Gradients will be None warnings.warn("None of the inputs have requires_grad=True. Gradients will be None")