ComfyUI Node

Set Dimensions

One width/height pair, wired to every latent

By haroonaslam·Created 4 months ago·Updated 7 days ago· 10
Set Dimensions
    • width
    • height
    key
    width1024
    height1024

    Width and height are the two numbers you type into an Empty Latent Image every time you start a workflow, and if you change resolution you're hunting through every latent, every upscale, every crop node to keep them in sync. Set Dimensions is WorkflowX's fix for that exact annoyance: publish one width/height pair under a key, and Get Dimensions feeds both values to every consumer. Change the pair once, the whole graph resizes.

    Unusually for the Set family, this one has an output. Unlike Set Int or Set Boolean, which publish into config state and stop, Set Dimensions both publishes and passes both numbers through - you get width and height out of the node directly, so you can keep them on the local wire and still let config-scoped Get Dimensions nodes resolve them elsewhere. It's the Set/Relay hybrid of the family, minus mute controls.

    The two values are constrained to 1–16384 and default to 1024, which is a sensible ceiling - you probably don't want to learn what a 16K latent does to your VRAM by accident.

    The config-scoped trick

    The reason this beats a pair of PrimitiveInts is the same one as the rest of the family: values resolve per configuration. Config SelectorX scopes Set/Get resolution to native groups, so a "Draft" config can publish 1024×1024 and a "Final" config 1536×1536 under the same key. Flip the config and every Get Dimensions downstream follows. One graph, two resolutions, no cloning.

    Inputs:

    • key (STRING) - the name to match in Get Dimensions. Empty keys are rejected.
    • width / height (INT, 1–16384) - the pair, both defaulting to 1024.

    Outputs: width and height (INT), the same values passed straight through.

    Install

    One pack installs every node in WorkflowX:

    cd ComfyUI/custom_nodes
    git clone https://github.com/haroonaslam/WorkflowX-Configurator
    

    or search WorkflowX Configurator in ComfyUI Manager, restart ComfyUI, hard-refresh the browser. No pip deps, no model downloads.

    Wire the Set's width/height outputs (or Get Dimensions with a matching key) into an Empty Latent Image's converted width/height inputs.

    Where it bites

    • Get Dimensions wants both values. Its error message is explicit: it needs a matching Set Dimensions in an active config group or both fallback inputs connected directly. Connecting only width and leaving height dangling errors out.
    • Same key discipline as always. Case-sensitive, and a Get Dimensions resolves Set Dimensions values - not Set Int values.
    • Think about the latent, not just the image. Changing dimensions changes VRAM cost and the model's native-resolution behavior. This node makes resizing easy; it doesn't make 4096-wide Flux "free."

    A small node that quietly removes one of the most common sources of "why is everything the wrong size" - worth it if you build workflows that get reused at different resolutions.

    CategoryWorkflowX/Get Set Go

    Inputs (3)

    NameTypeDefaultDescription
    keySTRING
    widthINT10241–16384
    heightINT10241–16384

    Outputs (2)

    NameTypeDescription
    widthINT
    heightINT