ComfyUI Node

Debug JSON

See exactly what your JSON prompt actually becomes

By Pauan·Created 8 months ago·Updated 5 months ago· 3
Debug JSON
  • json
  • ORIGINAL
  • POSITIVE
  • NEGATIVE
  • LORAS

Debug JSON is the pack's answer to the oldest question in prompting: why didn't my prompt do what I said? In the Prompt Helpers world the prompt is JSON, and JSON hides exactly as much as it helps - bundles get expanded, weights get multiplied, and negative weights silently redirect tags into the negative prompt. This node shows you the processed result, so you're debugging the reality, not the source file.

It runs the same processing pipeline that EZ Generate uses (ProcessedJSON): expands every bundle, normalizes weights (an outer weight times an inner weight, rounded to two decimals), and sorts each prompt by the sign of its weight - positive weights land in the positive list, negative weights land in the negative list with their magnitude, and LoRAs get collected separately.

Outputs - this is a spy node, not a generating node

  • ORIGINAL (STRING) - the raw JSON you fed in, pretty-printed. Great for checking what the node received before you blame the processing.
  • POSITIVE (JSON_PROMPT) - the JSON of only positive prompts, ready to wire into Debug JSON Prompt.
  • NEGATIVE (JSON_PROMPT) - the negative-only JSON, likewise.
  • LORAS (STRING) - a dump of every LoRA the JSON pulled out, with paths and weights.

The input is a single json (EZ_JSON) socket.

Where it saves you

Two classic failures it makes obvious:

The disappearing tag. You wrote weight: -0.5 on something thinking you were de-emphasizing it. The pack's rule is simpler: negative weight means negative prompt. Debug JSON shows it landing in NEGATIVE, and you finally understand why it was hurting rather than helping.

The missing LoRA. Your JSON has a lora: line but the output has no style. The LORAS dump shows whether the LoRA was even picked up - and if it was, the Apply Loras node's error message will tell you it couldn't find the file. At least now you know which stage failed.

Wire POSITIVE and NEGATIVE into Debug JSON Prompt (its dedicated partner) to see the final text with weights applied, exactly as it'll be CLIP-encoded. That's the full diagnostic chain: Debug JSON for structure, Debug JSON Prompt for text.

Installing it

It ships with the Prompt Helpers pack. In ComfyUI Manager search "Prompt Helpers" (Pauan/comfyui-prompt-helpers), install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/Pauan/comfyui-prompt-helpers

Restart ComfyUI. No model downloads; the pack needs PyYAML and desktop-notifier and ComfyUI 0.8.0+.

A practical note: Debug JSON is a pure inspection node - it costs nothing to leave one in a workflow while you iterate, then delete it once the prompt behaves. That's the intended lifecycle, and it's the cheapest debugging tool in the whole pack.

Categoryprompt_helpers/prompt

Inputs (1)

NameTypeDefaultDescription
jsonEZ_JSON

Outputs (4)

NameTypeDescription
ORIGINALSTRINGOriginal JSON input as a string.
POSITIVEJSON_PROMPTJSON that only contains positive prompts.
NEGATIVEJSON_PROMPTJSON that only contains negative prompts.
LORASSTRINGList of lora paths and weights