code: def load_lora_weights(unet, text_encoder, input_dir):
      lora_state_dict, network_alphas = LoraLoaderMixin.lora_state_dict(
          input_dir
      )
      LoraLoaderMixin.load_lora_into_unet(
          lora_state_dict, network_alphas=network_alphas, unet=unet
      )
      LoraLoaderMixin.load_lora_into_text_encoder(
          lora_state_dict,
          network_alphas=network_alphas,
          text_encoder=text_encoder,
      )
      return unet, text_encoder
  
imports: from diffusers import DiffusionPipeline
  from diffusers.loaders import LoraLoaderMixin
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: load_lora_weights(unet, text_encoder, input_dir) and returns: unet,  text_encoder