Grounded-Segment-Anything icon indicating copy to clipboard operation
Grounded-Segment-Anything copied to clipboard

Google Colaboratory sample notebook error (Unsupported TypeMeta in ATen)

Open hirokinaito opened this issue 10 months ago • 6 comments

Running the Google Colaboratory sample code (grounded_sam_colab_demo.ipynb) has been generating the following "Unsupported TypeMeta in ATen" error at detect method. This error occurred since this morning. It was working fine until yesterday.

Code:

annotated_frame, detected_boxes = detect(image, text_prompt="bench", model=groundingdino_model)
Image.fromarray(annotated_frame)

Error output:

FutureWarning: The `device` argument is deprecated and will be removed in v5 of Transformers.
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.
UserWarning: None of the inputs have requires_grad=True. Gradients will be None
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
[<ipython-input-10-eb2d1c4b4783>](https://localhost:8080/#) in <cell line: 1>()
----> 1 annotated_frame, detected_boxes = detect(image, text_prompt="bench", model=groundingdino_model)
      2 Image.fromarray(annotated_frame)

24 frames
[/content/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/ms_deform_attn.py](https://localhost:8080/#) in forward(ctx, value, value_spatial_shapes, value_level_start_index, sampling_locations, attention_weights, im2col_step)
     51     ):
     52         ctx.im2col_step = im2col_step
---> 53         output = _C.ms_deform_attn_forward(
     54             value,
     55             value_spatial_shapes,

RuntimeError: Unsupported TypeMeta in ATen:  (please report this error)

My Google Colab runtime environment is GPU(T4).

Do you know a solution to this problem?

hirokinaito avatar Apr 25 '24 01:04 hirokinaito

Getting the same error in colab

kshitizagarwal-dev avatar Apr 25 '24 07:04 kshitizagarwal-dev

Same here. It was working just fine 3 days back. But now getting this error in colab.

'RuntimeError: Unsupported TypeMeta in ATen: (please report this error)'

Anika-Tahsin-S avatar Apr 25 '24 17:04 Anika-Tahsin-S

Not in case of colab, but Remove the env and reinstalling it solved the problem for me.

TikaToka avatar May 03 '24 08:05 TikaToka

pip install --upgrade torch solved the issue for me

karimelgazar avatar May 19 '24 04:05 karimelgazar

Same here. It was working just fine 3 days back. But now getting this error in colab.

'RuntimeError: Unsupported TypeMeta in ATen: (please report this error)'

Hi, have you solved this problem?

BinaryKevin avatar May 21 '24 15:05 BinaryKevin

I'm having the same error. pip install --upgrade torch did not work

Morgan11-tech avatar May 26 '24 16:05 Morgan11-tech