Nodes/LoRA Txt Loader/Txt File Loader
ComfyUI Node

Txt File Loader

A plain .txt file loader, for prompt snippets you reuse everywhere

By kwokkakiu233·Created 2 months ago·Updated about a month ago· 2
Txt File Loader
    • text
    txt_name
    text

    Txt File Loader is the odd one out in this pack: it has nothing to do with LoRAs. It's a tiny utility that loads a standalone .txt file into an editable text box and hands you the content as a string. That's the whole node - one dropdown, one text box, one output. Sometimes the simple ones are the ones you actually end up using.

    Why would you want it? Because ComfyUI is bad at remembering text. You'll find yourself typing the same style block, quality tag list, or base scene description into a CLIP Text Encode over and over, across a dozen workflows. Put that text in a file once, load it here, and the content follows you everywhere - edit the file in Notepad, click reset in the node, and every workflow that uses it picks up the change.

    How it works

    Drop your files into ComfyUI/input/texts/:

    ComfyUI/input/texts/
    ├── my_style.txt
    ├── base_prompt.txt
    └── ...
    

    The txt_name dropdown lists whatever's in that folder (the directory is auto-created if it's missing). When you select a file, the frontend loads its contents into the text box. You can edit that box freely and the Reset button restores the file's original content. The text output is just the box content passed through as a STRING - like the other nodes in this pack, what's in the box is what comes out.

    Wire the text output into a Text Concatenate to splice it onto a prompt, or straight into a CLIP Text Encode if the file already holds a full prompt. It's also a neat way to share a trigger-word set across LoRAs without duplicating it next to each model.

    Gotchas worth knowing

    • The (No txt files found) placeholder. When the folder is empty, the dropdown shows exactly that. If you save a workflow with that value selected, older versions of this pack could fail validation silently - ComfyUI would "run" in 0.01 seconds and print "Output will be ignored." A hotfix (v2.2.1) kept the placeholder in the list and auto-switched to the first real file, but if an old workflow misbehaves, just reselect the file.
    • Mapped or symlinked storage. If your input folder lives somewhere unusual, a static startup scan used to miss it. Current versions register all scanned directories with ComfyUI's folder system dynamically, so relocated input trees show up.
    • The output is the box, not the file. The node passes through whatever's in text when it runs. If you've edited the box, that's what goes to the graph - the Reset button is how you get back to the file.

    Installing it

    Same pack, same story - ComfyUI Manager search "LoRA Txt Loader", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/kwokkakiu233/comfyui-lora-txt-loader
    

    Restart, and you're done. No Python dependencies. It's a small node for a small job, but if you keep a handful of reusable prompt files around, it quietly saves you a lot of retyping.

    Categoryloaders

    Inputs (2)

    NameTypeDefaultDescription
    txt_nameCOMBO0 options:
    textSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING