watarika 1c3192fae7 Merge pull request #25 from 00akii/fix/async-output-cache-never-awaited
Fix: RuntimeWarning / broken metadata capture from un-awaited async outputs cache
2026-08-14 11:12:03 +09:00
2025-11-05 22:40:52 +09:00
2025-01-05 02:44:34 +09:00
2025-01-05 02:44:34 +09:00
2025-01-05 02:44:34 +09:00
2025-12-17 13:44:39 +09:00
2025-12-17 09:54:04 +09:00
2025-11-05 22:34:25 +09:00

ComfyUI-SendToEagle-w-Metadata

[English] [日本語]

  • A custom node for ComfyUI
  • Sends images with metadata (PNGInfo) obtained from the input values of each node to Eagle (image management software)
  • You can also add arbitrary Key:Value pairs to the metadata
  • You can customize the tags to be registered in Eagle
  • You can save arbitrary strings and metadata in the Eagle notes field

Installation

cd <ComfyUI directory>/custom_nodes
git clone https://github.com/watarika/ComfyUI-SendToEagle-w-Metadata.git

List of Custom Nodes

  • Send to Eagle With Metadata
  • Send to Eagle With Metadata (Extended)
  • Create Extra MetaData

Send to Eagle With Metadata

  • Saves the images received as input to storage as images with metadata (PNGInfo), and then sends them to Eagle
  • For details on the actual metadata added, please refer to Metadata Added to Images
  • If the file format is png or webp, the workflow is also saved in the image
    Note: If it is webp and lossless, the workflow may not be saved (under investigation)

SendToEagleWithMetadata Preview

Default Behavior

The default behavior is as follows:
If you want to change these behaviors, use the Send to Eagle With Metadata (Extended) node.

  • The file name is saved in the format yyyyMMdd-hhmmss_SSSSSS + extension
    • If the batch size is 2 or more, (Batch index) is appended to the end to ensure that images executed in batches have unique file names
  • Sent to the default Eagle folder
  • Metadata is also saved in the Eagle notes field
  • The sampler name is converted to the notation used on Civitai
    • Example: If the sampler is dpmpp_2m and the scheduler is karras, it becomes DPM++ 2M Karras
  • The model hash value is not output in the metadata
  • Metadata is obtained from the first processed KSampler node

Configurable Settings

Item Description
file_format Specifies the format of the file to be saved. You can specify png, jpeg, or webp
lossless_webp Specifies whether to compress the image when file_format is webp
  • lossless: Saves the image without compression
  • lossy: Compresses and saves the image
quality Specifies the quality when compressing the image. Specify a value between 0 and 100.
Note: Only valid for jpeg or webp (lossy).
save_only_no_send If true, the image is saved to storage but not sent to Eagle
tag_pattern Specifies what to add to Eagle tags.
  • None: No tags are added
  • Positive Prompt: The positive prompt is added as a tag
  • Positive Prompt, Negative Prompt: The positive and negative prompts are added as tags
  • Memo: The content of memo is added as a tag
  • Custom: The string specified by custom_tag_pattern is added as a tag
Note: When registering the negative prompt, "n:" is added to the beginning of the tag name to distinguish it from the positive prompt tag
custom_tag_pattern Specifies the tag pattern to be used when tag_pattern is Custom, separated by commas.
The following settings are available:
  • Image metadata: Positive prompt, Negative prompt, Steps, Sampler, CFG scale, Seed, Clip skip, Size, Model, Model hash, VAE, VAE hash, Batch index, Batch size
  • Memo content: Memo
  • Additional metadata: The Key defined in extra_metadata
Note: Items that do not match the above are added as tags as they are
Note: Metadata for which a value cannot be obtained is added with a value of - (e.g., "Model hash: -")
memo Specifies the text to be saved in the Eagle notes field. The specified text is appended with "Memo:" and saved at the end of the notes field
extra_metadata Allows you to add your own metadata to the saved image. Can be omitted if not needed.
Specifies the metadata to be added using the Create Extra MetaData node.
positive / negative This is an option input for explicitly specifying prompts, rather than automatically retrieving them from the workflow. Use this input when prompts cannot be automatically retrieved or when you wish to specify prompts yourself.

Batch Support

