Skip to content

AI-generated image provenance metadata (EU AI Act deepfake disclosure) #13359

@HMAKT99

Description

@HMAKT99

Context

Diffusers generates images that get saved and distributed. Under EU AI Act Article 50 (August 2, 2026), AI-generated images disclosed publicly must carry transparency metadata. Deepfake disclosure becomes mandatory.

Currently, when you run:

pipe = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0")
image = pipe("a sunset over mountains").images[0]
image.save("output.png")

The saved PNG has no metadata indicating it's AI-generated. A recipient has no way to know its origin.

The Gap

Photos from cameras carry EXIF (camera model, GPS, timestamp). AI-generated images carry nothing. There's no standard EXIF/XMP field for:

  • AIGenerated: True
  • AIModel: stable-diffusion-xl-base-1.0
  • AIPrompt: "a sunset over mountains" (optional)
  • GeneratedAt: 2026-03-28T12:00:00Z

Possible Approach

Diffusers could optionally embed provenance into saved images:

image.save("output.png", 
    pnginfo=PngInfo()  # already supported
)
# Could include AI provenance in PNG tEXt chunks or EXIF

This could be:

  1. Opt-in flagpipe(..., embed_provenance=True)
  2. Default on, opt-out — more aggressive but helps compliance
  3. Separate utilitydiffusers.utils.embed_provenance(image, model_name=...)

Why Diffusers Specifically

  • Diffusers is the most popular image generation library
  • Images are the primary target of EU AI Act deepfake provisions
  • Pillow (which diffusers uses) already supports custom EXIF/XMP writing
  • C2PA exists but requires Certificate Authority infrastructure — a lightweight EXIF-based approach would have much broader adoption

Existing Formats

  • C2PA — media provenance with PKI (heavy)
  • AKF — lightweight JSON provenance for 20+ formats including images
  • Custom EXIF/XMP — simplest, most compatible

Not advocating for any specific format — the important thing is that diffusers outputs carry some provenance. What does the team think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions