ComfyUI – v0.14.2: fix: use glob matching for Gemini image MIME types (#12511)

ComfyUI – v0.14.2: fix: use glob matching for Gemini image MIME types (#12511)

🚨 ComfyUI v0.14.2 is out β€” and it’s fixing a sneaky Gemini image bug! 🚨

This patch resolves a critical issue where Gemini API responses in `image/jpeg` format were silently discarded, resulting in black (all-zero) images instead of the expected output. 😬

βœ… What’s Fixed & Improved:

  • 🌐 Glob-style MIME matching added via `_mime_matches()` helper (using `fnmatch`)
  • πŸ”„ `get_image_from_response()` now accepts any image format (`”image/*”`), not just `image/png`
  • πŸ“¦ Supports both `image/png` and `image/jpeg`, plus future image types β€” no more silent failures!

πŸ’‘ Why you’ll care: If your workflow leans on Gemini for image generation or processing (e.g., multimodal prompts), this update ensures reliable, non-deterministic JPEG outputs β€” no more black squares!

πŸ”— View PR #12511

β€” Tagged by @huntcsg, 18 Feb 05:07

πŸ”— View Release