Nodes/m10i/Primitive Int Step
ComfyUI Node

Primitive Int Step

An integer that refuses to be a bad resolution

By 0nyx-networks·Created 7 months ago·Updated 4 months ago· 0
Primitive Int Step
    • value
    choice256

    ComfyUI will happily let you type 1027 into a resolution field. Your model will not. That's the gap Primitive Int Step exists to close: it's a plain integer value node with the training wheels bolted on so the number can only ever land on a multiple of 256.

    What it does

    Like its sibling PrimitiveComboList, it's a pass-through - you set a value, it hands the same value to everything wired into it. The difference is the control. Where the combo node forces you to pick from a fixed list, this one gives you a real integer field with a step of 256: min 256, max 8192, default 256. Type or scroll, and the value snaps to the nearest multiple of 256. You physically cannot set it to 1027.

    That constraint maps neatly to how most current architectures think about resolution - 256, 512, 768, 1024, 1536, 2048 are the sizes models were actually trained near (SDXL's trained buckets top out around 1344×768 / 1536×640, and 2026-era models generally like anything in a megapixel band). If you want to hand a different number to your empty latent for a one-off, this isn't the node for that; grab a core PrimitiveInt for total freedom. This one is for when "keep it in the standard band" is the whole job.

    Inputs and outputs

    • choice - the constrained integer, 256 → 8192, step 256.
    • value - INT output, the same number, ready to fan out.

    Use the "Convert widget to input" trick to wire it into the width/height of an Empty Latent Image, a resize node, or a resolution calculator like the pack's own CalculateOptimizeResolution. One source, many consumers - change it in one place and the whole graph follows, which is the entire point of the primitive-node family in the first place.

    Install

    ComfyUI Manager → search "comfy-nekonote-extensions", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/0nyx-networks/comfy-nekonote-extensions
    

    Restart ComfyUI and the node lives under NEKONOTE → Utils. It's part of a small MIT-licensed utility pack by MINETA "m10i" Hiroki (v0.4.7) with no model downloads and no exotic dependencies - numpy, pillow, httpx, pyyaml, piexif, diskcache, most already present in a stock install. Because the pack is written against the newer comfy_api.latest backend API, keep ComfyUI current; an old core will silently fail to register its nodes.

    CategoryNEKONOTE/Utils

    Inputs (1)

    NameTypeDefaultDescription
    choiceINT256256–8192

    Outputs (1)

    NameTypeDescription
    valueINT