bizyengine 1.2.80__py3-none-any.whl → 1.2.81__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.
@@ -585,3 +585,215 @@ class Seedance_1_0_I2V_API(BizyAirTrdApiBaseNode):
585
585
 
586
586
  def handle_outputs(self, outputs):
587
587
  return (outputs[0][0], "")
588
+
589
+
590
+ class Seedance_1_5_T2V_API(BizyAirTrdApiBaseNode):
591
+ RETURN_TYPES = (
592
+ "VIDEO",
593
+ """{"doubao-seedance-1-5-pro-251215": "doubao-seedance-1-5-pro"}""",
594
+ )
595
+ RETURN_NAMES = ("video", "bizyair_model_name")
596
+ CATEGORY = "☁️BizyAir/External APIs/Doubao"
597
+ NODE_DISPLAY_NAME = "Seedance 1.5 Pro Text To Video"
598
+
599
+ @classmethod
600
+ def INPUT_TYPES(cls):
601
+ return {
602
+ "required": {
603
+ "prompt": (
604
+ "STRING",
605
+ {
606
+ "multiline": True,
607
+ "default": "",
608
+ },
609
+ ),
610
+ "model": (
611
+ ["doubao-seedance-1-5-pro-251215"],
612
+ {"default": "doubao-seedance-1-5-pro-251215"},
613
+ ),
614
+ "resolution": (
615
+ ["480p", "720p", "1080p"],
616
+ {
617
+ "default": "1080p",
618
+ "tooltip": "分辨率+比例共同决定视频尺寸,具体尺寸请参考官方文档说明",
619
+ },
620
+ ),
621
+ "ratio": (
622
+ ["16:9", "4:3", "1:1", "3:4", "9:16", "21:9", "adaptive"],
623
+ {
624
+ "default": "adaptive",
625
+ "tooltip": "比例+分辨率共同决定视频尺寸,具体尺寸请参考官方文档说明",
626
+ },
627
+ ),
628
+ "duration": ("INT", {"default": 12, "min": 2, "max": 12}),
629
+ "fps": (
630
+ [24],
631
+ {
632
+ "default": 24,
633
+ "tooltip": "帧率固定24",
634
+ },
635
+ ),
636
+ "camerafixed": (
637
+ "BOOLEAN",
638
+ {
639
+ "default": False,
640
+ "tooltip": "平台可能在提示词中追加固定摄像机指令(效果不保证) ",
641
+ },
642
+ ),
643
+ "generate_audio": (
644
+ "BOOLEAN",
645
+ {
646
+ "default": False,
647
+ "tooltip": "影响计费。控制生成的视频是否包含与画面同步的声音,Seedance 1.5 pro 能够基于文本提示词与视觉内容,自动生成与之匹配的人声、音效及背景音乐。建议将对话部分置于双引号内,以优化音频生成效果。例如:男人叫住女人说:“你记住,以后不可以用手指指月亮。”",
648
+ },
649
+ ),
650
+ "seed": ("INT", {"default": -1, "min": -1, "max": 2147483647}),
651
+ },
652
+ }
653
+
654
+ def handle_inputs(self, headers, prompt_id, **kwargs):
655
+ model = kwargs.get("model", "doubao-seedance-1-5-pro-251215")
656
+ prompt = kwargs.get("prompt", "")
657
+ resolution = kwargs.get("resolution", "1080p")
658
+ ratio = kwargs.get("ratio", "adaptive")
659
+ duration = kwargs.get("duration", 12)
660
+ camerafixed = kwargs.get("camerafixed", False)
661
+ generate_audio = kwargs.get("generate_audio", False)
662
+ seed = kwargs.get("seed", -1)
663
+ if prompt is None or prompt.strip() == "":
664
+ raise ValueError("Prompt is required")
665
+ data = {
666
+ "prompt": prompt,
667
+ "model": model,
668
+ "resolution": resolution,
669
+ "ratio": ratio,
670
+ "duration": duration,
671
+ "camerafixed": camerafixed,
672
+ "seed": seed,
673
+ "watermark": False,
674
+ "fps": 24,
675
+ "generate_audio": generate_audio,
676
+ }
677
+ return data, "doubao-seedance-1-5-pro"
678
+
679
+ def handle_outputs(self, outputs):
680
+ return (outputs[0][0], "")
681
+
682
+
683
+ class Seedance_1_5_I2V_API(BizyAirTrdApiBaseNode):
684
+ RETURN_TYPES = (
685
+ "VIDEO",
686
+ """{"doubao-seedance-1-5-pro-251215": "doubao-seedance-1-5-pro"}""",
687
+ )
688
+ RETURN_NAMES = ("video", "bizyair_model_name")
689
+ CATEGORY = "☁️BizyAir/External APIs/Doubao"
690
+ NODE_DISPLAY_NAME = "Seedance 1.5 Pro Image To Video"
691
+
692
+ @classmethod
693
+ def INPUT_TYPES(cls):
694
+ return {
695
+ "required": {
696
+ "first_frame_image": ("IMAGE",),
697
+ "prompt": (
698
+ "STRING",
699
+ {
700
+ "multiline": True,
701
+ "default": "",
702
+ },
703
+ ),
704
+ "model": (
705
+ ["doubao-seedance-1-5-pro-251215"],
706
+ {"default": "doubao-seedance-1-5-pro-251215"},
707
+ ),
708
+ "resolution": (
709
+ ["480p", "720p", "1080p"],
710
+ {
711
+ "default": "1080p",
712
+ "tooltip": "分辨率+比例共同决定视频尺寸,具体尺寸请参考官方文档说明",
713
+ },
714
+ ),
715
+ "ratio": (
716
+ ["16:9", "4:3", "1:1", "3:4", "9:16", "21:9", "adaptive"],
717
+ {
718
+ "default": "adaptive",
719
+ "tooltip": "比例+分辨率共同决定视频尺寸,具体尺寸请参考官方文档说明",
720
+ },
721
+ ),
722
+ "duration": ("INT", {"default": 12, "min": 2, "max": 12}),
723
+ "fps": (
724
+ [24],
725
+ {
726
+ "default": 24,
727
+ "tooltip": "帧率固定24",
728
+ },
729
+ ),
730
+ "camerafixed": (
731
+ "BOOLEAN",
732
+ {
733
+ "default": False,
734
+ "tooltip": "平台可能在提示词中追加固定摄像机指令(效果不保证) ",
735
+ },
736
+ ),
737
+ "generate_audio": (
738
+ "BOOLEAN",
739
+ {
740
+ "default": False,
741
+ "tooltip": "影响计费。控制生成的视频是否包含与画面同步的声音,Seedance 1.5 pro 能够基于文本提示词与视觉内容,自动生成与之匹配的人声、音效及背景音乐。建议将对话部分置于双引号内,以优化音频生成效果。例如:男人叫住女人说:“你记住,以后不可以用手指指月亮。”",
742
+ },
743
+ ),
744
+ "seed": ("INT", {"default": -1, "min": -1, "max": 2147483647}),
745
+ },
746
+ "optional": {
747
+ "last_frame_image": ("IMAGE",),
748
+ },
749
+ }
750
+
751
+ def handle_inputs(self, headers, prompt_id, **kwargs):
752
+ model = kwargs.get("model", "doubao-seedance-1-5-pro-251215")
753
+ prompt = kwargs.get("prompt", "")
754
+ resolution = kwargs.get("resolution", "1080p")
755
+ ratio = kwargs.get("ratio", "adaptive")
756
+ duration = kwargs.get("duration", 12)
757
+ camerafixed = kwargs.get("camerafixed", False)
758
+ generate_audio = kwargs.get("generate_audio", False)
759
+ seed = kwargs.get("seed", -1)
760
+ first_frame_image = kwargs.get("first_frame_image", None)
761
+ last_frame_image = kwargs.get("last_frame_image", None)
762
+ if first_frame_image is None:
763
+ raise ValueError("First frame image is required")
764
+ if (
765
+ last_frame_image is not None
766
+ and model == "doubao-seedance-1-0-pro-fast-251015"
767
+ ):
768
+ raise ValueError(
769
+ "Last frame image is not supported for doubao-seedance-1-0-pro-fast-251015"
770
+ )
771
+ first_frame_image_url = self.upload_file(
772
+ tensor_to_bytesio(image=first_frame_image, total_pixels=4096 * 4096),
773
+ f"{prompt_id}_first.png",
774
+ headers,
775
+ )
776
+ data = {
777
+ "prompt": prompt,
778
+ "model": model,
779
+ "resolution": resolution,
780
+ "ratio": ratio,
781
+ "duration": duration,
782
+ "camerafixed": camerafixed,
783
+ "seed": seed,
784
+ "watermark": False,
785
+ "fps": 24,
786
+ "first_frame_image": first_frame_image_url,
787
+ "generate_audio": generate_audio,
788
+ }
789
+ if last_frame_image is not None:
790
+ last_frame_image_url = self.upload_file(
791
+ tensor_to_bytesio(image=last_frame_image, total_pixels=4096 * 4096),
792
+ f"{prompt_id}_last.png",
793
+ headers,
794
+ )
795
+ data["last_frame_image"] = last_frame_image_url
796
+ return data, "doubao-seedance-1-5-pro"
797
+
798
+ def handle_outputs(self, outputs):
799
+ return (outputs[0][0], "")
@@ -250,38 +250,33 @@ async def async_send_request(
250
250
  **kwargs,
251
251
  ) -> dict:
