comfy-ui-api-workflow 0.0.1__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.
- comfy_ui_api_workflow/__about__.py +1 -0
- comfy_ui_api_workflow/__init__.py +9 -0
- comfy_ui_api_workflow/_impl/__init__.py +0 -0
- comfy_ui_api_workflow/_impl/data_structure.py +182 -0
- comfy_ui_api_workflow/_impl/enums.py +13 -0
- comfy_ui_api_workflow/_impl/errors/__init__.py +3 -0
- comfy_ui_api_workflow/_impl/errors/data_structure.py +34 -0
- comfy_ui_api_workflow/_impl/errors/node.py +63 -0
- comfy_ui_api_workflow/_impl/errors/output.py +5 -0
- comfy_ui_api_workflow/_impl/errors/pipeline.py +14 -0
- comfy_ui_api_workflow/_impl/errors/workflow.py +13 -0
- comfy_ui_api_workflow/_impl/exceptions.py +22 -0
- comfy_ui_api_workflow/_impl/lazy.py +71 -0
- comfy_ui_api_workflow/_impl/nodes/__init__.py +3 -0
- comfy_ui_api_workflow/_impl/nodes/advanced/__init__.py +3 -0
- comfy_ui_api_workflow/_impl/nodes/advanced/debug.py +103 -0
- comfy_ui_api_workflow/_impl/nodes/advanced/guidance.py +281 -0
- comfy_ui_api_workflow/_impl/nodes/advanced/hooks/__init__.py +29 -0
- comfy_ui_api_workflow/_impl/nodes/advanced/hooks/clip.py +35 -0
- comfy_ui_api_workflow/_impl/nodes/advanced/hooks/combine.py +108 -0
- comfy_ui_api_workflow/_impl/nodes/advanced/hooks/cond_pair.py +203 -0
- comfy_ui_api_workflow/_impl/nodes/advanced/hooks/cond_single.py +143 -0
- comfy_ui_api_workflow/_impl/nodes/advanced/hooks/create.py +130 -0
- comfy_ui_api_workflow/_impl/nodes/advanced/hooks/scheduling.py +167 -0
- comfy_ui_api_workflow/_impl/nodes/advanced/multigpu.py +78 -0
- comfy_ui_api_workflow/_impl/nodes/audio.py +260 -0
- comfy_ui_api_workflow/_impl/nodes/base.py +214 -0
- comfy_ui_api_workflow/_impl/nodes/experimental/__init__.py +283 -0
- comfy_ui_api_workflow/_impl/nodes/experimental/attention_experiments.py +156 -0
- comfy_ui_api_workflow/_impl/nodes/experimental/stable_cascade.py +16 -0
- comfy_ui_api_workflow/_impl/nodes/image/__init__.py +601 -0
- comfy_ui_api_workflow/_impl/nodes/image/adjustments.py +46 -0
- comfy_ui_api_workflow/_impl/nodes/image/background_removal.py +16 -0
- comfy_ui_api_workflow/_impl/nodes/image/batch.py +236 -0
- comfy_ui_api_workflow/_impl/nodes/image/color.py +104 -0
- comfy_ui_api_workflow/_impl/nodes/image/compositing.py +128 -0
- comfy_ui_api_workflow/_impl/nodes/image/detection.py +689 -0
- comfy_ui_api_workflow/_impl/nodes/image/filters.py +215 -0
- comfy_ui_api_workflow/_impl/nodes/image/geometry_estimation.py +307 -0
- comfy_ui_api_workflow/_impl/nodes/image/mask.py +291 -0
- comfy_ui_api_workflow/_impl/nodes/image/post_processors.py +45 -0
- comfy_ui_api_workflow/_impl/nodes/image/pre_processors.py +13 -0
- comfy_ui_api_workflow/_impl/nodes/image/transform.py +385 -0
- comfy_ui_api_workflow/_impl/nodes/image/upscaling.py +188 -0
- comfy_ui_api_workflow/_impl/nodes/image/video.py +66 -0
- comfy_ui_api_workflow/_impl/nodes/model/__init__.py +3 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/__init__.py +395 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/ace.py +232 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/autoregressive.py +53 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/controlnet.py +153 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/cosmos.py +108 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/flux.py +121 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/gligen.py +57 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/hidream.py +31 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/hunyuan_3d.py +44 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/hunyuan_image.py +21 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/hunyuan_video.py +243 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/instructpix2pix.py +28 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/kandinsky.py +78 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/lotus.py +8 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/ltxv.py +504 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/lumina.py +39 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/minimax.py +110 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/minimax_music.py +53 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/photomaker.py +28 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/pixart.py +34 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/qwen_image.py +101 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/stable_audio.py +34 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/stable_cascade.py +16 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/stable_diffusion.py +141 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/stable_diffusion_upscaler.py +37 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/stable_video.py +63 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/stable_video_3d.py +53 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/stable_zero123.py +128 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/transform.py +341 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/trellis.py +168 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/triposplat.py +54 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/void.py +61 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/wan/__init__.py +184 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/wan/animate.py +255 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/wan/camera.py +150 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/wan/dancer.py +102 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/wan/fun_control.py +129 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/wan/fun_inpaint.py +68 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/wan/humo.py +63 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/wan/move.py +332 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/wan/phantom_subject.py +58 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/wan/scail.py +161 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/wan/sound.py +128 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/wan/vace.py +73 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/yue2.py +189 -0
- comfy_ui_api_workflow/_impl/nodes/model/conditioning/z_image.py +59 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/__init__.py +510 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/ace.py +49 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/advanced/__init__.py +210 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/advanced/operations.py +113 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/autoregressive.py +36 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/batch.py +93 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/chroma_radiance.py +28 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/cosmos.py +36 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/flux.py +28 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/hidream.py +28 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/hunyuan_3d.py +57 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/hunyuan_image.py +28 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/hunyuan_video.py +130 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/ltxv.py +162 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/minimax.py +28 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/minimax_music.py +25 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/mochi.py +36 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/qwen.py +36 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/seedvr.py +16 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/stable_cascade.py +60 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/stable_diffusion.py +28 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/transform.py +92 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/trellis.py +91 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/triposplat.py +86 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/void.py +54 -0
- comfy_ui_api_workflow/_impl/nodes/model/latent/yue2.py +25 -0
- comfy_ui_api_workflow/_impl/nodes/model/loaders.py +820 -0
- comfy_ui_api_workflow/_impl/nodes/model/merging/__init__.py +290 -0
- comfy_ui_api_workflow/_impl/nodes/model/merging/model_specific.py +4370 -0
- comfy_ui_api_workflow/_impl/nodes/model/patch/__init__.py +463 -0
- comfy_ui_api_workflow/_impl/nodes/model/patch/anima.py +53 -0
- comfy_ui_api_workflow/_impl/nodes/model/patch/chroma_radiance.py +50 -0
- comfy_ui_api_workflow/_impl/nodes/model/patch/flux.py +63 -0
- comfy_ui_api_workflow/_impl/nodes/model/patch/hidream.py +72 -0
- comfy_ui_api_workflow/_impl/nodes/model/patch/ltxv.py +125 -0
- comfy_ui_api_workflow/_impl/nodes/model/patch/minimax.py +92 -0
- comfy_ui_api_workflow/_impl/nodes/model/patch/qwen.py +57 -0
- comfy_ui_api_workflow/_impl/nodes/model/patch/sensenova.py +21 -0
- comfy_ui_api_workflow/_impl/nodes/model/patch/stable_cascade.py +21 -0
- comfy_ui_api_workflow/_impl/nodes/model/patch/stable_diffusion.py +21 -0
- comfy_ui_api_workflow/_impl/nodes/model/patch/supir.py +57 -0
- comfy_ui_api_workflow/_impl/nodes/model/patch/unet.py +281 -0
- comfy_ui_api_workflow/_impl/nodes/model/patch/wan.py +143 -0
- comfy_ui_api_workflow/_impl/nodes/model/sampling/__init__.py +228 -0
- comfy_ui_api_workflow/_impl/nodes/model/sampling/custom.py +123 -0
- comfy_ui_api_workflow/_impl/nodes/model/sampling/guiders.py +252 -0
- comfy_ui_api_workflow/_impl/nodes/model/sampling/noise.py +52 -0
- comfy_ui_api_workflow/_impl/nodes/model/sampling/samplers.py +531 -0
- comfy_ui_api_workflow/_impl/nodes/model/sampling/schedulers.py +462 -0
- comfy_ui_api_workflow/_impl/nodes/model/sampling/sigmas.py +163 -0
- comfy_ui_api_workflow/_impl/nodes/model/training.py +249 -0
- comfy_ui_api_workflow/_impl/nodes/partner/__init__.py +3 -0
- comfy_ui_api_workflow/_impl/nodes/partner/audio/__init__.py +3 -0
- comfy_ui_api_workflow/_impl/nodes/partner/audio/elevenlabs.py +47 -0
- comfy_ui_api_workflow/_impl/nodes/partner/image/__init__.py +3 -0
- comfy_ui_api_workflow/_impl/nodes/partner/image/bytedance.py +16 -0
- comfy_ui_api_workflow/_impl/nodes/partner/image/krea.py +31 -0
- comfy_ui_api_workflow/_impl/nodes/partner/image/luma.py +27 -0
- comfy_ui_api_workflow/_impl/nodes/partner/image/recraft.py +220 -0
- comfy_ui_api_workflow/_impl/nodes/partner/text/__init__.py +3 -0
- comfy_ui_api_workflow/_impl/nodes/partner/text/gemini.py +25 -0
- comfy_ui_api_workflow/_impl/nodes/partner/text/openai.py +77 -0
- comfy_ui_api_workflow/_impl/nodes/partner/video/__init__.py +3 -0
- comfy_ui_api_workflow/_impl/nodes/partner/video/bytedance.py +16 -0
- comfy_ui_api_workflow/_impl/nodes/partner/video/pixverse.py +27 -0
- comfy_ui_api_workflow/_impl/nodes/text.py +506 -0
- comfy_ui_api_workflow/_impl/nodes/three_d/__init__.py +563 -0
- comfy_ui_api_workflow/_impl/nodes/three_d/mesh.py +183 -0
- comfy_ui_api_workflow/_impl/nodes/three_d/splat.py +262 -0
- comfy_ui_api_workflow/_impl/nodes/three_d/texturing.py +254 -0
- comfy_ui_api_workflow/_impl/nodes/utilities/__init__.py +404 -0
- comfy_ui_api_workflow/_impl/nodes/utilities/logic.py +44 -0
- comfy_ui_api_workflow/_impl/nodes/utilities/primitive.py +107 -0
- comfy_ui_api_workflow/_impl/nodes/validation.py +126 -0
- comfy_ui_api_workflow/_impl/nodes/video/__init__.py +440 -0
- comfy_ui_api_workflow/_impl/nodes/video/batch.py +45 -0
- comfy_ui_api_workflow/_impl/nodes/video/preprocessors.py +24 -0
- comfy_ui_api_workflow/_impl/nodes/video/transform.py +52 -0
- comfy_ui_api_workflow/_impl/pipeline.py +67 -0
- comfy_ui_api_workflow/_impl/workflow.py +539 -0
- comfy_ui_api_workflow-0.0.1.dist-info/METADATA +123 -0
- comfy_ui_api_workflow-0.0.1.dist-info/RECORD +176 -0
- comfy_ui_api_workflow-0.0.1.dist-info/WHEEL +4 -0
- comfy_ui_api_workflow-0.0.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
from ..base import BaseNode
|
|
2
|
+
from ..validation import validate_bool, validate_range
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class SkipLayerGuidanceSD3(BaseNode):
|
|
6
|
+
__slots__ = ("model", "layers", "scale", "start_percent", "end_percent")
|
|
7
|
+
CATEGORY = "advanced/guidance"
|
|
8
|
+
OUTPUTS = {"MODEL": 0}
|
|
9
|
+
RETURN_TYPES = ("MODEL",)
|
|
10
|
+
INPUT_SOCKET_TYPES = {
|
|
11
|
+
"model": "MODEL",
|
|
12
|
+
"layers": "STRING",
|
|
13
|
+
"scale": "FLOAT",
|
|
14
|
+
"start_percent": "FLOAT",
|
|
15
|
+
"end_percent": "FLOAT",
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
def __init__(
|
|
19
|
+
self,
|
|
20
|
+
node_id: str,
|
|
21
|
+
model: tuple[str, int],
|
|
22
|
+
layers: str | tuple[str, int] = "7, 8, 9",
|
|
23
|
+
scale: float | tuple[str, int] = 3.0,
|
|
24
|
+
start_percent: float | tuple[str, int] = 0.01,
|
|
25
|
+
end_percent: float | tuple[str, int] = 0.15,
|
|
26
|
+
) -> None:
|
|
27
|
+
super().__init__(node_id=node_id)
|
|
28
|
+
self.model = model
|
|
29
|
+
self.layers = layers
|
|
30
|
+
self.scale = scale
|
|
31
|
+
self.start_percent = start_percent
|
|
32
|
+
self.end_percent = end_percent
|
|
33
|
+
self.__validate()
|
|
34
|
+
|
|
35
|
+
def __validate(self) -> None:
|
|
36
|
+
validate_range("scale", self.scale, 0.0, 10.0)
|
|
37
|
+
validate_range("start_percent", self.start_percent, 0.0, 1.0)
|
|
38
|
+
validate_range("end_percent", self.end_percent, 0.0, 1.0)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class SkipLayerGuidanceDiT(BaseNode):
|
|
42
|
+
__slots__ = (
|
|
43
|
+
"model",
|
|
44
|
+
"double_layers",
|
|
45
|
+
"single_layers",
|
|
46
|
+
"scale",
|
|
47
|
+
"start_percent",
|
|
48
|
+
"end_percent",
|
|
49
|
+
"rescaling_scale",
|
|
50
|
+
)
|
|
51
|
+
CATEGORY = "advanced/guidance"
|
|
52
|
+
OUTPUTS = {"MODEL": 0}
|
|
53
|
+
RETURN_TYPES = ("MODEL",)
|
|
54
|
+
INPUT_SOCKET_TYPES = {
|
|
55
|
+
"model": "MODEL",
|
|
56
|
+
"double_layers": "STRING",
|
|
57
|
+
"single_layers": "STRING",
|
|
58
|
+
"scale": "FLOAT",
|
|
59
|
+
"start_percent": "FLOAT",
|
|
60
|
+
"end_percent": "FLOAT",
|
|
61
|
+
"rescaling_scale": "FLOAT",
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
def __init__(
|
|
65
|
+
self,
|
|
66
|
+
node_id: str,
|
|
67
|
+
model: tuple[str, int],
|
|
68
|
+
double_layers: str | tuple[str, int] = "7, 8, 9",
|
|
69
|
+
single_layers: str | tuple[str, int] = "7, 8, 9",
|
|
70
|
+
scale: float | tuple[str, int] = 3.0,
|
|
71
|
+
start_percent: float | tuple[str, int] = 0.01,
|
|
72
|
+
end_percent: float | tuple[str, int] = 0.15,
|
|
73
|
+
rescaling_scale: float | tuple[str, int] = 0.0,
|
|
74
|
+
) -> None:
|
|
75
|
+
super().__init__(node_id=node_id)
|
|
76
|
+
self.model = model
|
|
77
|
+
self.double_layers = double_layers
|
|
78
|
+
self.single_layers = single_layers
|
|
79
|
+
self.scale = scale
|
|
80
|
+
self.start_percent = start_percent
|
|
81
|
+
self.end_percent = end_percent
|
|
82
|
+
self.rescaling_scale = rescaling_scale
|
|
83
|
+
self.__validate()
|
|
84
|
+
|
|
85
|
+
def __validate(self) -> None:
|
|
86
|
+
validate_range("scale", self.scale, 0.0, 10.0)
|
|
87
|
+
validate_range("start_percent", self.start_percent, 0.0, 1.0)
|
|
88
|
+
validate_range("end_percent", self.end_percent, 0.0, 1.0)
|
|
89
|
+
validate_range("rescaling_scale", self.rescaling_scale, 0.0, 10.0)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
class SkipLayerGuidanceDiTSimple(BaseNode):
|
|
93
|
+
__slots__ = (
|
|
94
|
+
"model",
|
|
95
|
+
"double_layers",
|
|
96
|
+
"single_layers",
|
|
97
|
+
"start_percent",
|
|
98
|
+
"end_percent",
|
|
99
|
+
)
|
|
100
|
+
CATEGORY = "advanced/guidance"
|
|
101
|
+
OUTPUTS = {"MODEL": 0}
|
|
102
|
+
RETURN_TYPES = ("MODEL",)
|
|
103
|
+
INPUT_SOCKET_TYPES = {
|
|
104
|
+
"model": "MODEL",
|
|
105
|
+
"double_layers": "STRING",
|
|
106
|
+
"single_layers": "STRING",
|
|
107
|
+
"start_percent": "FLOAT",
|
|
108
|
+
"end_percent": "FLOAT",
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
def __init__(
|
|
112
|
+
self,
|
|
113
|
+
node_id: str,
|
|
114
|
+
model: tuple[str, int],
|
|
115
|
+
double_layers: str | tuple[str, int] = "7, 8, 9",
|
|
116
|
+
single_layers: str | tuple[str, int] = "7, 8, 9",
|
|
117
|
+
start_percent: float | tuple[str, int] = 0.0,
|
|
118
|
+
end_percent: float | tuple[str, int] = 1.0,
|
|
119
|
+
) -> None:
|
|
120
|
+
super().__init__(node_id=node_id)
|
|
121
|
+
self.model = model
|
|
122
|
+
self.double_layers = double_layers
|
|
123
|
+
self.single_layers = single_layers
|
|
124
|
+
self.start_percent = start_percent
|
|
125
|
+
self.end_percent = end_percent
|
|
126
|
+
self.__validate()
|
|
127
|
+
|
|
128
|
+
def __validate(self) -> None:
|
|
129
|
+
validate_range("start_percent", self.start_percent, 0.0, 1.0)
|
|
130
|
+
validate_range("end_percent", self.end_percent, 0.0, 1.0)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
class LTXVModalityGuidance(BaseNode):
|
|
134
|
+
__slots__ = ("model", "modality_scale", "start_percent", "end_percent")
|
|
135
|
+
CATEGORY = "advanced/guidance"
|
|
136
|
+
OUTPUTS = {"MODEL": 0}
|
|
137
|
+
RETURN_TYPES = ("MODEL",)
|
|
138
|
+
INPUT_SOCKET_TYPES = {
|
|
139
|
+
"model": "MODEL",
|
|
140
|
+
"modality_scale": "FLOAT",
|
|
141
|
+
"start_percent": "FLOAT",
|
|
142
|
+
"end_percent": "FLOAT",
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
def __init__(
|
|
146
|
+
self,
|
|
147
|
+
node_id: str,
|
|
148
|
+
model: tuple[str, int],
|
|
149
|
+
modality_scale: float | tuple[str, int] = 3.0,
|
|
150
|
+
start_percent: float | tuple[str, int] = 0.0,
|
|
151
|
+
end_percent: float | tuple[str, int] = 1.0,
|
|
152
|
+
) -> None:
|
|
153
|
+
super().__init__(node_id=node_id)
|
|
154
|
+
self.model = model
|
|
155
|
+
self.modality_scale = modality_scale
|
|
156
|
+
self.start_percent = start_percent
|
|
157
|
+
self.end_percent = end_percent
|
|
158
|
+
self.__validate()
|
|
159
|
+
|
|
160
|
+
def __validate(self) -> None:
|
|
161
|
+
validate_range("modality_scale", self.modality_scale, 1.0, 100.0)
|
|
162
|
+
validate_range("start_percent", self.start_percent, 0.0, 1.0)
|
|
163
|
+
validate_range("end_percent", self.end_percent, 0.0, 1.0)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
class LTXVSpatioTemporalGuidance(BaseNode):
|
|
167
|
+
__slots__ = ("model", "scale", "blocks", "start_percent", "end_percent")
|
|
168
|
+
CATEGORY = "advanced/guidance"
|
|
169
|
+
OUTPUTS = {"MODEL": 0}
|
|
170
|
+
RETURN_TYPES = ("MODEL",)
|
|
171
|
+
INPUT_SOCKET_TYPES = {
|
|
172
|
+
"model": "MODEL",
|
|
173
|
+
"scale": "FLOAT",
|
|
174
|
+
"blocks": "STRING",
|
|
175
|
+
"start_percent": "FLOAT",
|
|
176
|
+
"end_percent": "FLOAT",
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
def __init__(
|
|
180
|
+
self,
|
|
181
|
+
node_id: str,
|
|
182
|
+
model: tuple[str, int],
|
|
183
|
+
scale: float | tuple[str, int] = 1.0,
|
|
184
|
+
blocks: str | tuple[str, int] = "29",
|
|
185
|
+
start_percent: float | tuple[str, int] = 0.0,
|
|
186
|
+
end_percent: float | tuple[str, int] = 1.0,
|
|
187
|
+
) -> None:
|
|
188
|
+
super().__init__(node_id=node_id)
|
|
189
|
+
self.model = model
|
|
190
|
+
self.scale = scale
|
|
191
|
+
self.blocks = blocks
|
|
192
|
+
self.start_percent = start_percent
|
|
193
|
+
self.end_percent = end_percent
|
|
194
|
+
self.__validate()
|
|
195
|
+
|
|
196
|
+
def __validate(self) -> None:
|
|
197
|
+
validate_range("scale", self.scale, 0.0, 100.0)
|
|
198
|
+
validate_range("start_percent", self.start_percent, 0.0, 1.0)
|
|
199
|
+
validate_range("end_percent", self.end_percent, 0.0, 1.0)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
class CFGZeroStar(BaseNode):
|
|
203
|
+
__slots__ = ("model",)
|
|
204
|
+
CATEGORY = "advanced/guidance"
|
|
205
|
+
OUTPUTS = {"patched_model": 0}
|
|
206
|
+
RETURN_TYPES = ("MODEL",)
|
|
207
|
+
INPUT_SOCKET_TYPES = {"model": "MODEL"}
|
|
208
|
+
|
|
209
|
+
def __init__(self, node_id: str, model: tuple[str, int]) -> None:
|
|
210
|
+
super().__init__(node_id=node_id)
|
|
211
|
+
self.model = model
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
class CFGNorm(BaseNode):
|
|
215
|
+
__slots__ = ("model", "strength", "pre_cfg")
|
|
216
|
+
CATEGORY = "advanced/guidance"
|
|
217
|
+
OUTPUTS = {"patched_model": 0}
|
|
218
|
+
RETURN_TYPES = ("MODEL",)
|
|
219
|
+
INPUT_SOCKET_TYPES = {"model": "MODEL", "strength": "FLOAT", "pre_cfg": "BOOLEAN"}
|
|
220
|
+
|
|
221
|
+
def __init__(
|
|
222
|
+
self,
|
|
223
|
+
node_id: str,
|
|
224
|
+
model: tuple[str, int],
|
|
225
|
+
strength: float | tuple[str, int] = 1.0,
|
|
226
|
+
pre_cfg: bool | tuple[str, int] = False,
|
|
227
|
+
) -> None:
|
|
228
|
+
super().__init__(node_id=node_id)
|
|
229
|
+
self.model = model
|
|
230
|
+
self.strength = strength
|
|
231
|
+
self.pre_cfg = pre_cfg
|
|
232
|
+
self.__validate()
|
|
233
|
+
|
|
234
|
+
def __validate(self) -> None:
|
|
235
|
+
validate_range("strength", self.strength, 0.0, 100.0)
|
|
236
|
+
validate_bool("pre_cfg", self.pre_cfg)
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
class TCFG(BaseNode):
|
|
240
|
+
__slots__ = ("model",)
|
|
241
|
+
CATEGORY = "advanced/guidance"
|
|
242
|
+
OUTPUTS = {"patched_model": 0}
|
|
243
|
+
RETURN_TYPES = ("MODEL",)
|
|
244
|
+
INPUT_SOCKET_TYPES = {"model": "MODEL"}
|
|
245
|
+
|
|
246
|
+
def __init__(self, node_id: str, model: tuple[str, int]) -> None:
|
|
247
|
+
super().__init__(node_id=node_id)
|
|
248
|
+
self.model = model
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
class NAGuidance(BaseNode):
|
|
252
|
+
__slots__ = ("model", "nag_scale", "nag_alpha", "nag_tau")
|
|
253
|
+
CATEGORY = "advanced/guidance"
|
|
254
|
+
OUTPUTS = {"MODEL": 0}
|
|
255
|
+
RETURN_TYPES = ("MODEL",)
|
|
256
|
+
INPUT_SOCKET_TYPES = {
|
|
257
|
+
"model": "MODEL",
|
|
258
|
+
"nag_scale": "FLOAT",
|
|
259
|
+
"nag_alpha": "FLOAT",
|
|
260
|
+
"nag_tau": "FLOAT",
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
def __init__(
|
|
264
|
+
self,
|
|
265
|
+
node_id: str,
|
|
266
|
+
model: tuple[str, int],
|
|
267
|
+
nag_scale: float | tuple[str, int] = 5.0,
|
|
268
|
+
nag_alpha: float | tuple[str, int] = 0.5,
|
|
269
|
+
nag_tau: float | tuple[str, int] = 1.5,
|
|
270
|
+
) -> None:
|
|
271
|
+
super().__init__(node_id=node_id)
|
|
272
|
+
self.model = model
|
|
273
|
+
self.nag_scale = nag_scale
|
|
274
|
+
self.nag_alpha = nag_alpha
|
|
275
|
+
self.nag_tau = nag_tau
|
|
276
|
+
self.__validate()
|
|
277
|
+
|
|
278
|
+
def __validate(self) -> None:
|
|
279
|
+
validate_range("nag_scale", self.nag_scale, 0.0, 50.0)
|
|
280
|
+
validate_range("nag_alpha", self.nag_alpha, 0.0, 1.0)
|
|
281
|
+
validate_range("nag_tau", self.nag_tau, 1.0, 10.0)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from ...base import BaseNode
|
|
2
|
+
from ...validation import validate_range
|
|
3
|
+
from ....lazy import submodules_of
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ConditioningTimestepsRange(BaseNode):
|
|
7
|
+
__slots__ = ("start_percent", "end_percent")
|
|
8
|
+
CATEGORY = "advanced/hooks"
|
|
9
|
+
OUTPUTS = {"TIMESTEPS_RANGE": 0, "BEFORE_RANGE": 1, "AFTER_RANGE": 2}
|
|
10
|
+
RETURN_TYPES = ("TIMESTEPS_RANGE", "TIMESTEPS_RANGE", "TIMESTEPS_RANGE")
|
|
11
|
+
INPUT_SOCKET_TYPES = {"start_percent": "FLOAT", "end_percent": "FLOAT"}
|
|
12
|
+
|
|
13
|
+
def __init__(
|
|
14
|
+
self,
|
|
15
|
+
node_id: str,
|
|
16
|
+
start_percent: float | tuple[str, int] = 0.0,
|
|
17
|
+
end_percent: float | tuple[str, int] = 1.0,
|
|
18
|
+
) -> None:
|
|
19
|
+
super().__init__(node_id=node_id)
|
|
20
|
+
self.start_percent = start_percent
|
|
21
|
+
self.end_percent = end_percent
|
|
22
|
+
self.__validate()
|
|
23
|
+
|
|
24
|
+
def __validate(self) -> None:
|
|
25
|
+
validate_range("start_percent", self.start_percent, 0.0, 1.0)
|
|
26
|
+
validate_range("end_percent", self.end_percent, 0.0, 1.0)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
__getattr__ = submodules_of(__name__)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from ...base import BaseNode
|
|
2
|
+
from ...validation import validate_bool
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class SetClipHooks(BaseNode):
|
|
6
|
+
__slots__ = ("clip", "apply_to_conds", "schedule_clip", "hooks")
|
|
7
|
+
CATEGORY = "advanced/hooks/clip"
|
|
8
|
+
OUTPUTS = {"CLIP": 0}
|
|
9
|
+
RETURN_TYPES = ("CLIP",)
|
|
10
|
+
INPUT_SOCKET_TYPES = {
|
|
11
|
+
"clip": "CLIP",
|
|
12
|
+
"apply_to_conds": "BOOLEAN",
|
|
13
|
+
"schedule_clip": "BOOLEAN",
|
|
14
|
+
"hooks": "HOOKS",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
def __init__(
|
|
18
|
+
self,
|
|
19
|
+
node_id: str,
|
|
20
|
+
clip: tuple[str, int],
|
|
21
|
+
apply_to_conds: bool | tuple[str, int] = True,
|
|
22
|
+
schedule_clip: bool | tuple[str, int] = False,
|
|
23
|
+
hooks: tuple[str, int] | None = None,
|
|
24
|
+
) -> None:
|
|
25
|
+
super().__init__(node_id=node_id)
|
|
26
|
+
self.clip = clip
|
|
27
|
+
self.apply_to_conds = apply_to_conds
|
|
28
|
+
self.schedule_clip = schedule_clip
|
|
29
|
+
if hooks is not None:
|
|
30
|
+
self.hooks = hooks
|
|
31
|
+
self.__validate()
|
|
32
|
+
|
|
33
|
+
def __validate(self) -> None:
|
|
34
|
+
validate_bool("apply_to_conds", self.apply_to_conds)
|
|
35
|
+
validate_bool("schedule_clip", self.schedule_clip)
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
from ...base import BaseNode
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class CombineHooks2(BaseNode):
|
|
5
|
+
__slots__ = ("hooks_A", "hooks_B")
|
|
6
|
+
CATEGORY = "advanced/hooks/combine"
|
|
7
|
+
OUTPUTS = {"HOOKS": 0}
|
|
8
|
+
RETURN_TYPES = ("HOOKS",)
|
|
9
|
+
INPUT_SOCKET_TYPES = {"hooks_A": "HOOKS", "hooks_B": "HOOKS"}
|
|
10
|
+
|
|
11
|
+
def __init__(
|
|
12
|
+
self,
|
|
13
|
+
node_id: str,
|
|
14
|
+
hooks_A: tuple[str, int] | None = None,
|
|
15
|
+
hooks_B: tuple[str, int] | None = None,
|
|
16
|
+
) -> None:
|
|
17
|
+
super().__init__(node_id=node_id)
|
|
18
|
+
if hooks_A is not None:
|
|
19
|
+
self.hooks_A = hooks_A
|
|
20
|
+
if hooks_B is not None:
|
|
21
|
+
self.hooks_B = hooks_B
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class CombineHooks4(BaseNode):
|
|
25
|
+
__slots__ = ("hooks_A", "hooks_B", "hooks_C", "hooks_D")
|
|
26
|
+
CATEGORY = "advanced/hooks/combine"
|
|
27
|
+
OUTPUTS = {"HOOKS": 0}
|
|
28
|
+
RETURN_TYPES = ("HOOKS",)
|
|
29
|
+
INPUT_SOCKET_TYPES = {
|
|
30
|
+
"hooks_A": "HOOKS",
|
|
31
|
+
"hooks_B": "HOOKS",
|
|
32
|
+
"hooks_C": "HOOKS",
|
|
33
|
+
"hooks_D": "HOOKS",
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
def __init__(
|
|
37
|
+
self,
|
|
38
|
+
node_id: str,
|
|
39
|
+
hooks_A: tuple[str, int] | None = None,
|
|
40
|
+
hooks_B: tuple[str, int] | None = None,
|
|
41
|
+
hooks_C: tuple[str, int] | None = None,
|
|
42
|
+
hooks_D: tuple[str, int] | None = None,
|
|
43
|
+
) -> None:
|
|
44
|
+
super().__init__(node_id=node_id)
|
|
45
|
+
if hooks_A is not None:
|
|
46
|
+
self.hooks_A = hooks_A
|
|
47
|
+
if hooks_B is not None:
|
|
48
|
+
self.hooks_B = hooks_B
|
|
49
|
+
if hooks_C is not None:
|
|
50
|
+
self.hooks_C = hooks_C
|
|
51
|
+
if hooks_D is not None:
|
|
52
|
+
self.hooks_D = hooks_D
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class CombineHooks8(BaseNode):
|
|
56
|
+
__slots__ = (
|
|
57
|
+
"hooks_A",
|
|
58
|
+
"hooks_B",
|
|
59
|
+
"hooks_C",
|
|
60
|
+
"hooks_D",
|
|
61
|
+
"hooks_E",
|
|
62
|
+
"hooks_F",
|
|
63
|
+
"hooks_G",
|
|
64
|
+
"hooks_H",
|
|
65
|
+
)
|
|
66
|
+
CATEGORY = "advanced/hooks/combine"
|
|
67
|
+
OUTPUTS = {"HOOKS": 0}
|
|
68
|
+
RETURN_TYPES = ("HOOKS",)
|
|
69
|
+
INPUT_SOCKET_TYPES = {
|
|
70
|
+
"hooks_A": "HOOKS",
|
|
71
|
+
"hooks_B": "HOOKS",
|
|
72
|
+
"hooks_C": "HOOKS",
|
|
73
|
+
"hooks_D": "HOOKS",
|
|
74
|
+
"hooks_E": "HOOKS",
|
|
75
|
+
"hooks_F": "HOOKS",
|
|
76
|
+
"hooks_G": "HOOKS",
|
|
77
|
+
"hooks_H": "HOOKS",
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
def __init__(
|
|
81
|
+
self,
|
|
82
|
+
node_id: str,
|
|
83
|
+
hooks_A: tuple[str, int] | None = None,
|
|
84
|
+
hooks_B: tuple[str, int] | None = None,
|
|
85
|
+
hooks_C: tuple[str, int] | None = None,
|
|
86
|
+
hooks_D: tuple[str, int] | None = None,
|
|
87
|
+
hooks_E: tuple[str, int] | None = None,
|
|
88
|
+
hooks_F: tuple[str, int] | None = None,
|
|
89
|
+
hooks_G: tuple[str, int] | None = None,
|
|
90
|
+
hooks_H: tuple[str, int] | None = None,
|
|
91
|
+
) -> None:
|
|
92
|
+
super().__init__(node_id=node_id)
|
|
93
|
+
if hooks_A is not None:
|
|
94
|
+
self.hooks_A = hooks_A
|
|
95
|
+
if hooks_B is not None:
|
|
96
|
+
self.hooks_B = hooks_B
|
|
97
|
+
if hooks_C is not None:
|
|
98
|
+
self.hooks_C = hooks_C
|
|
99
|
+
if hooks_D is not None:
|
|
100
|
+
self.hooks_D = hooks_D
|
|
101
|
+
if hooks_E is not None:
|
|
102
|
+
self.hooks_E = hooks_E
|
|
103
|
+
if hooks_F is not None:
|
|
104
|
+
self.hooks_F = hooks_F
|
|
105
|
+
if hooks_G is not None:
|
|
106
|
+
self.hooks_G = hooks_G
|
|
107
|
+
if hooks_H is not None:
|
|
108
|
+
self.hooks_H = hooks_H
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
from typing import Literal, get_args
|
|
2
|
+
|
|
3
|
+
from ...base import BaseNode
|
|
4
|
+
from ...validation import validate_choice, validate_range
|
|
5
|
+
|
|
6
|
+
PairConditioningSetProperties_Set_Cond_Areas = Literal["default", "mask bounds"]
|
|
7
|
+
PAIRCONDITIONINGSETPROPERTIES_SET_COND_AREAS = frozenset(
|
|
8
|
+
get_args(PairConditioningSetProperties_Set_Cond_Areas)
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class PairConditioningSetProperties(BaseNode):
|
|
13
|
+
__slots__ = (
|
|
14
|
+
"positive_NEW",
|
|
15
|
+
"negative_NEW",
|
|
16
|
+
"set_cond_area",
|
|
17
|
+
"strength",
|
|
18
|
+
"mask",
|
|
19
|
+
"hooks",
|
|
20
|
+
"timesteps",
|
|
21
|
+
)
|
|
22
|
+
CATEGORY = "advanced/hooks/cond pair"
|
|
23
|
+
OUTPUTS = {"positive": 0, "negative": 1}
|
|
24
|
+
RETURN_TYPES = ("CONDITIONING", "CONDITIONING")
|
|
25
|
+
INPUT_SOCKET_TYPES = {
|
|
26
|
+
"positive_NEW": "CONDITIONING",
|
|
27
|
+
"negative_NEW": "CONDITIONING",
|
|
28
|
+
"strength": "FLOAT",
|
|
29
|
+
"set_cond_area": "V1 COMBO",
|
|
30
|
+
"mask": "MASK",
|
|
31
|
+
"hooks": "HOOKS",
|
|
32
|
+
"timesteps": "TIMESTEPS_RANGE",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
def __init__(
|
|
36
|
+
self,
|
|
37
|
+
node_id: str,
|
|
38
|
+
positive_NEW: tuple[str, int],
|
|
39
|
+
negative_NEW: tuple[str, int],
|
|
40
|
+
set_cond_area: PairConditioningSetProperties_Set_Cond_Areas | tuple[str, int],
|
|
41
|
+
strength: float | tuple[str, int] = 1.0,
|
|
42
|
+
mask: tuple[str, int] | None = None,
|
|
43
|
+
hooks: tuple[str, int] | None = None,
|
|
44
|
+
timesteps: tuple[str, int] | None = None,
|
|
45
|
+
) -> None:
|
|
46
|
+
super().__init__(node_id=node_id)
|
|
47
|
+
self.positive_NEW = positive_NEW
|
|
48
|
+
self.negative_NEW = negative_NEW
|
|
49
|
+
self.set_cond_area = set_cond_area
|
|
50
|
+
self.strength = strength
|
|
51
|
+
if mask is not None:
|
|
52
|
+
self.mask = mask
|
|
53
|
+
if hooks is not None:
|
|
54
|
+
self.hooks = hooks
|
|
55
|
+
if timesteps is not None:
|
|
56
|
+
self.timesteps = timesteps
|
|
57
|
+
self.__validate()
|
|
58
|
+
|
|
59
|
+
def __validate(self) -> None:
|
|
60
|
+
validate_choice(
|
|
61
|
+
"set_cond_area",
|
|
62
|
+
self.set_cond_area,
|
|
63
|
+
PAIRCONDITIONINGSETPROPERTIES_SET_COND_AREAS,
|
|
64
|
+
)
|
|
65
|
+
validate_range("strength", self.strength, 0.0, 10.0)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
PairConditioningSetPropertiesAndCombine_Set_Cond_Areas = Literal[
|
|
69
|
+
"default", "mask bounds"
|
|
70
|
+
]
|
|
71
|
+
PAIRCONDITIONINGSETPROPERTIESANDCOMBINE_SET_COND_AREAS = frozenset(
|
|
72
|
+
get_args(PairConditioningSetPropertiesAndCombine_Set_Cond_Areas)
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class PairConditioningSetPropertiesAndCombine(BaseNode):
|
|
77
|
+
__slots__ = (
|
|
78
|
+
"positive",
|
|
79
|
+
"negative",
|
|
80
|
+
"positive_NEW",
|
|
81
|
+
"negative_NEW",
|
|
82
|
+
"set_cond_area",
|
|
83
|
+
"strength",
|
|
84
|
+
"mask",
|
|
85
|
+
"hooks",
|
|
86
|
+
"timesteps",
|
|
87
|
+
)
|
|
88
|
+
CATEGORY = "advanced/hooks/cond pair"
|
|
89
|
+
OUTPUTS = {"positive": 0, "negative": 1}
|
|
90
|
+
RETURN_TYPES = ("CONDITIONING", "CONDITIONING")
|
|
91
|
+
INPUT_SOCKET_TYPES = {
|
|
92
|
+
"positive": "CONDITIONING",
|
|
93
|
+
"negative": "CONDITIONING",
|
|
94
|
+
"positive_NEW": "CONDITIONING",
|
|
95
|
+
"negative_NEW": "CONDITIONING",
|
|
96
|
+
"strength": "FLOAT",
|
|
97
|
+
"set_cond_area": "V1 COMBO",
|
|
98
|
+
"mask": "MASK",
|
|
99
|
+
"hooks": "HOOKS",
|
|
100
|
+
"timesteps": "TIMESTEPS_RANGE",
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
def __init__(
|
|
104
|
+
self,
|
|
105
|
+
node_id: str,
|
|
106
|
+
positive: tuple[str, int],
|
|
107
|
+
negative: tuple[str, int],
|
|
108
|
+
positive_NEW: tuple[str, int],
|
|
109
|
+
negative_NEW: tuple[str, int],
|
|
110
|
+
set_cond_area: (
|
|
111
|
+
PairConditioningSetPropertiesAndCombine_Set_Cond_Areas | tuple[str, int]
|
|
112
|
+
),
|
|
113
|
+
strength: float | tuple[str, int] = 1.0,
|
|
114
|
+
mask: tuple[str, int] | None = None,
|
|
115
|
+
hooks: tuple[str, int] | None = None,
|
|
116
|
+
timesteps: tuple[str, int] | None = None,
|
|
117
|
+
) -> None:
|
|
118
|
+
super().__init__(node_id=node_id)
|
|
119
|
+
self.positive = positive
|
|
120
|
+
self.negative = negative
|
|
121
|
+
self.positive_NEW = positive_NEW
|
|
122
|
+
self.negative_NEW = negative_NEW
|
|
123
|
+
self.set_cond_area = set_cond_area
|
|
124
|
+
self.strength = strength
|
|
125
|
+
if mask is not None:
|
|
126
|
+
self.mask = mask
|
|
127
|
+
if hooks is not None:
|
|
128
|
+
self.hooks = hooks
|
|
129
|
+
if timesteps is not None:
|
|
130
|
+
self.timesteps = timesteps
|
|
131
|
+
self.__validate()
|
|
132
|
+
|
|
133
|
+
def __validate(self) -> None:
|
|
134
|
+
validate_choice(
|
|
135
|
+
"set_cond_area",
|
|
136
|
+
self.set_cond_area,
|
|
137
|
+
PAIRCONDITIONINGSETPROPERTIESANDCOMBINE_SET_COND_AREAS,
|
|
138
|
+
)
|
|
139
|
+
validate_range("strength", self.strength, 0.0, 10.0)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
class PairConditioningSetDefaultCombine(BaseNode):
|
|
143
|
+
__slots__ = (
|
|
144
|
+
"positive",
|
|
145
|
+
"negative",
|
|
146
|
+
"positive_DEFAULT",
|
|
147
|
+
"negative_DEFAULT",
|
|
148
|
+
"hooks",
|
|
149
|
+
)
|
|
150
|
+
CATEGORY = "advanced/hooks/cond pair"
|
|
151
|
+
OUTPUTS = {"positive": 0, "negative": 1}
|
|
152
|
+
RETURN_TYPES = ("CONDITIONING", "CONDITIONING")
|
|
153
|
+
INPUT_SOCKET_TYPES = {
|
|
154
|
+
"positive": "CONDITIONING",
|
|
155
|
+
"negative": "CONDITIONING",
|
|
156
|
+
"positive_DEFAULT": "CONDITIONING",
|
|
157
|
+
"negative_DEFAULT": "CONDITIONING",
|
|
158
|
+
"hooks": "HOOKS",
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
def __init__(
|
|
162
|
+
self,
|
|
163
|
+
node_id: str,
|
|
164
|
+
positive: tuple[str, int],
|
|
165
|
+
negative: tuple[str, int],
|
|
166
|
+
positive_DEFAULT: tuple[str, int],
|
|
167
|
+
negative_DEFAULT: tuple[str, int],
|
|
168
|
+
hooks: tuple[str, int] | None = None,
|
|
169
|
+
) -> None:
|
|
170
|
+
super().__init__(node_id=node_id)
|
|
171
|
+
self.positive = positive
|
|
172
|
+
self.negative = negative
|
|
173
|
+
self.positive_DEFAULT = positive_DEFAULT
|
|
174
|
+
self.negative_DEFAULT = negative_DEFAULT
|
|
175
|
+
if hooks is not None:
|
|
176
|
+
self.hooks = hooks
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
class PairConditioningCombine(BaseNode):
|
|
180
|
+
__slots__ = ("positive_A", "negative_A", "positive_B", "negative_B")
|
|
181
|
+
CATEGORY = "advanced/hooks/cond pair"
|
|
182
|
+
OUTPUTS = {"positive": 0, "negative": 1}
|
|
183
|
+
RETURN_TYPES = ("CONDITIONING", "CONDITIONING")
|
|
184
|
+
INPUT_SOCKET_TYPES = {
|
|
185
|
+
"positive_A": "CONDITIONING",
|
|
186
|
+
"negative_A": "CONDITIONING",
|
|
187
|
+
"positive_B": "CONDITIONING",
|
|
188
|
+
"negative_B": "CONDITIONING",
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
def __init__(
|
|
192
|
+
self,
|
|
193
|
+
node_id: str,
|
|
194
|
+
positive_A: tuple[str, int],
|
|
195
|
+
negative_A: tuple[str, int],
|
|
196
|
+
positive_B: tuple[str, int],
|
|
197
|
+
negative_B: tuple[str, int],
|
|
198
|
+
) -> None:
|
|
199
|
+
super().__init__(node_id=node_id)
|
|
200
|
+
self.positive_A = positive_A
|
|
201
|
+
self.negative_A = negative_A
|
|
202
|
+
self.positive_B = positive_B
|
|
203
|
+
self.negative_B = negative_B
|