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:
co-authored by
Claude Opus 4.6
parent
ff01a0c43e
commit
7eddbca7d9
+4
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user