code: def network_forward(module, input, original_forward):
      """
      Old way of applying Lora by executing operations during layer's forward.
      Stacking many loras this way results in big performance degradation.
      """
  
      if len(loaded_networks) == 0:
          return original_forward(module, input)
  
      input = devices.cond_cast_unet(input)
  
      network_restore_weights_from_backup(module)
      network_reset_cached_weight(module)
  
      y = original_forward(module, input)
  
      network_layer_name = getattr(module, "network_layer_name", None)
      for lora in loaded_networks:
          module = lora.modules.get(network_layer_name, None)
          if module is None:
              continue
  
          y = module.forward(input, y)
  
      return y
  
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 8 for calling a global function with example usage: network_forward(module, input, original_forward) and returns: y, original_forward