Nodes/NodeGPT/LoadTXT
ComfyUI Node

LoadTXT

Drag a text file into your graph like it's any other asset

By antonym-git·Created 3 years ago·Updated 2 years ago· 355
LoadTXT
    • STRING
    namelog.txt
    pathpath

    ComfyUI lets you load images, models, and Loras as if they were files sitting on a shelf. Text files never got the same treatment in the core app, which is the gap LoadTXT fills: it reads a .txt file off disk and hands its contents to the graph as a STRING. In NodeGPT's world that's genuinely useful - the whole pack is about feeding text into agents - and it's how you'd keep long prompts, briefs, or system context in a file instead of bloating the workflow JSON.

    It's about as simple as a node gets. Two inputs, one output, no state.

    Inputs and output

    • name - the file name, defaulting to log.txt. That default is a hint about its origin story: it looks like the author built it to pull in a log file, then generalized it.
    • path - the directory, defaulting to the string path, which is a placeholder. This is the field you actually set: the folder where your text file lives.
    • Output: STRING, the file's contents, ready for any string input - a prompt, a task, a system message for an agent.

    Notes from real use

    Two practical things. First, the defaults are placeholder-y (path is literally the string "path"), so a stock copy of the node fails until you fill it in - don't take the defaults as real paths. Second, the log.txt default plus the pack's terminal-centric output style suggests this node was the author's own debugging convenience before it became a general utility. In the pack's heyday you'd use it to feed a saved prompt file into a Chat node's Task or into an agent's system message.

    The pack's install story, briefly, because it applies here:

    cd ComfyUI/custom_nodes
    git clone https://github.com/xXAdonesXx/NodeGPT
    

    Restart and requirements auto-install. As of this writing the repo returns 404 and the author's GitHub account is gone, so the clone fails and ComfyUI Manager can't install it; the surviving fork (Guizmus/NodeGPT) only has the pack's earliest build, without these AutoGen-era nodes. If you're just looking to load text into ComfyUI in 2026, there are simpler, maintained text-loading nodes in several popular utility packs - this one is the historical version of an idea that stuck around.

    CategoryAutoGen

    Inputs (2)

    NameTypeDefaultDescription
    nameSTRINGlog.txt
    pathSTRINGpath

    Outputs (1)

    NameTypeDescription
    STRINGSTRING