Nodes/ComfyUI Text-Driven Workflows/Resolution Selector (Text-Driven)
ComfyUI Node

Resolution Selector (Text-Driven)

Stop hand-typing width and height — pick an aspect ratio from a dropdown

By kanryu·Created 4 months ago·Updated 3 months ago· 0
Resolution Selector (Text-Driven)
    • width
    • height
    resolutions_list768x1024 (3:4) 832x1216 (13:19) 960x1280 (3:4) 1024x1365 (3:4) 1024x1496 (paper) 1080x1440 (3:4) 1152x1536 (3:4) 1280x1728 (3:4) 1536x1536 (1:1)
    selected_resolution768x1024

    This node exists to end one of the dumbest little chores in ComfyUI: hand-typing the same width and height into Empty Latent Image, the SDXL CLIP encoder, and whatever latent node you're feeding - and fat-fingering a 1034 that turns your subject into a stretched noodle. Resolution Selector (Text-Driven) is a dropdown of preset resolutions that outputs width and height as numbers, so one selection drives every node that needs dimensions and they can never disagree.

    How it works

    Two inputs, zero math. resolutions_list is a plain multiline text box, preloaded with nine presets written for humans rather than for parsers:

    768x1024 (3:4)
    832x1216 (13:19)
    1024x1496 (paper)
    1536x1536 (1:1)
    

    The selected_resolution dropdown is generated from that list by the pack's JavaScript. Pick a line, and the node emits width and height as ints. Wire those into Empty Latent Image, into CLIP Text Encode SDXL's width/height, and your aspect ratio stays consistent across every stage of the graph. That's the whole point: SDXL conditions on resolution and crop position, so a latent that doesn't match its text encode will quietly distort your composition instead of telling you about it.

    The presets skew portrait 3:4, which is sensible for character work but useless if you want a landscape. Doesn't matter - the list is just text. Delete the defaults, type your own, keep each line in a WxH ... shape. That's the design.

    Where people get burned

    The dropdown shows the friendly label ("1024x1365 (3:4)"), but the backend only reads the part before the first space - the actual 1024x1365. Add lines that don't contain an x and the node silently falls back to 768x1024 rather than telling you anything is wrong. Keep your lines parseable and you'll never see it.

    Install

    It's part of a nine-node pack, so you get it all at once. Easiest is ComfyUI Manager - search "ComfyUI Text-Driven Workflows", hit Install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/kanryu/ComfyUI-Text-Driven-Workflows.git
    

    Then restart ComfyUI. There are no Python dependencies, no model downloads, nothing to weigh down your install - the pack's pyproject.toml declares an empty dependency list, which is rare and worth appreciating in an ecosystem where half of every install is dependency roulette.

    The one real gotcha is ComfyUI itself: this pack is built on the new V3 extension API (comfy_api.latest), which only ships with recent ComfyUI builds. On an older install you'll get a "Failed to load nodes" line in the console and no Text-Driven Workflows category. The fix is boring and correct: update ComfyUI, restart.

    Bottom line

    You can absolutely fake this with a few primitive nodes and some wiring, and if that's already in your workflow you don't need it. But for a base workflow that gets re-rendered at multiple aspect ratios - the kind this pack is built around - a named preset list beats remembering numbers, and it makes the graph read like a config file instead of a puzzle. For a 109-impression niche node, that's a fair deal.

    CategoryText-Driven Workflows

    Inputs (2)

    NameTypeDefaultDescription
    resolutions_listSTRING768x1024 (3:4) 832x1216 (13:19) 960x1280 (3:4) 1024x1365 (3:4) 1024x1496 (paper) 1080x1440 (3:4) 1152x1536 (3:4) 1280x1728 (3:4) 1536x1536 (1:1)
    selected_resolutionCOMBO768x10249 options: 768x1024, 832x1216, 960x1280, 1024x1365, 1024x1496, 1080x1440, +3

    Outputs (2)

    NameTypeDescription
    widthINT
    heightINT