Nodes/ComfyUI-ZMongo/09 ZMongo Content Pack Export JSON File
ComfyUI Node

09 ZMongo Content Pack Export JSON File

Export a content pack to a file you can drag back into ComfyUI

By CentralFloridaAttorney·Created 5 months ago·Updated 2 months ago· 1
09 ZMongo Content Pack Export JSON File
  • content_pack
  • session
  • json
  • file_path
  • filename
  • success
  • refresh
filename_prefixcontent_pack
export_modeworkflow_json
include_imagestrue
include_metadatatrue
pretty_jsontrue
output_subfoldercontent_packs
master_key_hex
refresh_token

Databases are great for sharing packs between your own rigs. But when you want to hand a content pack to someone else - or stash it somewhere a database can't reach - you need a file. Export JSON File serializes a ZMONGO_CONTENT_PACK to disk in a portable format, and in its default mode it wraps that JSON in a normal ComfyUI workflow file. Meaning the person on the other end doesn't need ZMongo's database at all to look at it.

Where it writes

The file lands in your ComfyUI output directory under a subfolder (default content_packs), named <prefix>_<timestamp>.json. So something like ComfyUI/output/content_packs/content_pack_20260816_103015.json. You get the absolute path back on the file_path output, which is handy for a subsequent file-loading node.

The export modes - this is the real decision

  • workflow_json (default) - wraps the pack in a LiteGraph workflow JSON so it opens in ComfyUI like any workflow. The loaded file contains a content-pack loader node with the data embedded; drop it on the canvas and it rehydrates.
  • portable_inline - a bare portable content-pack envelope, values inline, no workflow wrapper.
  • asset_refs - keeps image fields as asset references instead of inlining pixels. Smaller file, but the images can only be resolved against a live session, so the pack isn't truly self-contained.
  • manifest_only - just the manifest metadata: aliases, types, field summaries. No values. Great for documenting what a pack should contain without shipping data.

include_images toggles whether image data is inlined (off for asset_refs, generally), include_metadata controls the pack metadata, pretty_json keeps the file human-readable (leave it on). The optional session and master_key_hex matter when you're exporting asset_refs and need to resolve live asset pointers.

Outputs

json (STRING) is the serialized export, file_path and filename are where it went, success is your flag, and refresh is the standard dirty token for forcing downstream re-execution. is_output_node is false here, so wire it however you like.

Gotchas

The default mode's promise - "opens as a ComfyUI workflow" - only fully works if the person opening it has the pack installed, because the embedded node is a ZMongo loader. It's a portable format, not a no-install format. Also note that the file is written by ComfyUI's process: if you've got your output folder on a different drive or a custom path via folder_paths, that's where it goes - check the file_path output rather than assuming.

CategoryZMongo/09 Content Packs/Portable

Inputs (10)

NameTypeDefaultDescription
content_packZMONGO_CONTENT_PACK
filename_prefixSTRINGcontent_pack
export_modeCOMBOworkflow_json4 options: workflow_json, portable_inline, asset_refs, manifest_only
include_imagesBOOLEANtrue
include_metadataBOOLEANtrue
pretty_jsonBOOLEANtrue
sessionoptZMONGO_API_SESSION
output_subfolderoptSTRINGcontent_packs
master_key_hexoptSTRING
refresh_tokenoptSTRING

Outputs (5)

NameTypeDescription
jsonSTRING
file_pathSTRING
filenameSTRING
successBOOLEAN
refreshSTRING