Nodes/LF Nodes/Display primitive as JSON
ComfyUI Node

Display primitive as JSON

Every number and string on your graph, wrapped in one JSON

By lucafoscili·Created 2 years ago·Updated 2 years ago· 50
Display primitive as JSON
  • ui_widget
  • json
integer0
float0.0
string
booleanfalse

This is the node you drop in when you want to see everything at once. LF_DisplayPrimitiveAsJSON takes the four primitive types ComfyUI actually carries - integer, float, string, boolean - and packs them into a single JSON object that's rendered right on the node. It's a debug readout, basically, with a pass-through benefit: that same JSON is also a real output you can wire downstream.

The name is the whole trick. Rather than scatter five display nodes across your graph, you collect the values that matter into one place and eyeball them. If your workflow is computing a seed, a denoise, a scale factor and a toggle and you're not sure which one is throwing off your batch, this is the fastest way to see them all next to each other.

How it works

Nothing clever under the hood. Every input on the node is optional - integer, float, string, boolean, each with a sensible default - and the node builds a little JSON object from whatever you've wired in, shows it on the widget, and hands the same object out its json output. Because it's an output node (is_output_node in the schema), ComfyUI treats it as a sink, which is exactly right for a thing whose job is inspecting the graph.

You only set the fields you care about. The tooltips are self-explanatory: "Integer value.", "Float value.", "String value.", "Boolean value." Leave the rest untouched and they'll just show their defaults (0, 0.0, "", false).

The one output that matters

  • json - the combined object, a JSON type. Wire it into any node that consumes JSON, like the pack's other LF JSON utilities, or into a save/debug node that writes it to disk.

If you just want to watch, you don't even need the wire - the rendered widget is the point.

Installing it

LF Nodes ships as one pack, and this node rides along with it. The easy route is ComfyUI Manager:

  1. Open Manager → Install Custom Nodes.
  2. Search for LF Nodes.
  3. Install and restart ComfyUI.

Or clone it straight into your custom nodes folder:

cd ComfyUI/custom_nodes
git clone https://github.com/lucafoscili/comfyui-lf

Then restart ComfyUI. The pack's Python dependencies are light (numpy, Pillow, opencv-python, requests, torch) - no model downloads, no GPU-heavy extras, no API keys.

Gotchas

One thing to know: lucafoscili/comfyui-lf is now in legacy mode. The author moved active development to lucafoscili/lf-nodes, and this repo is frozen at its last stable release (Feb 2025). Everything still works - that's the point of freezing at a stable state - but new features only land in the new repo. If Manager ever offers you the lf-nodes pack during a migration prompt, that's why.

And a small trap for people new to the pack's UI style: nodes like this one render their value through a custom frontend widget. If you see nothing where the JSON should be, the frontend didn't load - update the pack through Manager (or check the browser console) rather than assuming the node is broken.

Category✨ LF Nodes/Primitives

Inputs (5)

NameTypeDefaultDescription
integeroptINT0Integer value.
floatoptFLOAT0.0Float value.
stringoptSTRINGString value.
booleanoptBOOLEANfalseBoolean value.
ui_widgetoptKUL_CODE

Outputs (1)

NameTypeDescription
jsonJSON