Nodes/ComfyUI-ZMongo/07 Load Image Sequence from ZMongo
ComfyUI Node

07 Load Image Sequence from ZMongo

Reassemble a saved image sequence straight back into a batch tensor

By CentralFloridaAttorney·Created 5 months ago·Updated 2 months ago· 1
07 Load Image Sequence from ZMongo
  • session
  • images
  • json
  • frame_count
  • status
collection_nameimage_sequences
image_prefixdrone_stream
limit300
skip0
refresh_token

This is the read half of the ZMongo image-sequence feature. "07 Load Image Sequence from ZMongo" queries the database for a sequence namespace, reconstructs the frames in order, and returns a proper ComfyUI IMAGE batch tensor - ready to feed a VAE decoder, a video model, or a frame-processor without you touching a single file path. Saved a drone stream or animation frames to ZMongo with "07 Save Image Sequence to ZMongo"? This is how you get them back as pixels.

How it works

It queries collection_name (default image_sequences) for documents whose sequence_identifier matches image_prefix (default drone_stream - yes, the default is oddly specific; name your sequences something meaningful and set this to match). Documents are sorted by frame_index, and each frame's stored image binary (a base64-encoded envelope) is decoded back into a PIL image and stacked into one tensor via torch.cat. limit (default 300, max 10,000) and skip (default 0) page through the sequence like a standard query.

Outputs: images - the IMAGE batch tensor, the one you actually wire onward; frame_count - how many frames came back; status - a human-readable summary ("Loaded N frames safely for tracking group: ..."); and json with the full response for debugging. On failure it returns a 1×64×64×3 black tensor plus an error status, which means your downstream nodes won't crash on an empty result - they'll just see a black single frame and frame_count: 0.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo

Restart ComfyUI, or install "ComfyUI-ZMongo" via ComfyUI Manager.

Where people get burned

The image_prefix default is the trap. drone_stream is a real example value baked in as the default - if you saved a sequence under a different name and load with the default, you get "No records found." and a black frame. Set image_prefix to exactly what you saved under. Same for collection_name: if your Save node used a custom collection, match it here.

Second, remember this reconstructs from saved image fields, not from raw latent tensors. What you get back is decoded image data - the shape and dtype will be standard ComfyUI IMAGE (B, H, W, 3, float 0–1), not latents. If you saved latents expecting to resume sampling, this isn't the round-trip for that; it's for sequences you intend to re-render, reprocess, or feed into a video pipeline.

Third, frame ordering. The node sorts by frame_index, so it depends on the save side having stamped proper indices. If your loaded sequence is out of order, the corruption happened at save time, not load - check what the Save node wrote. And keep limit realistic: pulling 10,000 full-res frames into one tensor will happily eat your VRAM and then some.

CategoryZMongo/05 Image Sequences

Inputs (6)

NameTypeDefaultDescription
sessionZMONGO_API_SESSION
collection_nameSTRINGimage_sequences
image_prefixSTRINGdrone_stream
limitoptINT3001–10000
skipoptINT00–1000000
refresh_tokenoptSTRING

Outputs (4)

NameTypeDescription
imagesIMAGE
jsonSTRING
frame_countINT
statusSTRING