Nodes/😸 YFG Comical Nodes/🐯 YFG Random.org True Random Number (V2)
ComfyUI Node

🐯 YFG Random.org True Random Number (V2)

Random.org True Random Number (V2) (v2.0.1) Generates a true random integer using random.org. Uniqueness options: β€’ ensure_unique=true + use_shuffle_bag=true: uses a shuffle-bag (no repeats until the range is exhausted, then reshuffles). β€’ If the range is very large, the node automatically falls back to history-based de-dup to avoid huge memory use. API Key: β€’ Set env var RANDOM_ORG_API_KEY, or create random_org_api_key.json next to this file: {"api_key":"..."}

By gonzaluΒ·Created 2 years agoΒ·Updated 10 days agoΒ· 29
🐯 YFG Random.org True Random Number (V2)
    • number
    • float
    • int
    β—„minimum0.00β–Ί
    β—„maximum10.00β–Ί
    β—„moderandomβ–Ί
    β—„ensure_uniquetrueβ–Ί
    β—„unique_scoperangeβ–Ί
    β—„history_size100β–Ί
    β—„time_window_sec0β–Ί
    β—„retry_limit20β–Ί
    β—„use_shuffle_bagtrueβ–Ί
    Category🐯 YFG/πŸ”’ Numbers

    Inputs (9)

    NameTypeDefaultDescription
    minimumFLOAT0.00-9223372036854776000–9223372036854776000Lower bound (inclusive). Floats are converted to integers via int().
    maximumFLOAT10.00-9223372036854776000–9223372036854776000Upper bound (inclusive). Floats are converted to integers via int().
    modeCOMBOrandomrandom: call random.org. fixed: return minimum deterministically (cacheable).
    ensure_uniqueoptBOOLEANtrueIf true, avoids repeats using shuffle-bag (preferred) or history de-dup (fallback).
    unique_scopeoptCOMBOrangerange: uniqueness tracked per (minimum,maximum). global: shared across all ranges.
    history_sizeoptINT1001–100000Used by history-based de-dup (and as extra guard when global scope is enabled).
    time_window_secoptINT00–86400If >0, values older than this many seconds are forgotten for de-dup checks.
    retry_limitoptINT200–1000How many times to try finding a non-duplicate when using history-based de-dup (or global checks).
    use_shuffle_bagoptBOOLEANtrueIf true and range size <= 200,000, use shuffle-bag. Otherwise fall back.

    Outputs (3)

    NameTypeDescription
    numberNUMBERComfyUI NUMBER output (typically behaves like a float).
    floatFLOATSame value as a Python float.
    intINTSame value as a Python int.