forked from siliconflow/BizyAir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
53 lines (43 loc) · 1.2 KB
/
__init__.py
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
import os
import sys
current_path = os.path.abspath(os.path.dirname(__file__))
src_path = os.path.join(current_path, "src")
if os.path.isdir(src_path):
sys.path.insert(0, src_path)
from bizyair import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
WEB_DIRECTORY = "./js"
from . import (
auth,
bizyair_extras,
llm,
mzkolors,
nodes,
nodes_controlnet_aux,
nodes_controlnet_union_sdxl,
segment_anything,
showcase,
supernode,
)
def update_mappings(module):
NODE_CLASS_MAPPINGS.update(**module.NODE_CLASS_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(**module.NODE_DISPLAY_NAME_MAPPINGS)
update_mappings(auth)
update_mappings(supernode)
update_mappings(llm)
update_mappings(nodes_controlnet_aux)
update_mappings(nodes_controlnet_union_sdxl)
update_mappings(mzkolors)
update_mappings(segment_anything)
# bizy_server
bizyair_adv_is_not_installed = False
try:
import crcmod
import oss2
except ImportError:
bizyair_adv_is_not_installed = True
print(
"\n\n\033[91m[BizyAir]\033[0m Please run"
" 'pip install -r requirements.txt' to install depencies for model host feature.\n\n"
)
if not bizyair_adv_is_not_installed:
import bizy_server