Diztraido: Metadata Reader Advanced
Pull the whole workflow back out of a PNG — prompt, seed, sampler, model, all as wires
- prompt
- negative_prompt
- seed
- steps
- cfg
- sampler_name
- scheduler
- model
- width
- height
- metadata_text
- metadata_json
The whole "workflow included" culture runs on one fact: a ComfyUI PNG is the project file. The prompt, the graph, the seed, the sampler - all of it is embedded in the file as text chunks. Diztraido: Metadata Reader Advanced is the version of that idea that hands you the data back as typed outputs you can wire straight back into the graph. Pick an image, and it spits out the prompt, negative prompt, seed, steps, CFG, sampler, scheduler, model, and dimensions as individual sockets - plus the raw metadata as text and JSON.
It's the workflow-reusable sibling of the pack's plain Metadata Reader (which is a pure visual panel with no outputs). This one exists for the "I found this image, rebuild it" workflow, and for dataset scrubbing, and for any pipeline that wants to feed an old generation's settings back into a new one.
How it works
Under the hood it reads the image with Pillow and pulls from every place generators stash their settings. It reads the tEXt/iTXt PNG text chunks that ComfyUI writes (prompt and workflow), the comf chunks newer ComfyUI versions add, and EXIF tags. It also recognizes the A1111 dialect: that flat parameters string - Steps: 30, Sampler: DPM++ 2M, CFG scale: 5, Seed: … - that AUTOMATIC1111 and Forge write. If the metadata is a serialized ComfyUI prompt graph, it walks it and pulls the CLIP text encode and model-loader values out. Then it normalizes everything: the seed and steps become ints, CFG a float, sampler and scheduler become strings.
A detail that matters in practice: the node's IS_CHANGED method hashes the file (sha256), so when the image on disk changes, the node re-reads instead of serving you a cached result.
Inputs and the outputs that matter
One input, image - a dropdown of files in your ComfyUI input/ folder (or upload directly). Nothing else.
Twelve outputs. The ones you'll actually wire:
promptandnegative_prompt(STRING) - straight into a text encoder or just displayed.seed(INT),steps(INT),cfg(FLOAT) - into a sampler.sampler_nameandscheduler- typed as the same enum lists ComfyUI samplers use, so they plug directly into a KSampler's sampler/scheduler inputs without conversion.model(STRING) - the checkpoint/diffusion model name.width,height(INT).metadata_textandmetadata_json- the complete raw metadata, in case you want the bits the node doesn't already parse.
How to install
Part of Diztraido Nodes. In ComfyUI Manager search "Diztraido Nodes" and install diztraido-nodes, then restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/jadervasque/ComyUI-Diztraido.git
Restart and it's under the Diztraido image category. No dependencies beyond what ComfyUI already has (Pillow ships with ComfyUI), and no model downloads.
Common issues
Where people get burned is not the node - it's the source image. Any image that went through a re-encoding host (Reddit previews, most Discord embeds, Twitter) has had its text chunks stripped, and JPEG/WebP have no PNG text chunks at all. If your outputs come back empty or zeroed, that's why: the metadata is genuinely gone, and no reader can invent it. Keep the original PNG as your master; work from that. It's also worth knowing the A1111 vs ComfyUI dialect difference - the flat parameters string reads fine here, but it won't reconstruct a node graph, only a parameter set.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 1 options: example.png |
Outputs (12)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| negative_prompt | STRING | — |
| seed | INT | — |
| steps | INT | — |
| cfg | FLOAT | — |
| sampler_name | euler,euler_cfg_pp,euler_ancestral,euler_ancestral_cfg_pp,heun,heunpp2,exp_heun_2_x0,exp_heun_2_x0_sde,dpm_2,dpm_2_ancestral,lms,dpm_fast,dpm_adaptive,dpmpp_2s_ancestral,dpmpp_2s_ancestral_cfg_pp,dpmpp_sde,dpmpp_sde_gpu,dpmpp_2m,dpmpp_2m_cfg_pp,dpmpp_2m_sde,dpmpp_2m_sde_gpu,dpmpp_2m_sde_heun,dpmpp_2m_sde_heun_gpu,dpmpp_3m_sde,dpmpp_3m_sde_gpu,ddpm,lcm,ipndm,ipndm_v,deis,res_multistep,res_multistep_cfg_pp,res_multistep_ancestral,res_multistep_ancestral_cfg_pp,gradient_estimation,gradient_estimation_cfg_pp,er_sde,seeds_2,seeds_3,sa_solver,sa_solver_pece,ddim,uni_pc,uni_pc_bh2 | — |
| scheduler | simple,sgm_uniform,karras,exponential,ddim_uniform,beta,normal,linear_quadratic,kl_optimal | — |
| model | STRING | — |
| width | INT | — |
| height | INT | — |
| metadata_text | STRING | — |
| metadata_json | STRING | — |