VRGDG_LoadLatestCombinedJsonText
Pull the Latest Batch Results as Text, Without Touching the Filesystem
- text
Somewhere in the VRGameDevGirl pipeline, batches of jobs write their results to combined_*.json files - a record of what the batch produced. VRGDG_LoadLatestCombinedJsonText exists to read the latest one back into the graph as plain text. It's a workflow-automation node: when a batch finishes and you want the next stage to see what it produced (prompts, parameters, file names), this is the clean, graph-native way to load it instead of someone reading a file and typing values back in.
The mechanism is simple and deliberately careful. It picks the latest combined JSON for your chosen batch_type (resolving to the newest file, auto-selecting "latest" when you want it), reads it, and re-serializes the JSON with indentation - or returns the raw text if it isn't valid JSON. It also handles the UTF-8 BOM case, which is a small detail but a real one: Windows-written JSON files often carry a BOM that trips naive parsers.
The inputs that matter
- batch_type -
Text2ImageorImage2Video. Tells it which batch's combined JSON you want. - combined_json_file - a dropdown of the files found (or
<no files found>if there are none). Choose one, or rely on the "latest" auto-resolution. - refresh - an INT you bump to force re-reading the file. Because ComfyUI caches nodes by their inputs, a node reading a file can return stale content; this is the "please re-read" knob. The node's change-detection actually checks the file's modification time too, so it re-runs when the file changes even if you don't touch refresh.
Output: text - the JSON content as a STRING. Wire it into a text node, an LLM, or whatever consumes batch results.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
Or search vrgamedev in ComfyUI Manager. No special dependencies.
Common issues
- Shows
<no files found>: no combined JSON exists for thatbatch_typeyet - the batch has to run first, or the file lives somewhere the pack's file browser isn't scanning. - Stale content after a new batch: bump
refreshto force a re-read. The node does watch file mtime, but if the file was overwritten in-place with identical metadata, refresh is your override. - Ugly JSON output: it pretty-prints with indentation by design; if you need compact JSON for a downstream consumer, that's a transform on the text output.
Honest take: this is a plumbing node with a narrow job - it only makes sense inside the pack's batch-based workflow, where combined JSON files are a real artifact. But if you're automating that workflow (and especially if you want the next stage to react to what a batch produced), it beats reading files by hand, and the mtime-aware re-run means you can leave it in the graph and it just updates.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| batch_type | COMBO | 2 options: Text2Image, Image2Video | |
| combined_json_file | COMBO | 1 options: <no files found> | |
| refresh | INT | 00–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |