Only Load Images With Metadata
A Load Image Node That Only Shows the Images Worth Loading
- IMAGE
- MASK
- positive_prompt
- negative_prompt
Same trick as its sibling, with a bouncer at the door
This is LoadImageX's stricter cousin from the same pack. LoadImageX ("Load Image And Display Prompt Metadata") shows you every image in your input folder and reads the prompt out of whatever you pick. OnlyLoadImagesWithMetadata refuses to even list an image unless it has a real prompt stashed in its metadata. If your ComfyUI/input folder is a graveyard of hundreds of generated PNGs, that filter is the whole point - you stop picking images and wondering why the prompt box came up empty.
ComfyUI images carry their generation workflow as JSON embedded in the PNG's tEXt/iTXt chunks - that's how the "workflow included" sharing culture works. This node checks, at load time, whether a file still has a usable prompt in there, and hides the ones that don't. Handy for triage: curating a folder of outputs you want to re-run, sorting a set of images that should be reproducible, or working through someone else's directory without wasting clicks on metadata-stripped files.
How the filter works
It's the same LoadImage backbone as the sibling node - IMAGE, MASK, EXIF handling, the works - but INPUT_TYPES runs a check per file before building the dropdown. For each candidate it reads the raw bytes, verifies the PNG signature, walks the tEXt/iTXt chunks, finds a prompt chunk, JSON-parses it, and then inspects the embedded workflow for actual text. It accepts the file only if it finds conditioning inputs that connect back to a node with non-empty text, or a CLIPTextEncode / CLIPTextEncodeFlux node with a non-empty text field. No prompt in the metadata, no place in the list. The upload button is locked to .png files to match.
Inputs and outputs
Identical shape to LoadImageX:
- image - the dropdown, but only populated with PNGs whose metadata passes the prompt check.
- positive_prompt / negative_prompt - multiline STRING, default empty, auto-filled from the embedded workflow and passed through to the outputs.
Outputs: IMAGE, MASK, positive_prompt, negative_prompt (STRING). Wire them wherever you'd wire a LoadImage - img2img, a fresh CLIPTextEncode, whatever.
Gotchas that will actually bite
- The filter is stricter than the reader. LoadImageX's frontend can also recover a positive prompt from the
workflowchunk via a Display Any (rgthree) node. This node's Python-side check only accepts thepromptchunk with recognizable conditioning - so an image whose prompt it could display might still be filtered out of the list. If a file mysteriously won't show up, that's usually why. When in doubt, fall back to LoadImageX for a single image. - The list is built when the node is created. Drop new PNGs into
ComfyUI/inputwhile the app is running and they won't appear until you re-add the node or reload the frontend - standard LoadImage behavior, not a bug. - It keys off the same embedded JSON as everything in this pack. Re-saved, screenshot, or reposted images lose that chunk and get filtered out. That's the feature.
Install
Same pack as the sibling node - one install gets you both:
cd ComfyUI/custom_nodes
git clone https://github.com/BigStationW/ComfyUi-Load-Image-And-Display-Prompt-Metadata
Restart ComfyUI. It's also findable via ComfyUI Manager (search "BigStationW" or the pack title). No models, no extra pip packages - the dependencies are just ComfyUI's own torch/PIL stack. Find the node by double-clicking the canvas and typing "Only Load Images With Metadata"; don't trust the menu categories, since the author left the category as the placeholder testt.
For batch work over a folder of tagged images, this is the one I'd reach for. For anything where you just want one image's prompt right now, use the more forgiving LoadImageX instead.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 0 options: | |
| positive_promptopt | STRING | — | |
| negative_promptopt | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |
| positive_prompt | STRING | — |
| negative_prompt | STRING | — |