09 ZMongo Content Pack Build
Turn any JSON blob into a typed, shareable content pack
- content_pack
- content_pack_json
- manifest_json
- field_report_json
- aliases
- data_types
- indexed
- success
This is the node the whole V3 content pack system starts from. You hand it a blob of JSON - a prompt dict, a batch of generation parameters, whatever - and it chews it into a typed, portable bundle called a content pack that can be saved to a database, exported to a file, or wired into other nodes by stable alias names. If you've ever rebuilt the same KSampler settings across ten machines by hand, this is the thing that ends that.
ComfyUI-ZMongo is a persistence framework by CentralFloridaAttorney: instead of hardcoding values into your graph, you offload them into a database layer (a hosted backend, or a local file store if you supply no credentials) and read them back by name. The V3 content packs are its structured-data format - a normalized manifest, not a dynamic node schema. That distinction matters because it means a pack built here behaves identically everywhere in the pack's ecosystem.
What it actually does
The document_json input is your source of truth. Paste a JSON object (or array) and the node flattens it into dot-paths like prompt.positive or model.seed, classifies each leaf value (string, int, float, boolean, image, JSON), and builds a fields[] list where every field gets a stable alias, a comfy_type, and its value. The name, project, and field-selection settings come from the other required inputs:
content_pack_nameandproject_name- how the pack is identified when you save or load it later.field_selection_mode- defaults toauto_safe, which skips oversized binary-ish strings.select_all_safetakes everything, and the twoinclude_pathsmodes let you whitelist exact dot-paths viainclude_paths_csv.image_policy-referencestores image fields as references to the source asset,copy_referenceduplicates them,ignoredrops them entirely.
On the optional side, alias_map_json lets you rename fields to friendly names ({"prompt.positive": "positive_prompt"}), and type_overrides_json forces a type on a field. max_inline_text_chars and max_inline_json_bytes guard against bloating the pack with huge strings.
The outputs that matter
The first output, content_pack (type ZMONGO_CONTENT_PACK), is the wire format you feed into every other V3 node. content_pack_json and manifest_json give you the full doc and its stripped-down manifest, handy for eyeballing. aliases and data_types are parallel lists - alias at index 3 matches the type at index 3 - which is exactly what the selection-based nodes expect. field_report_json is a quick success/count summary, and success tells you it built.
Install and gotchas
Install the pack via ComfyUI Manager (search "ZMongo") or:
cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo
cd ComfyUI-ZMongo
pip install -r requirements.txt
Two real warnings. First, requirements.txt is heavy - it pulls langchain, sentence-transformers, FlagEmbedding, transformers, pymilvus and friends for the pack's agent/embedding features, so the first install takes a while even though Build itself only needs JSON handling. Second, the project declares Python >=3.10,<3.13, so a bleeding-edge 3.13 environment can bite you at import time. The good news: Build needs no session and no credentials - paste JSON, get a pack, done.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| document_json | STRING | {} | — |
| content_pack_name | STRING | content_pack | — |
| project_name | STRING | default | — |
| field_selection_mode | COMBO | auto_safe | 4 options: auto_safe, select_all_safe, manual_include_paths, include_paths |
| image_policy | COMBO | reference | 3 options: reference, copy_reference, ignore |
| source_collectionopt | STRING | — | |
| source_document_idopt | STRING | — | |
| include_paths_csvopt | STRING | — | |
| exclude_paths_csvopt | STRING | — | |
| alias_map_jsonopt | STRING | {} | — |
| type_overrides_jsonopt | STRING | {} | — |
| max_inline_text_charsopt | INT | 30001–200000 | — |
| max_inline_json_bytesopt | INT | 81921–2000000 | — |
| refresh_tokenopt | STRING | — |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| content_pack | ZMONGO_CONTENT_PACK | — |
| content_pack_json | STRING | — |
| manifest_json | STRING | — |
| field_report_json | STRING | — |
| aliases | * | — |
| data_types | * | — |
| indexed | STRING | — |
| success | BOOLEAN | — |