    return examples Lastly, the training loop handles everything else. It encodes images into latent space, adds noise to the latents, computes the text embeddings to condition on, updates the model parameters, and saves and pushes the model to the Hub. If you want to learn more about how the training loop works, check out the Understanding pipelines, models and schedulers tutorial which breaks down the basic pattern of the denoising process.  Launch the script Once you’ve made all your changes or you’re okay with the default configuration, you’re ready to launch the training script! 🚀 PyTorch Flax  Let’s train on the Pokémon BLIP captions dataset to generate your own Pokémon. Set the environment variables MODEL_NAME and dataset_name to the model and the dataset (either from the Hub or a local path). If you’re training on more than one GPU, add the --multi_gpu parameter to the accelerate launch command. To train on a local dataset, set the TRAIN_DIR and OUTPUT_DIR environment variables to the path of the dataset and where to save the model to.   Copied export MODEL_NAME="runwayml/stable-diffusion-v1-5"