chunk_content: t_dir, "text_encoder")
      if os.path.exists(text_encoder_sub_dir) and base_model_name_or_path is None:
          config = LoraConfig.from_pretrained(text_encoder_sub_dir)
          base_model_name_or_path = config.base_model_name_or_path
  
      if base_model_name_or_path is None:
          raise ValueError("Please specify the base model name or path")
  
      pipe = StableDiffusionPipeline.from_pretrained(base_model_name_or_path, torch_dtype=dtype).to(de