-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path__init__.py
More file actions
43 lines (38 loc) · 1.57 KB
/
Copy path__init__.py
File metadata and controls
43 lines (38 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
"""ComfyUI-NanoBanana2 — Google Gemini integration.
Aggregates the v2.0 core nodes (nanobanana_node.py) with v2.1's new
feature nodes (extra_nodes.py) into the standard ComfyUI mapping dicts.
Loader compatibility: ComfyUI typically loads custom_node packages via
SourceFileLoader, which gives this file a __package__ name and lets the
relative imports below resolve. When run outside a package (e.g. pytest
adding the parent dir to sys.path), we fall back to absolute imports.
"""
try:
from .nanobanana_node import (
NODE_CLASS_MAPPINGS as _CORE_CLASSES,
NODE_DISPLAY_NAME_MAPPINGS as _CORE_NAMES,
)
from .extra_nodes import (
NEW_NODE_CLASS_MAPPINGS as _EXTRA_CLASSES,
NEW_NODE_DISPLAY_NAME_MAPPINGS as _EXTRA_NAMES,
)
from .network_route import (
NODE_CLASS_MAPPINGS as _NET_CLASSES,
NODE_DISPLAY_NAME_MAPPINGS as _NET_NAMES,
)
except ImportError:
# Flat-import fallback (tests / direct execution).
from nanobanana_node import (
NODE_CLASS_MAPPINGS as _CORE_CLASSES,
NODE_DISPLAY_NAME_MAPPINGS as _CORE_NAMES,
)
from extra_nodes import (
NEW_NODE_CLASS_MAPPINGS as _EXTRA_CLASSES,
NEW_NODE_DISPLAY_NAME_MAPPINGS as _EXTRA_NAMES,
)
from network_route import (
NODE_CLASS_MAPPINGS as _NET_CLASSES,
NODE_DISPLAY_NAME_MAPPINGS as _NET_NAMES,
)
NODE_CLASS_MAPPINGS = {**_CORE_CLASSES, **_EXTRA_CLASSES, **_NET_CLASSES}
NODE_DISPLAY_NAME_MAPPINGS = {**_CORE_NAMES, **_EXTRA_NAMES, **_NET_NAMES}
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]