Nodes/ComfyUI Silver Nodes/Silver File Text Loader
ComfyUI Node

Silver File Text Loader

Feed Prompts From a Text File and Step Through Them One Queue Run at a Time

By SilverAndJade·Created about a year ago·Updated 23 days ago· 0
Silver File Text Loader
    • text
    • index
    • count
    file_path
    split_modeby line
    current_index0
    actionfixed

    If you've ever wanted to batch-render a list of prompts without installing a wildcard pack, this is the cheap version. Silver File Text Loader reads a plain text file, splits it into lines or paragraphs, and - here's the whole point - steps through them with action set to increment. Write one prompt per line, queue up twenty runs, and each one uses the next prompt. No dynamic prompts, no __wildcards__, just a text file and a counter that advances itself.

    The pack calls it beta, and that's a fair label: it works, but it's clearly the least-tested node in the set.

    How it works

    The node reads the whole file and sniffs the encoding, trying utf-8-sig, utf-8, utf-16, cp1252, latin-1, and ascii in order until one decodes cleanly. That list covers basically every prompt file you'll ever produce, including Windows-notepad exports that come out in UTF-16 or cp1252. It then splits by line or by paragraph (paragraphs = blank-line-separated blocks), applies your action, and hands back one chunk. A bundled JS extension writes the next index back into the widget after each run, which is what makes "increment" actually loop through the file without you touching anything.

    Inputs that matter

    • file_path - an absolute path. It does not search ComfyUI's input folder like stock loaders do; it opens whatever string you give it. /home/you/prompts.txt, not prompts.txt.
    • split_mode - by line or by paragraph. For a prompt-per-line file, use by line.
    • current_index - where to start; the JS keeps it updated, so you usually don't touch it.
    • action - fixed, increment, decrement, or randomize. increment is the batch-rendering workhorse.

    Outputs

    • text - the selected chunk. Wire it into your positive prompt.
    • index - the current position, if you want to display or log it.
    • count - total number of lines/paragraphs, handy for a "3 of 20" display.

    Gotchas

    Files over 10 MB are rejected outright - you'll never hit that with prompts, but don't point it at a giant log file. Empty lines are stripped in by line mode, which is usually what you want but will shift your indices if you'd relied on blank lines as placeholders. Unusual extensions still load, just with a warning in the console. And because it's beta, a genuinely malformed file can throw a hard error instead of a graceful one - keep a backup of anything you care about, and test it once with your real file before queuing a big batch.

    Install

    ComfyUI Manager → search "ComfyUI Silver Nodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SilverAndJade/comfyui-silver-nodes
    

    Restart ComfyUI after cloning. No extra Python packages beyond what ComfyUI already ships, so install is as painless as custom nodes get.

    Categorysilver_nodes/loaders

    Inputs (4)

    NameTypeDefaultDescription
    file_pathSTRING
    split_modeCOMBOby line2 options: by line, by paragraph
    current_indexINT00–1000000
    actionCOMBOfixed4 options: fixed, increment, decrement, randomize

    Outputs (3)

    NameTypeDescription
    textSTRING
    indexINT
    countINT