Extensions/ComfyUI-ZMongo
ComfyUI Extension

ComfyUI-ZMongo

Professional ZMongo Legal Operations suite for ComfyUI

By CentralFloridaAttorney·Created 5 months ago·Updated 2 months ago· 1
CentralFloridaAttorney/ComfyUI-ZMongo
Nodes95
On cloudLocal install
CategoryZMongo/06 Gemini, ZMongo/04 Images
Stars1
Updated2 months ago

Nodes (95)

05 Gemini Key Status
ZMongo/06 Gemini
05 Gemini Chat and Save to ZMongo
ZMongo/06 Gemini
05 Gemini Chat

The multimodal Swiss army knife of this pack

ZMongo/06 Gemini
05 Gemini Count Tokens
ZMongo/06 Gemini
05 Delete Gemini API Key
ZMongo/06 Gemini
05 Gemini Image + Text
ZMongo/06 Gemini
05 Gemini JSON
ZMongo/06 Gemini
05 Gemini List Models
ZMongo/06 Gemini
05 Gemini Prompt from ZMongo Doc
ZMongo/06 Gemini
05 Save Gemini API Key
ZMongo/06 Gemini
05 Test Gemini API Key
ZMongo/06 Gemini
04 Browse Collection Images
ZMongo/04 Images
00 Close Session
ZMongo/00 Auth
03 Count Docs
ZMongo/02 Docs
02 Create Collection
ZMongo/01 Collections
03 Create Doc
ZMongo/02 Docs
02 Delete Collection
ZMongo/01 Collections
03 Delete Doc
ZMongo/02 Docs
04 Debug Image Document
ZMongo/04 Images
04 Easy Save Image
ZMongo/04 Images
03 Get Doc
ZMongo/02 Docs
03 Get Value
ZMongo/02 Docs
00 Health
ZMongo/00 Auth
04 Image Field Candidates
ZMongo/04 Images
99 JSON Pick
ZMongo/99 Helpers
00 API Key Session
ZMongo/00 Auth
02 List Collections
ZMongo/01 Collections
03 List Docs
ZMongo/02 Docs
04 Metadata Flattened Paths
ZMongo/04 Images
03 Query Docs
ZMongo/02 Docs
03 Save Value
ZMongo/02 Docs
99 Select Nth Item
ZMongo/99 Helpers
03 Update Doc
ZMongo/02 Docs
00 Who Am I
ZMongo/00 Auth
10 Best Variant Selector
ZMongo/07 Text Agents/Prompt Agents
10 Build Context Pack
ZMongo/07 Text Agents/Memory
10 Caption Pack Generator
ZMongo/07 Text Agents/Publishing
09 ZMongo Content Pack Add Image Sequence
ZMongo/09 Content Packs
09 ZMongo Content Pack Add Images
ZMongo/09 Content Packs
09 ZMongo Content Pack Add Image
ZMongo/09 Content Packs
09 ZMongo Content Pack Alias Editor
ZMongo/09 Content Packs
09 ZMongo Content Pack Build
ZMongo/09 Content Packs
09 ZMongo Content Pack Export JSON File
ZMongo/09 Content Packs/Portable
ZMongo Content Pack Export Static Workflow V3
ZMongo/Content Packs/V3/Static Workflow
ZMongo Content Pack Get Boolean
ZMongo/09 Content Packs/Get
09 ZMongo Content Pack Get Float
ZMongo/09 Content Packs/Get
09 ZMongo Content Pack Get Image
ZMongo/09 Content Packs/Get
09 ZMongo Content Pack Get Int
ZMongo/09 Content Packs/Get
09 ZMongo Content Pack Get JSON
ZMongo/09 Content Packs/Get
09 ZMongo Content Pack Get Selected
ZMongo/09 Content Packs/Get
09 ZMongo Content Pack Get String
ZMongo/09 Content Packs/Get
09 ZMongo Content Pack JSON Text Loader
ZMongo/09 Content Packs/Portable
09 ZMongo Content Pack Load JSON File
ZMongo/09 Content Packs/Portable
09 ZMongo Content Pack Load
ZMongo/09 Content Packs
09 ZMongo Content Pack Manifest Preview
ZMongo/09 Content Packs
09 ZMongo Content Pack Save
ZMongo/09 Content Packs
ZMongo Content Pack Static Outputs V3
ZMongo/Content Packs/V3/Static Workflow
04 Display Image from ZMongo
ZMongo/04 Images
06 Create Text Document
ZMongo/03 Documents
06 Delete Document
ZMongo/03 Documents
06 Extract Document Text
ZMongo/03 Documents
06 Document Field Paths
ZMongo/03 Documents
06 Document File Browser
ZMongo/03 Documents
06 Get Document
ZMongo/03 Documents
06 Get Document Text
ZMongo/03 Documents
06 Get Document Value
ZMongo/03 Documents
06 Document API Health
ZMongo/03 Documents
06 Document Index Selector
ZMongo/03 Documents
06 Ingest Text PDF / DOCX
ZMongo/03 Documents
06 List Documents
ZMongo/03 Documents
06 Document OCR Status
ZMongo/03 Documents
06 Queue Document OCR
ZMongo/03 Documents
06 Save Document Text
ZMongo/03 Documents
06 Save Document Value
ZMongo/03 Documents
06 Select Nth Document Item
ZMongo/03 Documents
06 Update Document Metadata
ZMongo/03 Documents
06 Upload Document File
ZMongo/03 Documents
06 Document WhoAmI
ZMongo/03 Documents
08 Dynamic Preset Outputs
ZMongo/08 Presets
10 Find Similar Successful Prompts
ZMongo/07 Text Agents/Provenance
07 Load Image Sequence from ZMongo
ZMongo/05 Image Sequences
10 Load Memory Capsule
ZMongo/07 Text Agents/Memory
08 Load Preset
ZMongo/08 Presets
00 Local File Store Session
ZMongo/00 Auth
ZMongo: Message of the Day
ZMongo
08 Preset Debug Info
ZMongo/08 Presets
10 Prompt Critic
ZMongo/07 Text Agents/Prompt Agents
10 Prompt Evolver
ZMongo/07 Text Agents/Prompt Agents
10 Save Prompt Provenance Ledger
ZMongo/07 Text Agents/Provenance
99 Record Loop Manager
ZMongo/99 Helpers
07 Save Image Sequence to ZMongo
ZMongo/05 Image Sequences
08 Save Preset By Node ID
ZMongo/08 Presets
10 Save Prompt Memory
ZMongo/07 Text Agents/Memory
10 Text Agent Session
ZMongo/07 Text Agents
10 Workflow Documentation Agent
ZMongo/07 Text Agents/Publishing
Readme

🚀 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

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 PyMuPDF for advanced PDF element mapping and python-docx for 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.
    • * or all — 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