Ino Json Set Field
Patch a JSON string mid-graph — the config mutator
- field_value
- success
- message
- json
If you've poked around this pack at all, you've noticed the whole thing speaks JSON. Model configs are JSON strings, LoRA configs are JSON strings, download configs are JSON strings. So sooner or later you need to edit one of those strings without leaving the graph - and that's Ino Json Set Field. It takes a JSON string, sets one field, and hands back the updated JSON. Think of it as a tiny jq for the middle of a workflow.
It's from ComfyUI-InoNodes, the 125+ node automation pack, and it's the counterpart to the pack's Ino Json Get Field (read a field) and Ino Save Json (write it to disk). This one's the mutator.
The inputs
Three, and they're all simple:
base_json- the JSON string you're editing. Defaults to{}.field_name- the key to set, as a string.field_value- a wildcard*input, meaning you can wire in any type: a string, a number, a boolean, even a nested value.
Outputs: success (boolean), message (a human-readable result or error), and json - the updated JSON string.
How it works
It parses base_json into a dict, sets field_name to field_value, and re-serializes it. If the input JSON is malformed, it returns success: false with an error message rather than crashing the graph - the pack is big on graceful failure, and this is a good example. Under the hood it uses the shared inopyutils JSON helpers, so the parse/serialize behavior is consistent with the rest of the pack's JSON nodes.
A couple of practical behaviors worth knowing: setting a field that already exists overwrites it, and setting a new one adds it. Both are just Python dict semantics, so there's nothing surprising.
Where it fits
- Tweak a model or LoRA config. The sampler helpers (
Ino Get Model Config,Ino Get Lora Config,Ino Create Lora Config) emit config JSON; patch a single field here instead of rebuilding the whole thing. - Prepare an API payload. Build up a JSON body field by field, then feed the result into Ino Http Call's
json_payload. - Staging ground before save. Patch, inspect, and persist with
Ino Save Jsonat the end of the chain.
Because field_value accepts any type, you can wire a computed float (like a CFG value from a compare or math node) straight in - which makes it a genuinely useful tool for making a workflow's config respond to its own measurements.
Gotchas
Watch the types. If you set a field to a string "3" when the rest of the config expects a number 3, you've just created a silent type mismatch that surfaces later in whatever consumes the JSON. Also: the node's field_value is a required * input, so if you leave it unwired the graph may treat it as empty - wire it properly. And as with all the pack's nodes, the enabled toggle is a real thing; an off node returns failure without touching your JSON.
Installation
Ships with ComfyUI-InoNodes:
- ComfyUI Manager: search "ComfyUI Ino Nodes", install, restart.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/nobandegani/comfyui_ino_nodes && cd comfyui_ino_nodes && pip install -r requirements.txt, restart.
Python 3.10+, ComfyUI 0.18.1+ (V3 schema), no models or keys. The inopyutils dependency comes with requirements.txt.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| base_json | STRING | {} | — |
| field_name | STRING | — | |
| field_value | * | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| success | BOOLEAN | — |
| message | STRING | — |
| json | STRING | — |