Oasis Metadata 🌴
Getting the prompt back out of a file you already saved
- prompt
- settings
You know the drill. There's a PNG in output/ you like, the workflow is long gone, and all you remember is that it involved a Flux checkpoint and roughly thirty steps. ComfyUI's Load Image won't help - it hands you pixels and throws the rest away. Drag the PNG onto the canvas and you get the graph back, sure, but that gives you a tab, not a value.
Oasis Metadata reads the file instead. Two strings out: the prompt, and a human-readable settings block.
Why it exists
ComfyUI's whole sharing culture sits on one trick: when SaveImage writes a PNG, it stuffs the entire graph into the file as PNG text chunks, under the keywords prompt and workflow. The image is the project file.
The catch: that data is only reachable through drag-and-drop. Nothing in stock ComfyUI reads it back as a value, so a logging text node, a rename-the-batch script, anything automated is stuck. Video is worse - a saved mp4 has no drag-back at all.
That's the niche. It's a utility node, not a generator, and it's the same itch Crystools' Metadata Extractor scratches - the author says the prompt output deliberately matches Crystools, so if you already wire one of those, this drops in with a better second output.
How it actually works
For images it opens the file with Pillow and reads img.info - the PNG text chunks. For video it goes through PyAV, checking the container metadata and each stream's metadata. Both libraries ship with ComfyUI, so this node adds no dependencies of its own.
The prompt and workflow values get json.loadsed twice, because some writers double-encode the JSON string, and the code tolerates the Prompt: / Workflow: prefixes other tools use.
Then the good part. If the graph contains an ImageOasis, LTX23Oasis, or VideoOasisPreview node, it digs that node's own widget blob out of the graph (image_oasis_ui, ltx23_oasis_ui, video_oasis_ui) and prints that - architecture, model file, size, seed, steps, CFG, sampler/scheduler, denoise, the LoRA stack with per-LoRA model and clip strengths, refiner and upscale settings. LTX runs add frames, fps, sigmas, audio mode, Prompt Beats, RTX VSR. Far more useful than the flat chunk most tools hand you.
No Oasis node in the graph? It falls back to a generic pass: every string widget as NodeClass.widget: text, plus the KSampler's seed/steps/CFG/sampler and the checkpoint or UNET filename. Less pretty, still enough to reproduce.
The two pickers
Both are dropdowns and both default to (none):
- image - PNG/WebP/JPG from
input/oroutput/, with an upload button. - file - MP4/WebM/MKV/MOV from
input/,output/, oroutput/video/, also uploadable.
Pick exactly one. Both and it errors with "Pick Image or File, not both."; neither and it nags. Files in output/ get a [output] suffix - worth knowing, since ComfyUI_00042_.png existing in both input/ and output/ is not rare.
Outputs are prompt (the execution-graph JSON, pretty-printed) and settings (the readable pass). Settings also renders in the node body (it's an output node returning UI text), so a quick look needs no wiring. prompt is the one you'd feed into a text node or a save.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/NikoDemon80/ComfyUI-Image-Oasis
cd ComfyUI-Image-Oasis && pip install -r requirements.txt
Or search Image Oasis in ComfyUI Manager. Restart, then Ctrl+F5 - the pack ships frontend JS for its other nodes and a stale cache is the usual "nothing changed" complaint.
Worth saying plainly: this node needs nothing extra. The pack's requirements.txt installs spandrel for the Upscale node's model mode and comments out the optional heavy stuff (llama-cpp-python, librosa). Pillow and PyAV come from ComfyUI.
Where people get burned
An empty result almost always means the metadata isn't there any more. Anything that re-encodes a file drops PNG text chunks on the floor: Reddit uploads, JPEG/WebP export, screenshots, most editors doing a save round-trip. If the instance that made it ran with --disable-metadata, it never wrote them. The node says so - "No ComfyUI prompt/workflow metadata in this file." - and if it found some tags but no graph, the settings output lists the keys it did see. That's your clue.
Your file isn't in the list. The scan isn't recursive: top level of input/ and output/, plus output/video/. A save prefix with a slash in it (portraits/run_a) puts the PNG where the dropdown never looks - upload it through the node's button, or copy it into input/. A moved or renamed file gives you "Missing file" at validation rather than a silent empty string.
The prompt output is JSON, so wire it to a display node if you actually want to read it. And a JPG or WebP in the list is a red herring - the chunks this node knows about are a PNG thing, and WebP/JPEG never carried your graph anyway.
Re-runs are cheap: it caches on the file's mtime and size, so it only re-reads what changed.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | PNG from input/ or output/. Leave File on (none). | |
| file | COMBO | Video from input/, output/, or output/video/. Leave Image on (none). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| settings | STRING | — |