Nodes/ComfyUI-ZMongo/04 Debug Image Document
ComfyUI Node

04 Debug Image Document

The tool for when saved images won't come back out

By CentralFloridaAttorney·Created 5 months ago·Updated 2 months ago· 1
04 Debug Image Document
  • session
  • json
  • candidate_paths
  • summary
collection_name
document_id
field_pathimage_data
cachefalse
refresh_token

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 (default image_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_data or first_bytes_envelope=None. Start here; drill into json if 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_envelope and size_bytes in 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_path in your save or browse node? This node's candidate report names the paths that are populated.

Tips

  • The optional cache boolean and refresh_token input exist so you can re-inspect after a write without stale data sneaking in - leave cache off 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.

CategoryZMongo/04 Images

Inputs (6)

NameTypeDefaultDescription
sessionZMONGO_API_SESSION
collection_nameSTRING
document_idSTRING
field_pathSTRINGimage_data
cacheoptBOOLEANfalse
refresh_tokenoptSTRING

Outputs (3)

NameTypeDescription
jsonSTRING
candidate_paths*
summarySTRING