code: def __init__(self, model):
      super().__init__(model)
      self.forward_model = self.model.model
      self.num_media_latents = model.cfg.data.get(
          "image_token_len", 576
      )
      self.tokenizer = self.model.tokenizer
      self.image_paths = []
      self.cfg = self.model.cfg
      self.data_cfg = self.model.cfg.data
  
      if self.cfg.mm_cfg.vision_encoder.from_hf:
          self.processor = CLIPImageProcessor.from_pretrained(
              self.cfg.mm_cfg.vision_encoder.from_pretrained,
              torch_dtype=torch.bfloat16,
          )
      else:
          self.processor = CLIPImageProcessor.from_pretrained(
              "openai/clip-vit-large-patch14",
              torch_dtype=torch.bfloat16,
          )
  
      add_extra_token = 0
      self.multimodal_cfg = dict(
          is_multimodal=self.data_cfg.is_multimodal,
          sep_image_conv_front=self.data_cfg.sep_image_conv_front,
          conv_template=self.data_cfg.get("conv_template", "nvgpt"),
          image_token_len=self.data_cfg.image_token_len,
          image_folder=self.data_cfg.image_folder,
          image_aspect_ratio=self.data_cfg.image_aspect_ratio,
          use_im_start_end=getattr(
              self.cfg.mm_cfg, "use_im_start_end", False
          ),
          image_processor=self.processor,
          add_extra_token=add_extra_token,
          context_length=self.cfg.encoder_seq_length,
      )
  
imports: import abc
  import copy
  import os
  import re
  import warnings
  from typing import List, Set, Tuple
  import torch
  from transformers import CLIPImageProcessor
  from nemo.collections.nlp.modules.common.lm_utils import pad_batch
  from nemo.collections.nlp.modules.common.megatron.utils import get_ltor_masks_and_position_ids
label_desc: Use image node_id 1 to create a new NevaModelTextGenerationStrategy object from inherited base classes: TextGenerationStrategy with example: obj = NevaModelTextGenerationStrategy(model)