Lite Text to File Tools
Lightweight and fast, text to and from file tools for ComfyUI, has some JSON capabilities as well, great for storing, reading, organizing, batching text and batch text operations.
Nodes (9)
Collect batch results one append at a time
A timestamped audit log for whatever your workflow is doing
The reset button your JSON array needs
Read a JSON file back as a string, three ways
Read a file back into your graph, no extra deps required
Grab item number N out of your collected results
Pull one value out of your JSON store, with a safe fallback
File anything under a key, and actually find it later
The node that stops your prompts from evaporating
ComfyUI Lite Text-to-File
Simple and lightweight text file operations for ComfyUI workflows.
Features
- 📝 Write and read text files
- 🔢 JSON array operations
- 🗝️ JSON key-value storage
- 📋 Append lines with timestamps
- 💾 Auto-saves to ComfyUI output directory
Installation
cd ComfyUI/custom_nodes/
git clone https://github.com/JasonHoku/comfyui-lite-text-to-file-tools
# Restart ComfyUI
Nodes
| Node | Description | |------|-------------| | Write To Text File | Write or append text files | | Load From Text File | Read text files | | Append Input To JSON Array File | Build JSON arrays progressively | | Load From JSON File | Read JSON with formatting options | | Save Text Into JSON | Store key-value pairs in JSON | | Load Text From JSON From Key | Retrieve values by key | | Append Line To Text File | Add timestamped log entries | | Clear JSON Array File | Reset JSON arrays |
Quick Example
Save Text Into JSON:
Very useful for batching a bunch of LLM VL outputs and saving them with the filename or path as a key for later use.
Save Text Into JSON
├─ key: "path/or/filename/or/any_string"
├─ value: "a beautiful sunset"
└─ file: "prompts/settings.json"
Load it back:
Load Text From JSON From Key
├─ key: "path/or/filename/or/any_string"
└─ file: "prompts/settings.json"
→ outputs: "a beautiful sunset"
File Location
All files save to: ComfyUI/output/{your-path}
Example: text/data.json → ComfyUI/output/text/data.json
Use Cases
- 💡 Log all your prompts for review
- 🎯 Save/load workflow configurations
- 📊 Collect batch processing results
- 🐛 Debug workflows with timestamped logs
- 🔄 Build datasets from generation runs
License
MIT