ComfyUI Node
Caption Audit
Audit a LoRA caption set for tokens fused with the trigger word. Point 'directory' at a folder of images + same-named .txt captions; the audit runs there and the report card renders inside the node. The primary measure is document frequency — in how many captions a term appears at least once, across words, phrases and whole comma segments. A term near 100% cannot be prompted in or out at inference: the model cannot tell it apart from the trigger. This reads .txt files only, never the images. Every flagged term has two possible causes needing opposite fixes, so the card ends with the question you have to answer by looking at the pictures. Wire 'critical' into a gate to stop a training workflow before it starts.
Caption Audit
- report_image
- report_text
- report_json
- critical
- warning
◄directory►
◄trigger►
◄class_words►
◄fuse►
◄critical_threshold0.85►
◄warn_threshold0.60►
◄info_threshold0.35►
◄ngram_max3►
◄no_stopwordsfalse►
◄recursivefalse►
◄table_rows12►
◄images_dir►
CategoryBCNodes/analysis
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| directory | STRING | Folder holding the caption set: images plus .txt sidecars sharing each image's basename. Empty = ComfyUI's working directory. | |
| trigger | STRING | The trigger word this LoRA is supposed to own. Leave empty to have it inferred from the captions — the card marks that [INFERRED], and an inferred guess is worth checking. | |
| class_words | STRING | Comma-separated class words, e.g. 'woman, car'. Shown as EXPECTED and never flagged: they are supposed to be everywhere. Coverage is measured and shown per word — one you declare but never wrote into the captions is a WARNING, not a silent pass. | |
| fuse | STRING | Comma-separated attributes you WANT welded to the trigger, e.g. 'red scarf'. Covers the phrase and its fragments, shown as INTENDED, excluded from the critical count. Keeps its row even at 0%, so a --fuse that no longer matches your captions is visible rather than inert. | |
| critical_threshold | FLOAT | 0.850.05–1 | Document frequency at or above which a term counts as fused with the trigger. |
| warn_threshold | FLOAT | 0.600.05–1 | Strong bias: will bleed into unrelated prompts. |
| info_threshold | FLOAT | 0.350.01–1 | Below this a term is not reported at all. |
| ngram_max | INT | 31–5 | Longest phrase analysed. Phrases never cross a comma, so tag lists produce no phantom n-grams. |
| no_stopwords | BOOLEAN | false | Off (default) hides function words like 'a' / 'with' from the flag list. On shows everything. |
| recursive | BOOLEAN | false | Descend into subdirectories. |
| table_rows | INT | 121–60 | Rows in the card's term table. This is the only input that changes the card's size — the canvas is otherwise fixed, so the node does not resize between runs. Unused rows show an em dash. Terms you declared always keep a row here. |
| images_diropt | STRING | Where the images live, when captions are kept in a separate folder. Empty = alongside the captions; with no images anywhere the audit runs in caption-only mode. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| report_image | IMAGE | — |
| report_text | STRING | — |
| report_json | STRING | — |
| critical | INT | — |
| warning | INT | — |