bizyengine 0.4.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.
Files changed (76) hide show
  1. bizyengine/__init__.py +35 -0
  2. bizyengine/bizy_server/__init__.py +7 -0
  3. bizyengine/bizy_server/api_client.py +763 -0
  4. bizyengine/bizy_server/errno.py +122 -0
  5. bizyengine/bizy_server/error_handler.py +3 -0
  6. bizyengine/bizy_server/execution.py +55 -0
  7. bizyengine/bizy_server/resp.py +24 -0
  8. bizyengine/bizy_server/server.py +898 -0
  9. bizyengine/bizy_server/utils.py +93 -0
  10. bizyengine/bizyair_extras/__init__.py +24 -0
  11. bizyengine/bizyair_extras/nodes_advanced_refluxcontrol.py +62 -0
  12. bizyengine/bizyair_extras/nodes_cogview4.py +31 -0
  13. bizyengine/bizyair_extras/nodes_comfyui_detail_daemon.py +180 -0
  14. bizyengine/bizyair_extras/nodes_comfyui_instantid.py +164 -0
  15. bizyengine/bizyair_extras/nodes_comfyui_layerstyle_advance.py +141 -0
  16. bizyengine/bizyair_extras/nodes_comfyui_pulid_flux.py +88 -0
  17. bizyengine/bizyair_extras/nodes_controlnet.py +50 -0
  18. bizyengine/bizyair_extras/nodes_custom_sampler.py +130 -0
  19. bizyengine/bizyair_extras/nodes_dataset.py +99 -0
  20. bizyengine/bizyair_extras/nodes_differential_diffusion.py +16 -0
  21. bizyengine/bizyair_extras/nodes_flux.py +69 -0
  22. bizyengine/bizyair_extras/nodes_image_utils.py +93 -0
  23. bizyengine/bizyair_extras/nodes_ip2p.py +20 -0
  24. bizyengine/bizyair_extras/nodes_ipadapter_plus/__init__.py +1 -0
  25. bizyengine/bizyair_extras/nodes_ipadapter_plus/nodes_ipadapter_plus.py +1598 -0
  26. bizyengine/bizyair_extras/nodes_janus_pro.py +81 -0
  27. bizyengine/bizyair_extras/nodes_kolors_mz/__init__.py +86 -0
  28. bizyengine/bizyair_extras/nodes_model_advanced.py +62 -0
  29. bizyengine/bizyair_extras/nodes_sd3.py +52 -0
  30. bizyengine/bizyair_extras/nodes_segment_anything.py +256 -0
  31. bizyengine/bizyair_extras/nodes_segment_anything_utils.py +134 -0
  32. bizyengine/bizyair_extras/nodes_testing_utils.py +139 -0
  33. bizyengine/bizyair_extras/nodes_trellis.py +199 -0
  34. bizyengine/bizyair_extras/nodes_ultimatesdupscale.py +137 -0
  35. bizyengine/bizyair_extras/nodes_upscale_model.py +32 -0
  36. bizyengine/bizyair_extras/nodes_wan_video.py +49 -0
  37. bizyengine/bizyair_extras/oauth_callback/main.py +118 -0
  38. bizyengine/core/__init__.py +8 -0
  39. bizyengine/core/commands/__init__.py +1 -0
  40. bizyengine/core/commands/base.py +27 -0
  41. bizyengine/core/commands/invoker.py +4 -0
  42. bizyengine/core/commands/processors/model_hosting_processor.py +0 -0
  43. bizyengine/core/commands/processors/prompt_processor.py +123 -0
  44. bizyengine/core/commands/servers/model_server.py +0 -0
  45. bizyengine/core/commands/servers/prompt_server.py +234 -0
  46. bizyengine/core/common/__init__.py +8 -0
  47. bizyengine/core/common/caching.py +198 -0
  48. bizyengine/core/common/client.py +262 -0
  49. bizyengine/core/common/env_var.py +101 -0
  50. bizyengine/core/common/utils.py +93 -0
  51. bizyengine/core/configs/conf.py +112 -0
  52. bizyengine/core/configs/models.json +101 -0
  53. bizyengine/core/configs/models.yaml +329 -0
  54. bizyengine/core/data_types.py +20 -0
  55. bizyengine/core/image_utils.py +288 -0
  56. bizyengine/core/nodes_base.py +159 -0
  57. bizyengine/core/nodes_io.py +97 -0
  58. bizyengine/core/path_utils/__init__.py +9 -0
  59. bizyengine/core/path_utils/path_manager.py +276 -0
  60. bizyengine/core/path_utils/utils.py +34 -0
  61. bizyengine/misc/__init__.py +0 -0
  62. bizyengine/misc/auth.py +83 -0
  63. bizyengine/misc/llm.py +431 -0
  64. bizyengine/misc/mzkolors.py +93 -0
  65. bizyengine/misc/nodes.py +1208 -0
  66. bizyengine/misc/nodes_controlnet_aux.py +491 -0
  67. bizyengine/misc/nodes_controlnet_union_sdxl.py +171 -0
  68. bizyengine/misc/route_sam.py +60 -0
  69. bizyengine/misc/segment_anything.py +276 -0
  70. bizyengine/misc/supernode.py +182 -0
  71. bizyengine/misc/utils.py +218 -0
  72. bizyengine/version.txt +1 -0
  73. bizyengine-0.4.2.dist-info/METADATA +12 -0
  74. bizyengine-0.4.2.dist-info/RECORD +76 -0
  75. bizyengine-0.4.2.dist-info/WHEEL +5 -0
  76. bizyengine-0.4.2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,93 @@
