code: def load_networks(
      names, te_multipliers=None, unet_multipliers=None, dyn_dims=None
  ):
      emb_db = sd_hijack.model_hijack.embedding_db
      already_loaded = {}
  
      for net in loaded_networks:
          if net.name in names:
              already_loaded[net.name] = net
          for emb_name, embedding in net.bundle_embeddings.items():
              if embedding.loaded:
                  emb_db.register_embedding_by_name(
                      None, shared.sd_model, emb_name
                  )
  
      loaded_networks.clear()
  
      networks_on_disk = [
          available_network_aliases.get(name, None) for name in names
      ]
      if any(x is None for x in networks_on_disk):
          list_available_networks()
  
          networks_on_disk = [
              available_network_aliases.get(name, None)
              for name in names
          ]
  
      failed_to_load_networks = []
  
      for i, (network_on_disk, name) in enumerate(
          zip(networks_on_disk, names)
      ):
          net = already_loaded.get(name, None)
  
          if network_on_disk is not None:
              if net is None:
                  net = networks_in_memory.get(name)
  
              if (
                  net is None
                  or os.path.getmtime(network_on_disk.filename)
                  > net.mtime
              ):
                  try:
                      net = load_network(name, network_on_disk)
  
                      networks_in_memory.pop(name, None)
                      networks_in_memory[name] = net
                  except Exception as e:
                      errors.display(
                          e,
                          f"loading network {network_on_disk.filename}",
                      )
                      continue
  
              net.mentioned_name = name
  
              network_on_disk.read_hash()
  
          if net is None:
              failed_to_load_networks.append(name)
              logging.info(f"Couldn't find network with name {name}")
              continue
  
          net.te_multiplier = (
              te_multipliers[i] if te_multipliers else 1.0
          )
          net.unet_multiplier = (
              unet_multipliers[i] if unet_multipliers else 1.0
          )
          net.dyn_dim = dyn_dims[i] if dyn_dims else 1.0
          loaded_networks.append(net)
  
          for emb_name, embedding in net.bundle_embeddings.items():
              if (
                  embedding.loaded is None
                  and emb_name in emb_db.word_embeddings
              ):
                  logger.warning(
                      f'Skip bundle embedding: "{emb_name}"'
                      " as it was already loaded from embeddings folder"
                  )
                  continue
  
              embedding.loaded = False
              if (
                  emb_db.expected_shape == -1
                  or emb_db.expected_shape == embedding.shape
              ):
                  embedding.loaded = True
                  emb_db.register_embedding(embedding, shared.sd_model)
              else:
                  emb_db.skipped_embeddings[name] = embedding
  
      if failed_to_load_networks:
          sd_hijack.model_hijack.comments.append(
              "Networks not found: "
              + ", ".join(failed_to_load_networks)
          )
  
      purge_networks_from_memory()
  
imports: import logging
  import os
  import re
  import lora_patches
  import network
  import network_lora
  import network_glora
  import network_hada
  import network_ia3
  import network_lokr
  import network_full
  import network_norm
  import network_oft
  import torch
  from typing import Union
  from modules import shared, devices, sd_models, errors, scripts, sd_hijack
  import modules.textual_inversion.textual_inversion
  from lora_logger import logger
label_desc: Use image node_id 5 for calling a global function with example usage: load_networks(names, te_multipliers, unet_multipliers, dyn_dims) without return types