def build_vision_encoder(self):
        """build vision encoder
        Returns: (vision_encoder, vision_layernorm). Each is a `nn.Module`.

        """
        encoder_name = self.config.model.vision_encoder.name
        logger.info(f"Build vision_encoder: {encoder_name}")
        if "vit" in encoder_name:
            vision_encoder = build_vit(self.config.model)
        else:
            raise ValueError(f"not implemented: {encoder_name}")

        if self.config.model.vit_add_ln:
            vision_layernorm = nn.LayerNorm(self.vision_width, eps=1e-12)
        else:
            vision_layernorm = nn.Identity()

        vision_temp_embed = nn.Parameter(
            torch.zeros(1, self.config.num_frames, 1, self.vision_width)
        )

        return vision_encoder, vision_layernorm, vision_temp_embed
build vision encoder
        Returns: (vision_encoder, vision_layernorm). Each is a `nn.Module`.

        
video_chat2/models/videochat2_qformer.py