ComfyUI Node Runs on cloud

Random Int

RandomInt — a random integer generator for seeds and random choices

By sipherxyz·Created 3 years ago·Updated 4 months ago· 352
Random Int
    • INT
    • STRING
    min0
    max100

    Give it a range, get a random whole number back each run. That's it, and that's plenty. The classic use is seeds - feed the output into a KSampler's seed input and every execution rolls a fresh number, so you get variation without manually bumping anything. But it's useful anywhere you want a graph to make a random numeric choice: pick a random index into a list, randomize a step count, drive a switch, jitter a parameter.

    It handily also gives you the number as both an INT and a STRING, which sounds trivial until you're wiring into nodes that disagree about type - one wants the integer, another (a filename, a text template) wants it as text. You get both off the one node instead of adding a converter.

    How it works

    Each time the node runs, it draws a random integer between min and max and outputs it. Nothing to configure beyond the bounds.

    The inputs and outputs that matter

    • min - the low bound, default 0, up to the full 64-bit range (~1.8×10¹⁹).
    • max - the high bound, default 100, same ceiling. For a seed generator, crank max up toward that ceiling so you're sampling the full seed space; for picking a list index, set max to the list length.

    Outputs:

    • INT - the random number, for numeric inputs (seed, index, count).
    • STRING - the same value as text, for filename or template use.

    How to install it

    Part of the Art Venture pack. ComfyUI Manager → search comfyui-art-venture → Install → restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/sipherxyz/comfyui-art-venture
    

    then pip install -r comfyui-art-venture/requirements.txt and restart. No model download.

    Common issues & troubleshooting

    It's not re-rolling every run. ComfyUI caches node outputs when nothing upstream changed - if the graph thinks this node's inputs are identical, it may reuse the last result instead of executing it again. In practice a seed path usually does re-run because the sampler consumes it, but if you see a stuck value, make sure the node is actually on the execution path and not being cached out. This is a general ComfyUI behavior, not an Art Venture quirk.

    As a seed source vs. SeedSelector. RandomInt is pure "always random in this range." If you want a switch between random and a locked seed, that's SeedSelector. Use RandomInt when you just want fresh numbers, SeedSelector when you want to toggle fixed/random.

    Range confusion at the top end. Both bounds go all the way to the 64-bit ceiling, so for full-range seeds set max high. For a small random pick (say 0–9), set min/max tight - leaving max at the default 100 will happily hand you numbers you didn't want.

    Node missing after a workflow import. The pack isn't installed - Manager → Install Missing Custom Nodes.

    CategoryArtVenture/Utils

    Inputs (2)

    NameTypeDefaultDescription
    minINT00–18446744073709550000
    maxINT1000–18446744073709550000

    Outputs (2)

    NameTypeDescription
    INTINT
    STRINGSTRING