chunk_content: trained(
              pipe.text_encoder, text_encoder_sub_dir, adapter_name=adapter_name
          )
  
      if dtype in (torch.float16, torch.bfloat16):
          pipe.unet.half()
          pipe.text_encoder.half()
  
      pipe.to(device)
      return pipe
  Now you can use the function above to create a Stable Diffusion pipeline using the LoRA weights that you have created during the fine-tuning step.
  Note, if you’re running inference on the same machine, the