  --num_train_epochs=150 \ Many of the basic and important parameters are described in the Text-to-image training guide, so this guide just focuses on the LoRA relevant parameters: --rank: the inner dimension of the low-rank matrices to train; a higher rank means more trainable parameters --learning_rate: the default learning rate is 1e-4, but with LoRA, you can use a higher learning rate  Training script The dataset preprocessing code and training loop are found in the main() function, and if you need to adapt the training script, this is where you’ll make your changes. As with the script parameters, a walkthrough of the training script is provided in the Text-to-image training guide. Instead, this guide takes a look at the LoRA relevant parts of the script. UNet text encoder  Diffusers uses ~peft.LoraConfig from the PEFT library to set up the parameters of the LoRA adapter such as the rank, alpha, and which modules to insert the LoRA weights into. The adapter is added to the UNet, and only the LoRA layers are filtered for optimization in lora_layers.   Copied unet_lora_config = LoraConfig(