File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -99,8 +99,6 @@ def __init__(
99
99
assign = True ,
100
100
)
101
101
self .image_processor = image_processor
102
- self .vision_tower = self .get_model ().vision_tower
103
- self .mm_projector = self .get_model ().mm_projector
104
102
105
103
def _translate_state_dict_for_text_model (self ) -> Dict [str , Any ]:
106
104
state_dict = self .model_ .state_dict ()
@@ -143,8 +141,8 @@ def get_model(self):
143
141
144
142
def encode_images (self , images : torch .Tensor ) -> torch .Tensor :
145
143
images = images .to (dtype = self .get_model ().dtype )
146
- image_features = self .vision_tower (images )
147
- image_features = self .mm_projector (image_features )
144
+ image_features = self .get_model (). vision_tower (images )
145
+ image_features = self .get_model (). mm_projector (image_features )
148
146
return image_features
149
147
150
148
def image_preprocess (self , img : torch .Tensor ) -> torch .Tensor :
You can’t perform that action at this time.
0 commit comments