bizyengine 0.4.6__py3-none-any.whl → 1.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bizyengine/bizyair_extras/__init__.py +1 -0
- bizyengine/bizyair_extras/route_bizyair_tools.py +57 -0
- bizyengine/core/data_types.py +13 -0
- bizyengine/misc/segment_anything.py +5 -3
- bizyengine/version.txt +1 -1
- {bizyengine-0.4.6.dist-info → bizyengine-1.1.2.dist-info}/METADATA +1 -1
- {bizyengine-0.4.6.dist-info → bizyengine-1.1.2.dist-info}/RECORD +9 -8
- {bizyengine-0.4.6.dist-info → bizyengine-1.1.2.dist-info}/WHEEL +0 -0
- {bizyengine-0.4.6.dist-info → bizyengine-1.1.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import pprint
|
|
3
|
+
|
|
4
|
+
import bizyengine.core as bizyair
|
|
5
|
+
from aiohttp import web
|
|
6
|
+
from bizyengine.core.data_types import BIZYAIR_TYPE_MAP
|
|
7
|
+
from server import PromptServer
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def get_bizyair_display_name(class_type: str) -> str:
|
|
11
|
+
bizyair_cls_prefix = bizyair.nodes_base.PREFIX
|
|
12
|
+
bizyair_logo = bizyair.nodes_base.LOGO
|
|
13
|
+
return f"{bizyair_logo}{bizyair_cls_prefix} {bizyair.NODE_DISPLAY_NAME_MAPPINGS.get(class_type, class_type)}"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def workflow_convert(inputs: dict):
|
|
17
|
+
nodes = inputs["nodes"]
|
|
18
|
+
for node in nodes:
|
|
19
|
+
class_type = node["type"]
|
|
20
|
+
node_inputs = node.get("inputs")
|
|
21
|
+
node_outputs = node.get("outputs")
|
|
22
|
+
bizyair_cls_type = f"{bizyair.nodes_base.PREFIX}_{class_type}"
|
|
23
|
+
is_converted = False
|
|
24
|
+
if bizyair_cls_type in bizyair.NODE_CLASS_MAPPINGS:
|
|
25
|
+
node["type"] = bizyair_cls_type
|
|
26
|
+
display_name = get_bizyair_display_name(class_type)
|
|
27
|
+
node["properties"]["Node name for S&R"] = display_name
|
|
28
|
+
if node_inputs:
|
|
29
|
+
for input_node in node_inputs:
|
|
30
|
+
input_type = input_node["type"]
|
|
31
|
+
input_node["type"] = BIZYAIR_TYPE_MAP.get(input_type, input_type)
|
|
32
|
+
if node_outputs:
|
|
33
|
+
for output_node in node_outputs:
|
|
34
|
+
output_type = output_node["type"]
|
|
35
|
+
output_node["type"] = BIZYAIR_TYPE_MAP.get(output_type, output_type)
|
|
36
|
+
is_converted = True
|
|
37
|
+
pprint.pprint(
|
|
38
|
+
{
|
|
39
|
+
"original_class_type": class_type,
|
|
40
|
+
"bizyair_cls_type": bizyair_cls_type,
|
|
41
|
+
"is_converted": is_converted,
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
return inputs
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@PromptServer.instance.routes.post("/bizyair/node_converter")
|
|
48
|
+
async def convert(request):
|
|
49
|
+
try:
|
|
50
|
+
data = await request.json()
|
|
51
|
+
ret = workflow_convert(data)
|
|
52
|
+
return web.Response(
|
|
53
|
+
text=json.dumps(ret),
|
|
54
|
+
content_type="application/json",
|
|
55
|
+
)
|
|
56
|
+
except Exception as e:
|
|
57
|
+
return web.json_response({"status": "error", "message": str(e)}, status=400)
|
bizyengine/core/data_types.py
CHANGED
|
@@ -11,6 +11,19 @@ FACEANALYSIS = "BIZYAIR_FACEANALYSIS"
|
|
|
11
11
|
STYLE_MODEL = "BIZYAIR_STYLE_MODEL"
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
BIZYAIR_TYPE_MAP = {
|
|
15
|
+
"MODEL": MODEL,
|
|
16
|
+
"CLIP": CLIP,
|
|
17
|
+
"VAE": VAE,
|
|
18
|
+
"CONDITIONING": CONDITIONING,
|
|
19
|
+
"CONTROL_NET": CONTROL_NET,
|
|
20
|
+
"UPSCALE_MODEL": UPSCALE_MODEL,
|
|
21
|
+
"INSTANTID": INSTANTID,
|
|
22
|
+
"FACEANALYSIS": FACEANALYSIS,
|
|
23
|
+
"STYLE_MODEL": STYLE_MODEL,
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
14
27
|
def is_model_datatype(datatype):
|
|
15
28
|
return datatype in [MODEL, CLIP, VAE, CONDITIONING, CONTROL_NET, STYLE_MODEL]
|
|
16
29
|
|
|
@@ -155,10 +155,9 @@ class BizyAirSegmentAnythingPointBox:
|
|
|
155
155
|
assert (
|
|
156
156
|
w <= SIZE_LIMIT and h <= SIZE_LIMIT
|
|
157
157
|
), f"width and height must be less than {SIZE_LIMIT}x{SIZE_LIMIT}, but got {w} and {h}"
|
|
158
|
-
|
|
159
158
|
if is_point:
|
|
160
159
|
coordinates = [
|
|
161
|
-
|
|
160
|
+
json.loads(SAM_COORDINATE["point_coords"][key])
|
|
162
161
|
for key in SAM_COORDINATE["point_coords"]
|
|
163
162
|
]
|
|
164
163
|
|
|
@@ -179,7 +178,7 @@ class BizyAirSegmentAnythingPointBox:
|
|
|
179
178
|
}
|
|
180
179
|
else:
|
|
181
180
|
coordinates = [
|
|
182
|
-
|
|
181
|
+
json.loads(SAM_COORDINATE["box_coords"][key])
|
|
183
182
|
for key in SAM_COORDINATE["box_coords"]
|
|
184
183
|
]
|
|
185
184
|
input_box = [
|
|
@@ -224,6 +223,9 @@ class BizyAirSegmentAnythingPointBox:
|
|
|
224
223
|
raise Exception(f"Unexpected response: {ret} {e=}")
|
|
225
224
|
|
|
226
225
|
if ret["status"] == "error":
|
|
226
|
+
if "data" in ret:
|
|
227
|
+
if "error" in ret["data"]:
|
|
228
|
+
raise Exception(ret["data"]["error"])
|
|
227
229
|
raise Exception(ret["message"])
|
|
228
230
|
|
|
229
231
|
msg = ret["data"]
|
bizyengine/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1.1.2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: bizyengine
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: [a/BizyAir](https://github.com/siliconflow/BizyAir) Comfy Nodes that can run in any environment.
|
|
5
5
|
Author-email: SiliconFlow <yaochi@siliconflow.cn>
|
|
6
6
|
Project-URL: Repository, https://github.com/siliconflow/BizyAir
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
bizyengine/__init__.py,sha256=GP9V-JM07fz7uv_qTB43QEA2rKdrVJxi5I7LRnn_3ZQ,914
|
|
2
|
-
bizyengine/version.txt,sha256=
|
|
2
|
+
bizyengine/version.txt,sha256=g9DE-d3AiatY4yLimLYZDyv1kdwiX_XN130F5qhCBhk,5
|
|
3
3
|
bizyengine/bizy_server/__init__.py,sha256=SP9oSblnPo4KQyh7yOGD26YCskFAcQHAZy04nQBNRIw,200
|
|
4
4
|
bizyengine/bizy_server/api_client.py,sha256=Txt17UOwpHRgbo5vXI00VEr1Z-rJi1IZjptKnV6QaSs,26719
|
|
5
5
|
bizyengine/bizy_server/errno.py,sha256=OsVdedWFunQyJdZ7ijMqaL7gKrrP6DxndhJ0ZGnif00,6856
|
|
@@ -8,7 +8,7 @@ bizyengine/bizy_server/execution.py,sha256=ayaEf6eGJKQsVZV-1_UlGlvwwmlH7FEek31Uq
|
|
|
8
8
|
bizyengine/bizy_server/resp.py,sha256=uxNMCOPNSC4EH6ZB43yXUrQ8_BYJ2RG-w4rk52brnBQ,521
|
|
9
9
|
bizyengine/bizy_server/server.py,sha256=zKp4NemJ_eUwzLe-heKT5FQ2glLruC09FCqj6WU0Gos,34106
|
|
10
10
|
bizyengine/bizy_server/utils.py,sha256=9VYj9tFyJ53VUyPcdoolTPNivHyRrRrzzP17Cc4UAXs,2202
|
|
11
|
-
bizyengine/bizyair_extras/__init__.py,sha256=
|
|
11
|
+
bizyengine/bizyair_extras/__init__.py,sha256=Lnf-6vOrpkmzZ1H_AiBKlRo0pPt_A8HyUqGDXCZKOIc,892
|
|
12
12
|
bizyengine/bizyair_extras/nodes_advanced_refluxcontrol.py,sha256=cecfjrtnjJAty9aNkhz8BlmHUC1NImkFlUDiA0COEa4,2242
|
|
13
13
|
bizyengine/bizyair_extras/nodes_cogview4.py,sha256=Ni0TDOycczyDhYPvSR68TxGV_wE2uhaxd8MIj-J4-3o,2031
|
|
14
14
|
bizyengine/bizyair_extras/nodes_comfyui_detail_daemon.py,sha256=i71it24tiGvZ3h-XFWISr4CpZszUtPuz3UrZARYluLk,6169
|
|
@@ -32,12 +32,13 @@ bizyengine/bizyair_extras/nodes_trellis.py,sha256=QU2dQsN_zKA91vTVtR4Af4kJXDJA8C
|
|
|
32
32
|
bizyengine/bizyair_extras/nodes_ultimatesdupscale.py,sha256=6IZCDZ_9PhrKwJzCZGvKNxcRYwwkPRMNovF17nwzFqw,4130
|
|
33
33
|
bizyengine/bizyair_extras/nodes_upscale_model.py,sha256=6DWAkcLPKy_8byaL9xShzDuccHLiVevKEswcbPr1vSI,825
|
|
34
34
|
bizyengine/bizyair_extras/nodes_wan_video.py,sha256=d1mCcW9jCj-5Oymmymy0Vz-nwWv36FMGE5Gn-E7Rul4,1632
|
|
35
|
+
bizyengine/bizyair_extras/route_bizyair_tools.py,sha256=QdgfiKeF6c4-5Bx5Pmz9RKlaAHreypy9SIg_krmLk-o,2079
|
|
35
36
|
bizyengine/bizyair_extras/nodes_ipadapter_plus/__init__.py,sha256=ECKATm_EKi_4G47-FJI4-3rHO3iiF9FVakfSTE-pooE,36
|
|
36
37
|
bizyengine/bizyair_extras/nodes_ipadapter_plus/nodes_ipadapter_plus.py,sha256=7J0f-LLyETZTfcKUMiFenz6WwJnZeRDID_Ghz2z6Caw,53476
|
|
37
38
|
bizyengine/bizyair_extras/nodes_kolors_mz/__init__.py,sha256=mYaCDH1G28DOp5yLN-wsrCJV3TwgY18bqNPygeNqa30,2304
|
|
38
39
|
bizyengine/bizyair_extras/oauth_callback/main.py,sha256=KQOZWor3kyNx8xvUNHYNMoHfCF9g_ht13_iPk4K_5YM,3633
|
|
39
40
|
bizyengine/core/__init__.py,sha256=XKaHyQVH_xybBzEPJ_Vv-KA1dAtsU_cYtPnAMfdUT3c,303
|
|
40
|
-
bizyengine/core/data_types.py,sha256=
|
|
41
|
+
bizyengine/core/data_types.py,sha256=U1Ai149lvbVA-z59sfgniES9KSsyFIbDs_vcjpjlUK4,967
|
|
41
42
|
bizyengine/core/image_utils.py,sha256=--DmQb3R9Ev21MfZG9rfgOGsU2zRywJ-hpiNNN0N8p8,8586
|
|
42
43
|
bizyengine/core/nodes_base.py,sha256=oWyFUXRjCiMrG1xz4pIKx8m9ioS_XJe0i37ixJl4hSE,5264
|
|
43
44
|
bizyengine/core/nodes_io.py,sha256=3U1rb7CyZxsXYGeA-51Y_q8VaElLz-guR0EUlbgOr84,2812
|
|
@@ -67,10 +68,10 @@ bizyengine/misc/nodes.py,sha256=HJ4m7AiyfU_SynMYoTuYgYGsflzeTv4Zy4wlA6a8xk4,3626
|
|
|
67
68
|
bizyengine/misc/nodes_controlnet_aux.py,sha256=9DoNT06go6fm2wjttUdPQKfqzumtEPnHUe3e93cCarc,16211
|
|
68
69
|
bizyengine/misc/nodes_controlnet_union_sdxl.py,sha256=e6Zs7unfPU-18VCLGgZXFOa0x1L8NJQyTkPv_YqI-zA,5857
|
|
69
70
|
bizyengine/misc/route_sam.py,sha256=-bMIR2QalfnszipGxSxvDAHGJa5gPSrjkYPb5baaRg4,1561
|
|
70
|
-
bizyengine/misc/segment_anything.py,sha256=
|
|
71
|
+
bizyengine/misc/segment_anything.py,sha256=RRm8FOfDY9VxdVrLjcdzJRh2pSM-kmNcCySuYnx9l7w,8677
|
|
71
72
|
bizyengine/misc/supernode.py,sha256=eOhV7gLK6FaqXwASmD-0HJ-OPFrZk2e1IGOI1taCL9w,5152
|
|
72
73
|
bizyengine/misc/utils.py,sha256=FRDEy63vDpssQxSFXrlK6WuXu15dNitYDIGGNOqtdH8,6353
|
|
73
|
-
bizyengine-
|
|
74
|
-
bizyengine-
|
|
75
|
-
bizyengine-
|
|
76
|
-
bizyengine-
|
|
74
|
+
bizyengine-1.1.2.dist-info/METADATA,sha256=UM1U2_YysM_EhDpTm1YQWVys5AZvxKOUqeN0BK590sM,574
|
|
75
|
+
bizyengine-1.1.2.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
|
76
|
+
bizyengine-1.1.2.dist-info/top_level.txt,sha256=2zapzqxX-we5cRyJkGf9bd5JinRtXp3-_uDI-xCAnc0,11
|
|
77
|
+
bizyengine-1.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|