A simple script to calculate the recommended initial latent size for SDXL image generation and its Upscale Factor based on the desired Final Resolution output

Aspect ratio calculator

A simple script (also a Custom Node in ComfyUI thanks to CapsAdmin), to calculate and automatically set the recommended initial latent size for SDXL image generation and its Upscale Factor based on the desired Final Resolution output.

Resolutionscale calculator

A simple script to calculate the recommended initial latent size for SDXL image generation and its Upscale Factor based on the desired Final Resolution output

According to SDXL paper references (Page 17), it's advised to avoid arbitrary resolutions and stick to those initial resolution, as SDXL was trained using those specific resolution.