code: def copy_vison_model_and_projection(hf_model, pt_model):
      # copy projection
      hf_model.visual_projection.weight.data = (
          pt_model.visual.proj.data.T
      )
  
      # copy layer norms
      copy_linear(
          hf_model.vision_model.pre_layrnorm, pt_model.visual.ln_pre
      )
      copy_linear(
          hf_model.vision_model.post_layernorm, pt_model.visual.ln_post
      )
  
      # copy embeds
      hf_model.vision_model.embeddings.patch_embedding.weight.data = (
          pt_model.visual.conv1.weight.data
      )
      hf_model.vision_model.embeddings.class_embedding = (
          pt_model.visual.class_embedding
      )
      hf_model.vision_model.embeddings.position_embedding.weight.data = (
          pt_model.visual.positional_embedding.data
      )
  
      # copy encoder
      copy_layers(
          hf_model.vision_model.encoder.layers,
          pt_model.visual.transformer.resblocks,
      )
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/clip/convert_clip_original_pytorch_to_hf.py
imports: import argparse
  import torch
  from clip import load
  from transformers import CLIPConfig, CLIPModel
label_desc: Use image node_id 8 for calling a global function with example usage: copy_vison_model_and_projection(hf_model, pt_model) without return types