Nodes/ComfyUI-KikoTools/Width Height Selector
ComfyUI Node

Width Height Selector

26 Resolutions, Zero 'What Res Should I Use?' Anxiety

By ComfyAssetsΒ·Created about a year agoΒ·Updated 2 months agoΒ· 19
Width Height Selector
    • width
    • height
    β—„presetcustomβ–Ί
    β—„width1024β–Ί
    β—„height1024β–Ί

    "Should this be 1024Γ—1024 or 896Γ—1152?" is a question with a correct answer for every model, and you don't want to keep a spreadsheet of them. Width Height Selector is a dropdown of curated resolutions - organized by whether they suit SDXL (~1MP), FLUX (higher-res), or ultra-wide formats - that spits out clean width/height integers for the rest of your workflow. Pick a preset, wire the outputs into your latent/empty-image node, done.

    How it works

    Under the hood is a table of presets (presets.py) where each entry carries width, height, aspect ratio, megapixel count, and which model group it's tuned for. Pick one from the dropdown and the node returns its dimensions. There's a custom option that falls back to the manual width/height fields, so the node doubles as a plain "give me my numbers" box when no preset fits.

    The party trick is the swap button - a small blue button in the node's corner that flips the orientation of the current preset. Pick a 16:9 landscape preset, hit swap, and you get 9:16 portrait in one click. It's a frontend feature (the width_height_swap.js file), and it's more useful than it sounds: you never type 1920Γ—1080 as 1080Γ—1920 and discover it halfway through a render.

    Inputs and outputs

    • preset - dropdown of ~41 options (26 curated presets plus custom). The names carry the metadata, e.g. 1024Γ—1024 - 1:1 (1.1MP) - SDXL or 640Γ—1536 - 5:12 (1.0MP) - SDXL. FLUX presets run higher (like 1920Γ—1080); ultra-wide covers 2560Γ—1080 and friends.
    • width / height - custom INTs, 64–8192, stepped by 8. Only used when preset is custom or as a fallback.

    Outputs: width and height as INTs. Standard wiring is into an Empty Latent Image (or the pack's Empty Latent Batch), or straight into anything that takes explicit pixel dimensions.

    Installing it

    In the ComfyUI-KikoTools pack. ComfyUI Manager β†’ search "ComfyUI-KikoTools" β†’ Install β†’ restart, then ComfyAssets β†’ Resolution. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ComfyAssets/ComfyUI-KikoTools.git
    cd ComfyUI-KikoTools
    pip install -r requirements.txt
    

    Restart ComfyUI. Nothing heavy ships with it.

    Gotchas

    The two rules of thumb that make the presets make sense: SDXL wants roughly 1 megapixel (that's why every SDXL preset hovers around 0.9–1.1MP), and stepping by 8 matters because the VAE works in multiples of 8 - the node enforces that so you don't hand it a 1003px-wide nightmare. The thing people misread is that this outputs pixel dimensions, not latent dimensions; an Empty Latent Image interprets them as pixels and divides by 8 internally, so don't pre-divide. And if you swap dimensions and the result looks wrong, remember the swap applies to the preset - with custom selected you're just editing the two fields manually.

    Category🫢 ComfyAssets/πŸ–ΌοΈ Resolution

    Inputs (3)

    NameTypeDefaultDescription
    presetCOMBOcustomSelect from optimized resolution presets or use custom dimensions. SDXL presets are ~1MP, FLUX presets are higher resolution, Ultra-wide presets support modern aspect ratios.
    widthINT102464–8192Custom width in pixels (must be multiple of 8). Used when preset is 'custom' or as fallback for invalid presets.
    heightINT102464–8192Custom height in pixels (must be multiple of 8). Used when preset is 'custom' or as fallback for invalid presets.

    Outputs (2)

    NameTypeDescription
    widthINTβ€”
    heightINTβ€”