Load Text File
Read a whole text file into your graph
Load Text File reads a .txt off disk and brings its contents into your workflow as text. Where its sibling Text Load Line From File hands you one line at a time, this one gives you the whole file - plus, and this is the useful part, a dictionary of every line keyed under the file's name so downstream nodes can pick lines out programmatically.
It's the node you use when your prompts, style snippets, or a wordlist live in a file and you want the graph to consume them wholesale rather than stepping through one per run.
How it works
Point it at a text file and it loads the content. Per the README, it now outputs a dictionary named after the file (or a custom name you give it), and that dictionary holds a list of all the lines in the file. So you get both the raw text and a structured handle on the individual lines - the latter feeds the WAS dictionary nodes (Text Dictionary Get, Keys, and friends) if you want to fish out specific entries.
That dictionary output is what separates this from just pasting text into a Text Multiline node. If you keep a reusable library of prompt fragments in a file, Load Text File turns it into something the graph can index into by line.
Inputs and outputs that matter
The inputs that matter are the file path to your .txt and the optional dictionary name (defaults to the filename). The outputs are the file's text as a STRING and the dictionary of its lines. Wire the string into an encoder or another text node; wire the dictionary into the WAS dictionary nodes when you need to grab a particular line by key or index.
How to install it
ComfyUI Manager: search was-node-suite-comfyui, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui
then install the pack's requirements.txt in your ComfyUI venv and restart. Reading files needs nothing heavy.
Common issues & troubleshooting
File not found. The path is relative to the machine running ComfyUI and needs to be exact. Use an absolute path if a relative one isn't resolving, and check permissions if you're on Linux or a locked-down Windows account - the pack's own install notes stress write/read access to its folders.
Load Text File vs Text Load Line From File - which do I want? If you want to batch through prompts one per queued run, use Text Load Line From File. If you want the whole file at once, or you want to address specific lines by key via the dictionary, use this one. They look similar and solve different jobs.
The dictionary output confuses me. It's a convenience, not a requirement. If you just want the text, take the STRING output and ignore the dictionary. The dictionary only matters if you're going to pull specific lines out with the WAS Text Dictionary nodes.
Special characters look wrong. Save the source file as UTF-8. Text saved in a legacy encoding can come through garbled.
Whole pack won't import after a ComfyUI update. The recurring WAS Node Suite problem - it downgrades a few packages for older modules, so a ComfyUI bump can break the startup import. Re-run the pack's requirements against the activated venv, or use install.bat. Maintenance-only since late 2023, so expect the occasional post-update reinstall.
Inputs (0)
No inputs
Outputs (0)
No outputs