JSON to Multi-Line Summary
JSON to a readable summary, even when it's nested four levels deep
- STRING
Every serious video workflow eventually dumps a JSON blob on you - inference params, a sampler's config, a VLM's output - and you stare at it and think "I just want to know what seed it used." JSON to Multi-Line Summary is that: it takes a dict or a raw JSON string, drills down to whichever part of it you care about, and emits a tidy multi-line string of just the keys you asked for.
It's the more flexible sibling of the pack's JSON Params Extractor. That node has a fixed key list; this one lets you name your own keys and your own path into the structure.
How it works
Three knobs on the right side, and they're the whole show:
- sub_path - where in the JSON to look. Defaults to
inference_params, which is where Wan-style pipelines stash the good stuff. But here's the upgrade over a flat reader: it supports bracket indexing, soloras[0]grabs the first LoRA entry andfoo.bar[2][1]walks a nested list. Empty means "use the whole object." If you land on a list, it quietly falls back to the first item - the commonlorascase. - keys - comma-separated list of keys to extract, defaulting to the usual video suspects:
height,width,num_frames,fps,guidance_scale,seed,stepsand a heap more. Missing keys print asN/Ainstead of crashing. - separator - what goes between key and value. Default
": "gives youseed: 1234. Change it if your downstream logger wants a tab or nothing.
The json_in socket accepts either a JSON or a STRING type, so you can wire it directly to a node that outputs structured JSON, or feed it pasted text. It tolerates both, which removes a whole class of type-mismatch friction.
The output
One STRING output, named plainly STRING. Wire it into any Preview Text, text-logging, or "show text" node and you get:
height: 704
width: 1280
num_frames: 121
seed: 123456789
Exactly the shape you want in a log line or an easy node's display.
Install
It's part of TrentNodes, the pack this whole family ships in:
cd ComfyUI/custom_nodes
git clone https://github.com/TrentHunter82/TrentNodes.git
cd TrentNodes
pip install -r requirements.txt
Or search "Trent Nodes" in ComfyUI Manager and restart. It shows up under Trent/Utilities. No models, no weights, no GPU - it's a pure formatting node.
Gotchas
Three things to know. First, invalid JSON doesn't crash the workflow - it returns a [JSONSummary] ERROR: string that you'll see in your preview, which is friendlier than a hard fail but easy to mistake for a real value if you're piping it into a logger. Second, the default keys list is tuned for Wan-style inference params; if your JSON uses different names, replace the whole list or everything prints N/A. Third, remember sub_path is relative - loras[0] means "under the top-level loras key," not "under inference_params.loras," so you may need inference_params.loras[0] to descend twice. Get that wrong and you get N/A lines, not an error - easy to chase.
Boring in the best way. When you need to know what a run actually did, this is the fastest wire from blob to eyeballs.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| json_in | COMBO | 2 options: JSON, STRING | |
| sub_pathopt | STRING | inference_params | — |
| keysopt | STRING | height,width,num_frames,fps,guidance_scale,seed,steps,use_timestep_transform,shift_value,use_guidance_schedule,add_quality_guidance,clip_value,use_negative_prompts,skip_control,caching_coefficient,caching_warmup,caching_cooldown | — |
| separatoropt | STRING | : | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |