Nodes/ComfyUI Smart Scaler/Dynamic Resolution Selector
ComfyUI Node

Dynamic Resolution Selector

When you want to type the resolution yourself

By babydjac·Created about a year ago·Updated about a year ago· 1
Dynamic Resolution Selector
    • sdxl_resolution
    • wan_resolution
    sdxl_width1024
    sdxl_height1536
    wan_width512
    wan_height768
    force_multiple_64true

    Dynamic Resolution Selector is the manual override node in the ComfyUI Smart Scaler pack. Where Smart Aspect Scaler looks at your image and picks a resolution bucket for you, this node does the opposite: you type in the exact width and height you want for SDXL and for Wan, it snaps them to sensible values, and it hands you back both as size strings. No image in, no image out - it's a widget-to-string converter with training wheels.

    Why you'd want it. Sometimes auto-picking the bucket isn't what you want. You know your card can't handle 1024x1536 and you'd rather run a specific size like 832x1216; or you're building a workflow that has to work with two different models in one pass and you want one clean place to set both resolutions. This node gives you a single spot to define "SDXL gets this, Wan gets that" as numbers, then produces the strings the rest of the pack expects.

    How it works

    Four integer inputs - sdxl_width, sdxl_height, wan_width, wan_height - each with a step of 64, plus a force_multiple_64 toggle (default on). If the toggle is on, each value is floored to the nearest multiple of 64 before anything else happens, and anything below 64 gets bumped up to 64 so you can't produce a degenerate zero-size. Then it just formats two strings, sdxl_resolution and wan_resolution, like "1280x720".

    That's genuinely all it does. It doesn't validate that your numbers are a resolution any model can actually handle - the widget bounds (up to 4096 for SDXL, 2048 for Wan) are your only guardrail, and they're generous enough to let you shoot well past what your VRAM can take. The multiple-of-64 floor is there because both SDXL and Wan's VAE behave best when dimensions divide cleanly, and it saves you from the classic "I set 1150 and the sampler complained" failure.

    Where it fits

    The outputs are strings, so the natural wiring is into Size Parser (which converts "WxH" into integer width/height for EmptyLatentImage or a sampler's size fields) or straight into anything that reads a size string. It pairs with the rest of the pack in two patterns:

    • As the fixed-resolutions half of a workflow where the scalers do aspect work and this node locks in exact output sizes for the generation stage.
    • As a planning node when you're testing: type your candidate resolution, see the string, and know instantly whether it's a multiple of 64 before you commit it to the graph.

    For most people this is a utility you reach for once the pack's auto-scaling does most of the work and you just need to pin one specific number. If you never want to type a resolution again, Smart Aspect Scaler is your node; if you want the last word, this one is.

    Installation

    Same pack, same story - ComfyUI Manager search comfyui-smart-scaler, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/babydjac/comfyui-smart-scaler.git
    pip install torch Pillow numpy
    

    Then restart. It's under SmartScaler in the node menu. Dependencies are just torch/Pillow/numpy; no models to download.

    Common issues

    The main way people get burned is forgetting this node formats rather than validates. "I asked for 4096x4096 on the Wan side and it OOMed" isn't a bug, it's the widget bounds being advisory. And note it floors to multiples of 64 - if you type 1000 and get 960 back, that's the toggle doing its job; turn force_multiple_64 off if you really need the exact odd number (you usually don't). Keep in mind there's no image processing here, so wiring it into a pipeline expecting an actual image will do nothing.

    CategorySmartScaler

    Inputs (5)

    NameTypeDefaultDescription
    sdxl_widthINT102464–4096
    sdxl_heightINT153664–4096
    wan_widthINT51264–2048
    wan_heightINT76864–2048
    force_multiple_64BOOLEANtrue

    Outputs (2)

    NameTypeDescription
    sdxl_resolutionSTRING
    wan_resolutionSTRING