vectorvein 0.3.1__py3-none-any.whl → 0.3.3__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 (43) hide show
  1. vectorvein/api/client.py +81 -103
  2. vectorvein/api/exceptions.py +1 -3
  3. vectorvein/api/models.py +11 -11
  4. vectorvein/chat_clients/anthropic_client.py +157 -169
  5. vectorvein/chat_clients/base_client.py +257 -198
  6. vectorvein/chat_clients/openai_compatible_client.py +150 -161
  7. vectorvein/chat_clients/utils.py +44 -24
  8. vectorvein/server/token_server.py +1 -1
  9. vectorvein/settings/__init__.py +27 -27
  10. vectorvein/types/defaults.py +32 -16
  11. vectorvein/types/llm_parameters.py +40 -34
  12. vectorvein/types/settings.py +10 -10
  13. vectorvein/utilities/media_processing.py +1 -1
  14. vectorvein/utilities/rate_limiter.py +5 -6
  15. vectorvein/utilities/retry.py +6 -5
  16. vectorvein/workflow/graph/edge.py +3 -3
  17. vectorvein/workflow/graph/node.py +14 -26
  18. vectorvein/workflow/graph/port.py +40 -39
  19. vectorvein/workflow/graph/workflow.py +13 -25
  20. vectorvein/workflow/nodes/audio_generation.py +5 -7
  21. vectorvein/workflow/nodes/control_flows.py +7 -9
  22. vectorvein/workflow/nodes/file_processing.py +4 -6
  23. vectorvein/workflow/nodes/image_generation.py +20 -22
  24. vectorvein/workflow/nodes/llms.py +13 -15
  25. vectorvein/workflow/nodes/media_editing.py +26 -40
  26. vectorvein/workflow/nodes/media_processing.py +19 -21
  27. vectorvein/workflow/nodes/output.py +10 -12
  28. vectorvein/workflow/nodes/relational_db.py +3 -5
  29. vectorvein/workflow/nodes/text_processing.py +8 -10
  30. vectorvein/workflow/nodes/tools.py +8 -10
  31. vectorvein/workflow/nodes/triggers.py +1 -3
  32. vectorvein/workflow/nodes/vector_db.py +3 -5
  33. vectorvein/workflow/nodes/video_generation.py +4 -6
  34. vectorvein/workflow/nodes/web_crawlers.py +4 -6
  35. vectorvein/workflow/utils/analyse.py +5 -13
  36. vectorvein/workflow/utils/check.py +6 -16
  37. vectorvein/workflow/utils/json_to_code.py +6 -14
  38. vectorvein/workflow/utils/layout.py +3 -5
  39. {vectorvein-0.3.1.dist-info → vectorvein-0.3.3.dist-info}/METADATA +1 -1
  40. vectorvein-0.3.3.dist-info/RECORD +68 -0
  41. {vectorvein-0.3.1.dist-info → vectorvein-0.3.3.dist-info}/WHEEL +1 -1
  42. vectorvein-0.3.1.dist-info/RECORD +0 -68
  43. {vectorvein-0.3.1.dist-info → vectorvein-0.3.3.dist-info}/entry_points.txt +0 -0
@@ -1,11 +1,9 @@
1
- from typing import Optional
2
-
3
1
  from ..graph.node import Node
4
2
  from ..graph.port import PortType, InputPort, OutputPort
5
3
 
6
4
 
7
5
  class BackgroundGeneration(Node):
