ComfyUI-ZMongo
Professional ZMongo Legal Operations suite for ComfyUI
Nodes (95)
The read-only check before you trust the Gemini nodes
One node, generate and persist in a single run
The multimodal Swiss army knife of this pack
Checking prompt size before it bites
Revoking server-side access you can't see
A multimodal vision call from your own render
Getting structured output instead of prose
Finding out what your Gemini key can actually reach
Pulling a stored document into a Gemini call
Where your Gemini key actually lives in ZMongo
Proving the key works before the real calls start
Your ZMongo store as a contact sheet
The polite way to end a ZMongo workflow
Knowing how much is in your store before you build around it
Making the table before you fill it
Parking structured data in your ZMongo store
The one with the safety word
Removing a record without nuking the whole collection
The tool for when saved images won't come back out
Getting renders out of the graph and into storage
Pull a whole document out of the database — ZMongo 03 Get Doc
Pull one field out by dot-path — ZMongo 03 Get Value
The 'did the database still wake up' node — ZMongo 00 Health
What field name is my image data hiding in? — ZMongo 04 Image Field Candidates
Grab a value out of any JSON blob — ZMongo 99 JSON Pick
Every ZMongo workflow starts here — and it's not calling your database
Show me my tables — ZMongo 02 List Collections
Find documents without dragging the whole database out — ZMongo 03 List Docs
See every key a document actually has — ZMongo 04 Metadata Flattened Paths
Filter, sort, project — ZMongo 03 Query Docs
Store one value by dot-path — ZMongo 03 Save Value
Pick items out of any list with one expression — ZMongo 99 Select Nth Item
Change what's stored — ZMongo 03 Update Doc, and its two confusing modes
Who are we in this database, anyway? — ZMongo 00 Who Am I
You made 10 prompts with an LLM — now pick the winner — ZMongo 10 Best Variant Selector
Give the LLM its memory back — ZMongo 10 Build Context Pack
Turn a generation into a ready-to-post caption — ZMongo 10 Caption Pack Generator
Bundle an animation's frames as one sequence — ZMongo 09 Content Pack Add Image Sequence
Splat a whole batch of images into a content pack — ZMongo 09 Content Pack Add Images
Stash a hero image inside a content pack — ZMongo 09 Content Pack Add Image
Rename, relabel, retype, or drop fields — ZMongo 09 Content Pack Alias Editor
Turn any JSON blob into a typed, shareable content pack
Export a content pack to a file you can drag back into ComfyUI
Freeze a content pack into a self-contained workflow.json
Pull a boolean out of a content pack for toggles and flags
Pull a float out of a content pack for CFG and denoise values
Rehydrate a stored image back into a real IMAGE tensor
Pull an int out of a content pack for seeds, steps, and sizes
Pull a JSON field out of a content pack as text
One node that pulls any field out of a content pack, whatever its type
Pull a string out of a content pack, without digging through JSON
Load a content pack straight from pasted JSON text
Load a content pack back from a file on disk
Pull a saved content pack back out of the database
Preview what's inside a content pack before you wire it up
Save a content pack into your ZMongo database
The 64-output workhorse at the end of an exported static workflow
Pull an image out of a ZMongo database document and preview it
Create a text document in ZMongo straight from a string input
Delete a document from ZMongo (with a safety switch)
Extract text from a stored document and feed it into your workflow
The X-ray that shows you every field hiding inside a document
Browse your disk from inside ComfyUI and hand files to your workflow
Pull one whole document out of the database, without touching JSON
The node that turns a document ID into an actual string you can use
Pluck one field out of a document with dot notation
The 2-second sanity check before you blame your database node
Slice and dice a document list with one string of index math
Turn a PDF or DOCX into a searchable database record
Browse your document collection like it's a folder you can query
Check whether the server's OCR actually finished
The fire-and-forget way to get text out of a scanned PDF
Persist any string to the database with one wire
Write to any field in a document, dot-path included
The safest way to grab one item out of a list
Tag and triage your documents without touching the record body
Ship the raw file itself to the backend, not just its text
Find out which database silo you're actually writing to
Turn a saved preset back into 64 live wires, automatically
What worked the last time I generated something like this?
Reassemble a saved image sequence straight back into a batch tensor
Pull your saved prompts back into the graph
Put that saved KSampler config back on the canvas
Local File Store Session
The pack's little news ticker
Read that preset JSON without squinting
A Gemini-powered second opinion on your prompt
Generate N variants, keep the best one
The audit trail for your prompts
A self-advancing loop for batch processing
Park every frame as a document
ZMongo Save Preset By Node ID
Your prompt ideas, tagged and searchable
The config card every ZMongo LLM node needs
Auto-write the README for your graph
🚀 ComfyUI-ZMongo
Welcome to ComfyUI-ZMongo, an advanced framework that transforms ComfyUI into an integrated production ecosystem. By decoupling hardcoded values from your workflow graph and offloading them into a centralized database layer, ZMongo allows you to utilize your database as a reusable parameter library, prompt hub, and structured asset store.
Whether you want to synchronize complex generation parameters across multiple local worker rigs, store structured prompt configurations, or build automated document ingestion pipelines driven by Large Language Models (LLMs), ComfyUI-ZMongo seamlessly bridges your visual graphs with database state management.
📌 Table of Contents
- 🔑 00 Session / Auth
- 📁 01 Collections & 02 Docs
- 📄 03 Documents
- 🖼️ 04 Image & 05 Images
- 🧠 06 Gemini / AI API
- 📦 07 Text Agents
- 🎛️ 08 Presets
- 🎒 09 Content Packs
- 🛠️ Message of the Day (MOTD)
- ⚙️ Installation & Setup
🔑 00 Session / Auth
Every enterprise data pipeline requires a flexible, authenticated entry point. The initialization section provides nodes that bridge local canvas variables to backend configurations using modern token infrastructure.
💡 Added Benefit — Dual Operational Backends: ZMongo custom nodes include a robust Local File Store system. If you don't supply a hosted base URL or authentication credentials, the database nodes can be operated using a Local Storage Node for saving and loading your data cleanly on your local hard drive. This provides immediate, zero-config persistence out of the box, with an effortless upgrade path to a hosted production cluster later on. Below is a recommended graph structure for a dual-operational setup:
[ ComfyUI Graph Grid ] ──► (00 API Key Session) ──► Secure Bearer Socket ──► Hosted Silo DB │ └─► [ No Credentials Supplied ] ──► Built-In Local File Store ──► Local Disk Cache
00 API Key Session (ZMongoApiKeySessionNode)
The primary cryptographic gateway for your database sessions. It manages persistence, tracks transaction logging, handles fallback switches for local-only storage, and securely flows your authenticated session downstream to all other operational nodes.
- Inputs:
base_url: The address of your backend operational cluster (e.g.,https://businessprocessapplications.com). Leave blank or default to engage local-only mode.zai_api_key: Your private security key fetched from your user management panel.username: Your explicit account identity for logging and telemetry data isolating your personal silo storage.
00 Who Am I (ZMongoApiWhoAmINode)
A network sanity-check block used to verify connection integrity. It pings the database server, validating active tokens, user access levels, and infrastructure connectivity statuses.
📁 01 Collections & 02 Docs
ZMongo groups data sets cleanly into distinct structural boundaries. These management tools provide full control over creating and managing collections (tables) and records directly within the node workspace.
01 Create Collection / 01 Delete Collection
Administrative schema nodes that allow you to stand up or drop custom dataset tables dynamically based on programmatic milestones or pipeline logic.
02 Create Document / 02 Delete Document
Saves or completely wipes out structured dictionary documents into target collections. Perfect for saving raw prompt structures, negative weights, and runtime configurations without typing a single line of raw code.
📄 03 Documents
The 03 Documents suite provides local file scanning, document text parsing across various extensions, sequence selection, and asynchronous server-side OCR processing.
🔍 03 Document File Browser (ZMongoDocumentFilePathBrowser)
Scans a target machine folder with customized folder depth and extension filters. It formats discovered paths into array lists designed for batch streaming.
- Supported Formats:
.pdf,.docx,.txt,.md,.csv,.json,.log, and.rtf.
📥 03 Ingest Text PDF / DOCX (ZMongoDocumentIngestTextFile)
Extracts text components from complex document files directly at the local system level. It maps extracted strings, line counts, and metadata configurations cleanly into document payloads.
- Layout Engines: Employs
PyMuPDFfor advanced PDF element mapping andpython-docxfor parsing tabular text configurations.
🔀 03 Document Index Selector (ZMongoDocumentIndexSelector)
A versatile index-expression compiler that slices and filters multi-document list records with precision.
- Selection Syntax Examples:
3— Extracts index number 3.2-7— Grabs an inclusive series of rows from index 2 to 7.0,2,5— Filters out a specified custom set.*orall— Passes the entire sequence uninterrupted.
👁️ 03 Queue Document OCR / 06 Document OCR Status
Schedules automated optical character recognition on the server backend for image-heavy documents or scanned media layers, outputting extraction tracking states and raw parsed text.
📑 Extended Document Node Registry:
03 Upload Document File: Packages and uploads local asset payloads directly to server storage folders.03 Create Text Document: Instantiates a fresh document entry populated directly with string variables.03 List Documents: Returns structured collection metadata matching query arguments.03 Get Document Text: Retrieves target strings using intelligent structure fallbacks.03 Document Field Paths: Flattens deeply nested object trees into readable dot-notated list configurations.03 Get Document Value/06 Save Document Value: Targets deep properties directly to mutate or extract specific fields.
🖼️ 04 Image & 05 Images
These nodes turn your database into a centralized visual asset management layer, eliminating cluttered storage folders and preventing data loss when scaling across multiple machines.
04 Save Image to Field: Intercepts active pixel grids directly from rendering nodes, packages them into optimized binary array objects, and saves them within targeted records.04 Load Image from Field: Resolves remote image pointers or binary fields and converts them into standard image tensors ready for immediate VAE decoding.05 Images Batch Upload: Collects multiple workflow output frames simultaneously and streams them directly into web platform asset galleries.
🧠 06 Gemini / AI API
Integrate advanced intelligence directly into your node graph to dynamically build prompt layouts, translate styles, and analyze imagery using state-of-the-art multimodal LLMs.
06 Gemini Chat: Establishes conversational prompt logic paths, feeding text fields into deep models to dynamically create high-fidelity generation instructions.06 Gemini Flash: A lightweight inference option built for fast, low-latency processing tasks like parsing text or cleaning messy clip conditioning parameters.
📦 07 Text Agents (In-Development)
Turn your text strings into active logic directors. The text agents layer extracts context from your documents to dynamically branch your execution pipeline.
07 Text Agent Router: Evaluates incoming text elements against complex logical conditions to automatically direct the active execution flow down different path branches based on string data.
🎛️ 08 Presets
The 08 Presets architecture frees your workspace from rigid, tangled parameter connections. Instead of routing endless wires for seeds, steps, samplers, and CFG scales across a massive grid, you can group an entire node's state into a named database preset.
[ Target Node (e.g. KSampler ID: 14) ] ──► [ 08 Save Preset By Node ID ] ──► Unified DB Storage │ [ Downstream Graph Mapping ] ◄── [ 08 Dynamic Preset Outputs ] ◄── [ 08 Load Preset ] ┘
💾 08 Save Preset By Node ID (ZMongoSavePresetByNodeID)
Inspects active node states at runtime using their unique canvas numeric ID. It captures every active input value, widget choice, slider property, and connection coordinate, saving them as a clean, standardized preset object.
- Dynamic Connection Flattening: If the targeted node gets its values from an upstream link, the save node automatically traces the connection chain back to its source, resolving and saving the actual literal values.
📂 08 Load Preset (ZMongoLoadPreset)
Retrieves stored configuration configurations. It can read parameters from local JSON files, hosted cloud databases, or direct text block values, formatting them into an active preset payload.
🔌 08 Dynamic Preset Outputs (ZMongoDynamicPresetOutputs)
An automated output pin factory that parses structural preset entries and exposes them through sequential wildcard sockets (out_00, out_01, etc.) to map properties directly to downstream inputs.
🎒 09 Content Packs
Content Packs expand on the preset system by bundling entire multi-node generation environments into single, highly transportable database collections. This allows you to store mixed production data—including images, structural strings, meta flags, and numeric generation configs—into Content Packs that can be easily shared across multiple projects.
09 Export Content Pack: Packages active generation parameters, text items, and images into Downloadable Content Packs, which can be dropped into a canvas to rehydrate the saved content.09 Dynamic Content Pack Outputs: Automatically expands content pack array records back into sequential canvas links, providing a clean solution for building template-driven production pipelines.
🛠️ Message of the Day (MOTD)
Message Of The Day (MOTD): Connects to infrastructure alerts, updating your canvas with package change logs and cluster status announcements.
⚙️ Installation & Setup
To install the extension along with all advanced document extraction tools, clone the repository into your custom nodes directory and install dependencies inside your ComfyUI Python environment:
cd custom_nodes
git clone [https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo.git](https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo.git)
cd ComfyUI-ZMongo
# Install required processing libraries
pip install pymupdf python-docx requests python-dotenv