A simple & user-friendly extension for Stable Diffusion WebUI Forge that lets you view, edit, add & manage metadata in your Ai-generated or real images.
This extension helps you:
- View metadata stored inside your Ai-generated images (like prompts, settings, etc.)
- Edit existing metadata or add new info to images
- Save images w/ updated metadata
- Remove all metadata from images if needed
- Add custom info like artist name, notes, or categories
Think of metadata as invisible info stored inside your image files - like the recipe used to create the Ai image.
-
Find your Forge folder:
stable-diffusion-webui-forgeon your computer -
Navigate to extensions: Inside that folder, find & open the
extensionsfolder -
Download this extension:
- Easy way: Download the .zip or .7z from release page, extract it, & put the folder in
extensions - Git way (if you have Git installed): Open command prompt/terminal in the extensions folder & run:
git clone https://github.com/MackinationsAi/sd-forge-metadata-editor.git
- Easy way: Download the .zip or .7z from release page, extract it, & put the folder in
-
Restart Forge: Close Stable Diffusion WebUI Forge completely & start it again
-
Find the extension: Look for "Image Metadata Editor" section in your txt2img or img2img tabs (it will be collapsed/closed by default - click to open it)
- Click the "Source" image upload area
- Select any image file (PNG, JPEG, etc.)
- Metadata is automatically read & displayed
The extension automatically displays:
- Generation Info Tab: Shows parsed metadata in readable format
- Nothing found in the image = No metadata detected
- Parsed parameters = Shows prompt, negative prompt, steps, etc.
In the "Generation Info" tab, you can edit:
- Prompt: Main generation prompt
- Negative Prompt: Negative prompt text
- Steps: Number of sampling steps (1-150)
- CFG Scale: Classifier guidance scale (1.0-30.0)
- Sampler: Sampling method (e.g., "DPM++ 2M")
- Schedule type: Sampling schedule (e.g., "Karras")
- Model: Model name used
- Seed: Generation seed (-1 for random)
- Size-1 & Size-2: Image dimensions (width x height)
In the "Custom Fields" tab:
Method A - Using Add Button:
- Enter a key (e.g., "artist")
- Enter a value (e.g., "MyUsername")
- Click "Add" button
- The key-value pair is added to the image’s metadata JSON
Method B - Direct JSON Editing:
- Edit the JSON directly in the text area:
{ "artist": "MyUsername", "category": "portrait", "rating": "5", "notes": "My favorite generation" }
- Click "Save w/ Metadata"
- The image appears in "Output Image" tab
- Success message shows: "✅ Successfully saved metadata to image!"
- Go to the Output Image tab to download the image
- View complete metadata as JSON
- Manually edit any metadata field
- See exactly what's stored in the image
- Useful for debugging or advanced editing
- Click "Clear Metadata" to remove ALL metadata
- Useful for creating clean images for sharing
- Cannot be undone, so save original first
- This means your image has no metadata (completely normal for photos or edited images)
- You can still add metadata & save it w/ that new info
- Make sure the files are in the right place:
extensions/sd-forge-metadata-editor/scripts/metadata_editor.py - Restart Forge completely (close & reopen)
- Check the console for error messages
- Make sure you have permission to write files where Forge is installed
- Try w/ a simple prompt first
- Check if your antivirus is blocking file creation
- Make sure your JSON format is correct (the extension will show errors)
- Use simple text w/o special characters when starting out
Q: Will this work w/ images from other Ai tools? A: Yes, if they save metadata in standard formats. You can also add metadata to any image.
Q: Can I use this to organize my image collection? A: Yes! Add custom fields like "category", "rating", or "notes" to help organize your images.
Q: Does this change my original image? A: No, it creates a new copy w/ the metadata. Your original stays unchanged. So you have to download the new image w/ metadata to see the changes.
Q: Why save as PNG instead of JPEG? A: PNG preserves metadata much better than JPEG, ensuring your info doesn't get lost.
- ✅ Stable Diffusion WebUI Forge: Primary target platform
- ✅ AUTOMATIC1111: Can read A1111 metadata format
- ✅ Other SD Tools: Standard metadata format ensures compatibility
sd-forge-metadata-editor/
├── README.md # This documentation
├── assets/
| ├── ui.png # UI Example
| └── input_test_image.png # Input Image Example
└── scripts/
└── metadata_editor.py # Main extension code
- Reading: Uses
images.read_info_from_image()(same as Forge's PNG Info tab) - Parsing: Extracts individual parameters from metadata strings
- Editing: Provides user-friendly form inputs for common parameters
- Custom Fields: JSON-based storage for additional metadata
- Saving: Embeds metadata as PNG text chunks for maximum compatibility
- Upload a photo or image w/ or w/o metadata
- Fill in Generation Info fields:
- Prompt: "beautiful landscape, mountains"
- Steps: 20
- CFG Scale: 7.0
- Sampler: "DPM++ 2M"
- Add custom fields:
{"source": "original photo", "edited": "2024"} - Click "Save w/ Metadata"
- PNG files w/ embedded metadata
- JPEG files w/ EXIF data
- Images created by Stable Diffusion, AUTOMATIC1111, Forge & ComfyUI
- Can read metadata from: PNG (text), JPEG (EXIF), SD formats (Forge, A1111, ComfyUI)
- Saves as: PNG (best for preserving metadata)
This extension is open source. Feel free to:
- Report bugs or issues
- Suggest new features
- Submit pull requests
- Share usage examples
This extension is available under the MIT License.
Version: 1.0
Author: MackinationsAi
Compatibility: Stable Diffusion WebUI Forge
Last Updated: May 2025
