Nodes/TW-CUI-Util/INTEGER Literal
ComfyUI Node

INTEGER Literal

INTEGER Literal

By TW-CUI·Created 2 years ago·Updated 2 years ago· 1
INTEGER Literal
    • INT
    value0

    The integer twin of this pack's FLOAT Literal: one INT value in, the same value out, nothing else happening. It's a wire, not a calculator.

    Why you'd want one: ComfyUI widgets are usually locked to a single node, so if you need the same integer - a seed, a resolution dimension, a batch size - feeding two or three different nodes at once, you need one shared source to point them all at. Type the number into an IntLiteral once, drag a wire from its output to every node that needs it, and from then on you only ever edit the number in one place instead of hunting down every copy scattered across the graph. A seed you want to reuse for both a KSampler and a filename-tagging node elsewhere in the same workflow is a good example of exactly the case this solves.

    Mechanism. Stores an integer, returns it unchanged. That's the whole node - no rounding surprises, no float-to-int coercion, no side effects.

    Inputs and outputs. One required value (INT, default 0), one output typed INT and named "INT." Nothing else is configurable.

    It's a deliberately dumb node, and that's the appeal - you're trading "a widget welded to one place" for "a value you can see and edit from anywhere on the graph." On a small workflow that's barely worth the extra node; on a large one with several samplers, a resolution shared across two branches, or a seed you want to keep pinned while you iterate on everything else, it's the difference between one obvious place to change a number and a scavenger hunt through a dozen collapsed node groups.

    Installing it. Part of TW-CUI-Util. ComfyUI Manager: search "TW-CUI-Util", install, restart. Or manually, git clone https://github.com/TW-CUI/TW-CUI-Util into ComfyUI/custom_nodes and restart. No dependencies, no downloads beyond the pack code itself.

    Troubleshooting. About the only thing worth flagging is that, like its float sibling, this node has no min/max/step configured - it'll happily hand a KSampler a seed of -50 or a batch size of 99999 without complaint, because the literal itself has no idea what field it's ultimately feeding. The receiving node may or may not validate that for you; ComfyUI will usually error loudly rather than silently misbehave on a truly out-of-range value, but it's still on you to sanity-check what you're piping in before you hit queue.

    If you're used to ComfyUI's own native Primitive node - the generic one that auto-detects its type from whatever it's wired to - this is functionally similar but explicitly typed as an integer rather than generic. That mostly matters for readability: glance at a crowded graph and you know at a glance this particular box can only ever be a whole number, instead of tracing a wire to find out what it actually resolves to.

    If the node's missing from your search after installing or updating the pack, that's an import-failure symptom rather than something wrong with this specific node - check the ComfyUI console at startup for a TW-CUI-Util-related error before troubleshooting further.

    CategoryTW-CUI/util

    Inputs (1)

    NameTypeDefaultDescription
    valueINT0

    Outputs (1)

    NameTypeDescription
    INTINT