ComfyUI Node

⬡ Polyhedron Int

An integer with a memory for what it means

By PolyhedronAI·Created 3 months ago·Updated a day ago· 2
⬡ Polyhedron Int
    • value
    • label
    value0
    preset_config

    Every ComfyUI workflow ends up with a handful of magic numbers: step counts, batch sizes, seed offsets, the frame_load_cap you keep forgetting to set. ⬡ Polyhedron Int is a plain integer node with one genuinely useful addition - named presets. One click sets the number and says what it means, and the meaning travels downstream as text.

    The setup is the whole point. You define a preset list for the node once (a frontend-owned JSON config), so "81", "121", "169" become "81 · short clip", "121 · standard", "169 · long". Click the named preset and the node's value output emits the number; its label output emits the preset's name. Wire that label into a Save node's filename prefix or a note, and your output files stop being clip_00001_.mp4 and start being clip_169_standard_00001_.mp4 - the graph and the file agree on what that number was for, months later.

    How it works

    It's deliberately simple under the hood. The value widget is the single source of truth - presets just write into it, they're never a second source, so there's no drift between "what the number is" and "what it's labelled." The preset_config input carries the preset list (JSON) and is meant to be owned by the node's frontend rather than hand-edited. Because the config lives on the node, presets survive saving and reloading the workflow like any other widget state.

    What you actually set

    • value - the integer this node emits. Click, drag, arrows, or type. Any int from −2³¹ to 2³¹−1.
    • preset_config - the named preset list, if you're configuring them by hand.
    • value (out, INT) - the number, exactly as shown.
    • label (out, STRING) - the name of the preset currently holding that value, or empty if it's a free-typed number.

    The label being empty when you type a raw number is worth knowing: if a downstream filename logic expects a label, a hand-typed value quietly produces none. Reach for the presets.

    Installing it

    Part of the ⬡ Polyhedron Suite pack. ComfyUI Manager → "Polyhedron Suite", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/PolyhedronAI/ComfyUI-PolyhedronLoRAStack.git
    # restart ComfyUI
    

    No extra dependencies.

    Gotchas

    Honestly, there aren't many - it's a value node, and its failure mode is the same as every value node's: it doesn't update anything downstream on its own, it just holds a number for the graph to fan out from. Convert widgets to inputs and wire this one node to five samplers' step fields, and you've made one source of truth instead of five to keep in sync. That's the real reason to use it, presets aside. One renderer note: if it shows up blank under ComfyUI's Nodes 2.0 (Modern Node Design) setting, disable that in Settings - the pack's custom widgets are drawn on the classic LiteGraph canvas.

    CategoryPolyhedron/Logic

    Inputs (2)

    NameTypeDefaultDescription
    valueINT0-2147483648–2147483647The number this node emits. Presets write here; they are never a second source.
    preset_configoptSTRINGFrontend-owned preset list (JSON). Not meant for hand editing.

    Outputs (2)

    NameTypeDescription
    valueINTThe integer, exactly as shown.
    labelSTRINGName of the preset holding this value right now, or empty.