ComfyUI Node

M Int Max

Take the bigger number, every time

By Madlumi·Created 8 months ago·Updated 8 months ago· 0
M Int Max
    • max
    a0
    b0

    The mirror image of the pack's min node: M Int Max takes a and b and returns the larger one, as an INT named max. It's a single comparison - a if a > b else b - and it earns its place with a single repeated need: flooring a value from below.

    The patterns that keep coming up:

    • Minimum sensible values. "Resolution, but at least 512" is max(width, 512). Same for steps, batch size, tile size - any value where going too low is a different failure than going too high.
    • Two-source selection. When two branches of a graph each produce a candidate value and you want the larger - the more aggressive seed, the bigger margin - max is the explicit choice.
    • Building a clamp in two visible halves. max lifts the bottom, M Int Min caps the top. Some people find two named, individually-wired nodes easier to reason about than one combined clamp, and this pack gives you the option.

    Inputs are signed 32-bit INT, defaults 0. Output is plain INT and composes with the pack's arithmetic: max around a computed value is the standard "scale, then enforce a floor" idiom.

    It ships in ComfyUiNodes (repo Madlumi/ComfyUiNodes, author "Madanie"), a small personal grab-bag of integer math, string helpers, and workflow-glue nodes. Install via ComfyUI Manager - search "ComfyUiNodes" - or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Madlumi/ComfyUiNodes
    

    Then restart ComfyUI. No pip requirements or model downloads. It's under Add Node → mnodes → int.

    Look, max isn't exciting. It's one of those nodes that sits in the pack and quietly saves you the first time a formula hands you a 256px canvas when you meant 512. Pair it with M Int Min and you've built a full clamp from parts you can see.

    Categorymnodes/int

    Inputs (2)

    NameTypeDefaultDescription
    aINT0-2147483648–2147483647
    bINT0-2147483648–2147483647

    Outputs (1)

    NameTypeDescription
    maxINT