08 Load Preset
Put that saved KSampler config back on the canvas
- session
- preset_json
- preset_name
- source_node_id
- source_node_class
- field_count
- storage_backend_used
- document_id
- status
Every "save" node needs its load counterpart, and Load Preset is ZMongo's. If Save Preset By Node ID freezes a node's settings into a named preset, this node retrieves that preset and hands you the JSON - plus a trail of metadata about where it came from and what it describes.
Where it fits: you save a KSampler's config as main_sampler on one machine, and later - possibly on a different rig, possibly from ZMongo's hosted database - you wire a Load Preset into the graph, point it at that name, and feed its preset_json output into the pack's Dynamic Preset Outputs node to map the values back onto downstream inputs. Your parameters become portable state instead of graph furniture.
How it works
Load Preset has three ways to get you a preset, in priority order:
document_json- if you already have raw preset JSON (say from a 03 Get Doc node), it's reconstructed directly intopreset_json. No lookup happens at all.document_id- a specific ZMongo document ID loads that exact document.preset_name+collection_name- the normal path: query the local folder or hosted collection for the named preset.
The storage_backend enum decides where the lookup happens. auto is the sensible default: it uses the ZMongo API when a session is connected, and falls back to the local file store otherwise. Explicit local_file or zmongo_api force one or the other, and session is required for the API path.
Inputs and outputs that matter
You'll practically only touch three inputs as a beginner:
preset_name- the name you saved it under (defaultmain_sampler).collection_name- local folder or collection name (defaultworkflow_presets).storage_backend-auto/local_file/zmongo_api.
The outputs are the value. preset_json is the payload you actually use - wire it into 08 Dynamic Preset Outputs to expose the fields as out_00, out_01, etc., or into Preset Debug Info to inspect it. The rest are breadcrumbs: preset_name, source_node_id, source_node_class, field_count, storage_backend_used, document_id, and a status string that tells you exactly which file or document satisfied the request.
Installing it
Standard pack install - this is one of ~90 nodes in ComfyUI-ZMongo:
cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo
Restart ComfyUI. ComfyUI Manager users can search "ComfyUI-ZMongo" and install it there. Watch the requirements.txt: it drags in pymongo, langchain, sentence-transformers, FlagEmbedding, and transformers even if you're only here for presets.
Common issues
- "Preset ... was not found at ..." - the status output will literally tell you the file path it checked. If you saved via the API and are loading locally (or vice versa), the storage backends don't share anything. Match them.
- Loaded JSON looks empty - you supplied
document_jsonwith a value that wasn't actually a preset payload; Load Preset reconstructs what you give it without interpretation. - Missing
sessiononzmongo_api- you forced the API backend without wiring a session node. Drop the local file store session in and switch back toauto, or connect the real API key session.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| preset_name | STRING | main_sampler | Preset name to load when document_json/document_id is not supplied. |
| collection_name | STRING | workflow_presets | Local preset folder or ZMongo collection name. |
| storage_backend | COMBO | auto | auto uses ZMongo API when session is connected, otherwise local file. |
| sessionopt | ZMONGO_API_SESSION | Optional API session. Required for zmongo_api storage. | |
| document_idopt | STRING | Optional direct ZMongo document id. If supplied, this loads that document instead of querying by preset_name. | |
| document_jsonopt | STRING | Optional JSON from 03 Get Doc. If supplied, this is reconstructed directly into preset_json. |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| preset_json | STRING | — |
| preset_name | STRING | — |
| source_node_id | STRING | — |
| source_node_class | STRING | — |
| field_count | INT | — |
| storage_backend_used | STRING | — |
| document_id | STRING | — |
| status | STRING | — |