Nodes/ComfyUI_StringOps/重置尺寸(meeeyo.com)
ComfyUI Node

重置尺寸(meeeyo.com)

Snap your resolution to a small/medium/large preset in one step

By MeeeyoAI·Created 2 years ago·Updated about a year ago· 209
重置尺寸(meeeyo.com)
    • INT
    • INT
    width
    height
    size_option中尺寸

    StandardSize is a resolution helper from the MeeeyoAI/ComfyUI_StringOps pack: you give it a width and a height plus a size class, and it hands back an adjusted width and height. Its whole job is to stop you from hand-typing the same resolutions into every Empty Latent Image node and to normalize whatever resolution you computed elsewhere into a consistent "small, medium, or large" bucket.

    The inputs

    • width and height - plain integers, the resolution you're starting from.
    • size_option - the dropdown that does the work, with three choices: 小尺寸 (small), 中尺寸 (medium, the default), 大尺寸 (large).

    The two INT outputs are the resulting width and height. Feed those straight into an Empty Latent Image node, or into ImageAdjuster / LoadAndAdjustImage if you're resizing an input image to match, and your whole graph stops hard-coding resolutions in five different places.

    How to think about it

    This node is about standardization, not creativity. The pattern it supports: compute a target size once (say, from an input image's dimensions), snap it to one of the three presets so it's consistent with the rest of your batch, and reuse the outputs everywhere that needs matching dimensions. If you've ever had a workflow silently break because one Empty Latent Image said 1024x1024 and the next said 1024x1152, this is the class of node that kills that class of bug.

    The honest caveat

    The exact arithmetic behind the three presets isn't documented - no formula in the README, and the node doesn't expose its per-size multipliers. Treat it as "author's chosen sizes," not a spec: if the small/medium/large buckets it picks don't match the resolutions you actually want, that's a reason to pass and hard-code your own. The node's value is in consistency, not in its particular numbers. It's also resolution-only - it doesn't touch aspect ratio logic beyond what your width/height inputs already encode, so keep multiples-of-8 in mind if you're feeding a latent that expects them.

    Installing

    It ships with the pack, so it's the same install every other node here uses:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MeeeyoAI/ComfyUI_StringOps.git
    

    or via ComfyUI Manager (search ComfyUI_StringOps), then restart. It'll be under "Meeeyo/Image". No model downloads, no heavy dependencies - this is a pure arithmetic node, instant and free at runtime.

    One note: because the pack re-issues versions, a node that was crawled under this name may have been renamed in newer releases - if you don't find it in the menu after install, search the pack's "Meeeyo/Image" category for the size-related node. For a pure convenience helper like this, the cost of adopting it is basically zero, and the payoff is one fewer thing to remember.

    CategoryMeeeyo/Image

    Inputs (3)

    NameTypeDefaultDescription
    widthINT
    heightINT
    size_optionCOMBO中尺寸3 options: 小尺寸, 中尺寸, 大尺寸

    Outputs (2)

    NameTypeDescription
    INTINT
    INTINT