Implement SD3 loss weighting (#8528)
* Add lognorm and cosmap weighting
* Implement mode sampling
* Update examples/dreambooth/train_dreambooth_lora_sd3.py
* Update examples/dreambooth/train_dreambooth_lora_sd3.py
* Update examples/dreambooth/train_dreambooth_sd3.py
* Update examples/dreambooth/train_dreambooth_sd3.py
* Update examples/dreambooth/train_dreambooth_sd3.py
* Update examples/dreambooth/train_dreambooth_lora_sd3.py
* Update examples/dreambooth/train_dreambooth_sd3.py
* Update examples/dreambooth/train_dreambooth_sd3.py
* Update examples/dreambooth/train_dreambooth_lora_sd3.py
* keep timestamp sampling fully on cpu
---------
Co-authored-by: Kashif Rasul <kashif.rasul@gmail.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>