Skip to content

fix(exif): handle non-standard EXIF with UserComment in IFD0#942

Merged
zanllp merged 1 commit into
mainfrom
fix/non-standard-exif-support
Mar 29, 2026
Merged

fix(exif): handle non-standard EXIF with UserComment in IFD0#942
zanllp merged 1 commit into
mainfrom
fix/non-standard-exif-support

Conversation

@zanllp

@zanllp zanllp commented Mar 29, 2026

Copy link
Copy Markdown
Owner

Some images store UserComment directly in IFD0 with type BYTE instead of the standard Exif sub-IFD with type UNDEFINED, causing piexif to return empty results. Add a raw EXIF fallback to extract and decode UserComment in both ComfyUI detection and webui gen info reading.

  • Add _extract_usercomment_from_raw_exif() for raw IFD0 parsing
  • Add detection fallback in is_img_created_by_comfyui() for JPEG/WEBP
  • Add extraction fallback in read_sd_webui_gen_info_from_image()
  • In dev mode, bypass DB cache for unedited images to aid debugging

Some images store UserComment directly in IFD0 with type BYTE instead
of the standard Exif sub-IFD with type UNDEFINED, causing piexif to
return empty results. Add a raw EXIF fallback to extract and decode
UserComment in both ComfyUI detection and webui gen info reading.

- Add _extract_usercomment_from_raw_exif() for raw IFD0 parsing
- Add detection fallback in is_img_created_by_comfyui() for JPEG/WEBP
- Add extraction fallback in read_sd_webui_gen_info_from_image()
- In dev mode, bypass DB cache for unedited images to aid debugging
@zanllp zanllp merged commit 09c3f41 into main Mar 29, 2026
@zanllp zanllp deleted the fix/non-standard-exif-support branch June 6, 2026 03:54
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.

1 participant