Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.
This repository was archived by the owner on May 22, 2026. It is now read-only.

TypeError: Got unsupported ScalarType BFloat16Cell Execution Error #14

Description

@xiangao0904

One or both local paths not provided. Loading from Hugging Face Hub: IDEA-Research/grounding-dino-base

TypeError Traceback (most recent call last)
Cell In[18], line 33
31 x0_preview = models_rbm.previewer(x0_forward)
32 sam_model = LangSAM()
---> 33 sam_mask, boxes, phrases, logits = sam_model.predict(transform(x0_preview[0]), sam_prompt)
34 sam_mask = sam_mask.detach().unsqueeze(dim=0).to(device)
36 conditions = core.get_conditions(batch, models_rbm, extras, is_eval=True, is_unconditional=False, eval_image_embeds=True, eval_subject_style=True, eval_csd=False)

File /data/aoxiang/anaconda3/envs/rbm/lib/python3.12/site-packages/torchvision/transforms/transforms.py:234, in ToPILImage.call(self, pic)
225 def call(self, pic):
226 """
227 Args:
228 pic (Tensor or numpy.ndarray): Image to be converted to PIL Image.
(...) 232
233 """
--> 234 return F.to_pil_image(pic, self.mode)

File /data/aoxiang/anaconda3/envs/rbm/lib/python3.12/site-packages/torchvision/transforms/functional.py:266, in to_pil_image(pic, mode)
264 if pic.ndim == 3:
265 pic = pic.permute((1, 2, 0))
--> 266 pic = pic.numpy(force=True)
267 elif not isinstance(pic, np.ndarray):
268 raise TypeError(f"pic should be Tensor or ndarray. Got {type(pic)}.")

TypeError: Got unsupported ScalarType BFloat16

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions