Nodes/ComfyUI-LogicUtils/Pyobjects/PyObject -> JSON
ComfyUI Node

Pyobjects/PyObject -> JSON

Turn any Python object flowing through your graph into a string

By aria1th·Created 3 years ago·Updated 7 months ago· 116
Pyobjects/PyObject -> JSON
  • py_obj
  • STRING
indent0

Sometimes you're mid-graph, you've built up some Python object - a dict, a list, whatever another node handed you - and you just want to see it. Or save it. Or hand it to something that expects a plain string. That's the whole job of JSON Dump: one input, one output, and it turns whatever's flowing through that wire into a JSON string.

What it does

Under the hood this is json.dumps() wearing a node's clothing. The required input, py_obj, is typed * - ComfyUI's wildcard - so it'll accept literally anything you connect to it. The optional indent (an INT, default 0) controls formatting: leave it at 0 and you get a compact one-liner; bump it to 2 or 4 and you get pretty-printed, multi-line JSON that's actually readable in a text-preview widget or a log dump. The single output is a STRING.

It's also marked as an output node, which in ComfyUI terms means it'll execute even if nothing downstream is wired to it - useful for dropping in as a pure "inspect this value" tap without having to route it anywhere.

Where this actually earns a spot in a graph: it's the exit door for the rest of LogicUtils. Build a list with List Create / List Append / List Extend, or parse some incoming JSON into a live object, do whatever manipulation you need, and then Dump it back to a string you can display, save to a text file, or feed into another node's string parameter - an API node's payload field, for instance.

Worth knowing who's behind this: aria1th on GitHub is also, under the handle AngelBottomless, the person who actually trained the Illustrious XL checkpoints - the base most of today's anime-SDXL finetunes trace back to. LogicUtils was a late, low-key side repo, last touched January 2026 before the account's public work pivoted to Minecraft mods and Lean4 math proofs. Don't expect a lot of hand-holding; this was never the main event.

The inputs and outputs that matter

  • py_obj (required, any type) - whatever you want serialized. Dicts and lists built from LogicUtils's own nodes are the safe case.
  • indent (optional INT, default 0) - 0 for compact, a positive number for pretty-printed.
  • Output: STRING - the JSON text, ready to wire into anything that wants a string.

Installing it

Easiest route: open ComfyUI Manager, search ComfyUI-LogicUtils, install, restart. By hand it's just cd ComfyUI/custom_nodes && git clone https://github.com/aria1th/ComfyUI-LogicUtils, then restart ComfyUI. No models, no GPU dependency chain to speak of - when someone on r/StableDiffusion went looking for the lightest possible node pack for basic logic (after ruling out comfyui-essentials as unmaintained and impact-pack as overkill for one comparison), the answer they got pointed here specifically because "it doesn't have dependencies." The one thing worth flagging: the repo ships an install hook that's opt-in via COMFYUI_LOGICUTILS_AUTO_INSTALL=1, with a kill switch at COMFYUI_LOGICUTILS_SKIP_INSTALL=1 if you'd rather it never fire. Most people never need to touch either.

Where people get burned

The README's own words are "proper documentation is being prepared, however there are too many nodes" - so when a node does something you don't expect, the source on GitHub is genuinely the only reference. For this one specifically: json.dumps() can't serialize everything. Feed it a raw tensor, an IMAGE, or some other non-JSON-native Python object and it'll error out, because JSON only understands dicts, lists, strings, numbers, booleans, and null. Keep it fed with things you've built out of LogicUtils's own List/JSON nodes, or plain values, and it's completely reliable.

Second gotcha: JSON Dump has no preview widget of its own. If you want to actually read the output, wire the STRING port into whatever text-display node your workflow already has, or check the console - the node computes the value, but it won't show it to you unprompted.

CategoryData

Inputs (2)

NameTypeDefaultDescription
py_obj*
indentoptINT0

Outputs (1)

NameTypeDescription
STRINGSTRING