code: def _get_inp(
      inp: Union[str, tensor_dict_type],
      vae_inp: Optional[Union[str, tensor_dict_type]],
  ) -> tensor_dict_type:
      inp = get_tensors(inp)
      if vae_inp is not None:
          vae_inp = get_tensors(vae_inp)
          num_injected = 0
          for k, v in vae_inp.items():
              inp_k = f"first_stage_model.{k}"
              if inp_k in inp:
                  inp[inp_k] = v
                  num_injected += 1
          print(f">> injected vae parameters: {num_injected}")
      return inp
  
imports: import json
  import torch
  from torch import Tensor
  from typing import Dict
  from typing import List
  from typing import Union
  from typing import Optional
  from cftool.misc import shallow_copy_dict
  from cftool.array import tensor_dict_type
  from ..misc.toolkit import get_tensors
  from ..misc.toolkit import download_static
  from ..api.cv.diffusion import DiffusionAPI
label_desc: Use image node_id 6 for calling a global function with example usage: _get_inp(inp, vae_inp) and returns: inp