PixArt-alpha / PixArt-sigma

PixArt-Σ: Weak-to-Strong Training of Diffusion Transformer for 4K Text-to-Image Generation
https://pixart-alpha.github.io/PixArt-sigma-project/
GNU Affero General Public License v3.0
1.44k stars 67 forks source link

Training pixart sigma with any aspect ratio? #83

Open NguyenNhoTrung opened 1 month ago

NguyenNhoTrung commented 1 month ago

I have a question: How to train pixart sigma with any aspect ratio (for example: image 960x1280 pixel). Can you describe details in step by step? Thank you!

lawrence-cj commented 1 month ago

This part is done during the dataset sampling. You can find it here: https://github.com/PixArt-alpha/PixArt-sigma/blob/f999a89ce86d2dc2b65d01e77602a4d2f4ddec85/train_scripts/train.py#L431

NguyenNhoTrung commented 1 month ago

This part is done during the dataset sampling. You can find it here:

https://github.com/PixArt-alpha/PixArt-sigma/blob/f999a89ce86d2dc2b65d01e77602a4d2f4ddec85/train_scripts/train.py#L431

I see that: here is config for aspect ratio.

image Can I add any aspect ratio into config ? (example: add 0.625 aspect ratio with 720x1280).
When adding like this, does it decrease performance ?

lawrence-cj commented 1 month ago

Of course, you can add any aspect ratio into the config. It'll not cause a decreasing in performance IMO.