1
+ import os
2
+ from pathlib import Path
3
+
4
+ from .errno import errnos
5
+ from .resp import ErrResponse
6
+
7
+ TYPE_OPTIONS = {
8
+ "LoRA": "LoRA",
9
+ "Controlnet": "Controlnet",
10
+ }
11
+
12
+ BASE_MODEL_TYPE_OPTIONS = {
13
+ "Flux.1 D": "Flux.1 D",
14
+ "SDXL": "SDXL",
15
+ "SD 1.5": "SD 1.5",
16
+ "SD 3.5": "SD 3.5",
17
+ "Pony": "Pony",
18
+ "Kolors": "Kolors",
19
+ "Hunyuan 1": "Hunyuan 1",
20
+ "Other": "Other",
21
+ }
22
+
23
+ ALLOW_TYPES = list(TYPE_OPTIONS.values())
24
+ ALLOW_BASE_MODEL_TYPES = list(BASE_MODEL_TYPE_OPTIONS.values())
25
+ ALLOW_UPLOADABLE_EXT_NAMES = [
26
+ ".safetensors",
27
+ ".pth",
28
+ ".bin",
29
+ ".pt",
30
+ ".ckpt",
31
+ ".gguf",
32
+ ".sft",
33
+ ]
34
+
35
+ current_path = os.path.abspath(os.path.dirname(__file__))
36
+
37
+
38
+ def get_html_content(filename: str):
39
+ html_file_path = Path(current_path) / filename
40
+ with open(html_file_path, "r", encoding="utf-8") as htmlfile:
41
+ html_content = htmlfile.read()
42
+ return html_content
43
+
44
+
45
+ def is_string_valid(s):
46
+ # 检查s是否已经被定义(即不是None)且不是空字符串
47
+ if s is not None and s != "":
48
+ return True
49
+ else:
50
+ return False
51
+
52
+
53
+ def to_slash(path):
54
+ return path.replace("\\", "/")
55
+
56
+
57
+ def check_str_param(json_data, param_name: str, err):
58
+ if param_name not in json_data:
59
+ return ErrResponse(err)
60
+ if not is_string_valid(json_data[param_name]):
61
+ return ErrResponse(err)
62
+ return None
63
+
64
+
65
+ def check_type(json_data):
66
+ if "type" not in json_data:
67
+ return ErrResponse(errnos.INVALID_TYPE)
68
+ if not is_string_valid(json_data["type"]) or (
69
+ json_data["type"] not in ALLOW_TYPES and json_data["type"] != "Workflow"
70
+ ):
71
+ return ErrResponse(errnos.INVALID_TYPE)
72
+ return None
73
+
74
+
75
+ def types():
76
+ types = []
77
+ for k, v in TYPE_OPTIONS.items():
78
+ types.append({"label": k, "value": v})
79
+ return types
80
+
81
+
82
+ def base_model_types():
83
+ base_model_types = []
84
+ for k, v in BASE_MODEL_TYPE_OPTIONS.items():
85
+ base_model_types.append({"label": k, "value": v})
86
+ return base_model_types
87
+
88
+
89
+ def is_allow_ext_name(local_file_name):
90
+ if not os.path.isfile(local_file_name):
91
+ return False
92
+ _, ext = os.path.splitext(local_file_name)
93
+ return ext.lower() in ALLOW_UPLOADABLE_EXT_NAMES
@@ -0,0 +1,24 @@
1
+ from .nodes_advanced_refluxcontrol import *
2
+ from .nodes_cogview4 import *
3
+ from .nodes_comfyui_detail_daemon import *
4
+ from .nodes_comfyui_instantid import *
5
+ from .nodes_comfyui_layerstyle_advance import *
6
+ from .nodes_comfyui_pulid_flux import *
7
+ from .nodes_controlnet import *
8
+ from .nodes_custom_sampler import *
9
+ from .nodes_dataset import *
10
+ from .nodes_differential_diffusion import *
11
+ from .nodes_flux import *
12
+ from .nodes_image_utils import *
13
+ from .nodes_ip2p import *
14
+ from .nodes_ipadapter_plus.nodes_ipadapter_plus import *
15
+ from .nodes_janus_pro import *
16
+ from .nodes_kolors_mz import *
17
+ from .nodes_model_advanced import *
18
+ from .nodes_sd3 import *
19
+ from .nodes_segment_anything import *
20
+ from .nodes_testing_utils import *
21
+ from .nodes_trellis import *
22
+ from .nodes_ultimatesdupscale import *
23
+ from .nodes_upscale_model import *
24
+ from .nodes_wan_video import *
@@ -0,0 +1,62 @@
1
+ """ComfyUI Advanced Redux Control
2
+ Reference: https://github.com/kaibioinfo/ComfyUI_AdvancedRefluxControl
3
+ """
4
+
5
+ from bizyengine.core import BizyAirBaseNode, data_types
6
+ from bizyengine.core.path_utils import path_manager as folder_paths
7
+
8
+ STRENGTHS = ["highest", "high", "medium", "low", "lowest"]
9
+ STRENGTHS_VALUES = [1, 2, 3, 4, 5]
10
+ IMAGE_MODES = ["center crop (square)", "keep aspect ratio", "autocrop with mask"]
11
+
12
+
13
+ class StyleModelApplySimple(BizyAirBaseNode):
14
+ @classmethod
15
+ def INPUT_TYPES(s):
16
+ return {
17
+ "required": {
18
+ "conditioning": (data_types.CONDITIONING,),
19
+ "style_model": (data_types.STYLE_MODEL,),
20
+ "clip_vision_output": ("CLIP_VISION_OUTPUT",),
21
+ "image_strength": (STRENGTHS, {"default": "medium"}),
22
+ }
23
+ }
24
+
25
+ RETURN_TYPES = (data_types.CONDITIONING,)
26
+ CATEGORY = "conditioning/style_model"
27
+ NODE_DISPLAY_NAME = "Apply style model (simple)"
28
+
29
+
30
+ class ReduxAdvanced(BizyAirBaseNode):
31
+ @classmethod
32
+ def INPUT_TYPES(s):
33
+ return {
34
+ "required": {
35
+ "conditioning": (data_types.CONDITIONING,),
36
+ "style_model": (data_types.STYLE_MODEL,),
37
+ "clip_vision": ("CLIP_VISION",),
38
+ "image": ("IMAGE",),
39
+ "downsampling_factor": ("INT", {"default": 3, "min": 1, "max": 9}),
40
+ "downsampling_function": (
41
+ ["nearest", "bilinear", "bicubic", "area", "nearest-exact"],
42
+ {"default": "area"},
43
+ ),
44
+ "mode": (IMAGE_MODES, {"default": "center crop (square)"}),
45
+ "weight": (
46
+ "FLOAT",
47
+ {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01},
48
+ ),
49
+ },
50
+ "optional": {
51
+ "mask": ("MASK",),
52
+ "autocrop_margin": (
53
+ "FLOAT",
54
+ {"default": 0.1, "min": 0.0, "max": 1.0, "step": 0.01},
55
+ ),
56
+ },
57
+ }
58
+
59
+ RETURN_TYPES = (data_types.CONDITIONING, "IMAGE", "MASK")
60
+ # FUNCTION = "apply_stylemodel"
61
+ NODE_DISPLAY_NAME = "Apply Redux model (advanced)"
62
+ CATEGORY = "conditioning/style_model"
@@ -0,0 +1,31 @@
1
+ from bizyengine.core import BizyAirBaseNode
2
+
3
+
4
+ class CogView4_6B_Pipe(BizyAirBaseNode):
5
+ @classmethod
6
+ def INPUT_TYPES(self):
7
+ default_prompt = "A vibrant cherry red sports car sits proudly under the gleaming sun, its polished exterior smooth and flawless, casting a mirror-like reflection. The car features a low, aerodynamic body, angular headlights that gaze forward like predatory eyes, and a set of black, high-gloss racing rims that contrast starkly with the red. A subtle hint of chrome embellishes the grille and exhaust, while the tinted windows suggest a luxurious and private interior. The scene conveys a sense of speed and elegance, the car appearing as if it's about to burst into a sprint along a coastal road, with the ocean's azure waves crashing in the background.The license plate number of the car is 'CogView4'. The car sprinted along a coastal road, with the same sports car printed on the roadside billboard and large Chinese text '遥遥领先' written to it. The text was yellow, with thick strokes and heavy shadow lines."
8
+ return {
9
+ "required": {
10
+ "prompt": ("STRING", {"default": default_prompt, "multiline": True}),
11
+ "seed": ("INT", {"default": 0, "min": 0, "max": 1e14}),
12
+ "guidance_scale": (
13
+ "FLOAT",
14
+ {"default": 3.5, "min": 0.1, "max": 100, "step": 0.1},
15
+ ),
16
+ "num_images_per_prompt": (
17
+ "INT",
18
+ {"default": 1, "min": 1, "max": 4, "step": 1},
19
+ ),
20
+ "num_inference_steps": (
21
+ "INT",
22
+ {"default": 30, "min": 1, "max": 100, "step": 1},
23
+ ),
24
+ "width": ("INT", {"default": 1536, "min": 16, "max": 4096, "step": 16}),
25
+ "height": ("INT", {"default": 832, "min": 16, "max": 4096, "step": 16}),
26
+ }
27
+ }
28
+
29
+ RETURN_TYPES = ("IMAGE",)
30
+ RETURN_NAMES = ("image",)
31
+ CATEGORY = "CogView4 Wrapper"
@@ -0,0 +1,180 @@
1
+ """
2
+ Reference: https://github.com/Jonseed/ComfyUI-Detail-Daemon
3
+ """
4
+
5
+ from bizyengine.core import BizyAirBaseNode
6
+
7
+
8
+ class DetailDaemonSamplerNode(BizyAirBaseNode):
9
+ DESCRIPTION = "This sampler wrapper works by adjusting the sigma passed to the model, while the rest of sampling stays the same."
10
+ CATEGORY = "sampling/custom_sampling/samplers"
11
+ RETURN_TYPES = ("SAMPLER",)
12
+ # FUNCTION = "go"
13
+
14
+ NODE_DISPLAY_NAME = "Detail Daemon Sampler"
15
+
16
+ @classmethod
17
+ def INPUT_TYPES(cls) -> dict:
18
+ return {
19
+ "required": {
20
+ "sampler": ("SAMPLER",),
21
+ "detail_amount": (
22
+ "FLOAT",
23
+ {"default": 0.1, "min": -5.0, "max": 5.0, "step": 0.01},
24
+ ),
25
+ "start": (
26
+ "FLOAT",
27
+ {"default": 0.2, "min": 0.0, "max": 1.0, "step": 0.01},
28
+ ),
29
+ "end": (
30
+ "FLOAT",
31
+ {"default": 0.8, "min": 0.0, "max": 1.0, "step": 0.01},
32
+ ),
33
+ "bias": (
34
+ "FLOAT",
35
+ {"default": 0.5, "min": 0.0, "max": 1.0, "step": 0.01},
36
+ ),
37
+ "exponent": (
38
+ "FLOAT",
39
+ {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.05},
40
+ ),
41
+ "start_offset": (
42
+ "FLOAT",
43
+ {"default": 0.0, "min": -1.0, "max": 1.0, "step": 0.01},
44
+ ),
45
+ "end_offset": (
46
+ "FLOAT",
47
+ {"default": 0.0, "min": -1.0, "max": 1.0, "step": 0.01},
48
+ ),
49
+ "fade": (
50
+ "FLOAT",
51
+ {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.05},
52
+ ),
53
+ "smooth": ("BOOLEAN", {"default": True}),
54
+ "cfg_scale_override": (
55
+ "FLOAT",
56
+ {
57
+ "default": 0,
58
+ "min": 0.0,
59
+ "max": 100.0,
60
+ "step": 0.5,
61
+ "round": 0.01,
62
+ "tooltip": "If set to 0, the sampler will automatically determine the CFG scale (if possible). Set to some other value to override.",
63
+ },
64
+ ),
65
+ },
66
+ }
67
+
68
+
69
+ class MultiplySigmas(BizyAirBaseNode):
70
+ # FUNCTION = "simple_output"
71
+ RETURN_TYPES = ("SIGMAS",)
72
+ CATEGORY = "sampling/custom_sampling/sigmas"
73
+ NODE_DISPLAY_NAME = "Multiply Sigmas (stateless)"
74
+
75
+ @classmethod
76
+ def INPUT_TYPES(cls) -> dict:
77
+ return {
78
+ "required": {
79
+ "sigmas": ("SIGMAS", {"forceInput": True}),
80
+ "factor": (
81
+ "FLOAT",
82
+ {"default": 1, "min": 0, "max": 100, "step": 0.001},
83
+ ),
84
+ "start": ("FLOAT", {"default": 0, "min": 0, "max": 1, "step": 0.001}),
85
+ "end": ("FLOAT", {"default": 1, "min": 0, "max": 1, "step": 0.001}),
86
+ }
87
+ }
88
+
89
+
90
+ class LyingSigmaSampler(BizyAirBaseNode):
91
+ CATEGORY = "sampling/custom_sampling"
92
+ RETURN_TYPES = ("SAMPLER",)
93
+ NODE_DISPLAY_NAME = "Lying Sigma Sampler"
94
+ # FUNCTION = "go"
95
+
96
+ @classmethod
97
+ def INPUT_TYPES(cls) -> dict:
98
+ return {
99
+ "required": {
100
+ "sampler": ("SAMPLER",),
101
+ "dishonesty_factor": (
102
+ "FLOAT",
103
+ {
104
+ "default": -0.05,
105
+ "min": -0.999,
106
+ "step": 0.01,
107
+ "tooltip": "Multiplier for sigmas passed to the model. -0.05 means we reduce the sigma by 5%.",
108
+ },
109
+ ),
110
+ },
111
+ "optional": {
112
+ "start_percent": (
113
+ "FLOAT",
114
+ {"default": 0.1, "min": 0.0, "max": 1.0, "step": 0.01},
115
+ ),
116
+ "end_percent": (
117
+ "FLOAT",
118
+ {"default": 0.9, "min": 0.0, "max": 1.0, "step": 0.01},
119
+ ),
120
+ },
121
+ }
122
+
123
+
124
+ class DetailDaemonGraphSigmasNode(BizyAirBaseNode):
125
+ RETURN_TYPES = ()
126
+ OUTPUT_NODE = True
127
+ CATEGORY = "sampling/custom_sampling/sigmas"
128
+ NODE_DISPLAY_NAME = "Detail Daemon Graph Sigmas"
129
+ # FUNCTION = "make_graph"
130
+
131
+ @classmethod
132
+ def INPUT_TYPES(cls):
133
+ return {
134
+ "required": {
135
+ "sigmas": ("SIGMAS", {"forceInput": True}),
136
+ "detail_amount": (
137
+ "FLOAT",
138
+ {"default": 0.1, "min": -5.0, "max": 5.0, "step": 0.01},
139
+ ),
140
+ "start": (
141
+ "FLOAT",
142
+ {"default": 0.2, "min": 0.0, "max": 1.0, "step": 0.01},
143
+ ),
144
+ "end": (
145
+ "FLOAT",
146
+ {"default": 0.8, "min": 0.0, "max": 1.0, "step": 0.01},
147
+ ),
148
+ "bias": (
149
+ "FLOAT",
150
+ {"default": 0.5, "min": 0.0, "max": 1.0, "step": 0.01},
151
+ ),
152
+ "exponent": (
153
+ "FLOAT",
154
+ {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.05},
155
+ ),
156
+ "start_offset": (
157
+ "FLOAT",
158
+ {"default": 0.0, "min": -1.0, "max": 1.0, "step": 0.01},
159
+ ),
160
+ "end_offset": (
161
+ "FLOAT",
162
+ {"default": 0.0, "min": -1.0, "max": 1.0, "step": 0.01},
163
+ ),
164
+ "fade": (
165
+ "FLOAT",
166
+ {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.05},
167
+ ),
168
+ "smooth": ("BOOLEAN", {"default": True}),
169
+ "cfg_scale": (
170
+ "FLOAT",
171
+ {
172
+ "default": 1.0,
173
+ "min": 0.0,
174
+ "max": 100.0,
175
+ "step": 0.5,
176
+ "round": 0.01,
177
+ },
178
+ ),
179
+ },
180
+ }
@@ -0,0 +1,164 @@
1
+ from bizyengine.core import BizyAirBaseNode, data_types
2
+ from bizyengine.core.path_utils import path_manager as folder_paths
3
+
4
+
5
+ class InstantIDModelLoader(BizyAirBaseNode):
6
+ @classmethod
7
+ def INPUT_TYPES(s):
8
+ return {
9
+ "required": {
10
+ "instantid_file": (folder_paths.get_filename_list("instantid"),)
11
+ }
12
+ }
13
+
14
+ RETURN_TYPES = (data_types.INSTANTID,)
15
+ FUNCTION = "default_function"
16
+ CATEGORY = "InstantID"
17
+ NODE_DISPLAY_NAME = "Load InstantID Model"
18
+
19
+
20
+ class ApplyInstantID(BizyAirBaseNode):
21
+ @classmethod
22
+ def INPUT_TYPES(s):
23
+ return {
24
+ "required": {
25
+ "instantid": (data_types.INSTANTID,),
26
+ "insightface": (data_types.FACEANALYSIS,),
27
+ "control_net": (data_types.CONTROL_NET,),
28
+ "image": ("IMAGE",),
29
+ "model": (data_types.MODEL,),
30
+ "positive": (data_types.CONDITIONING,),
31
+ "negative": (data_types.CONDITIONING,),
32
+ "weight": (
33
+ "FLOAT",
34
+ {
35
+ "default": 0.8,
36
+ "min": 0.0,
37
+ "max": 5.0,
38
+ "step": 0.01,
39
+ },
40
+ ),
41
+ "start_at": (
42
+ "FLOAT",
43
+ {
44
+ "default": 0.0,
45
+ "min": 0.0,
46
+ "max": 1.0,
47
+ "step": 0.001,
48
+ },
49
+ ),
50
+ "end_at": (
51
+ "FLOAT",
52
+ {
53
+ "default": 1.0,
54
+ "min": 0.0,
55
+ "max": 1.0,
56
+ "step": 0.001,
57
+ },
58
+ ),
59
+ },
60
+ "optional": {
61
+ "image_kps": ("IMAGE",),
62
+ "mask": ("MASK",),
63
+ },
64
+ }
65
+
66
+ RETURN_TYPES = (
67
+ data_types.MODEL,
68
+ data_types.CONDITIONING,
69
+ data_types.CONDITIONING,
70
+ )
71
+ RETURN_NAMES = (
72
+ "MODEL",
73
+ "positive",
74
+ "negative",
75
+ )
76
+ # FUNCTION = "apply_instantid" use default_function
77
+ CATEGORY = "InstantID"
78
+ NODE_DISPLAY_NAME = "Apply InstantID"
79
+
80
+
81
+ class ApplyInstantIDAdvanced(ApplyInstantID):
82
+ NODE_DISPLAY_NAME = "Apply InstantID Adavanced"
83
+
84
+ @classmethod
85
+ def INPUT_TYPES(s):
86
+ return {
87
+ "required": {
88
+ "instantid": (data_types.INSTANTID,),
89
+ "insightface": (data_types.FACEANALYSIS,),
90
+ "control_net": (data_types.CONTROL_NET,),
91
+ "image": ("IMAGE",),
92
+ "model": (data_types.MODEL,),
93
+ "positive": (data_types.CONDITIONING,),
94
+ "negative": (data_types.CONDITIONING,),
95
+ "ip_weight": (
96
+ "FLOAT",
97
+ {
98
+ "default": 0.8,
99
+ "min": 0.0,
100
+ "max": 3.0,
101
+ "step": 0.01,
102
+ },
103
+ ),
104
+ "cn_strength": (
105
+ "FLOAT",
106
+ {
107
+ "default": 0.8,
108
+ "min": 0.0,
109
+ "max": 10.0,
110
+ "step": 0.01,
111
+ },
112
+ ),
113
+ "start_at": (
114
+ "FLOAT",
115
+ {
116
+ "default": 0.0,
117
+ "min": 0.0,
118
+ "max": 1.0,
119
+ "step": 0.001,
120
+ },
121
+ ),
122
+ "end_at": (
123
+ "FLOAT",
124
+ {
125
+ "default": 1.0,
126
+ "min": 0.0,
127
+ "max": 1.0,
128
+ "step": 0.001,
129
+ },
130
+ ),
131
+ "noise": (
132
+ "FLOAT",
133
+ {
134
+ "default": 0.0,
135
+ "min": 0.0,
136
+ "max": 1.0,
137
+ "step": 0.1,
138
+ },
139
+ ),
140
+ "combine_embeds": (
141
+ ["average", "norm average", "concat"],
142
+ {"default": "average"},
143
+ ),
144
+ },
145
+ "optional": {
146
+ "image_kps": ("IMAGE",),
147
+ "mask": ("MASK",),
148
+ },
149
+ }
150
+
151
+
152
+ class InstantIDFaceAnalysis(BizyAirBaseNode):
153
+ @classmethod
154
+ def INPUT_TYPES(s):
155
+ return {
156
+ "required": {
157
+ "provider": (["CUDA"],),
158
+ },
159
+ }
160
+
161
+ RETURN_TYPES = (data_types.FACEANALYSIS,)
162
+ # FUNCTION = "load_insight_face"
163
+ CATEGORY = "InstantID"
164
+ NODE_DISPLAY_NAME = "InstantID Face Analysis"