RaspberryPi 1280×1024 resolution in dietpi

Edit the config.txt file on the sdcard
nano /DietPi/config.txt and change the appropriate lines to be:

# hdmi_safe=1
hdmi_force_hotplug=1

# hdmi_group=2 sets to DMT
hdmi_group=2

# hdmi_mode=35 sets display to 1280x1024 @60Hz
hdmi_mode=35

# hdmi_drive=2 sets to normal HDMI with sound
hdmi_drive=2

# config_hdmi_boost=5 boosts signal can go as high as 9
config_hdmi_boost=5