8
- def __init__(self, id: Optional[str] = None):
6
+ def __init__(self, id: str | None = None):
9
7
  super().__init__(
10
8
  node_type="BackgroundGeneration",
11
9
  category="image_generation",
@@ -15,7 +13,7 @@ class BackgroundGeneration(Node):
15
13
  "base_image_url": InputPort(
16
14
  name="base_image_url",
17
15
  port_type=PortType.FILE,
18
- value=list(),
16
+ value=[],
19
17
  support_file_types=[".jpg", ".jpeg", ".png", ".webp"],
20
18
  multiple=True,
21
19
  show=True,
@@ -40,7 +38,7 @@ class BackgroundGeneration(Node):
40
38
  "ref_image_url": InputPort(
41
39
  name="ref_image_url",
42
40
  port_type=PortType.FILE,
43
- value=list(),
41
+ value=[],
44
42
  support_file_types=[".jpg", ".jpeg", ".png", ".webp"],
45
43
  multiple=True,
46
44
  ),
@@ -104,7 +102,7 @@ class BackgroundGeneration(Node):
104
102
 
105
103
 
106
104
  class DallE(Node):
107
- def __init__(self, id: Optional[str] = None):
105
+ def __init__(self, id: str | None = None):
108
106
  super().__init__(
109
107
  node_type="DallE",
110
108
  category="image_generation",
@@ -169,7 +167,7 @@ class DallE(Node):
169
167
 
170
168
 
171
169
  class Flux1(Node):
172
- def __init__(self, id: Optional[str] = None):
170
+ def __init__(self, id: str | None = None):
173
171
  super().__init__(
174
172
  node_type="Flux1",
175
173
  category="image_generation",
@@ -185,7 +183,7 @@ class Flux1(Node):
185
183
  "input_image": InputPort(
186
184
  name="input_image",
187
185
  port_type=PortType.FILE,
188
- value=list(),
186
+ value=[],
189
187
  support_file_types=[".jpg", ".jpeg", ".png", ".webp"],
190
188
  multiple=True,
191
189
  show=True,
@@ -272,7 +270,7 @@ class Flux1(Node):
272
270
 
273
271
 
274
272
  class Inpainting(Node):
275
- def __init__(self, id: Optional[str] = None):
273
+ def __init__(self, id: str | None = None):
276
274
  super().__init__(
277
275
  node_type="Inpainting",
278
276
  category="image_generation",
@@ -282,7 +280,7 @@ class Inpainting(Node):
282
280
  "input_image": InputPort(
283
281
  name="input_image",
284
282
  port_type=PortType.FILE,
285
- value=list(),
283
+ value=[],
286
284
  support_file_types=[".jpg", ".jpeg", ".png", ".webp"],
287
285
  multiple=True,
288
286
  show=True,
@@ -299,7 +297,7 @@ class Inpainting(Node):
299
297
  "mask_image": InputPort(
300
298
  name="mask_image",
301
299
  port_type=PortType.FILE,
302
- value=list(),
300
+ value=[],
303
301
  support_file_types=[".jpg", ".jpeg", ".png", ".webp"],
304
302
  condition="return fieldsData.inpainting_method.value === 'custom'",
305
303
  condition_python=lambda ports: ports["inpainting_method"].value == "custom",
@@ -340,7 +338,7 @@ class Inpainting(Node):
340
338
 
341
339
 
342
340
  class Kolors(Node):
343
- def __init__(self, id: Optional[str] = None):
341
+ def __init__(self, id: str | None = None):
344
342
  super().__init__(
345
343
  node_type="Kolors",
346
344
  category="image_generation",
@@ -408,7 +406,7 @@ class Kolors(Node):
408
406
 
409
407
 
410
408
  class Pulid(Node):
411
- def __init__(self, id: Optional[str] = None):
409
+ def __init__(self, id: str | None = None):
412
410
  super().__init__(
413
411
  node_type="Pulid",
414
412
  category="image_generation",
@@ -418,7 +416,7 @@ class Pulid(Node):
418
416
  "reference_image": InputPort(
419
417
  name="reference_image",
420
418
  port_type=PortType.FILE,
421
- value=list(),
419
+ value=[],
422
420
  support_file_types=[".jpg", ".jpeg", ".png", ".webp"],
423
421
  multiple=True,
424
422
  show=True,
@@ -514,7 +512,7 @@ class Pulid(Node):
514
512
 
515
513
 
516
514
  class Recraft(Node):
517
- def __init__(self, id: Optional[str] = None):
515
+ def __init__(self, id: str | None = None):
518
516
  super().__init__(
519
517
  node_type="Recraft",
520
518
  category="image_generation",
@@ -533,7 +531,7 @@ class Recraft(Node):
533
531
  "image_url": InputPort(
534
532
  name="image_url",
535
533
  port_type=PortType.FILE,
536
- value=list(),
534
+ value=[],
537
535
  support_file_types=[".jpg", ".jpeg", ".png", ".webp"],
538
536
  multiple=True,
539
537
  condition="return fieldsData.generation_type.value === 'image_to_vector'",
@@ -641,7 +639,7 @@ class Recraft(Node):
641
639
  "colors": InputPort(
642
640
  name="colors",
643
641
  port_type=PortType.COLOR,
644
- value=list(),
642
+ value=[],
645
643
  multiple=True,
646
644
  condition="return fieldsData.generation_type.value === 'text_to_image'",
647
645
  condition_python=lambda ports: ports["generation_type"].value == "text_to_image",
@@ -649,7 +647,7 @@ class Recraft(Node):
649
647
  "background_color": InputPort(
650
648
  name="background_color",
651
649
  port_type=PortType.COLOR,
652
- value=list(),
650
+ value=[],
653
651
  multiple=True,
654
652
  max_count=1,
655
653
  condition="return fieldsData.generation_type.value === 'text_to_image'",
@@ -671,7 +669,7 @@ class Recraft(Node):
671
669
 
672
670
 
673
671
  class GptImage(Node):
674
- def __init__(self, id: Optional[str] = None):
672
+ def __init__(self, id: str | None = None):
675
673
  super().__init__(
676
674
  node_type="GptImage",
677
675
  category="image_generation",
@@ -704,7 +702,7 @@ class GptImage(Node):
704
702
  "image": InputPort(
705
703
  name="image",
706
704
  port_type=PortType.FILE,
707
- value=list(),
705
+ value=[],
708
706
  support_file_types=[".jpg", ".jpeg", ".png", ".webp"],
709
707
  multiple=False,
710
708
  condition="return fieldsData.action.value === 'edit'",
@@ -713,7 +711,7 @@ class GptImage(Node):
713
711
  "mask": InputPort(
714
712
  name="mask",
715
713
  port_type=PortType.FILE,
716
- value=list(),
714
+ value=[],
717
715
  support_file_types=[".png"],
718
716
  condition="return fieldsData.action.value === 'edit'",
719
717
  condition_python=lambda ports: ports["action"].value == "edit",
@@ -772,7 +770,7 @@ class GptImage(Node):
772
770
 
773
771
 
774
772
  class StableDiffusion(Node):
775
- def __init__(self, id: Optional[str] = None):
773
+ def __init__(self, id: str | None = None):
776
774
  special_width_height_models = [
777
775
  "stable-diffusion-xl-1024-v0-9",
778
776
  "stable-diffusion-xl-1024-v1-0",
@@ -1,11 +1,9 @@
1
- from typing import Optional
2
-
3
1
  from ..graph.node import Node
4
2
  from ..graph.port import PortType, InputPort, OutputPort
5
3
 
6
4
 
7
5
  class AliyunQwen(Node):
8
- def __init__(self, id: Optional[str] = None):
6
+ def __init__(self, id: str | None = None):
9
7
  super().__init__(
10
8
  node_type="AliyunQwen",
11
9
  category="llms",
@@ -83,7 +81,7 @@ class AliyunQwen(Node):
83
81
 
84
82
 
85
83
  class Baichuan(Node):
86
- def __init__(self, id: Optional[str] = None):
84
+ def __init__(self, id: str | None = None):
87
85
  super().__init__(
88
86
  node_type="Baichuan",
89
87
  category="llms",
@@ -174,7 +172,7 @@ class Baichuan(Node):
174
172
 
175
173
 
176
174
  class BaiduWenxin(Node):
177
- def __init__(self, id: Optional[str] = None):
175
+ def __init__(self, id: str | None = None):
178
176
  super().__init__(
179
177
  node_type="BaiduWenxin",
180
178
  category="llms",
@@ -215,7 +213,7 @@ class BaiduWenxin(Node):
215
213
 
216
214
 
217
215
  class ChatGLM(Node):
218
- def __init__(self, id: Optional[str] = None):
216
+ def __init__(self, id: str | None = None):
219
217
  super().__init__(
220
218
  node_type="ChatGLM",
221
219
  category="llms",
@@ -303,7 +301,7 @@ class ChatGLM(Node):
303
301
 
304
302
 
305
303
  class Claude(Node):
306
- def __init__(self, id: Optional[str] = None):
304
+ def __init__(self, id: str | None = None):
307
305
  super().__init__(
308
306
  node_type="Claude",
309
307
  category="llms",
@@ -355,7 +353,7 @@ class Claude(Node):
355
353
 
356
354
 
357
355
  class Deepseek(Node):
358
- def __init__(self, id: Optional[str] = None):
356
+ def __init__(self, id: str | None = None):
359
357
  super().__init__(
360
358
  node_type="Deepseek",
361
359
  category="llms",
@@ -449,7 +447,7 @@ class Deepseek(Node):
449
447
 
450
448
 
451
449
  class Gemini(Node):
452
- def __init__(self, id: Optional[str] = None):
450
+ def __init__(self, id: str | None = None):
453
451
  super().__init__(
454
452
  node_type="Gemini",
455
453
  category="llms",
@@ -540,7 +538,7 @@ class Gemini(Node):
540
538
 
541
539
 
542
540
  class LingYiWanWu(Node):
543
- def __init__(self, id: Optional[str] = None):
541
+ def __init__(self, id: str | None = None):
544
542
  super().__init__(
545
543
  node_type="LingYiWanWu",
546
544
  category="llms",
@@ -585,7 +583,7 @@ class LingYiWanWu(Node):
585
583
 
586
584
 
587
585
  class MiniMax(Node):
588
- def __init__(self, id: Optional[str] = None):
586
+ def __init__(self, id: str | None = None):
589
587
  super().__init__(
590
588
  node_type="MiniMax",
591
589
  category="llms",
@@ -673,7 +671,7 @@ class MiniMax(Node):
673
671
 
674
672
 
675
673
  class Moonshot(Node):
676
- def __init__(self, id: Optional[str] = None):
674
+ def __init__(self, id: str | None = None):
677
675
  super().__init__(
678
676
  node_type="Moonshot",
679
677
  category="llms",
@@ -763,7 +761,7 @@ class Moonshot(Node):
763
761
 
764
762
 
765
763
  class OpenAI(Node):
766
- def __init__(self, id: Optional[str] = None):
764
+ def __init__(self, id: str | None = None):
767
765
  super().__init__(
768
766
  node_type="OpenAI",
769
767
  category="llms",
@@ -860,7 +858,7 @@ class OpenAI(Node):
860
858
 
861
859
 
862
860
  class XAi(Node):
863
- def __init__(self, id: Optional[str] = None):
861
+ def __init__(self, id: str | None = None):
864
862
  super().__init__(
865
863
  node_type="XAi",
866
864
  category="llms",
@@ -951,7 +949,7 @@ class XAi(Node):
951
949
 
952
950
 
953
951
  class CustomModel(Node):
954
- def __init__(self, id: Optional[str] = None):
952
+ def __init__(self, id: str | None = None):
955
953
  super().__init__(
956
954
  node_type="CustomModel",
957
955
  category="llms",
@@ -1,11 +1,9 @@
1
- from typing import Optional
2
-
3
1
  from ..graph.node import Node
4
2
  from ..graph.port import PortType, InputPort, OutputPort
5
3
 
6
4
 
7
5
  class AudioEditing(Node):
8
- def __init__(self, id: Optional[str] = None):
6
+ def __init__(self, id: str | None = None):
9
7
  super().__init__(
10
8
  node_type="AudioEditing",
11
9
  category="media_editing",
@@ -15,7 +13,7 @@ class AudioEditing(Node):
15
13
  "input_audio": InputPort(
16
14
  name="input_audio",
17
15
  port_type=PortType.FILE,
18
- value=list(),
16
+ value=[],
19
17
  support_file_types=[".mp3", ".wav", ".ogg", ".m4a"],
20
18
  multiple=True,
21
19
  show=True,
@@ -52,26 +50,21 @@ class AudioEditing(Node):
52
50
  port_type=PortType.NUMBER,
53
51
  value=0,
54
52
  condition="return fieldsData.trim.value && (fieldsData.trim_method.value === 'start_duration' || fieldsData.trim_method.value === 'end_duration')",
55
- condition_python=lambda ports: ports["trim"].value
56
- and (
57
- ports["trim_method"].value == "start_duration" or ports["trim_method"].value == "end_duration"
58
- ),
53
+ condition_python=lambda ports: ports["trim"].value and (ports["trim_method"].value == "start_duration" or ports["trim_method"].value == "end_duration"),
59
54
  ),
60
55
  "trim_start_time": InputPort(
61
56
  name="trim_start_time",
62
57
  port_type=PortType.INPUT,
63
58
  value="00:00:00",
64
59
  condition="return fieldsData.trim.value && fieldsData.trim_method.value === 'start_end_time'",
65
- condition_python=lambda ports: ports["trim"].value
66
- and ports["trim_method"].value == "start_end_time",
60
+ condition_python=lambda ports: ports["trim"].value and ports["trim_method"].value == "start_end_time",
67
61
  ),
68
62
  "trim_end_time": InputPort(
69
63
  name="trim_end_time",
70
64
  port_type=PortType.INPUT,
71
65
  value="00:01:00",
72
66
  condition="return fieldsData.trim.value && fieldsData.trim_method.value === 'start_end_time'",
73
- condition_python=lambda ports: ports["trim"].value
74
- and ports["trim_method"].value == "start_end_time",
67
+ condition_python=lambda ports: ports["trim"].value and ports["trim_method"].value == "start_end_time",
75
68
  ),
76
69
  "adjust_volume": InputPort(
77
70
  name="adjust_volume",
@@ -122,16 +115,14 @@ class AudioEditing(Node):
122
115
  port_type=PortType.NUMBER,
123
116
  value=1.0,
124
117
  condition="return fieldsData.adjust_speed.value && fieldsData.speed_adjustment_method.value === 'specified_speed'",
125
- condition_python=lambda ports: ports["adjust_speed"].value
126
- and ports["speed_adjustment_method"].value == "specified_speed",
118
+ condition_python=lambda ports: ports["adjust_speed"].value and ports["speed_adjustment_method"].value == "specified_speed",
127
119
  ),
128
120
  "specified_final_length": InputPort(
129
121
  name="specified_final_length",
130
122
  port_type=PortType.NUMBER,
131
123
  value=10,
132
124
  condition="return fieldsData.adjust_speed.value && fieldsData.speed_adjustment_method.value === 'specified_final_length'",
133
- condition_python=lambda ports: ports["adjust_speed"].value
134
- and ports["speed_adjustment_method"].value == "specified_final_length",
125
+ condition_python=lambda ports: ports["adjust_speed"].value and ports["speed_adjustment_method"].value == "specified_final_length",
135
126
  ),
136
127
  "adjust_channels": InputPort(
137
128
  name="adjust_channels",
@@ -175,7 +166,7 @@ class AudioEditing(Node):
175
166
 
176
167
 
177
168
  class ImageBackgroundRemoval(Node):
178
- def __init__(self, id: Optional[str] = None):
169
+ def __init__(self, id: str | None = None):
179
170
  super().__init__(
180
171
  node_type="ImageBackgroundRemoval",
181
172
  category="media_editing",
@@ -185,7 +176,7 @@ class ImageBackgroundRemoval(Node):
185
176
  "input_image": InputPort(
186
177
  name="input_image",
187
178
  port_type=PortType.FILE,
188
- value=list(),
179
+ value=[],
189
180
  support_file_types=[".jpg", ".jpeg", ".png", ".webp"],
190
181
  multiple=True,
191
182
  show=True,
@@ -234,7 +225,7 @@ class ImageBackgroundRemoval(Node):
234
225
 
235
226
 
236
227
  class ImageEditing(Node):
237
- def __init__(self, id: Optional[str] = None):
228
+ def __init__(self, id: str | None = None):
238
229
  super().__init__(
239
230
  node_type="ImageEditing",
240
231
  category="media_editing",
@@ -244,7 +235,7 @@ class ImageEditing(Node):
244
235
  "input_image": InputPort(
245
236
  name="input_image",
246
237
  port_type=PortType.FILE,
247
- value=list(),
238
+ value=[],
248
239
  support_file_types=[".jpg", ".jpeg", ".png", ".webp"],
249
240
  multiple=True,
250
241
  show=True,
@@ -317,16 +308,14 @@ class ImageEditing(Node):
317
308
  port_type=PortType.NUMBER,
318
309
  value=1,
319
310
  condition="return fieldsData.crop.value && fieldsData.crop_method.value == 'proportional'",
320
- condition_python=lambda ports: ports["crop"].value
321
- and ports["crop_method"].value == "proportional",
311
+ condition_python=lambda ports: ports["crop"].value and ports["crop_method"].value == "proportional",
322
312
  ),
323
313
  "crop_height_ratio": InputPort(
324
314
  name="crop_height_ratio",
325
315
  port_type=PortType.NUMBER,
326
316
  value=1,
327
317
  condition="return fieldsData.crop.value && fieldsData.crop_method.value == 'proportional'",
328
- condition_python=lambda ports: ports["crop"].value
329
- and ports["crop_method"].value == "proportional",
318
+ condition_python=lambda ports: ports["crop"].value and ports["crop_method"].value == "proportional",
330
319
  ),
331
320
  "scale": InputPort(
332
321
  name="scale",
@@ -349,16 +338,14 @@ class ImageEditing(Node):
349
338
  port_type=PortType.NUMBER,
350
339
  value=1,
351
340
  condition="return fieldsData.scale.value && fieldsData.scale_method.value == 'proportional_scale'",
352
- condition_python=lambda ports: ports["scale"].value
353
- and ports["scale_method"].value == "proportional_scale",
341
+ condition_python=lambda ports: ports["scale"].value and ports["scale_method"].value == "proportional_scale",
354
342
  ),
355
343
  "scale_width": InputPort(
356
344
  name="scale_width",
357
345
  port_type=PortType.NUMBER,
358
346
  value=0,
359
347
  condition="return fieldsData.scale.value && fieldsData.scale_method.value == 'fixed_width_height'",
360
- condition_python=lambda ports: ports["scale"].value
361
- and ports["scale_method"].value == "fixed_width_height",
348
+ condition_python=lambda ports: ports["scale"].value and ports["scale_method"].value == "fixed_width_height",
362
349
  ),
363
350
  "scale_height": InputPort(
364
351
  name="scale_height",
@@ -393,7 +380,7 @@ class ImageEditing(Node):
393
380
 
394
381
 
395
382
  class ImageSegmentation(Node):
396
- def __init__(self, id: Optional[str] = None):
383
+ def __init__(self, id: str | None = None):
397
384
  super().__init__(
398
385
  node_type="ImageSegmentation",
399
386
  category="media_editing",
@@ -403,7 +390,7 @@ class ImageSegmentation(Node):
403
390
  "input_image": InputPort(
404
391
  name="input_image",
405
392
  port_type=PortType.FILE,
406
- value=list(),
393
+ value=[],
407
394
  support_file_types=[".jpg", ".jpeg", ".png", ".webp"],
408
395
  multiple=True,
409
396
  show=True,
@@ -457,7 +444,7 @@ class ImageSegmentation(Node):
457
444
 
458
445
 
459
446
  class ImageWatermark(Node):
460
- def __init__(self, id: Optional[str] = None):
447
+ def __init__(self, id: str | None = None):
461
448
  super().__init__(
462
449
  node_type="ImageWatermark",
463
450
  category="media_editing",
@@ -467,7 +454,7 @@ class ImageWatermark(Node):
467
454
  "input_image": InputPort(
468
455
  name="input_image",
469
456
  port_type=PortType.FILE,
470
- value=list(),
457
+ value=[],
471
458
  support_file_types=[".jpg", ".jpeg", ".png", ".webp"],
472
459
  multiple=True,
473
460
  show=True,
@@ -484,7 +471,7 @@ class ImageWatermark(Node):
484
471
  "watermark_image": InputPort(
485
472
  name="watermark_image",
486
473
  port_type=PortType.FILE,
487
- value=list(),
474
+ value=[],
488
475
  support_file_types=[".jpg", ".jpeg", ".png", ".webp"],
489
476
  condition="return fieldsData.image_or_text.value == 'image'",
490
477
  condition_python=lambda ports: ports["image_or_text"].value == "image",
@@ -533,11 +520,10 @@ class ImageWatermark(Node):
533
520
  "watermark_text_font_custom": InputPort(
534
521
  name="watermark_text_font_custom",
535
522
  port_type=PortType.FILE,
536
- value=list(),
523
+ value=[],
537
524
  support_file_types=[".otf", ".ttf", ".ttc", ".otc"],
538
525
  condition="return fieldsData.image_or_text.value == 'text' && fieldsData.watermark_text_font.value == 'custom'",
539
- condition_python=lambda ports: ports["image_or_text"].value == "text"
540
- and ports["watermark_text_font"].value == "custom",
526
+ condition_python=lambda ports: ports["image_or_text"].value == "text" and ports["watermark_text_font"].value == "custom",
541
527
  ),
542
528
  "watermark_text_font_size": InputPort(
543
529
  name="watermark_text_font_size",
@@ -600,7 +586,7 @@ class ImageWatermark(Node):
600
586
 
601
587
 
602
588
  class VideoEditing(Node):
603
- def __init__(self, id: Optional[str] = None):
589
+ def __init__(self, id: str | None = None):
604
590
  super().__init__(
605
591
  node_type="VideoEditing",
606
592
  category="media_editing",
@@ -610,7 +596,7 @@ class VideoEditing(Node):
610
596
  "input_video": InputPort(
611
597
  name="input_video",
612
598
  port_type=PortType.FILE,
613
- value=list(),
599
+ value=[],
614
600
  support_file_types=["video/*"],
615
601
  multiple=True,
616
602
  show=True,
@@ -682,7 +668,7 @@ class VideoEditing(Node):
682
668
 
683
669
 
684
670
  class VideoScreenshot(Node):
685
- def __init__(self, id: Optional[str] = None):
671
+ def __init__(self, id: str | None = None):
686
672
  super().__init__(
687
673
  node_type="VideoScreenshot",
688
674
  category="media_editing",
@@ -692,7 +678,7 @@ class VideoScreenshot(Node):
692
678
  "input_video": InputPort(
693
679
  name="input_video",
694
680
  port_type=PortType.FILE,
695
- value=list(),
681
+ value=[],
696
682
  support_file_types=["video/*"],
697
683
  multiple=True,
698
684
  show=True,