-
Notifications
You must be signed in to change notification settings - Fork 29
Description
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