File size: 465 Bytes
fcf0cff
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from transformers import AutoModel, AutoImageProcessor 

from . import register_vision_tower
from .base import VisionTower


@register_vision_tower('aimv2')      
class AIMv2Tower(VisionTower):
    def __init__(self, cfg):
        super().__init__(cfg)
        self._vision_tower = AutoModel.from_pretrained(cfg.model_name_or_path, config = cfg, trust_remote_code=True)
        self._image_processor = AutoImageProcessor.from_pretrained(cfg.model_name_or_path)