Add support for WEBP images generated with ComfyUI#798
Merged
Conversation
Owner
|
Thanks for the PR! Really appreciate your contribution.
Unfortunately, I don't have an example workflow handy for this one — it was actually contributed by another dev. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current implementation doesn't read prompt/workflow metadata from WEBP images generated by ComfyUI, resulting in blank fields. This is because the code only checks PNG-specific metadata chunks. This PR adds logic to parse ComfyUI’s Workflow and Prompt data from WEBP EXIF tags. I believe this is crucial because WEBPs, along with PNG and FLAC files, are the only files that ComfyUI can auto-load workflows from, so they are clearly an important ComfyUI format.
Validation:
WEBP image generated by ComfyUI's native SaveAnimatedWEBP node (despite its name, it is the only native way to save static WEBP images): https://raw.githubusercontent.com/Ancions-dot/sd-webui-infinite-image-browsing/refs/heads/fix_comfyui_webp/ComfyUI_00001_.webp
WEBP image generated by custom Save Image node from https://github.com/WASasquatch/was-node-suite-comfyui: https://raw.githubusercontent.com/Ancions-dot/sd-webui-infinite-image-browsing/refs/heads/fix_comfyui_webp/ComfyUI_was_0001.webp
Limitation:
is_img_created_by_comfyui_with_webui_gen_infoalways returns False for WEBPs sinceimg.info.get("parameters")always fails for WEBP images. But since I have no idea what is meant by that or how to generate an image with WebUI gen info, I couldn't test this yet. Do you maybe have an example workflow?