Nodes/ComfyUI-TJ_NODE/Resolution (TJ)
ComfyUI Node

Resolution (TJ)

Resolution (TJ)

By designloves2·Created 4 months ago·Updated 3 days ago· 13
Resolution (TJ)
    • width
    • height
    auto_setfalse
    width1024
    height1024
    ui_state

    Typing 1024, 1024 into an Empty Latent is a habit most people never question - until the model they're using silently produces worse images at that size. Resolution (TJ) is built around the reality that 2026 models each have their own preferred bucket resolutions, and that picking the wrong one is a real quality tax. It's a picker, not a generator: you choose a ratio, it shows you the resolutions actual models are trained on, and it hands you clean width / height integers to feed into your latent.

    How it works

    The node is a DOM-based UI with three tiers:

    • Ratio presets - nine of them: 1:1, 16:9, 9:16, 2:1, 3:2, 2:3, 4:3, 3:4, 4:5. Click one and it shows a list of representative resolutions for that ratio.
    • Ecosystem buckets - the interesting part. The resolution list is curated from real training buckets for current models - LTX-2, Z-Image, Klein, Flux, Krea2, Qwen-Image, Ideogram. So instead of guessing, you're picking from 1664×928, 1920×1088, and friends that those architectures actually saw during training. For a flow-matching model this matters more than people realize - off-bucket sizes mean the model is working outside its distribution.
    • Custom - if no preset fits: Custom Ratio (enter one side and the other computes to match the ratio) or Custom Resolution (free entry with a swap button). A snap setting (8/16/32/64) keeps everything divisible, which is what latent spaces want.

    Everything funnels into two outputs: width and height (INT), the numbers you wire into an Empty Latent or a resolution-aware sampler. auto_set publishes them as wireless providers (there's an "Auto Set" button with width ▶ / height ▶), and ui_state carries the picker's state so your selection survives reloads. There's also a preview box that draws the selected aspect ratio, so you can sanity-check before committing.

    Installing it

    Trivial, it's in the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/designloves2/ComfyUI-TJ_NODE
    

    or ComfyUI Manager → ComfyUI-TJ_NODE → restart. No dependencies.

    The honest take

    For a node whose entire output is two numbers, this earns its place by saving you from a specific recurring failure: generating at a size your model was never trained on and wondering why everything looks slightly wrong. It's most useful if you hop between models a lot - one picker, every architecture's buckets listed in the same place. The maintainer has also patched the annoying bug where the picker reset to 1:1 on every workflow reload, so the state now sticks. If you only ever use one model at one size, this is unnecessary furniture. If you've ever wondered why Z-Image Turbo looks better at 1664×928 than at a random round number, now you know where to find it.

    Category ✨ TJ_Node/Utility

    Inputs (4)

    NameTypeDefaultDescription
    auto_setBOOLEANfalse
    widthINT10248–16384
    heightINT10248–16384
    ui_stateSTRING

    Outputs (2)

    NameTypeDescription
    widthINT
    heightINT