252
252
  headers = kwargs.pop("headers") if "headers" in kwargs else _headers()
253
- try:
254
- async with aiohttp.ClientSession(
255
- timeout=aiohttp.ClientTimeout(total=600)
256
- ) as session:
257
- async with session.request(
258
- method, url, data=data, headers=headers, **kwargs
259
- ) as response:
260
- response_data = await response.text()
261
- if response.status != 200:
262
- error_message = f"HTTP Status {response.status}"
263
- logging.error(f"Error encountered: {error_message}")
264
- if response.status == 401:
265
- raise PermissionError(
266
- "Key is invalid, please refer to https://cloud.siliconflow.cn to get the API key.\n"
267
- "If you have the key, please click the 'BizyAir Key' button at the bottom right to set the key."
268
- )
269
- else:
270
- raise ConnectionError(
271
- f"Failed to connect to the server: {error_message}.\n"
272
- + "Please check your API key and ensure the server is reachable.\n"
273
- + "Also, verify your network settings and disable any proxies if necessary.\n"
274
- + "After checking, please restart the ComfyUI service."
275
- )
276
- if callback:
277
- return callback(json.loads(response_data))
278
- return json.loads(response_data)
279
- except aiohttp.ClientError as e:
280
- logging.error(f"Error fetching data: {e}")
281
- return {}
282
- except Exception as e:
283
- logging.error(f"Error fetching data: {str(e)}")
284
- return {}
253
+ async with aiohttp.ClientSession(
254
+ timeout=aiohttp.ClientTimeout(total=600)
255
+ ) as session:
256
+ async with session.request(
257
+ method, url, data=data, headers=headers, **kwargs
258
+ ) as response:
259
+ response_data = await response.text()
260
+ if response.status != 200:
261
+ error_message = (
262
+ f"HTTP Status {response.status}, response body: {response_data}"
263
+ )
264
+ logging.error(f"Error encountered: {error_message}")
265
+ if response.status == 401:
266
+ raise PermissionError(
267
+ "Key is invalid, please refer to https://cloud.siliconflow.cn to get the API key.\n"
268
+ "If you have the key, please click the 'BizyAir Key' button at the bottom right to set the key."
269
+ )
270
+ else:
271
+ raise ConnectionError(
272
+ f"Failed to connect to the server: {error_message}.\n"
273
+ + "Please check your API key and ensure the server is reachable.\n"
274
+ + "Also, verify your network settings and disable any proxies if necessary.\n"
275
+ + "After checking, please restart the ComfyUI service."
276
+ )
277
+ if callback:
278
+ return callback(json.loads(response_data))
279
+ return json.loads(response_data)
285
280
 
