ComfyUI Node

Width

A width widget that other nodes can share

By ComfyAssets·Created about a year ago·Updated about a year ago· 9
Width
    • width
    width512
    presetcustom

    Let's be honest about what this is: a single integer, dressed up as a node. WidthNode outputs one number - the image width in pixels - and nothing else. Its entire reason to exist is that ComfyUI lets you convert a widget into an input port, and once you do, a node like this becomes the one place you set a value that several other nodes all read. It's the same centralization trick as the Sampler Selector in this pack, just for dimensions.

    When is that worth it? When your workflow has more than one place that needs the width. An EmptyLatentImage and an upscale target, or a latent and an image-size node, or a batch of comparison branches that must stay in lockstep. You convert each of their width widgets to input, wire them to one WidthNode, and change a single dropdown to resize the whole graph. If you have exactly one latent and you're never going to share its width - don't bother; just type into EmptyLatentImage. This node earns its place in big or reused workflows, not tiny ones.

    How it works

    Two inputs, and only the first is a real number: width (default 512, min 64, step 8) and preset (default custom). Pick a preset - 640, 768, 832, 896, 1024, 1152, 1216, 1344, or 1536, all the standard SDXL/FLUX sizes - and it overrides whatever's typed into width. Set custom and it just passes your number through. The single width INT output feeds any width port.

    The step-of-8 constraint is the part that saves you from yourself: latent dimensions have to be multiples of 8 or the VAE chokes on decode. The node enforces it on the input, so you can't fat-finger a 1001 and spend an hour wondering why the image came out black. The presets are all multiples of 8 too, and they're the sizes checkpoint cards actually want - 1024 for SDXL and Flux, smaller for SD 1.5.

    Install

    Via ComfyUI Manager, search "ComfyUI_Selectors" and install, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ComfyAssets/ComfyUI_Selectors.git
    

    Restart ComfyUI after - a hard restart, not a refresh. No models, no runtime pip dependencies; the repo's requirements-dev.txt is just the developers' test tooling. The node shows up under comfyassets/Dimensions.

    One thing to know: this pack also ships a standalone HeightNode and a combined Width & Height Node. If you need both dimensions - which you almost always do - the combined node is the better pick, because it keeps width and height in one place and adds preset aspect ratios plus a swap button. Grab this one only when you genuinely want just the width.

    Categorycomfyassets/Dimensions

    Inputs (2)

    NameTypeDefaultDescription
    widthINT51264–16384Image width in pixels (must be multiple of 8)
    presetCOMBOcustomSDXL/FLUX width presets

    Outputs (1)

    NameTypeDescription
    widthINT