Files
siliconflow-BizyAir/__init__.py
T
WanghanyingandYao Chi b8ed3a788e add sam edit (#167)
* add sam edit function

* add sam point/box nodes

* combine sam loader and segment-anything node

* refine the code

* refine the code

* refine the code

* refine the code

* add point/box example json files

* refine the code

* refine the code

* refine the code

* delete unused changes

* rm unused example jsons

* delete example json

* refine the code

* modify README.md、add example json and refine the code

* add example json in docs directory

* modify the example json

* refine the code

* update ci

* refine

---------

Co-authored-by: Yao Chi <later@usopp.net>
2024-10-30 18:10:40 +08:00

54 lines
1.2 KiB
Python

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