saveTextToFile _O
Log strings to disk without leaving ComfyUI
You've got a string in your workflow - a generated prompt, an NSP term, a filename, a seed - and you want it saved, not just displayed for the three seconds the preview window stays open. saveTextToFile _O is the pack's answer: wire in any string, give it a filename, and it writes the text to a file on disk with a timestamp header. Built for keeping logs of what your workflow actually produced.
It lives in O/text of the Quality of Life Suit pack, and it's one of those "obvious once you need it" nodes. No more copy-pasting values out of the console into a notes file; the graph just remembers for you.
How it works
When it runs, the node takes your text, prefixes it with the current date/time, and appends it to a file (append is the default - every run adds a new block rather than overwriting). It's marked as an output node, so it always executes even with nothing downstream of it. The source writes UTF-8 with a dd/mm/YYYY H:M:S header followed by your text on its own lines.
Inputs:
text(STRING) - what to save. Accepts wire input.filename(STRING) - the file name, defaultlog.txt.append- optional toggle,true/false, defaulttrue.falseoverwrites the file instead of appending.
The gotcha worth knowing: the README claims this saves into ComfyUI's /output folder. The code actually writes to an output directory inside the pack's own folder - i.e. custom_nodes/ComfyUI-QualityOfLifeSuit_Omar92/output/log.txt, not the ComfyUI root output. So if you save a file and can't find it, don't go hunting in the usual place - check inside the pack's directory. (If you ever reinstall the pack, that folder can go with it, so back up anything you care about.)
Where it fits
The genuinely useful pattern is workflow self-logging: save every generated prompt to prompts.log so you can look back at what produced that image. Pair it with floatToText _O to log computed values, or Debug Text _O's console output when you only need a transient peek. It's also handy for capturing NSP random terms per run so you can trace which random pick produced which result.
Honest limits: there's no directory picker and no naming template beyond a plain string. For anything fancier - structured logs, per-run folders - you'll want a dedicated text/file pack. This one is the "keep it simple" option.
Installing it
Part of the Quality of Life Suit pack (omar92/ComfyUI-QualityOfLifeSuit_Omar92). Install via ComfyUI Manager (search "Quality of Life Suit") or clone:
cd <ComfyUI>/custom_nodes
git clone https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92.git
Restart ComfyUI properly. No models, no dependencies. The pack's config.json defaults autoUpdate to true, so it can pull new commits on startup - worth knowing because a re-pull rewrites the pack folder (and its output).
Common issues
- "The file isn't in ComfyUI/output." Correct - it's in
custom_nodes/ComfyUI-QualityOfLifeSuit_Omar92/output/. The README's claim is stale relative to the code. - "My file is full of duplicates." Append mode defaults to true. Every queue adds a block. That's the intended log behaviour - switch
appendtofalseif you want a clean file each run. - "The timestamp looks odd." It's
dd/mm/YYYY H:M:S, not ISO. If you're parsing these later, know the format. - "Permission error on write." The pack prints an error to the console but doesn't crash. Check the folder is writable.
A simple logger with one surprising file-location detail. Know where it writes, and it's a perfectly good way to keep your workflow's history.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| filename | STRING | log.txt | — |
| appendopt | COMBO | true | 2 options: true, false |
Outputs (0)
No outputs