Mpi Json Load
Pull a JSON file into your graph by absolute path
- dictionary
ComfyUI's built-in file nodes are picky about where they'll read from - most of them only look inside the input/ directory, and a file that lives anywhere else might as well not exist. Mpi Json Load throws that constraint away: you hand it an absolute path to any JSON file on disk, and it parses the whole thing into a dictionary that comes out the dictionary output (type JSON). If your workflow reads config, presets, or metadata written by another tool, this is the node that gets it into the graph.
There's exactly one required input, path - a plain single-line string, full path, no dropdown of curated files. The tooltip is the spec: "Full path to json file to load." On the output side you get a single dictionary of type JSON, ready to feed into anything in the pack that understands JSON - MpiJsonSave being the obvious round-trip partner, or whatever downstream node you've got that consumes dictionaries.
The mechanism is about as simple as it gets: json.load on the path, wrapped in a try/except that prints [MpiNodes] Error loading JSON from <path> to the console and returns an empty dict on failure. That last bit is the gotcha worth internalizing. A bad path doesn't crash your workflow - it silently hands you {}. Which is friendlier than a crash, but it also means a typo in the path can produce a run that "works" while every value that was supposed to come from the file is just missing. If your downstream nodes suddenly act on nothing, check the console for that error line before you blame the JSON itself.
You also want the file to actually be JSON, obviously - comments or a trailing comma will make the parse fail and dump the empty dict. And note the output is a full dictionary, not a single value; you'll want a follow-up node to extract the field you care about, because this node doesn't do path-based lookups.
Installation is the pack's standard no-drama procedure: ComfyUI Manager, search "ComfyUi-MpiNodes", install, restart - or:
cd ComfyUI/custom_nodes
git clone https://github.com/MadPonyInteractive/ComfyUi-MpiNodes
No dependencies to install, no models to fetch. It's part of the Mad Pony Interactive utility pack (the same one powering the Cubric Vision desktop app), which is worth knowing because it's why the path handling is so permissive - a desktop app can stage files anywhere on disk, and this node reads exactly where it's told. If that's your use case too, this is the loader you've been looking for.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | Full path to json file to load |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| dictionary | JSON | — |