Summary Text Files ๐
Dump every caption in a folder into one blob for review
- trigger_signal
- log
SummaryTextFiles reads every text file in a folder and concatenates their contents into one string. That's the mechanism. The point of it is to get your whole set of captions in front of your eyes - or in front of an LLM - in a single pass, so you can actually review what you're about to train on.
It's part of ComfyUI-MieNodes, MieMieeeee's utility pack, sitting in the caption-tools group alongside the rest of the LoRA-prep kit.
Why you'd want it
Captions are scattered across dozens of tiny .txt files, one per image, which is a terrible format for spotting problems. You can't tell at a glance that half your set says "a woman" and the other half says "1girl," or that a stray tag snuck into ten files. The KB hammers that captioning quality makes or breaks a LoRA, and that the rule is describe-what-varies, leave-what's-fixed-undescribed - but you can only enforce that if you can see the whole set at once.
SummaryTextFiles gives you that. Point it at the caption folder, run it, and pipe the combined output into a ShowAnything node to read the lot. Or feed it into one of the pack's LLM prompt nodes and have a model flag inconsistencies for you. It's the "read my dataset back to me" node.
How it works
directory- the folder of text files.add_separator(boolean, default on) - inserts a divider between each file's contents so the concatenated blob is readable and you can tell where one caption ends and the next begins. Leave it on for review; turn it off if you want a raw run-together dump.save_to_file(boolean, default off) - write the combined result to disk as well as passing it downstream.file_extension(optional, default.txt) - which files to read.summary_file_name(optional, defaultsummary.txt) - the filename used whensave_to_fileis on.
The single output is log (STRING) - the concatenated content. There's also an optional trigger_signal (*) for forcing run order relative to other file nodes.
Installing it
Install the whole pack. ComfyUI Manager โ search ComfyUI-MieNodes (ComfyUI_MieNodes) โ install โ restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/MieMieeeee/ComfyUI-MieNodes
then restart. No model download. Nodes appear under the sheep-emoji ๐ MieNodes menu.
Common issues
It concatenates, it doesn't literally summarize. The name oversells it a touch - on its own the node just glues the files together (with separators). The actual "summarize" step is when you feed that blob to an LLM. If you were expecting a one-paragraph digest straight out of the node, that's not what it does; wire it into a prompt node for that.
Big datasets make a big string. A few thousand captions concatenated is a lot of text. If you're piping it into an LLM node, mind the model's context limit - you may need to review in chunks rather than dumping 10,000 captions at once.
Nothing came out? Almost always the file_extension doesn't match your files (captions saved as .caption instead of .txt, say), or the directory path doesn't resolve on the ComfyUI host. Check both, and use GetAbsolutePath if you're unsure where a relative path is landing.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| directory | STRING | X://path/to/files | โ |
| add_separator | BOOLEAN | true | โ |
| save_to_file | BOOLEAN | false | โ |
| file_extensionopt | STRING | .txt | โ |
| summary_file_nameopt | STRING | summary.txt | โ |
| trigger_signalopt | * | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| log | STRING | โ |