ComfyUI Node

XResolution

Resolution width and height settings with preset, scaling, swap, divisible adjustment and offset support

By Xz3r0-M·Created 7 months ago·Updated 22 days ago· 11
XResolution
  • image_or_mask
  • width
  • height
presetCustom
width1280
height720
scale1.0
swapfalse
divisible_modeDisabled
divisible16
width_offset0
height_offset0
Category♾️ Xz3r0/Workflow-Processing

Inputs (10)

NameTypeDefaultDescription
presetCOMBOCustomResolution preset (used only when image input is not connected; if preset is not Custom, it overrides custom width/height)
widthINT12801–16384Custom resolution width (used only when preset is Custom and image input is not connected)
heightINT7201–16384Custom resolution height (used only when preset is Custom and image input is not connected)
scaleFLOAT1.00.01–100Scale multiplier
swapBOOLEANfalseSwap width and height
divisible_modeCOMBODisabledHow to adjust resolution to be divisible: Disabled=no adjustment, Nearest=round to nearest multiple, Up=round up, Down=round down
divisibleINT161–128Make resolution divisible by this number (set to 1 to disable, common values: 8, 16, 32, 64)
width_offsetINT0-128–128Add offset to output width (positive=increase, negative=decrease)
height_offsetINT0-128–128Add offset to output height (positive=increase, negative=decrease)
image_or_maskoptIMAGE,MASKImage or mask input for base resolution (takes priority over preset and custom width/height)

Outputs (2)

NameTypeDescription
widthINTOutput resolution width (after preset, scaling, swap, divisible adjustment, and offset)
heightINTOutput resolution height (after preset, scaling, swap, divisible adjustment, and offset)