From 90b8128aea5a0602656618219b888ce9ad27c66f Mon Sep 17 00:00:00 2001 From: lnyan Date: Sun, 23 Oct 2022 19:27:45 +0800 Subject: [PATCH] Update interrogate --- interrogate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interrogate.py b/interrogate.py index 0b79b3e..6d99a6d 100644 --- a/interrogate.py +++ b/interrogate.py @@ -15,7 +15,6 @@ from torch import nn from torch.nn import functional as F from torchvision import transforms from torchvision.transforms.functional import InterpolationMode -from blip_model.blip import blip_decoder from transformers import CLIPTokenizer, CLIPModel from transformers import CLIPProcessor, CLIPModel @@ -75,6 +74,7 @@ class Interrogator: self.text_feature_lst = [torch.load(os.path.join(data_path, f"{i}.pth")) for i in range(5)] def get_blip(self): + from blip_model.blip import blip_decoder blip_model = blip_decoder(pretrained=blip_model_url, image_size=blip_image_eval_size, vit='base') blip_model.eval() self.blip_model = blip_model