The inputs memo, custom_tag_pattern, extra_metadata, positive, and negative support batch images.
If an input is a list, the corresponding element is applied to each image in the batch index. If the list is shorter than the batch size, empty strings are used. If a single string is passed, the same string is applied to all images.

Node Output

  • filepath: Outputs the full file paths of saved images (in list format)
  • filepath_count: Outputs the number of saved images
  • image: Outputs the input image as received

Send to Eagle With Metadata (Extended)

  • Saves the images received as input to storage as images with metadata (PNGInfo), and then sends them to Eagle
  • You can customize the default behavior of Send to Eagle With Metadata
  • Added feature: You can save the workflow's JSON file to storage

SendToEagleWithMetadataExtended Preview

Additional Configurable Settings

  • In addition to the settings that can be specified in Send to Eagle With Metadata, the following settings can be specified
Item Description
filename_prefix Specifies the string to be added to the beginning of the saved file name. You can also specify a directory by separating it with a slash (/).
You can replace it with the acquired information by using %<Key>%.
Note: Refer to the table below for the keys that can be specified.
sampler_selection_method Specifies how to select the KSampler node executed before this node
  • Farthest: Selects the KSampler node farthest from this node
  • Nearest: Selects the KSampler node closest to this node
  • By node ID: Selects the KSampler node with the node ID sampler_selection_node_id
sampler_selection_node_id Only specified when sampler_selection_method is By node ID.
Specifies the node ID of the KSampler node executed before this node. The node ID is the number displayed in the upper right corner of the node.
save_workflow_json Specifies whether to save the workflow's JSON file to storage.
Note: It will not be sent to Eagle.
add_counter_to_filename Specifies whether to add a counter to the file name.
  • true: Adds a sequential number to a group of files with the same file name excluding the counter part
  • false: Does not add a counter. However, if the batch size is 2 or more, (Batch index) is appended to the end of the file name to ensure that images executed in batches have unique file names
civitai_sampler Converts the sampler name to the notation used on Civitai
Example: If the sampler is dpmpp_2m and the scheduler is karras, it becomes DPM++ 2M Karras
calc_model_hash If true, calculates the hash value of the model and adds it to the metadata
Note: It takes time to calculate the hash value of the model
send_metadata_as_memo
  • true: Saves the metadata in the Eagle notes field. If there is input to memo, its content is appended with "Memo:" and saved after the metadata
  • false: Does not save the metadata in the Eagle notes field. Only the content of memo is saved in the Eagle notes field
eagle_folder Specifies the image save destination folder in Eagle by FolderID or Folder name

Batch Support

The filename_prefix and eagle_folder inputs support batch images.
If an input is a list, elements corresponding to the batch index are applied. If the list is shorter than the batch size, empty strings are used. If a single string is passed, the same string is applied to all images.

Keys that can be specified in filename_prefix

Key Replaced Information
%seed% Seed value
%width% Image width
%height% Image height
%pprompt% Positive Prompt
%pprompt:chars% First n characters of Positive Prompt
%nprompt% Negative Prompt
%nprompt:chars% First n characters of Negative Prompt
%model% Checkpoint name
%model:chars% First n characters of Checkpoint name
%date% Generation date and time (yyyyMMddhhmmss)
%date:% Generation date and time

Refer to the table below for the identifiers specified in <format> of %date:<format>%.

Identifier Description
yyyy Year
MM Month
dd Day
hh Hour
mm Minute
ss Second

Create Extra Metadata

  • Specifies the metadata to be added to the saved image.

CreateExtraMetaData Preview

Metadata Added to Images

Item Description
Positive prompt Positive prompt
Negative prompt Negative prompt
Steps Number of steps
Sampler Sampler + Scheduler name
CFG scale CFG scale
Seed Seed value
Clip skip Clip skip value
Note: Output only when the CLIP Set Last Layer node is used
Size Image width × Image height
Model Checkpoint name
Model hash Checkpoint hash value
Note: Output only when calc_model_hash is true
VAE VAE name
VAE hash VAE hash value
Note: Output only when calc_model_hash is true
Lora_n Model name nth LoRA name
Lora_n Model hash nth LoRA hash value
Lora_n Strength model Strength value for the model of the nth LoRA
Lora_n Strength clip Strength value for the clip of the nth LoRA
Embedding_n Name nth Embedding name
Embedding_n Hash nth Embedding hash value
Batch index Batch process index
Note: Output only when Batch size >= 2
Batch size Batch size
Note: Output only when Batch size >= 2
Hashes Outputs the hash values of Model, Lora_n, and Embedding_n separated by commas (for Civitai)
Note: Output only when calc_model_hash is true
(Additional metadata) Unique metadata entered in extra_metadata

