Nodes/ComfyUI illumorae/Load Text File Graceful
ComfyUI Node

Load Text File Graceful

Read a prompt file without the red crash bubble

By CorvaeOboro·Created 8 months ago·Updated 6 days ago· 1
Load Text File Graceful
    • text
    • status
    file_path
    debug_modefalse

    Storing prompts in external text files is a great habit - until one file is missing, renamed, or half-written, and your whole queue dies on a hard file-not-found error. Load Text File Graceful reads a text file from any path and returns its contents, but with the failure mode neutered: if the file is missing or unreadable, you get a status string telling you so instead of a crash that kills the run. That's the entire point, and the "Graceful" name is doing honest work.

    It's the text side of the pack's load-by-path family. Use it to pull prompts, configs, or LoRA-strength lists from disk as strings, and let a fallback switch (or your own logic) decide what to do when the file isn't there - instead of ComfyUI deciding for you by redlining the node.

    How it works

    The contract could not be simpler: file_path (STRING, the path to your file) in, two strings out. No dropdown, no ComfyUI-folder restriction - an absolute or relative path to anywhere on disk.

    Outputs:

    • text - the file's contents. When the load succeeds, this is your file; when it fails, it's typically an empty/fallback value.
    • status - the diagnostic string: something like a success report or an error reason ("file not found", "unreadable"), depending on what went wrong.

    Wire text into your prompt assembly or conditioning, and read status into a text node (or your head) to know whether what you got is real content or a placeholder. The debug_mode boolean (optional) adds console output if you're diagnosing path problems.

    That's the whole node - it's deliberately thin. The value is behavioral: a file-based prompt workflow that survives missing files, which matters more than it sounds like when you're running overnight batches that pull prompts by path.

    Installing it

    Part of CorvaeOboro's ComfyUI_illumorae (CC0, pure code). ComfyUI Manager → search illumorae, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/CorvaeOboro/ComfyUI_illumorae
    

    Common issues

    • The text output is empty even though the file exists - check the status output; it'll tell you what happened. Common causes: a path with mangled backslashes on Windows, or the file being open/locked in another app.
    • I get fallback text and I don't know why - that's the graceful part working. Read status before you trust text; this node is designed for you to check.
    • "Why isn't there a folder picker?" - because a path string is the point; it's how the file's location stays data you can generate and wire. For ComfyUI-folder-scoped loads, the built-in text loaders are still there.
    Categoryillumorae

    Inputs (2)

    NameTypeDefaultDescription
    file_pathSTRING
    debug_modeoptBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    textSTRING
    statusSTRING