bizyengine 1.2.27__py3-none-any.whl → 1.2.28__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.
@@ -38,6 +38,23 @@ class CLIPTextEncodeFlux(BizyAirBaseNode):
38
38
  # return (new_clip,)
39
39
 
40
40
 
41
+ class ReferenceLatent(BizyAirBaseNode):
42
+ @classmethod
43
+ def INPUT_TYPES(s):
44
+ return {
45
+ "required": {
46
+ "conditioning": ("CONDITIONING",),
47
+ },
48
+ "optional": {
49
+ "latent": ("LATENT",),
50
+ },
51
+ }
52
+
53
+ RETURN_TYPES = ("CONDITIONING",)
54
+ CATEGORY = "advanced/conditioning/edit_models"
55
+ DESCRIPTION = "This node sets the guiding latent for an edit model. If the model supports it you can chain multiple to set multiple reference images."
56
+
57
+
41
58
  class FluxGuidance(BizyAirBaseNode):
42
59
  @classmethod
43
60
  def INPUT_TYPES(s):
@@ -54,7 +54,8 @@
54
54
  "meijia_flux_lora_rank16_bf16.safetensors"
55
55
  ]
56
56
  },
57
- "unet": ["shuttle-3.1-aesthetic.safetensors",{
57
+ "unet": ["shuttle-3.1-aesthetic.safetensors",
58
+ "flux1-dev-kontext_fp8_scaled.safetensors", {
58
59
  "kolors": [
59
60
  "Kolors-Inpainting.safetensors",
60
61
  "Kolors.safetensors"
@@ -40,6 +40,16 @@ model_rules:
40
40
  inputs:
41
41
  unet_name:
42
42
  - ^flux/flux1-dev.sft$
43
+ - mode_type: unet
44
+ base_model: FLUX-kontext
45
+ describe: flux1-kontext
46
+ score: 3
47
+ route: /supernode/bizyair-comfyui-flux1-kontext-fp8
48
+ nodes:
49
+ - class_type: UNETLoader
50
+ inputs:
51
+ unet_name:
52
+ - ^flux1-dev-kontext_fp8_scaled.safetensors$
43
53
 
44
54
  - mode_type: unet
45
55
  base_model: FLUX
@@ -1,4 +1,7 @@
1
1
  # https://docs.comfy.org/essentials/custom_node_datatypes#model-datatypes
2
+ from functools import singledispatch
3
+ from typing import Any, Dict, List, Tuple, Union
4
+
2
5
  # Model datatypes
3
6
  MODEL = "BIZYAIR_MODEL"
4
7
  CLIP = "BIZYAIR_CLIP"
@@ -31,3 +34,24 @@ def is_model_datatype(datatype):
31
34
  # https://docs.comfy.org/essentials/custom_node_images_and_masks
32
35
  def is_send_request_datatype(datatype: str) -> bool:
33
36
  return datatype in {"IMAGE", "LATENT", "MASK", "STRING", "FLOAT", "INT"}
37
+
38
+
39
+ @singledispatch
40
+ def convert_to_custom_type(data: Any) -> Any:
41
+ return data
42
+
43
+
44
+ @convert_to_custom_type.register(str)
45
+ def _(data: str) -> Union[str, Any]:
46
+ return BIZYAIR_TYPE_MAP.get(data, data)
47
+
48
+
49
+ @convert_to_custom_type.register(dict)
50
+ def _(data: Dict) -> Dict:
51
+ return {k: convert_to_custom_type(v) for k, v in data.items()}
52
+
53
+
54
+ @convert_to_custom_type.register(list)
55
+ @convert_to_custom_type.register(tuple)
56
+ def _(data: Union[List, Tuple]) -> Union[List, Tuple]:
57
+ return type(data)(convert_to_custom_type(item) for item in data)
@@ -10,7 +10,7 @@ from bizyengine.core.common.env_var import BIZYAIR_DEBUG, BIZYAIR_SERVER_MODE
10
10
  from bizyengine.core.configs.conf import config_manager
11
11
 
12
12
  from .common.client import get_api_key
13
- from .data_types import is_send_request_datatype
13
+ from .data_types import convert_to_custom_type, is_send_request_datatype
14
14
  from .nodes_io import BizyAirNodeIO, create_node_data
15
15
 
16
16
  try:
@@ -134,6 +134,7 @@ def ensure_hidden_unique_id_and_prompt(org_input_types_func):
134
134
  nonlocal original_has_unique_id
135
135
 
136
136
  result = org_input_types_func()
137
+ result = convert_to_custom_type(result)
137
138
  if "hidden" not in result:
138
139
  result["hidden"] = {"unique_id": "UNIQUE_ID"}
139
140
  elif "unique_id" not in result["hidden"]:
@@ -156,6 +157,10 @@ class BizyAirBaseNode:
156
157
  def __init_subclass__(cls, **kwargs):
157
158
  if not cls.CATEGORY.startswith(f"{LOGO}{PREFIX}"):
158
159
  cls.CATEGORY = f"{LOGO}{PREFIX}/{cls.CATEGORY}"
160
+
161
+ if hasattr(cls, "RETURN_TYPES"):
162
+ setattr(cls, "RETURN_TYPES", convert_to_custom_type(cls.RETURN_TYPES))
163
+
159
164
  register_node(cls, PREFIX)
160
165
  cls.setup_input_types()
161
166
 
bizyengine/version.txt CHANGED
@@ -1 +1 @@
1
- 1.2.27
1
+ 1.2.28
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bizyengine
3
- Version: 1.2.27
3
+ Version: 1.2.28
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=hPsbIxO28ragdKYMcOjrjXZov_fwllVD_xQUQMCih60,6
2
+ bizyengine/version.txt,sha256=5L1cydx4tADQd48y4rHkNWBcq8rAyN4XJZ3nQNbzL1Q,6
3
3
  bizyengine/bizy_server/__init__.py,sha256=SP9oSblnPo4KQyh7yOGD26YCskFAcQHAZy04nQBNRIw,200
4
4
  bizyengine/bizy_server/api_client.py,sha256=t6cwob7hs993oy5WdFcjKtIzfi3S_eUhODdDVv_Hedo,43822
5
5
  bizyengine/bizy_server/errno.py,sha256=Q-U96XnZQCuPH_44Om8wnc2-Kh7qFqwLKtox27msU54,16095
@@ -21,7 +21,7 @@ bizyengine/bizyair_extras/nodes_controlnet.py,sha256=79eM_Q-5iddWamIQo5T47HPchqQ
21
21
  bizyengine/bizyair_extras/nodes_custom_sampler.py,sha256=NK-7sdcp8oxJisjTEFfBskknQJF5I1fRwQkJbG3dKfc,3457
22
22
  bizyengine/bizyair_extras/nodes_dataset.py,sha256=htF0YZb_FHncLhLDEbJfNCVqJ6rvlo1ZLk7iY42Rylc,3440
23
23
  bizyengine/bizyair_extras/nodes_differential_diffusion.py,sha256=nSrbD-w0XtrwktwzME5M0Vmi1sI7Z08AqwgymTdThqo,370
24
- bizyengine/bizyair_extras/nodes_flux.py,sha256=jdi8KM_s8a_2mEksHyM1StHVW0Odm0d3JXNOztOOrxA,2157
24
+ bizyengine/bizyair_extras/nodes_flux.py,sha256=ls94kGBuBNgW5c6uhG36iZLk1TTM2TIoTTcpERgEE5E,2683
25
25
  bizyengine/bizyair_extras/nodes_hunyuan3d.py,sha256=dWHLeqX68N7zKnfDMzm9nutmCNtFT6-wwt7P5cPDu7Q,2058
26
26
  bizyengine/bizyair_extras/nodes_image_utils.py,sha256=BldF_CKD2M01K8-SnG-QV86u3HZqFz_GP5GrCQ5CFDQ,2875
27
27
  bizyengine/bizyair_extras/nodes_ip2p.py,sha256=GSEFJvrs4f2tv0xwYkWqc8uhsXrzAJVPvvwcw0gTjR0,619
@@ -44,9 +44,9 @@ bizyengine/bizyair_extras/nodes_ipadapter_plus/nodes_ipadapter_plus.py,sha256=lO
44
44
  bizyengine/bizyair_extras/nodes_kolors_mz/__init__.py,sha256=HsCCCphW8q0SrWEiFlZKK_W2lQr1T0UJIJL7gEn37ME,3729
45
45
  bizyengine/bizyair_extras/oauth_callback/main.py,sha256=KQOZWor3kyNx8xvUNHYNMoHfCF9g_ht13_iPk4K_5YM,3633
46
46
  bizyengine/core/__init__.py,sha256=EV9ZtTwOHC0S_eNvCu-tltIydfxfMsH59LbgVX4e_1c,359
47
- bizyengine/core/data_types.py,sha256=U1Ai149lvbVA-z59sfgniES9KSsyFIbDs_vcjpjlUK4,967
47
+ bizyengine/core/data_types.py,sha256=2f7QqqZvhKmXw3kZV1AvXuPTda34b4wXQE9tyO8nUSM,1595
48
48
  bizyengine/core/image_utils.py,sha256=--DmQb3R9Ev21MfZG9rfgOGsU2zRywJ-hpiNNN0N8p8,8586
49
- bizyengine/core/nodes_base.py,sha256=n54RfLRnCb3lNd2euYj-IVQWlf7_CkVr33bzpPmVyEU,8821
49
+ bizyengine/core/nodes_base.py,sha256=h2f_FWTWj6lpdKjwHRuOmoRifqwkV59ovM2ZxPK4h9c,9019
50
50
  bizyengine/core/nodes_io.py,sha256=VhwRwYkGp0g3Mh0hx1OSwNZbV06NEV13w2aODSiAm5M,2832
51
51
  bizyengine/core/commands/__init__.py,sha256=82yRdMT23RTiZPkFW_G3fVa-fj3-TUAXnj6cnGA3xRA,22
52
52
  bizyengine/core/commands/base.py,sha256=TYH9lhr033B2roBLPkWkxcvoz_fW3cdzx_bvP_FI7dg,635
@@ -61,8 +61,8 @@ bizyengine/core/common/client.py,sha256=1Ka8DIjbmD9Gme9c_Q1zwXXueSCP3_OSdEDyGYEo
61
61
  bizyengine/core/common/env_var.py,sha256=1EAW3gOXY2bKouCqrGa583vTJRdDasQ1IsFTnzDg7Dk,3450
62
62
  bizyengine/core/common/utils.py,sha256=bm-XmSPy83AyjD0v5EfWp6jiO6_5p7rkZ_HQAuVmgmo,3086
63
63
  bizyengine/core/configs/conf.py,sha256=D_UWG9SSJnK5EhbrfNFryJQ8hUwwdvhOGlq1TielwpI,3830
64
- bizyengine/core/configs/models.json,sha256=jCrqQgjVeHugLb191Xay5rg0m3duTVISPp_GxVGQ3HA,2656
65
- bizyengine/core/configs/models.yaml,sha256=x8TOo-VHMKtrxfWO5_OUtFg6wNqxFQbf_eOWWfRBjAk,9082
64
+ bizyengine/core/configs/models.json,sha256=vQH4xVvybUYuoSWoT8kHLVBapB-ItVzsd0HFjSb56Hc,2705
65
+ bizyengine/core/configs/models.yaml,sha256=i7Om9jajsysqLQxrVt_8D2NbryyaVwhoQXdse7Sf9Ss,9364
66
66
  bizyengine/core/path_utils/__init__.py,sha256=JVpqNHgaKiEtTI8_r47af8GtWHxrtOockQ6Qpzp9_MQ,260
67
67
  bizyengine/core/path_utils/path_manager.py,sha256=tRVAcpsYvfWD-tK7khLvNCZayB0wpU9L0tRTH4ZESzM,10549
68
68
  bizyengine/core/path_utils/utils.py,sha256=kQfPQjGU27qF9iyzRxLSRg5cMsd-VixuCUldART7cgY,2394
@@ -77,7 +77,7 @@ bizyengine/misc/route_sam.py,sha256=-bMIR2QalfnszipGxSxvDAHGJa5gPSrjkYPb5baaRg4,
77
77
  bizyengine/misc/segment_anything.py,sha256=wNKYwlYPMszfwj23524geFZJjZaG4eye65SGaUnh77I,8941
78
78
  bizyengine/misc/supernode.py,sha256=STN9gaxfTSErH8OiHeZa47d8z-G9S0I7fXuJvHQOBFM,4532
79
79
  bizyengine/misc/utils.py,sha256=deQjBgLAkxIr-NaOMm77TcgBT3ExAp0MFm5ehUJ3CGs,6829
80
- bizyengine-1.2.27.dist-info/METADATA,sha256=ok50MkdSb5QqGRuIQMF7dR44VipfqVZKqm1RzZcAWaU,675
81
- bizyengine-1.2.27.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
82
- bizyengine-1.2.27.dist-info/top_level.txt,sha256=2zapzqxX-we5cRyJkGf9bd5JinRtXp3-_uDI-xCAnc0,11
83
- bizyengine-1.2.27.dist-info/RECORD,,
80
+ bizyengine-1.2.28.dist-info/METADATA,sha256=cmzaHXGfelwLTQvVs-T9dETqQ8N5Ji-Z034Bqwe7WAA,675
81
+ bizyengine-1.2.28.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
82
+ bizyengine-1.2.28.dist-info/top_level.txt,sha256=2zapzqxX-we5cRyJkGf9bd5JinRtXp3-_uDI-xCAnc0,11
83
+ bizyengine-1.2.28.dist-info/RECORD,,