ComfyUI Node

Random Modifier

Reproducible surprise lighting, seed and all

By MushroomFleet·Created 9 months ago·Updated 5 months ago· 3
Random Modifier
    • modified_prompt
    • used_modifier_id
    textSubject description here
    category
    seed0

    Random Modifier is the pack's slot machine - but a slot machine with a seed you control, which makes all the difference. Feed it a base prompt, pick a pool, and it grabs a random lighting modifier and appends it. Bump the seed and you get a different take; keep the seed and you get the same one, every time. That reproducibility is the whole point: it turns "random" from a wildcard into an experiment you can actually repeat and compare.

    The mechanism is refreshingly transparent. The node seeds Python's random module with your seed value, builds a list of valid modifier IDs from the selected category, picks one with random.choice, and applies it through the standard lighting modifier path. Because random.seed(seed) is deterministic, the same seed always yields the same ID - that's your reproducibility guarantee, and it's also why "change the seed" is the stock answer when results feel stuck.

    The inputs: text (base prompt), category (all/dry/wet), and seed (an integer, default 0, going up into the full 64-bit range). Outputs are two: modified_prompt (the STRING to feed your sampler) and used_modifier_id (the INT that tells you which one it picked - wire this into a display node if you want to know what happened without digging through logs).

    Two honest limitations, both visible in the source. First, it's lighting-only: the random pool is drawn from the lighting modifier table regardless of which category you pick - all just means IDs 1–20 across the lighting dimension, not across all twelve dimensions. It's the same wiring quirk that limits Batch Variation and Modifier Info. Second, dry and wet only filter the lighting modifiers that carry a category, which is fine - but don't come here expecting random mood or camera modifiers. For true multi-dimension randomness you'd have to chain several single-modifier nodes.

    Install is the standard pack story: zero dependencies, no model downloads. ComfyUI Manager → search "Variationator" → install → restart, or cd ComfyUI/custom_nodes && git clone https://github.com/MushroomFleet/ComfyUI-Variationator.git. The install-portable.bat in the repo references a requirements.txt that isn't shipped - ignore it, nothing needs installing. Node lives under Prompt Orchestration.

    Where I'd actually reach for this: creative exploration when you want to be surprised, or a quick way to check whether your checkpoint renders lighting vocabulary meaningfully - run the same base prompt through a few seeds and eyeball whether the lighting actually changes. Where I wouldn't: anything where a specific look matters. For that, the deterministic single modifier nodes are the right tool; the random node is for the mood board phase, not the final render.

    CategoryPrompt Orchestration

    Inputs (3)

    NameTypeDefaultDescription
    textSTRINGSubject description here
    categoryCOMBO3 options: all, dry, wet
    seedINT00–18446744073709550000

    Outputs (2)

    NameTypeDescription
    modified_promptSTRING
    used_modifier_idINT