An open API service indexing awesome lists of open source software.

https://github.com/asirihewage/remove_metadata_comfyui

A lightweight custom ComfyUI node that removes all metadata from images (EXIF, PNG text chunks, AI generation info) while keeping the image visually unchanged.
https://github.com/asirihewage/remove_metadata_comfyui

comfyui comfyui-custom-node comfyui-nodes image-processing metadata

Last synced: 2 months ago
JSON representation

A lightweight custom ComfyUI node that removes all metadata from images (EXIF, PNG text chunks, AI generation info) while keeping the image visually unchanged.

Awesome Lists containing this project

README

          

# 🧹 Remove Metadata for ComfyUI
![Version](https://img.shields.io/github/v/release/asirihewage/remove_metadata_comfyui)
![ComfyUI](https://img.shields.io/badge/ComfyUI-Compatible-brightgreen)
![License](https://img.shields.io/badge/License-MIT-blue)

A lightweight **custom ComfyUI node** that removes all metadata from images (EXIF, PNG text chunks, AI generation info) while keeping the image visually **unchanged**.

Perfect for:

* Cleaning AI-generated images
* Privacy‑focused workflows
* Preparing images for upload, sharing, or datasets
* Avoiding unwanted metadata leaks

---

## ✨ Features

* βœ… Removes EXIF metadata (camera, software, GPS, etc.)
* βœ… Strips PNG `tEXt`, `iTXt`, and `zTXt` chunks
* βœ… Removes AI generation comments
* βœ… Works with **batch images**
* βœ… No visible quality loss
* βœ… Fully offline & local

---

## πŸ“‚ Installation

1. Navigate to your ComfyUI installation:

```bash
cd ComfyUI/custom_nodes
```

2. Clone or create the node folder:

```bash
git clone https://github.com/yourname/remove-metadata-comfyui.git
```

3. Restart **ComfyUI**

---

## 🧩 Node Location

After restart, find the node at:

```
Image β†’ Utils β†’ Remove Image Metadata
```

---

## πŸ”Œ Usage

Basic workflow:

```
Load Image
↓
Remove Image Metadata
↓
Save Image
```

* Input: `IMAGE`
* Output: `IMAGE` (cleaned, metadata‑free)

The output image will look **identical**, but all metadata is removed.

---

## 🧠 How It Works

* Converts ComfyUI image tensors to PIL images
* Re‑encodes images without metadata
* Returns clean tensors back to ComfyUI

No pixel manipulation, only metadata sanitization.

---

## ⚠️ Notes

* Color profile (ICC) is currently removed
* PNG output format is used internally
* Original filename metadata is not preserved

---

## πŸš€ Planned Enhancements

* πŸ”˜ Toggle: keep/remove ICC color profile
* πŸ—‚ Batch filename suffix (`_clean`)
* πŸ“Έ JPEG / PNG format selector
* πŸ›° Optional GPS spoof node (separate module)
* πŸ›‘ Extra‑stealth recompression mode

---

## πŸ“Š Compatibility Table

| Environment | Supported | Notes |
| ------------------------ | --------- | ----------------------------------------- |
| ComfyUI (source install) | βœ… Yes | Fully supported |
| ComfyUI Windows Portable | βœ… Yes | No venv required |
| ComfyUI Linux Portable | βœ… Yes | FFmpeg must be system-installed for video |
| ComfyUI Manager | βœ… Yes | Installable via `comfyui_node.yaml` |
| Docker-based ComfyUI | βœ… Yes | Ensure FFmpeg available for video |

---

## 🎞️ Supported Formats

### πŸ–ΌοΈ Images

| Format | Support Level | Notes |
| ------ | ------------- | --------------------------------------------------- |
| PNG | βœ… Full | Lossless, pixel-identical |
| JPG | βœ… Full | One safe recompression (normal) |
| JPEG | βœ… Full | Same as JPG |
| WEBP | 🟑 Partial | Metadata removal works, not recommended for stealth |
| TIFF | 🟑 Partial | Behavior varies by Pillow build |

### πŸŽ₯ Videos

| Format | Support Level | Notes |
| ------------------- | ----------------- | -------------------------------------- |
| MP4 (H.264 / H.265) | βœ… Full | No re-encode, stream copy |
| MOV | βœ… Full | Apple-safe remux |
| MKV | 🟑 Partial | Some container headers remain (normal) |
| AVI / WMV / FLV | ❌ Not Recommended | Metadata handling unreliable |

---

## πŸ›‘οΈ Stealth Guarantees by Format

| Format | Pixel / Stream Integrity | Metadata Removed |
| ---------- | ------------------------ | ---------------------- |
| PNG | Pixel-identical | AI / Media / Privacy |
| JPG / JPEG | Visually identical | AI / Media / Privacy |
| MP4 / MOV | Bitstream identical | AI / Media / Privacy |
| MKV | Stream identical | Partial container tags |

---

## πŸ“œ License

MIT License – free to use, modify, and distribute.

---

## πŸ™Œ Credits

Built for the **ComfyUI** ecosystem.

If you find this useful, feel free to ⭐ the repo and contribute!

---

## πŸ“¬ Support / Contributions

PRs, issues, and feature requests are welcome.

Happy generating 🧠✨