fix: use try/except import for ComfyUI and pytest compatibility

ComfyUI loads custom nodes as packages (relative import needed),
pytest runs at top level (absolute import needed). Handle both.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Eric Mey
2026-04-01 23:20:12 -04:00
co-authored by Claude Opus 4.6
parent ff01a0c43e
commit 7eddbca7d9
+4 -1
View File
@@ -1,4 +1,7 @@
from immich_nodes.save_to_immich import SaveToImmich
try:
from .immich_nodes.save_to_immich import SaveToImmich
except ImportError:
from immich_nodes.save_to_immich import SaveToImmich
NODE_CLASS_MAPPINGS = {
"SaveToImmich": SaveToImmich,