Load Experiment Presets from Json
Run a whole experiment grid from one ComfyUI workflow
- index
- increment_index
- seed
- steps
- cfg
- width
- height
- positive_prompt
- negative_prompt
- sampler
- scheduler
- filename_prefix
The usual way to compare settings in ComfyUI is to save five workflow variants and babysit them one at a time. "Load Experiment Presets from Json" exists to collapse that into one graph: a JSON file holds a list of experiments - each one a little bundle of seed, steps, CFG, resolution, prompts, sampler, and scheduler - and this node plays them in sequence. Queue the workflow, and every run advances to the next experiment in the file. That's the whole pitch, and it's a genuinely good idea for anyone doing checkpoint or parameter comparison.
It's the read half of a pair. Its sibling, Save Experiment Presets to Json, writes new entries to the same file, so you can build up a batch as you go and then step through it.
How it works
The node reads from the pack's own presets directory - ComfyUI/custom_nodes/octo_json_presets/presets/. json_file is just a filename (it must end in .json), resolved against that folder. The file is expected to be a JSON array of objects, each with the settings you care about:
[
{ "steps": 30, "cfg": 7.0, "width": 1024, "height": 1024,
"positive_prompt": "a lighthouse at dusk, photorealistic",
"sampler": "euler", "scheduler": "normal" }
]
On each run it picks the entry at index, loads its values, and if increment_index is on (the default), advances index by one, wrapping around to zero when it hits the end. So increment_index is the automation switch: leave it on and a single workflow burns through your whole grid; switch it off and index becomes a manual picker.
Here's the part that saves you keystrokes: the node's widgets are fallbacks, not overrides. Any field missing from the current JSON entry keeps whatever you set in the widget. So you can define just the deltas per experiment and leave the shared settings alone in the widgets - a 30-entry file can be a few keys per row instead of a full copy-paste each time.
The outputs mirror the settings: index, increment_index, seed, steps, cfg, width, height, positive_prompt, negative_prompt, sampler, scheduler, and filename_prefix. Wire them into your sampler, empty latents, text, and KSampler nodes. The node also auto-builds a descriptive filename prefix from the resolved settings (exp_steps20_cfg7_w512_h512_euler_simple style), which keeps your output folder organized when you're running a grid - handy if you're feeding it to a save-image node.
The catch: this node looks broken as shipped
I want to be straight with you, because it's a 0-impression node from a single-commit pack and nobody's going to warn you. In the current code, the Load method is missing the self parameter in its signature. ComfyUI calls node functions as bound methods with keyword arguments, and with self absent, the instance gets bound to the json_file parameter - which then collides with the real json_file argument and raises TypeError: got multiple values for argument 'json_file' the moment you run it. The Save node has the same flaw. If your queue errors out immediately on these nodes, that's why, and it's a one-line fix per method (add self back to the signature) if you're comfortable hand-patching src/octo_json_presets/nodes.py. On a pack this young, it's the kind of thing that just hasn't been exercised yet.
Installing it
ComfyUI Manager: search Octo Json Presets, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/writer-in-fancy-pants/octo_json_presets
No extra dependencies, no model downloads - the pack only reads JSON files and passes values around. You'll find the node under octo_presets in the menu. Drop your experiments into the presets folder (or create them with the Save node) and you're set. If you're hitting the runtime error above, remember: it's the pack, not your JSON.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| json_file | STRING | — | |
| indexopt | INT | 0 | — |
| increment_indexopt | BOOLEAN | true | — |
| seedopt | INT | 4206980085 | — |
| stepsopt | INT | 20 | — |
| cfgopt | FLOAT | 7.0 | — |
| widthopt | INT | 512 | — |
| heightopt | INT | 512 | — |
| positive_promptopt | STRING | high quality, best quality, 8k, ultra-detailed | — |
| negative_promptopt | STRING | low quality, worst quality, blurry, fuzzy | — |
| sampleropt | COMBO | euler | 41 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +35 |
| scheduleropt | COMBO | simple | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 |
| filename_prefixopt | STRING | ComfyUI | — |
Outputs (12)
| Name | Type | Description |
|---|---|---|
| index | INT | — |
| increment_index | BOOLEAN | — |
| seed | INT | — |
| steps | INT | — |
| cfg | FLOATINT | — |
| width | INT | — |
| height | STRING | — |
| positive_prompt | STRING | — |
| negative_prompt | STRING | — |
| sampler | STRING | — |
| scheduler | STRING | — |
| filename_prefix | STRING | — |