https://github.com/nnnebel/comfyui-auto-tagger
Automatically extract ComfyUI metadata for the image management software Eagle. Save prompts and models as tags or notes.
https://github.com/nnnebel/comfyui-auto-tagger
comfyui eagle-plugin image-management metadata-extractor stable-diffusion
Last synced: about 2 months ago
JSON representation
Automatically extract ComfyUI metadata for the image management software Eagle. Save prompts and models as tags or notes.
- Host: GitHub
- URL: https://github.com/nnnebel/comfyui-auto-tagger
- Owner: NNNebel
- License: mit
- Created: 2025-12-22T16:37:57.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-04-20T13:38:52.000Z (about 2 months ago)
- Last Synced: 2026-04-20T15:39:19.485Z (about 2 months ago)
- Topics: comfyui, eagle-plugin, image-management, metadata-extractor, stable-diffusion
- Language: JavaScript
- Homepage:
- Size: 60.1 MB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ComfyUI Auto Tagger for Eagle
[English](#english) | [日本語](#japanese)
## 🇬🇧 English
**ComfyUI Auto Tagger** is a plugin for [Eagle](https://en.eagle.cool/) that automatically extracts metadata (Workflow/Prompt JSON) from AI-generated images and saves them as Eagle **Tags** and **Notes**.
It supports **ComfyUI**, **Stable Diffusion WebUI** (including Automatic1111, Forge, and other variants; referred to as "A1111" below), and **Civitai** generated images in **PNG**, **WebP**, and **JPEG** formats, and allows you to filter which information to import.
> ### 🔗 Better together: Eagle Metadata Bridge
>
> [Eagle Metadata Bridge](https://github.com/NNNebel/eagle-metadata-bridge) is a ComfyUI custom node that replaces the standard Save Image node. Every time you generate an image, it automatically:
> - Sends the image to Eagle
> - Attaches tags (checkpoint, LoRA, prompt tokens, seed, sampler…) and a structured annotation
>
> When used alongside this plugin, tag management becomes even more powerful — images arrive in Eagle already tagged, and you can re-run this plugin at any time to update, filter, or batch-process them further. The node embeds an identifier into each saved image, allowing this plugin to reliably retrieve the prompt and generation parameters by tracing the exact workflow graph instead of relying on heuristics or inference.
### ✨ Features
* **Multi-Format Support**: Supports ComfyUI workflows (including complex multi-sampler), A1111 (Stable Diffusion WebUI) parameters, and Civitai generation metadata.
* **Metadata Extraction**: Automatically detects Checkpoint, LoRA, Prompts (Positive/Negative), and Generation Parameters (Seed, Steps, CFG, Sampler).
* **Flexible Output**:
* **Tags**: Adds extracted info to Eagle tags (e.g., `#checkpoint_name`, `#lora_name`, `seed:12345`).
* **Notes (Annotation)**: Saves full prompts and parameters in the Note section for easy reference.
* **Selective Import**: Allows toggling specific items (e.g., "Import Checkpoint but ignore Seed") via checkboxes.
* **Batch Processing**: Efficiently processes multiple images with a progress bar.
* **Advanced Workflow Analysis**: Dynamically analyzes ComfyUI node graphs to trace the actual execution path, accurately extracting parameters even from complex multi-stage workflows (HiresFix, FaceDetailer, etc.).
* **Suspicious Node Detection**: Detects nodes with missing required inputs in ComfyUI workflows and allows users to decide whether to include or exclude them from metadata extraction.
* **Force Delete Mode**: Removes all tags and notes from selected items without analysis (Shift + Click on "Delete Info").
* **Debug Mode**: Detailed logs for troubleshooting (toggle via checkbox).
* **No External Dependencies**: No additional libraries required — works out of the box after installation.
* **Utility**: Provides a dedicated button to safely remove only the tags/notes added by this plugin.
### 📸 Screenshots
| Output Result | Main UI |
| :---: | :---: |
|
|
|
#### Advanced Workflow Analysis
The plugin traces complex ComfyUI workflows to identify the actual generation pipeline, supporting multi-stage setups with multiple samplers and refinement stages (HiresFix, FaceDetailer, etc.).
#### Suspicious Node Detection
ComfyUI metadata doesn't record the actual execution path. The plugin traces back from the final image save node to extract prompts and parameters. When workflows contain both txt2img and img2img paths, some nodes may not have been executed. To eliminate this noise, the plugin detects nodes with missing required inputs (e.g., latent) as "suspicious nodes (likely not executed)".
However, ComfyUI has many custom nodes, and some may work correctly even with seemingly missing inputs. To prevent automatic exclusion from causing information loss, the plugin displays a dialog when suspicious nodes are detected, allowing users to decide whether to include or exclude them from metadata extraction.
You can configure how to handle suspicious nodes in the settings (see Configuration section below).
### ⚙️ Configuration
The plugin provides several configuration options accessible via the settings dialog (gear icon):
#### Processing Settings
* **Process Items per Batch**: Set the number of images to process at once (default: 5). Processing too many images simultaneously may consume excessive memory.
#### Suspicious Node Handling
* **Suspicious Node Handling**: Configure how to handle suspicious nodes (nodes with missing required inputs):
* **Exclude**: Automatically exclude suspicious nodes from metadata extraction
* **Ask**: Show a dialog for each suspicious node (recommended)
* **Include**: Include all nodes regardless of missing inputs
#### Dictionary Settings
* **Fetch dictionary from online (Recommended)**: Fetches the latest custom node definitions from GitHub. If disabled, the bundled dictionary will be used. Changes take effect on next startup.
#### Tag Generation Settings
* **Include parameters from all samplers in tags**: When enabled, parameters from all samplers in the workflow are added to tags. When disabled (default), only parameters from the first executed sampler are added. Enable this if you want to record all parameters from complex workflows with multiple refinement stages (HiresFix, upscale, etc.).
#### Debug Settings
* **Enable debug mode**: Outputs detailed debug logs to console. Useful for diagnosing issues or reporting bugs.
### 🚀 Usage
1. Select one or more AI-generated images (ComfyUI/A1111/Civitai) in Eagle
2. Right-click and select **"Plugins"** > **"ComfyUI Auto Tagger"**
3. In the popup window:
* **Output Settings**: Choose to add to "Tags", "Notes", or both
* **Target**: Check the metadata items you want to extract (Checkpoint, LoRA, Prompts, etc.)
### 📦 Installation
1. Download the latest `.eagleplugin` file from [Releases](https://github.com/NNNebel/comfyui-auto-tagger/releases)
2. Launch Eagle
3. Drag and drop the `.eagleplugin` file into the Eagle window
4. Restart Eagle if necessary
### ⚠️ Disclaimer & Bug Reports
* **Disclaimer**: ComfyUI workflows can be extremely complex. 100% compatibility is not guaranteed. This plugin operates on advanced trace logic to identify the most relevant generation parameters.
* **Bug Reports**: When reporting issues on GitHub, please always attach:
1. Information about your generation environment (ComfyUI/A1111 version, custom nodes used, etc.).
2. The original image (PNG/WebP/JPEG) that retains its metadata.
### 📄 License
This project is licensed under the [MIT License](LICENSE).
---
## 🇯🇵 日本語
**ComfyUI Auto Tagger** は、画像収集管理ソフト [Eagle](https://jp.eagle.cool/) 用のプラグインです。
AI画像生成ツールで生成された画像に含まれるメタデータ(Workflow/Prompt)を解析し、モデル名やプロンプトなどを自動でEagleの「タグ」や「メモ」に追加します。
**ComfyUI**、**Stable Diffusion WebUI**(Automatic1111、Forge等の派生版を含む。以下「A1111」と表記)、**Civitai** で生成された **PNG**・**WebP**・**JPEG** 形式の画像に対応しており、取り込む情報を選択できます。
> ### 🔗 組み合わせるとさらに便利:Eagle Metadata Bridge
>
> [Eagle Metadata Bridge](https://github.com/NNNebel/eagle-metadata-bridge) は、ComfyUI の「Save Image」ノードを置き換えるカスタムノードです。画像を生成するたびに自動で:
> - Eagle へ画像を送信
> - タグ(チェックポイント・LoRA・プロンプトトークン・Seed・サンプラーなど)と構造化アノテーションを付与
>
> 本プラグインと組み合わせることで、タグ管理がさらに便利になります。Eagle に届いた時点で既にタグが付いており、後からいつでも本プラグインで一括処理・フィルタリング・追加編集が可能です。またノードは保存した画像に識別子を埋め込むため、本プラグインがヒューリスティックな推論に頼らず、ワークフローグラフを正確に辿ってプロンプトや各種情報を確実に取得できるようになります。
### ✨ 機能
* **複数フォーマット対応**: ComfyUIワークフロー、A1111(Stable Diffusion WebUI)、Civitai生成画像に対応。
* **メタデータ抽出**: チェックポイント、LoRA、プロンプト(Positive/Negative)、生成パラメータ(Seed, Steps, CFG, Sampler)を自動検出。
* **柔軟な出力先**:
* **タグ**: 抽出した情報をEagleのタグとして追加(例: `#checkpoint_name`, `seed:12345`)。
* **メモ(アノテーション)**: プロンプトやパラメータの詳細をメモ欄に保存し、参照・コピーを容易に。
* **選択的取り込み**: チェックボックスで必要な情報のみ(例: チェックポイントのみ)を選択して取り込み可能。
* **バッチ処理**: 複数画像をまとめて効率的に処理し、進捗状況を表示。
* **高度なワークフロー解析**: ComfyUIのノードグラフを動的に解析し、実際の実行ルートを特定。複雑なマルチステージワークフロー(HiresFix、FaceDetailer等)からも正確にパラメータを抽出。
* 複雑なノード接続を追跡して実際の生成パイプラインを特定
* 複数のサンプラーと改善ステージを持つマルチステージワークフローに対応
* **疑わしいノード検出**: ComfyUIのメタデータには実際の実行経路が記録されないため、プラグインは入力の欠落などから「実行されなかった未使用ノード(ノイズ)」を推測します。しかし、未知のカスタムノードを誤って除外しないよう、検知時はダイアログを表示し、抽出情報に含めるか除外するかの判断をユーザーに委ねます。
* **強制削除モード**: Shiftキーを押しながら削除ボタンをクリックすることで、解析を行わずにタグ・メモを一括削除。
* **デバッグモード**: 詳細なログを表示してトラブルシューティングを支援(チェックボックスで切替)。
* **外部依存なし**: インストール後すぐ使えます。追加ライブラリは不要です。
* **ユーティリティ**: このプラグインが生成したタグやメモのみを安全に削除する機能を提供。
### 📸 スクリーンショット
| 出力結果 | メイン画面 |
| :---: | :---: |
|
|
|
#### 高度なワークフロー解析
複雑なComfyUIワークフローを追跡して実際の生成パイプラインを特定します。複数のサンプラーや改善ステージを持つマルチステージ構成(HiresFix、FaceDetailer等)にも対応しています。
#### 疑わしいノード検出
ComfyUIの画像に埋め込まれるメタデータには、「実際にどのノードを通って生成されたか」という実行経路の記録が存在しません。そのため、本プラグインは最終的な画像保存ノードから呼び出し元を逆算してプロンプトやパラメータを抽出します。
1つのワークフロー内にt2iとi2iが混在している場合など、実際には実行されていないノードが存在することがあります。これらの不要なノイズを排除するため、プラグインは必須入力(Latentなど)が欠落しているノードを「疑わしいノード(実行されていない可能性が高いノード)」として推測し、検出します。
ただし、ComfyUIには独自のカスタムノードが多数存在し、一見入力が不足していても正常に動作する場合があります。プラグインによる機械的な自動除外による情報の欠落を防ぐため、疑わしいノードを検出した際はダイアログを表示し、メタデータ抽出の対象に「含める」か「除外する」かの選択をユーザーに委ねる設計となっています。
### ⚙️ 設定
プラグインは設定ダイアログ(歯車アイコン)からアクセスできる複数の設定オプションを提供します:
#### 処理設定
* **一度に処理する数**: 一度に処理する画像の数を設定します(デフォルト: 5)。多すぎるとメモリを消費します。
#### 疑わしいノードの扱い
* **疑わしいノードの扱い**: 疑わしいノード(必須入力が欠落しているノード)の扱いを設定します:
* **除外する**: 疑わしいノードを自動的にメタデータ抽出から除外
* **確認する**: 各疑わしいノードについてダイアログを表示(推奨)
* **含める**: 入力の欠落に関わらず全てのノードを含める
#### 辞書設定
* **オンラインから辞書を取得する(推奨)**: GitHubから最新のカスタムノード定義を取得します。無効にするとバンドルされた辞書を使用します。変更は次回起動時に反映されます。
#### タグ生成設定
* **全てのサンプラーのパラメータをタグに含める**: 有効にすると、ワークフロー内の全てのサンプラーのパラメータがタグに追加されます。無効(デフォルト)の場合、最初に実行されたサンプラーのパラメータのみが追加されます。複数の改善ステージ(HiresFix、アップスケールなど)を持つ複雑なワークフローの全てのパラメータを記録したい場合は有効にしてください。
#### デバッグ設定
* **デバッグモードを有効にする**: 詳細なデバッグログをコンソールに出力します。問題の診断やバグ報告に役立ちます。
### � 使い方
1. EagleでAI生成画像(ComfyUI/A1111/Civitai)を1つ以上選択
2. 右クリックして **「プラグイン」** > **「ComfyUI Auto Tagger」** を選択
3. ポップアップウィンドウで:
* **出力設定**: 「タグ」、「メモ」、または両方への追加を選択
* **対象**: 抽出したいメタデータ項目をチェック(チェックポイント、LoRA、プロンプトなど)
### 📦 インストール
1. [Releasesページ](https://github.com/NNNebel/comfyui-auto-tagger/releases)から最新の `.eagleplugin` ファイルをダウンロード
2. Eagleを起動
3. `.eagleplugin` ファイルをEagleウィンドウにドラッグ&ドロップ
4. 必要に応じてEagleを再起動
### ⚠️ 免責事項・不具合報告
* **免責事項**: ComfyUIのWorkflowは非常に複雑なため、100%の動作は保証できません。本プラグインは、高度な解析ロジックに基づいて最も関連性の高い生成パラメータを特定します。
* **不具合報告**: GitHubのIssueで報告する際は、以下の2点を必ず添付してください。
1. 生成環境の情報(ComfyUI/A1111のバージョン、使用しているカスタムノード等)
2. メタデータが保持された画像の実ファイル(PNG/WebP/JPEG)
### 📄 ライセンス
本プラグインは [MIT License](LICENSE) のもとで公開されています。商用・非商用を問わず、自由にご利用・改変いただけます。