Supported Nodes and Extensions

  • Metadata is obtained from the inputs of the KSampler node found by sampler_selection_method and the inputs of previously executed nodes
  • Please check the following files for supported nodes.
  • Please check the following directory for supported extensions.

Asynchronous sending to Eagle (experimental)

This extension can send items to Eagle in a background thread instead of synchronously. This may reduce the time spent waiting for Eagle during image generation, at the cost of using an in-memory queue.

How to enable

Set the EAGLE_ASYNC_SEND environment variable to 1 before starting ComfyUI.

Examples:

  • Linux / macOS (bash, zsh, etc.):
    export EAGLE_ASYNC_SEND=1
    python main.py
    
  • Windows (Command Prompt):
    set EAGLE_ASYNC_SEND=1
    python main.py
    
  • Windows (PowerShell):
    $env:EAGLE_ASYNC_SEND = "1"
    python .\main.py
    

To disable asynchronous sending, do not set EAGLE_ASYNC_SEND, or unset it / close the terminal and restart ComfyUI.

Behavior and limitations

  • When EAGLE_ASYNC_SEND=1 is set, sending to Eagle is performed by a separate thread.
  • Generated images can finish processing in ComfyUI while sending to Eagle continues in the background.
  • The send queue is in-memory only. If Python/ComfyUI is forcibly terminated (e.g. crash, kill -9, power loss), items that are still queued may be lost and never reach Eagle.
  • This feature is experimental and its behavior or availability may change in future versions.
  • If you suspect a problem with sending to Eagle, try running again without EAGLE_ASYNC_SEND to fall back to synchronous sending.

Change History

  • 2025/12/17 1.2.0 If the environment variable(EAGLE_ASYNC_SEND) is set, send to Eagle in a separate thread (experimental)
  • 2025/11/09 1.1.9 Fixed a bug where prompts were not saved in ComfyUI v0.3.68
  • 2025/11/09 1.1.8 Fixed a bug where prompts might not save. Fully supports workflows using loops.
  • 2025/11/06 1.1.7 Bug Fix for Node Analysis in ComfyUI-Easy-Use
  • 2025/11/05 1.1.6 Added IMAGE to output. Outputs the IMAGE received as input without modification.
  • 2025/11/03 1.1.5 Fixed a bug that could cause the error "AttributeError: 'NoneType' object has no attribute 'caches'".
  • 2025/11/02 1.1.4 Fixed a bug that caused errors in certain workflows
  • 2025/11/01 1.1.3 Added the ability to set different values for each image in a batch by passing a list to each input in filename_prefix/custom_tag_pattern/eagle_folder/memo/extra_metadata.
  • 2025/10/29 1.1.2 Fixed to correctly save the value for each loop iteration to metadata when called multiple times within a loop
  • 2025/10/29 1.1.1 Add the size of the filepath (list) to the output
  • 2025/10/29 1.1.0 Added support for supplying per-image positive/negative prompts via list inputs
  • 2025/10/28 1.0.6 Changed to no preview for improved performance
  • 2025/10/27 1.0.5 Supports Eagle API Token (specified via environment variable)
  • 2025/10/26 1.0.4 Fixed cases where errors occur related to DynamicPrompt
  • 2025/08/22 1.0.3 Fixed an issue where using Qwen-Image caused an error
  • 2025/03/23 1.0.2 Fixed an error when using embeddings
  • 2025/02/07 1.0.1 Support for comfyui-prompt-control
  • 2025/01/04 1.0.0 First release

Acknowledgements

  • The implementation for metadata acquisition is based on ComfyUI-SaveImageWithMetaData
  • The implementation for sending to Eagle is based on D2 Send Eagle
  • The tag customization specification is based on the WebUI extension Eagle-pnginfo
  • Thanks to nkchocoai, da2el, and bbc_mc for creating and publishing such wonderful programs
S
Description
No description provided
Readme GPL-3.0
496 KiB
Languages
Python 100%