forked from pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
35 lines (28 loc) · 1.24 KB
/
Copy path__init__.py
File metadata and controls
35 lines (28 loc) · 1.24 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
"""ComfyUI entry point for the MiniMax-H3 T2VA prompt rewriter."""
import importlib
import logging
from .minimax_h3_rewriter import routes as _routes # registers HTTP routes
from .minimax_h3_rewriter.nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
from .minimax_h3_rewriter import writer_8b
NODE_CLASS_MAPPINGS.update(writer_8b.NODE_CLASS_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(writer_8b.NODE_DISPLAY_NAME_MAPPINGS)
log = logging.getLogger(__name__)
for _module_name, _label in (
("multi_caption", "Multi Reference Caption"),
("universal", "Universal Writer"),
("universal_rewriter", "Universal Rewriter"),
):
try:
_module = importlib.import_module(f".minimax_h3_rewriter.{_module_name}", __name__)
except Exception:
log.warning(
"[minimax_h3_rewriter] '%s' needs a newer ComfyUI than this one, so it is not "
"registered. Every other node in the pack is unaffected.",
_label,
exc_info=True,
)
continue
NODE_CLASS_MAPPINGS.update(_module.NODE_CLASS_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(_module.NODE_DISPLAY_NAME_MAPPINGS)
WEB_DIRECTORY = "./web/js"
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]