Nodes/ComfyUI-mnemic-nodes/✏️ Literal Int
ComfyUI Node

✏️ Literal Int

Literal Int — ComfyUI Node Guide

By MNeMoNiCuZ·Created 3 years ago·Updated 23 days ago· 105
✏️ Literal Int
    • value
    value0

    The simplest node in this entire pack, and worth explaining precisely because it looks pointless at first glance: it's a whole number, typed once, with a wire coming out of it. No logic, no randomness, no formatting - just a value you can route.

    The obvious question is why this exists when every ComfyUI widget already lets you type a number directly into it. The answer is that a widget's value lives only on that one node - if five different nodes in your graph need the same number (say, a shared resolution feeding three separate Empty Latent nodes across a multi-stage workflow, or a step count you reuse in two different samplers), typing it five times means five places to remember to update when it changes. Wire one Literal Int node out to all five instead, and there's exactly one number to edit. It's also the shape you want the moment that number needs to come from somewhere other than your own typing - swap this node out for this pack's Random Int in Range, or a value pulled from a Prompt Property Extractor tag, and every downstream connection keeps working without being rewired.

    This pack ships the same idea at three other types - Literal Bool, Literal Float, and Literal String - for the same reason at each: sometimes you want a typed constant as an explicit, nameable, reroutable thing in your graph rather than buried inside a widget on some other node.

    Core ComfyUI ships something adjacent to this - a generic Primitive node that auto-detects its type from whatever it's connected to. The difference is that this node is explicitly and permanently an INT, nothing else. That matters whenever a downstream socket is strict about type and a Primitive's auto-detection isn't giving you the behavior you expect, or when you'd rather a node's type be obvious at a glance in a large graph than inferred from context. It's a small trade - less automatic, more predictable - and for a pack full of nodes that parse loosely-typed tags out of text strings, having one unambiguous typed constant to fall back on is worth having around.

    Input: value, a single integer field with an enormous range (effectively unbounded for anything you'd realistically use it for).

    Output: value, the same number, as a wire.

    Installing it: the same as every node in this pack - ComfyUI Manager, search "ComfyUI-mnemic-nodes," or git clone https://github.com/MNeMoNiCuZ/ComfyUI-mnemic-nodes into custom_nodes, then restart ComfyUI.

    There's honestly nothing to troubleshoot here. No dependencies, no external calls, no parsing that can fail - if ComfyUI itself is working, this node is working. The only "mistake" worth naming is reaching for it out of habit when a plain widget on the consuming node would do the job just as well; use this when you specifically need the value exposed as its own node, not as a default way to enter every number in your workflow.

    Category⚡ MNeMiC Nodes

    Inputs (1)

    NameTypeDefaultDescription
    valueINT0-18446744073709550000–18446744073709550000Integer value.

    Outputs (1)

    NameTypeDescription
    valueINT