code: def build_vit_b_16x_model():
      # Define model
      image_model = ViT_base_patch16_224()
      with open(
          os.path.join(
              os.path.dirname(__file__),
              "../../packages/ernie_base_3.0/ernie_config.base.json",
          )
      ) as json_file:
          config_dict = json.load(json_file)
      text_model = ErnieModel(config_dict)
      model = MultiModalModel(image_model, text_model)
      checkpoint = paddle.load(
          os.path.join(
              os.path.dirname(__file__),
              "../../pre_trained/vit_b_16x.pdparams",
          )
      )
      model.set_state_dict(checkpoint)
      model.eval()
      return model
  
file_path: PaddleHub/modules/image/text_to_image/disco_diffusion_ernievil_base/vit_b_16x/ernievil2/utils/utils.py
imports: import json
  import os
  from typing import List
  from typing import Union
  import numpy
  import paddle
  from disco_diffusion_ernievil_base.vit_b_16x.ernievil2.transformers.clip_vision_transformer import ViT_base_patch16_224
  from disco_diffusion_ernievil_base.vit_b_16x.ernievil2.transformers.clip_vision_transformer import ViT_base_patch32_224
  from disco_diffusion_ernievil_base.vit_b_16x.ernievil2.transformers.clip_vision_transformer import ViT_large_patch14_224
  from disco_diffusion_ernievil_base.vit_b_16x.ernievil2.transformers.efficientnet import EfficientNetB5
  from disco_diffusion_ernievil_base.vit_b_16x.ernievil2.transformers.ernie2 import ErnieModel
  from disco_diffusion_ernievil_base.vit_b_16x.ernievil2.transformers.multimodal import MultiModalModel
  from disco_diffusion_ernievil_base.vit_b_16x.ernievil2.utils.tokenizer import FullTokenizer
label_desc: Use image node_id 3 for calling a global function with example usage: build_vit_b_16x_model() and returns: model