Nodes/Prompt Writer – Grok API & LLM GGUF/Prompt Writer · Text File Loader
ComfyUI Node

Prompt Writer · Text File Loader

A ComfyUI node in Prompt Writer with 5 inputs and 4 outputs.

By Slartibart23·Created about a month ago·Updated a day ago· 2
Prompt Writer · Text File Loader
    • text
    • filename
    • file_path
    • total_files
    ◄folder_pathD:/captions►
    ◄index0►
    ◄pattern*.txt►
    ◄include_subfoldersfalse►
    ◄loop_at_endfalse►
    CategoryPrompt Writer

    Inputs (5)

    NameTypeDefaultDescription
    folder_pathSTRINGD:/captionsFolder to load text files from. Any drive, absolute path. Files are sorted naturally (file2 before file10).
    indexINT00–999999Which file to load (0 = first). Set the control below to 'increment' and queue a batch count equal to the number of files - each run loads the next file automatically.
    patternSTRING*.txtFilename filter, e.g. *.txt for all text files or pose_*.txt for a specific subset.
    include_subfoldersBOOLEANfalseAlso search all subfolders of folder_path.
    loop_at_endBOOLEANfalseWhen the index passes the last file, wrap around to the first instead of stopping with an error. Useful for endless wildcard-style cycling through scene ideas.

    Outputs (4)

    NameTypeDescription
    textSTRING—
    filenameSTRING—
    file_pathSTRING—
    total_filesINT—