Skip to content

Add support for WEBP images generated with ComfyUI#798

Merged
zanllp merged 1 commit into
zanllp:mainfrom
Ancions-dot:fix_comfy_webp_pr
May 8, 2025
Merged

Add support for WEBP images generated with ComfyUI#798
zanllp merged 1 commit into
zanllp:mainfrom
Ancions-dot:fix_comfy_webp_pr

Conversation

@Ancions-dot

Copy link
Copy Markdown
Contributor

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:

Limitation: is_img_created_by_comfyui_with_webui_gen_info always returns False for WEBPs since img.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?

@zanllp

zanllp commented May 8, 2025

Copy link
Copy Markdown
Owner

Thanks for the PR! Really appreciate your contribution.

Do you maybe have an example workflow?

Unfortunately, I don't have an example workflow handy for this one — it was actually contributed by another dev.

@zanllp zanllp merged commit b2b3f83 into zanllp:main May 8, 2025
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.

2 participants