Nodes/Crystools/πŸͺ› Primitive integer
ComfyUI Node Runs on cloud

πŸͺ› Primitive integer

Primitive Integer (Crystools)

By crystianΒ·Created 3 years agoΒ·Updated 9 months agoΒ· 1,940
πŸͺ› Primitive integer
    • int
    β—„int1β–Ί

    Type a whole number, get an INT out. That's the entire node - no logic, no options beyond the value itself. The only thing worth mentioning is the range: min and max sit at roughly Β±9.2 quintillion, the literal bounds of a 64-bit integer, so in practice it's unbounded for anything you'd realistically put in a ComfyUI graph - seeds, step counts, batch sizes, resolutions, all comfortably inside that range with room to spare.

    Why you'd reach for it

    Crystools' primitives exist so you can define a value once and fan it out to multiple places instead of typing the same number into five different widgets and inevitably forgetting to update one of them. A step count shared across two KSamplers, a batch size reused in two spots, a fixed seed you want visible and editable in one place rather than buried inside a sampler node - that's the whole use case. It's a small thing, but it's the difference between changing a number once and hunting through your graph for every copy of it.

    It's also the node people reach for to make a seed genuinely reproducible and visible: instead of trusting whatever random seed a KSampler generated last run and hoping you remembered to lock it, pull the seed out into one of these, note the number, and you've got a single obvious place to both read and re-set it for the next run.

    How it works

    Nothing to explain beyond the widget-to-output relationship: what you set is what comes out.

    Inputs and outputs

    One required field: int (default 1, step 1, effectively unbounded min/max). One output: int.

    Installing it

    Through ComfyUI Manager, search crystools. Manually:

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

    Restart ComfyUI. No models, no extra dependencies specific to this node.

    Common issues

    Honestly, this is about as close to bulletproof as a node gets - there's nothing here that breaks. The one practical thing to keep in mind: since the range is essentially unbounded, ComfyUI won't stop you from fat-fingering an extra digit onto a seed or a resolution value. The node itself won't catch it; the mistake shows up downstream in whatever sampler or latent node actually chokes on an absurd number, so double-check the widget before queuing anything expensive.

    If you're feeding this into something with its own tighter constraints - an Empty Latent Image only wants dimensions that are multiples of 8, for instance - remember that constraint lives on the receiving node, not here. This node will happily output any integer you type, valid for its destination or not.

    Categorycrystools πŸͺ›/Primitive

    Inputs (1)

    NameTypeDefaultDescription
    intINT1-9223372036854776000–9223372036854776000β€”

    Outputs (1)

    NameTypeDescription
    intINTβ€”