π Text Load
Pull a text file into the graph by its full path
- STRING
Every serious ComfyUI user ends up with a stash of text somewhere - saved prompts, LoRA trigger lists, a dictionary of negative terms. Getting that text into the graph is usually the annoying part, because the built-in file tools are all image-flavored. π
Text Load is the pack's blunt instrument for this: give it an absolute file path, and it reads the whole file as UTF-8 and hands it to you as a STRING. One field, one output, and your file's contents are in the workflow.
How it works
The required file_path input is a plain STRING. On execution the node opens that path with open(file_path, 'r', encoding="utf-8") and returns the entire file contents as a single string. That's the whole mechanism, and the simplicity is the point - but it carries real implications:
- The path is an absolute filesystem path. This isn't a ComfyUI input-folder picker; it won't resolve relative to your
inputdirectory, and there's no dropdown of available files. - It reads everything. A 10,000-line file comes back as one giant string. If you need it as a list, split it with the pack's π Text List afterward.
- UTF-8 only. Files in other encodings will throw or come back garbled.
Inputs and outputs
- file_path -
STRING, absolute path to the text file. - Output:
STRING- the file's full contents.
Where you'd use it
The natural companion is the pack's π Text Save, which writes text to ComfyUI's output folder - the pair gives you a save/load round-trip for prompt sets. It's also handy for pulling in a prompt library you maintain outside ComfyUI, or feeding a config file's contents into a text-processing chain. Combined with the GPT chat node, you can load a saved prompt, hand it to the LLM, and pipe the result somewhere new.
Install
Part of hay86/ComfyUI_AceNodes:
cd ComfyUI/custom_nodes
git clone https://github.com/hay86/ComfyUI_AceNodes
cd ComfyUI_AceNodes
pip install -r requirements.txt
Restart ComfyUI and find π
Text Load under Ace Nodes. Manager users search ComfyUI_AceNodes.
Gotchas
The big one is the path: no picker, no error message worth reading - a typo or a wrong relative path just fails at execution. Double-check the path is absolute and the file is UTF-8 before you blame anything else. Also note this reads at queue time, so if you edit the file and re-run, you get fresh contents - which is a feature, not a bug. And as always with this pack, the full requirements.txt (rembg, transformers, boto3β¦) installs even though this node is pure file I/O.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| file_path | STRING | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | β |