Nodes/ComfyUI-LogicUtils/Dump Text JSONL Node
ComfyUI Node

Dump Text JSONL Node

Append text to a JSONL file, straight from your graph

By aria1th·Created 3 years ago·Updated 7 months ago· 116
Dump Text JSONL Node
  • text
  • STRING
filename_prefixComfyUI
subfolder_dir
filenamedump.jsonl
keynametext

JSONL - one JSON object per line - is the standard format for training and captioning datasets, and if you've ever wanted a ComfyUI graph to just accumulate text output into one of those files as it runs, rather than saving individual files by hand, DumpTextJsonlNode is built for exactly that.

It's part of ComfyUI-LogicUtils, from GitHub user aria1th - publicly known as AngelBottomless, the trainer behind Illustrious XL. Unlike most of the pack's other nodes, this one lines up directly with the author's actual day job: training Illustrious meant running captioning over the entire Danbooru dataset and publishing a stream of Danbooru/Gelbooru dumps, SQLite conversions, and parquet exports on HuggingFace. A node that appends structured text records to a JSONL file fits that kind of pipeline naturally - batch-processing captions or metadata and writing them out incrementally rather than holding everything in memory. The README doesn't spell this connection out, but the shape of the node makes it a reasonable read. As always with this pack, the documentation itself is thin - "proper documentation is being prepared, however there are too many nodes."

How it works

You feed it text - typed *, so it'll accept whatever's wired in - along with a filename, an optional subfolder_dir, a keyname, and a filename_prefix. Each time the node runs, it appends a new line to the target JSONL file, most plausibly wrapping your text value into a JSON object keyed by keyname (so with the defaults, each line looks roughly like {"text": "..."}). Because this is a graph node rather than a script, running the workflow multiple times - over a batch, or repeatedly through a loop - is what builds the file up one line at a time.

One honest gap: the schema exposes both a literal filename and a separate filename_prefix, and the pack doesn't document how the two combine (whether filename_prefix gets prepended, used for auto-incrementing like ComfyUI's built-in Save Image node, or something else). If the exact output path matters to you, run it once with a distinctive filename and check your output folder before building automation around it.

The inputs and outputs that matter

  • text (*, required) - the content to write. Accepts any connected type.
  • filename (STRING, default "dump.jsonl") - the target file.
  • subfolder_dir (STRING, default "") - an optional subfolder under your output directory.
  • keyname (STRING, default "text") - the JSON key each line's value is stored under.
  • filename_prefix (STRING, default "ComfyUI") - present in the schema; exact interaction with filename isn't documented, so verify against your own output.
  • Output: a single STRING - check what it returns in your own test run; the schema doesn't specify beyond its type.

How to install it

Via ComfyUI Manager: search ComfyUI-LogicUtils, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils

Restart ComfyUI. No model files needed - this writes plain text to disk, nothing GPU- or checkpoint-related. The README's opt-in auto-install hook (COMFYUI_LOGICUTILS_AUTO_INSTALL=1, disable with COMFYUI_LOGICUTILS_SKIP_INSTALL=1) targets other parts of the pack; this node doesn't need it.

Common issues & troubleshooting

Can't find the output file. Check subfolder_dir first - if you left it blank, the file lands directly in your output root; if you set a value, look under that subfolder instead. Also confirm the node actually executed: it's flagged as an output node in ComfyUI's execution model, so it should run regardless of downstream wiring, but a missing required input (an unconnected text) will still block it.

File has fewer lines than expected. Since this appends one line per execution, running the same workflow once produces one line, not one per item in a batch - if you need multiple entries, the node needs to actually execute multiple times, typically through a loop construct or by running the workflow across a batch rather than a single pass.

Unsure of the exact JSON shape being written. Open the file directly and check - the keyname default of "text" is your clue to what key to expect, but confirm against the real output rather than assuming, since the pack doesn't document the precise structure.

Categorytext

Inputs (5)

NameTypeDefaultDescription
text*
filename_prefixSTRINGComfyUI
subfolder_dirSTRING
filenameSTRINGdump.jsonl
keynameSTRINGtext

Outputs (1)

NameTypeDescription
STRINGSTRING