code: def get_pipeline(model_dir, lora_weights_dir=None):
      pipeline = DiffusionPipeline.from_pretrained(
          model_dir, torch_dtype=torch.float16
      )
      if lora_weights_dir:
          unet = pipeline.unet
          text_encoder = pipeline.text_encoder
          print(f"Loading LoRA weights from {lora_weights_dir}")
          unet, text_encoder = load_lora_weights(
              unet, text_encoder, lora_weights_dir
          )
          pipeline.unet = unet
          pipeline.text_encoder = text_encoder
      return pipeline
  
imports: from diffusers import DiffusionPipeline
  from diffusers.loaders import LoraLoaderMixin
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: get_pipeline(model_dir, lora_weights_dir) and returns: pipeline