Nodes/ComfyUI-JNodes/Integer Literal
ComfyUI Node

Integer Literal

A reusable integer constant you can wire into anything

By JaredTherriault·Created 3 years ago·Updated about a month ago· 91
Integer Literal
    • INT
    integer1

    It's a number box. You type an integer, it outputs that integer. JNodes_IntLiteral is the numeric twin of JNodes_StringLiteral, and like that node its value is "define it once, wire it into several places." When the same number shows up in multiple spots - a step count you reuse, a seed you want shared, a dimension referenced twice - putting it in one literal means one place to edit instead of hunting down every copy.

    It's a primitive from Jared Therriault's JNodes suite. Nobody installs JNodes for this node, but once you have the pack it's a clean way to centralize a constant, and it plays nicely with the pack's other utility bits.

    How it works

    No processing. You set the integer value and the node emits it on its INT output. The range is enormous - it accepts the full span of 64-bit integers - so seeds, large counts, and negative values are all fine. What you type is what comes out.

    The inputs and outputs

    • integer (INT, default 1) - the value you want. It accepts very large positive and negative numbers, so it's happy holding a full-size seed.
    • INT output - the same integer, ready to plug into any integer input: sampler steps, a seed field, a latent dimension, a loop count, whatever.

    How to install it

    Via ComfyUI Manager: Install Custom Nodes, search "JNodes", install, restart. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/JaredTherriault/ComfyUI-JNodes
    pip install -r ComfyUI-JNodes/requirements.txt
    

    then restart ComfyUI. No model downloads. It's one of the lightest nodes in the suite.

    Common issues & troubleshooting

    It's an integer only - no decimals. If you plug this into something that wants a float and the receiving node is strict about it, you may need a float node instead. For whole numbers (steps, seeds, counts, pixel dimensions) it's exactly right; for a CFG of 7.5 or a denoise of 0.6, it's the wrong tool - those want a float literal.

    A shared value updates everywhere at once - that's the feature and the trap. The point of a single literal fanned out to many nodes is that changing it changes them all together. Occasionally that's not what you want (you meant to bump one consumer, not all of them). If you need independent values, use separate literals rather than one shared node.

    For text or model names, use the matching literal. Numbers here, strings in JNodes_StringLiteral. If you find yourself wanting to type a checkpoint name or a prompt, you're on the wrong node.

    That really is the whole thing. It's not clever and doesn't pretend to be - it's a tidy, single-source-of-truth place to hold a number, which in a sprawling graph is worth more than it looks.

    Categorysd

    Inputs (1)

    NameTypeDefaultDescription
    integerINT1-9223372036854776000–9223372036854776000

    Outputs (1)

    NameTypeDescription
    INTINT