No module named 'piexif' in ComfyUI
Fix No module named 'piexif' in ComfyUI when startup or image metadata handling fails.
Error Messages
When ComfyUI starts, one of the following errors appears in the terminal log:
ModuleNotFoundError: No module named 'piexif'Cannot import ... module for custom nodes: No module named 'piexif'Cause
piexif is a pure-Python library for reading and writing EXIF image metadata. Several popular plugins depend on it to embed workflow information into generated images, including:
- ComfyUI-Impact-Pack
- save-image-extended-comfyui
- ComfyUI_Comfyroll_CustomNodes
- comfyui-prompt-reader-node
When piexif is missing, these plugins fail to load, but ComfyUI's core functionality is unaffected.
Severity
Low -- only plugins that read or write image metadata are affected.
Fix
Install piexif into the Python environment that starts ComfyUI:
| Install type | Command |
|---|---|
| Official GitHub Windows portable package | From the portable package root: .\python_embeded\python.exe -s -m pip install piexif |
| Manual Git + venv install | Activate the venv, then run python -m pip install piexif |
| ComfyUI Desktop or managed launcher | Use the app's environment/terminal tools. Do not assume a portable python_embeded folder exists. |
Restart ComfyUI after the installation completes.
Notes
piexif is a pure-Python package with no compilation step, so you should not run into C compiler issues during installation. The library is updated infrequently but is stable and widely used across the ComfyUI ecosystem.
Still not resolved?
Contact support using the "Contact Us" button inside the app.
Source References
Start free with Wonderful Launcher if this affects your real ComfyUI environment. It keeps launcher-native repair, task logs, and runtime checks in one place; credits are only for image generation and metered tools.
Download Wonderful LauncherSee credit packagesDid this fix your issue?
Your answer helps prioritize verified ComfyUI repairs.