286
281
 
287
282
  def fetch_models_by_type(
bizyengine/version.txt CHANGED
@@ -1 +1 @@
1
- 1.2.80
1
+ 1.2.81
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bizyengine
3
- Version: 1.2.80
3
+ Version: 1.2.81
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=jPMuwo0YkWz0z6ipvf5yo6r6zf129yvctPDotxDmQ6g,6
2
+ bizyengine/version.txt,sha256=BIxqlk4qFX0rTxoaGz3szRCvEYArsAjvUAs_-d5c1oU,6
3
3
  bizyengine/bizy_server/__init__.py,sha256=SP9oSblnPo4KQyh7yOGD26YCskFAcQHAZy04nQBNRIw,200
4
4
  bizyengine/bizy_server/api_client.py,sha256=vNBUkFNMjPI_F_wAGiN-ydCZO8oLdgyWBlMY1DQbHOk,43685
5
5
  bizyengine/bizy_server/errno.py,sha256=8dzmtlqq0wBJguHAXKEDb_uUYUQ7qlZQK6FxOpMxqLg,17328
@@ -46,7 +46,7 @@ bizyengine/bizyair_extras/nodes_ipadapter_plus/nodes_ipadapter_plus.py,sha256=lO
46
46
  bizyengine/bizyair_extras/nodes_kolors_mz/__init__.py,sha256=HsCCCphW8q0SrWEiFlZKK_W2lQr1T0UJIJL7gEn37ME,3729
47
47
  bizyengine/bizyair_extras/oauth_callback/main.py,sha256=KQOZWor3kyNx8xvUNHYNMoHfCF9g_ht13_iPk4K_5YM,3633
48
48
  bizyengine/bizyair_extras/third_party_api/__init__.py,sha256=jAZrTdBSVg3TielWoAUWUqWonBwoKZQ-jLQ07JzOHx8,339
49
- bizyengine/bizyair_extras/third_party_api/nodes_doubao.py,sha256=d_1HMZEJ0eMftp4Ln0EI6A53leClqnSCf3J6Fwb2pwM,21687
49
+ bizyengine/bizyair_extras/third_party_api/nodes_doubao.py,sha256=TrFDCRkyF6LRJ2QxRmlqiIX_ebeHI5KvKWpVfQxa3Qg,30256
50
50
  bizyengine/bizyair_extras/third_party_api/nodes_flux.py,sha256=iv9V7-ijKGgR5_n8BlIe4E7QjWSGvWkIIUDMOn_3t1s,6339
51
51
  bizyengine/bizyair_extras/third_party_api/nodes_gemini.py,sha256=tRjAGNJsJkYPXhlBREJd3jxPr4lF533Q_XMMHNIeXNM,17910
52
52
  bizyengine/bizyair_extras/third_party_api/nodes_gpt.py,sha256=IwIvMiKU1h917w42NNCXM7o7VF1Bjm7hPEhwGeWGTOw,3220
@@ -84,7 +84,7 @@ bizyengine/core/commands/servers/model_server.py,sha256=47DEQpj8HBSa-_TImW-5JCeu
84
84
  bizyengine/core/commands/servers/prompt_server.py,sha256=5R4a5EU5z5lqGNoDlGRtUGGHRojFWAtm3rdslqxpebU,11366
85
85
  bizyengine/core/common/__init__.py,sha256=GicZw6YeAZk1PsKmFDt9dm1F75zPUlpia9Q_ki5vW1Y,179
86
86
  bizyengine/core/common/caching.py,sha256=hRNsSrfNxgc1zzvBzLVjMY0iMkKqA0TBCr-iYhEpzik,6946
87
- bizyengine/core/common/client.py,sha256=szsvaHkvmXm52PaBaDhjx8hUsk3KaxSaqSuIiW3hsHY,10638
87
+ bizyengine/core/common/client.py,sha256=CXhcNALGae1lLt5OhPvMg7RUhzgMz8ClFPYoiy6H22g,10394
88
88
  bizyengine/core/common/env_var.py,sha256=1EAW3gOXY2bKouCqrGa583vTJRdDasQ1IsFTnzDg7Dk,3450
89
89
  bizyengine/core/common/utils.py,sha256=Jxk4tCURbUhjYBFuHTiQgeUo2w13TYj4upnPTKNNucM,4215
90
90
  bizyengine/core/configs/conf.py,sha256=D_UWG9SSJnK5EhbrfNFryJQ8hUwwdvhOGlq1TielwpI,3830
@@ -104,7 +104,7 @@ bizyengine/misc/route_sam.py,sha256=-bMIR2QalfnszipGxSxvDAHGJa5gPSrjkYPb5baaRg4,
104
104
  bizyengine/misc/segment_anything.py,sha256=wNKYwlYPMszfwj23524geFZJjZaG4eye65SGaUnh77I,8941
105
105
  bizyengine/misc/supernode.py,sha256=STN9gaxfTSErH8OiHeZa47d8z-G9S0I7fXuJvHQOBFM,4532
106
106
  bizyengine/misc/utils.py,sha256=GMRWKhOP-MCueVyCO-doflb7dH5dM32DyLcSPEVOXWA,13333
107
- bizyengine-1.2.80.dist-info/METADATA,sha256=1TBmpEReFNxvv5XWdlyW-P3cUqULI2XXGygxnt3tifU,735
108
- bizyengine-1.2.80.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
109
- bizyengine-1.2.80.dist-info/top_level.txt,sha256=2zapzqxX-we5cRyJkGf9bd5JinRtXp3-_uDI-xCAnc0,11
110
- bizyengine-1.2.80.dist-info/RECORD,,
107
+ bizyengine-1.2.81.dist-info/METADATA,sha256=gjscZH-NEPlq8K8hNENZabddgt27l3uqdYSNAhr6zGE,735
108
+ bizyengine-1.2.81.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
109
+ bizyengine-1.2.81.dist-info/top_level.txt,sha256=2zapzqxX-we5cRyJkGf9bd5JinRtXp3-_uDI-xCAnc0,11
110
+ bizyengine-1.2.81.dist-info/RECORD,,