chunk_content: ine the weights of
  the base model with the fine-tuned LoRA weights using LoraConfig.
  
  
  	Copied
  def get_lora_sd_pipeline(
      ckpt_dir, base_model_name_or_path=None, dtype=torch.float16, device="cuda", adapter_name="default"
  ):
      unet_sub_dir = os.path.join(ckpt_dir, "unet")
      text_encoder_sub_dir = os.path.join(ckpt_dir, "text_encoder")
      if os.path.exists(text_encoder_sub_dir) and base_model_name_or_path is None:
          config = LoraCon