Compared to previous models, Stable Diffusion XL offers significantly improved image generation capabilities regarding image and composition details. Mostly because of this:

Stable Diffusion XL was trained at a base resolution of 1024 x 1024. Meaning that the total amount of pixels of a generated image did not exceed 10242 or 1 megapixel, basically.

The model was then finetuned on multiple aspect ratios, where the total number of pixels is equal to or lower than 1,048,576 pixels.

Below you can see a full list of aspect ratios and resolutions represented in the training dataset:

Stable Diffusion XL Resolutions

For the best results, it is recommended to generate images with Stable Diffusion XL using the following image resolutions and ratios:

  • 1024 x 1024 (1:1 Square)
  • 1152 x 896 (9:7)
  • 896 x 1152 (7:9)
  • 1216 x 832 (19:13)
  • 832 x 1216 (13:19)
  • 1344 x 768 (7:4 Horizontal)
  • 768 x 1344 (4:7 Vertical)
  • 1536 x 640 (12:5 Horizontal)
  • 640 x 1536 (5:12 Vertical, the closest to the iPhone resolution)

You can also try other variations, but remember this one thing:

It is important for optimal performance that the resolution is set to 1024×1024 or other resolutions with the same amount of pixels but a different aspect ratio.