```py
del text_encoders, tokenizers, vae
gc.collect()
torch.cuda.empty_cache()
```  
Finally, the [training loop](https://github.com/huggingface/diffusers/blob/aab6de22c33cc01fb7bc81c0807d6109e2c998c9/examples/text_to_image/train_text_to_image_sdxl.py#L943) takes care of the rest. If you chose to apply a timestep bias strategy, you'll see the timestep weights are calculated and added as noise:  
```py
weights = generate_timestep_weights(args, noise_scheduler.config.num_train_timesteps).to(