04 Debug Image Document
The tool for when saved images won't come back out
- session
- json
- candidate_paths
- summary
04 Debug Image Document is a diagnostic node for when your ZMongo image storage misbehaves: an image saved but won't reload, the wrong field got populated, or you just have no idea what's actually inside a document. It doesn't try to fix anything - it shows you exactly where image data is (or isn't) stored.
Every storage system eventually produces a "wait, where did that go?" moment, and ZMongo has more than most, because images live inside JSON documents as binary "bytes envelopes" and the exact field path is yours to choose. One typo in field_path and your image is technically saved but invisible to every loader. This node exists to make that situation diagnosable in five minutes.
How it works
Required inputs:
session- from the API Key Session node.collection_name- where the document lives.document_id- which document to inspect.field_path- the field you thought held the image (defaultimage_data).
It fetches the document, then runs a candidate scan: for the requested path and a handful of common alternatives, it reports the value's type, whether it's empty, its size, and (for dicts) whether it's a recognized bytes envelope. It also hunts for the first actual bytes envelope anywhere in the document, because that's usually the truth.
Outputs:
json- a rich debug payload: the candidate report, the found envelope (path + keys + size), and a document key summary.candidate_paths- the list of field paths it checked, as a wildcard list output.summary- one line, e.g.first_bytes_envelope=image_dataorfirst_bytes_envelope=None. Start here; drill intojsonif it isn't what you expect.
When you'll actually use it
- "Image won't load" debugging. The summary tells you instantly whether a bytes envelope exists at all, and if so, where.
- Checking the envelope format.
is_zmongo_bytes_envelopeandsize_bytesin the report tell you if the data is stored the way Easy Save Image writes it, or if something else (an old version, a different writer) left a different shape. - Verifying field paths. Wrong
field_pathin your save or browse node? This node's candidate report names the paths that are populated.
Tips
- The optional
cacheboolean andrefresh_tokeninput exist so you can re-inspect after a write without stale data sneaking in - leavecacheoff while debugging. - This is read-only and outputs plain data; it's a helper you drop in during a session and delete after, not a permanent graph citizen.
Install
ComfyUI Manager → ComfyUI-ZMongo, or:
cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo
restart. The full requirements.txt is heavy, but this diagnostic node needs nothing beyond the API session.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| session | ZMONGO_API_SESSION | — | |
| collection_name | STRING | — | |
| document_id | STRING | — | |
| field_path | STRING | image_data | — |
| cacheopt | BOOLEAN | false | — |
| refresh_tokenopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| json | STRING | — |
| candidate_paths | * | — |
| summary | STRING | — |