Bug Description
Extension fails to load on ComfyUI v0.8+ with:
ModuleNotFoundError: No module named 'custom_nodes.ComfyUI-SaveImageWithMetaData'
Root Cause
In py/defs/__init__.py, line 16, the module path is constructed with a hardcoded custom_nodes. prefix:
package_name = f"custom_nodes.ComfyUI-SaveImageWithMetaData.py.defs.ext.{module_name}"
This worked on older ComfyUI versions where the custom node root was implicitly custom_nodes/. In ComfyUI v0.8+, the module root is no longer prefixed with custom_nodes., causing importlib.import_module(package_name) to fail.
Fix
Remove the custom_nodes. prefix:
package_name = f"ComfyUI-SaveImageWithMetaData.py.defs.ext.{module_name}"
Environment
- ComfyUI v0.8.36 (bundled with ComfyUI Desktop on macOS)
- ComfyUI-SaveImageWithMetaData latest (cloned from git)
Reproduction
- Clone
ComfyUI-SaveImageWithMetaData to custom_nodes/
- Launch ComfyUI v0.8+
- Check
comfyui.log — extension shows IMPORT FAILED
Bug Description
Extension fails to load on ComfyUI v0.8+ with:
Root Cause
In
py/defs/__init__.py, line 16, the module path is constructed with a hardcodedcustom_nodes.prefix:This worked on older ComfyUI versions where the custom node root was implicitly
custom_nodes/. In ComfyUI v0.8+, the module root is no longer prefixed withcustom_nodes., causingimportlib.import_module(package_name)to fail.Fix
Remove the
custom_nodes.prefix:Environment
Reproduction
ComfyUI-SaveImageWithMetaDatatocustom_nodes/comfyui.log— extension showsIMPORT FAILED