code: def get_dpt_config(model_name):
      hidden_size = 768
      num_hidden_layers = 12
      num_attention_heads = 12
      intermediate_size = 3072
      out_features = [
          "stage3",
          "stage6",
          "stage9",
          "stage12",
      ]  # beit-base-384 uses [2, 5, 8, 11]
  
      if "large" in model_name:
          hidden_size = 1024
          num_hidden_layers = 24
          num_attention_heads = 16
          intermediate_size = 4096
          out_features = [
              "stage6",
              "stage12",
              "stage18",
              "stage24",
          ]  # beit-large-512 uses [5, 11, 17, 23]
  
      if "512" in model_name:
          image_size = 512
      elif "384" in model_name:
          image_size = 384
      else:
          raise ValueError("Model not supported")
  
      backbone_config = BeitConfig(
          image_size=image_size,
          num_hidden_layers=num_hidden_layers,
          hidden_size=hidden_size,
          intermediate_size=intermediate_size,
          num_attention_heads=num_attention_heads,
          use_relative_position_bias=True,
          reshape_hidden_states=False,
          out_features=out_features,
      )
  
      neck_hidden_sizes = (
          [256, 512, 1024, 1024]
          if "large" in model_name
          else [96, 192, 384, 768]
      )
      config = DPTConfig(
          backbone_config=backbone_config,
          neck_hidden_sizes=neck_hidden_sizes,
      )
  
      return config, image_size
  
file_path: transformers/src/transformers/models/dpt/convert_dpt_beit_to_hf.py
imports: import argparse
  from pathlib import Path
  import requests
  import torch
  from PIL import Image
  from transformers import BeitConfig, DPTConfig, DPTForDepthEstimation, DPTImageProcessor
  from transformers.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: get_dpt_config(model_name) and returns: config,  image_size