Nodes/comfyui-jjmaden-random-nodes/Random Line From File (Wildcard)
ComfyUI Node

Random Line From File (Wildcard)

Picks one random line from a text file using its own seed, independent of the KSampler's. Uses a private random.Random instance rather than reseeding Python's global random module, so it won't affect -- or be affected by -- any other node in the same ComfyUI process that also calls random.*. Blank lines and lines starting with '#' are skipped, so you can comment out entries in your wildcard file. The parsed line list is cached by the file's mtime, so large wildcard files aren't re-read from disk on every single execution.

By jjmaden·Created 7 days ago·Updated 3 days ago· 0
Random Line From File (Wildcard)
    • random_line
    • seed_output
    text_path
    seed0
    prompt_mode
    prompt_fixed_seed0
    lora_trigger
    prefix_text
    CategoryMy_Custom_Nodes

    Inputs (6)

    NameTypeDefaultDescription
    text_pathSTRING
    seedINT00–18446744073709550000
    prompt_modeCOMBO3 options: Follow KSampler/Seed Field, Use Dedicated Prompt Seed, True Independent Random
    prompt_fixed_seedINT00–18446744073709550000
    lora_triggerSTRING
    prefix_textSTRING

    Outputs (2)

    NameTypeDescription
    random_lineSTRING
    seed_outputINT