Skip to content

custom metadata nodes #9216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

parsee-mizuhashi
Copy link

(continuation of #8737 since i dont know how to git, my bad)

explanation of what the nodes do:
GetWorkflowMetadata: gets the pnginfo metadata (e.g. the one saved by default in SaveImage
EmptyMetadata: makes a new empty metadata to add upon
AddMetadataValue: adds a new value to the metadata
SaveImageCustomMetadata: saves image with custom metadata

this time its defined with v3 spec, ty comfy for showing me how to do do pnginfo in v3 spec
(note: should prob replace custom type with another type? feels too niche to require a whole new type so left it just as a custom type, also might help people making v3 nodes in the future)

@Kosinkadink
Copy link
Collaborator

Since the metadata is a special type that would be supported by core, assuming it will be accepted, the type should be defined within _io.py of latest API (comfy_api/latest/_io.py). Nice to see nodes written in v3 schema lol.

@asagi4
Copy link
Contributor

asagi4 commented Aug 7, 2025

Is the PngInfo object sufficient to contain metadata for all filetypes that could contain metadata? Maybe it could use a custom container type instead so you could extend the system to more than just images, like safetensors files or videos, without having to have separate types for all of them.

@parsee-mizuhashi
Copy link
Author

Since the metadata is a special type that would be supported by core, assuming it will be accepted, the type should be defined within _io.py of latest API (comfy_api/latest/_io.py). Nice to see nodes written in v3 schema lol.

will add the custom type into the _io.py file then

Is the PngInfo object sufficient to contain metadata for all filetypes that could contain metadata? Maybe it could use a custom container type instead so you could extend the system to more than just images, like safetensors files or videos, without having to have separate types for all of them.

i mostly intended this as just a way to give images custom metadata, but will try and add webm / checkpoint metadata

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants