Nodes/ComfyUI-LogicUtils/System Random Int
ComfyUI Node

System Random Int

System Random Int (SystemRandomInt) — ComfyUI-LogicUtils

By aria1th·Created 3 years ago·Updated 7 months ago· 116
System Random Int
    • INT
    min_val0
    max_val9223372036854776000

    SystemRandomInt gives you a random whole number with no seed and no memory. Every run, fresh entropy, different value, and no way to reproduce it. That's the entire distinction between this and its seeded sibling UniformRandomInt in the same pack, and picking the right one of the two is the only real decision here.

    Use this when you genuinely don't want reproducibility. You want a fresh roll every time you queue and you don't care about getting the same number back. That's less common than you'd think in generation work, because most of the time reproducibility is the whole point of seeds, but there are real cases: quick-and-dirty randomization, breaking a cache on purpose, feeding entropy into something where "always different" is the feature. If that's not what you're doing, reach for the seeded version instead so you can pin a result when you find one you like.

    It ships in ComfyUI-LogicUtils, the utility pack from aria1th, better known as AngelBottomless, the trainer behind Illustrious XL. The pack is a personal toolkit with barely any documentation, so these nodes are lean and you learn their behavior by running them.

    Inputs and outputs

    Two required inputs, both INT. min_val and max_val set the range the random number is drawn from, inclusive of the low end. The single output is an INT. There's no seed input at all, which is the defining feature: without a seed there's nothing to hold the value steady, so it changes freely. It's also an output node, so it executes when you queue even if nothing is reading from it.

    Installing it

    • ComfyUI Manager: Custom Nodes Manager, search "ComfyUI-LogicUtils," install, restart.
    • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/aria1th/ComfyUI-LogicUtils, then restart.

    No models, no dependencies of consequence. The pack's optional auto-installer only runs behind COMFYUI_LOGICUTILS_AUTO_INSTALL=1 (turn it off with COMFYUI_LOGICUTILS_SKIP_INSTALL=1), and rolling a random number needs none of it.

    The default that will surprise you

    Here's the one to watch. The default range on this node is enormous, running from roughly negative nine quintillion to positive nine quintillion, the full width of a 64-bit integer. If you drop the node in and hit run without touching the inputs, you will get an astronomically large number, positive or negative, that is almost certainly useless to whatever you wired it into. Always set min_val and max_val to the actual range you want. Nobody wants a random step count of four billion.

    The other thing to internalize is the flip side of "no seed": because it changes every run and can't be reproduced, anything downstream of it is also unreproducible, which can make a workflow frustrating to debug. If you later wish you could recreate a particular result, you can't, and that's not a bug, it's the trade you made by choosing the unseeded node. When reproducibility matters even a little, use UniformRandomInt instead.

    CategoryLogic Gates

    Inputs (2)

    NameTypeDefaultDescription
    min_valINT0-9223372036854776000–9223372036854776000
    max_valINT9223372036854776000-9223372036854776000–9223372036854776000

    Outputs (1)

    NameTypeDescription
    INTINT