-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path__init__.py
More file actions
63 lines (54 loc) · 2.38 KB
/
__init__.py
File metadata and controls
63 lines (54 loc) · 2.38 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
try:
import folder_paths as _fp
# Register a dedicated model type for ACE-Step GGUF files.
# This makes the files appear in ComfyUI's model manager, enables the
# built-in download prompt, and lets get_filename_list() find them.
for _p in _fp.get_folder_paths("text_encoders"):
_fp.add_model_folder_path("acestep_gguf", _p)
except Exception:
pass
# Run the same auto-build that ComfyUI Manager triggers via install.py so
# that manual git-clone users also get the binaries built automatically the
# first time ComfyUI loads this node.
try:
import threading as _threading
from .install import install as _install
def _background_install():
try:
_install()
except Exception as _exc:
print(
f"[acestep-cpp] Background build failed: {_exc}\n"
"[acestep-cpp] Use the 'Acestep.cpp Builder' node or run "
"install.py from the node directory for detailed output.",
flush=True,
)
_threading.Thread(target=_background_install, daemon=True).start()
except Exception:
pass
try:
from .nodes import AcestepCPPModelLoader, AcestepCPPLoraLoader, AcestepCPPModelDownloader, AcestepCPPBuilder, AcestepCPPGenerate, AcestepCPPOptions, AcestepCPPAudioPlayer
NODE_CLASS_MAPPINGS = {
"AcestepCPPModelLoader": AcestepCPPModelLoader,
"AcestepCPPLoraLoader": AcestepCPPLoraLoader,
"AcestepCPPModelDownloader": AcestepCPPModelDownloader,
"AcestepCPPBuilder": AcestepCPPBuilder,
"AcestepCPPGenerate": AcestepCPPGenerate,
"AcestepCPPOptions": AcestepCPPOptions,
"AcestepCPPAudioPlayer": AcestepCPPAudioPlayer,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"AcestepCPPModelLoader": "Acestep.cpp Model Loader",
"AcestepCPPLoraLoader": "Acestep.cpp LoRA Loader",
"AcestepCPPModelDownloader": "Acestep.cpp Model Downloader",
"AcestepCPPBuilder": "Acestep.cpp Builder",
"AcestepCPPGenerate": "Acestep.cpp Generate",
"AcestepCPPOptions": "Acestep.cpp Options",
"AcestepCPPAudioPlayer": "Acestep.cpp Audio Player",
}
WEB_DIRECTORY = "./web"
except ImportError:
# Imported as a standalone module (e.g., by pytest during conftest
# discovery) rather than as a ComfyUI package — skip node registration.
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}