Understanding AI Metadata in Dataset‐Tools - Ktiseos-Nyx/Dataset-Tools GitHub Wiki

Dataset-Tools is designed to help you view and understand the metadata embedded in your AI-generated images and associated files. This metadata is crucial for tracking how an image was created, allowing you to replicate results, share your process, or organize your datasets.


What is AI Metadata?

When AI image generation tools (like Stable Diffusion, Midjourney, etc.) create an image, they often embed textual information directly into the image file (commonly PNGs) or store it in accompanying text files. This information can include:

  • The prompt used.
  • The negative prompt (if applicable).
  • Generation parameters (seed, steps, sampler, CFG scale, dimensions, etc.).
  • Information about the models, LoRAs, embeddings, or VAEs used.
  • Software version or specific workflow details (especially from tools like ComfyUI).

Dataset-Tools parses this information and displays it in the "Metadata Box."


Common Metadata Fields You'll See

While the exact fields can vary based on the image generation software, here are some of the most common parameters you'll encounter in Dataset-Tools:

  • Prompt: The primary text description used to generate the image.
  • Negative Prompt: Terms used to tell the AI what not to include or emphasize.
  • Seed: A number that initializes the random generation process. Using the same seed with all other parameters identical should produce a very similar image. A seed of -1 often means a random seed was used.
  • Steps: The number of denoising steps the sampler took. More steps can mean more detail but also longer generation times.
  • Sampler: The algorithm used to denoise the latent image (e.g., Euler a, DPM++ 2M Karras, DDIM). Different samplers can produce different styles and levels of detail.
  • CFG Scale (Classifier Free Guidance Scale): How strongly the AI should adhere to the prompt. Higher values mean stricter adherence, lower values allow more creativity.
  • Size / Dimensions: The width and height of the generated image (e.g., 512x512, 1024x768).
  • Model / Model Hash: The base checkpoint model used for generation. The hash is a unique identifier for that model file.
  • LoRA(s) / LoCon(s): If Low-Rank Adaptation models were used, their names and weights might be listed.
  • Embeddings / Textual Inversions: If specific embeddings were triggered in the prompt, they might be noted.
  • VAE (Variational Autoencoder): The VAE used to decode the latent image into the final pixel image. Can affect colors and fine details.
  • Upscaler / Hires. Fix: If an upscaling process or "high-resolution fix" was applied, the method and parameters (e.g., Denoising Strength for Hires) might be listed.
  • Workflow Information (e.g., from ComfyUI): For images generated with ComfyUI, Dataset-Tools may display parts of the workflow JSON, showing the nodes and connections used.
  • Civitai Helper / Resource Information: For images downloaded from Civitai or with metadata added by related browser extensions, you might see links to the model pages, trigger words, etc.

How Dataset-Tools Displays Metadata

  • Image Files (PNG, JPG, WEBP):
    • Dataset-Tools reads EXIF data and specific text chunks (like "parameters" in A1111 PNGs or the ComfyUI workflow JSON).
    • The parsed information is presented in a human-readable format in the Metadata Box.
  • safetensors Files (e.g., LoRAs):
    • For LoRA models, Dataset-Tools attempts to read metadata often stored within the safetensors file itself. This can include information about the base model it was trained on, activation tags, preferred weight, etc. (e.g., fields like ss_sd_model_name, ss_tag, __metadata__).
  • Text Files (.txt, .caption):
    • If a text file has the same base name as an image file (e.g., my_image.png and my_image.txt), its content is often considered associated metadata or a caption. Dataset-Tools will display the content of these text files when the corresponding image (or the text file itself) is selected.

Using Metadata in Your Workflow

Understanding this metadata allows you to:

  • Replicate Images: Copy the seed and all other parameters to try and generate a similar image.
  • Organize Datasets: Sort or filter images based on models used, specific prompts, or parameters.
  • Share Your Work: Provide others with the exact parameters needed to understand your generation process.
  • Troubleshoot Generations: See what settings might have led to a particular style or artifact.
  • Learn: Study the parameters used by others to understand how different settings affect the output.

Dataset-Tools aims to make accessing and viewing this valuable information as straightforward as possible.