-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
31 lines (25 loc) · 1023 Bytes
/
Copy path__init__.py
File metadata and controls
31 lines (25 loc) · 1023 Bytes
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
"""ComfyUI-ModelRouter: detects workflow model dependencies and routes missing
models into the correct ComfyUI model directories.
This extension registers no workflow nodes - it operates at the application
level, so NODE_CLASS_MAPPINGS stays empty.
"""
try:
from .modelrouter.utils import get_logger
except ImportError:
# Fallback for tooling (e.g. pytest) that imports this file without the
# `custom_nodes.ComfyUI-ModelRouter` package context ComfyUI provides.
from modelrouter.utils import get_logger
WEB_DIRECTORY = "web/modelrouter"
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
log = get_logger()
try:
try:
from .modelrouter.api import register_routes
except ImportError:
from modelrouter.api import register_routes
register_routes()
except Exception:
# Never let ModelRouter take ComfyUI down with it.
log.error("Failed to initialize backend routes", exc_info=True)
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]