diff --git a/examples/02_comfyui_kling_wrapper_text2video_v3_intelligence.json b/examples/02_comfyui_kling_wrapper_text2video_v3_intelligence.json index 075e936..c9f731d 100644 --- a/examples/02_comfyui_kling_wrapper_text2video_v3_intelligence.json +++ b/examples/02_comfyui_kling_wrapper_text2video_v3_intelligence.json @@ -88,8 +88,7 @@ "Node name for S&R": "Comfyui-Kling-Wrapper Preview Video" }, "widgets_values": [ - "Comfyui-Kling-Wrapper", - true + "Comfyui-Kling-Wrapper" ] } ], diff --git a/examples/03_comfyui_kling_wrapper_image2video_v3.json b/examples/03_comfyui_kling_wrapper_image2video_v3.json index 23be693..afcc828 100644 --- a/examples/03_comfyui_kling_wrapper_image2video_v3.json +++ b/examples/03_comfyui_kling_wrapper_image2video_v3.json @@ -137,8 +137,7 @@ "Node name for S&R": "Comfyui-Kling-Wrapper Preview Video" }, "widgets_values": [ - "Comfyui-Kling-Wrapper", - true + "Comfyui-Kling-Wrapper" ] } ], diff --git a/examples/04_comfyui_kling_wrapper_multi_images_to_video_v3.json b/examples/04_comfyui_kling_wrapper_multi_images_to_video_v3.json index 7807b69..19e36ac 100644 --- a/examples/04_comfyui_kling_wrapper_multi_images_to_video_v3.json +++ b/examples/04_comfyui_kling_wrapper_multi_images_to_video_v3.json @@ -208,8 +208,7 @@ "Node name for S&R": "Comfyui-Kling-Wrapper Preview Video" }, "widgets_values": [ - "Comfyui-Kling-Wrapper", - true + "Comfyui-Kling-Wrapper" ] } ], diff --git a/examples/05_comfyui_kling_wrapper_text2video_v26_sound.json b/examples/05_comfyui_kling_wrapper_text2video_v26_sound.json index 25b70de..2daed5d 100644 --- a/examples/05_comfyui_kling_wrapper_text2video_v26_sound.json +++ b/examples/05_comfyui_kling_wrapper_text2video_v26_sound.json @@ -88,8 +88,7 @@ "Node name for S&R": "Comfyui-Kling-Wrapper Preview Video" }, "widgets_values": [ - "Comfyui-Kling-Wrapper", - true + "Comfyui-Kling-Wrapper" ] } ], diff --git a/examples/06_comfyui_kling_wrapper_advanced_element_subject_to_image2video.json b/examples/06_comfyui_kling_wrapper_advanced_element_subject_to_image2video.json index 35a2e78..c6796d6 100644 --- a/examples/06_comfyui_kling_wrapper_advanced_element_subject_to_image2video.json +++ b/examples/06_comfyui_kling_wrapper_advanced_element_subject_to_image2video.json @@ -396,8 +396,7 @@ "Node name for S&R": "Comfyui-Kling-Wrapper Preview Video" }, "widgets_values": [ - "Comfyui-Kling-Wrapper", - true + "Comfyui-Kling-Wrapper" ] } ], diff --git a/examples/07_comfyui_kling_wrapper_motion_control_v26.json b/examples/07_comfyui_kling_wrapper_motion_control_v26.json index 45e4ecc..8f48169 100644 --- a/examples/07_comfyui_kling_wrapper_motion_control_v26.json +++ b/examples/07_comfyui_kling_wrapper_motion_control_v26.json @@ -165,8 +165,7 @@ "Node name for S&R": "Comfyui-Kling-Wrapper Preview Video" }, "widgets_values": [ - "Comfyui-Kling-Wrapper", - true + "Comfyui-Kling-Wrapper" ] } ], diff --git a/examples/10_comfyui_kling_wrapper_video_extend_chain.json b/examples/10_comfyui_kling_wrapper_video_extend_chain.json index 4abb231..7285f7f 100644 --- a/examples/10_comfyui_kling_wrapper_video_extend_chain.json +++ b/examples/10_comfyui_kling_wrapper_video_extend_chain.json @@ -131,8 +131,7 @@ "Node name for S&R": "Comfyui-Kling-Wrapper Preview Video" }, "widgets_values": [ - "Comfyui-Kling-Wrapper", - true + "Comfyui-Kling-Wrapper" ] } ], diff --git a/examples/13_comfyui_kling_wrapper_lip_sync_from_text.json b/examples/13_comfyui_kling_wrapper_lip_sync_from_text.json index 9736bcf..e795413 100644 --- a/examples/13_comfyui_kling_wrapper_lip_sync_from_text.json +++ b/examples/13_comfyui_kling_wrapper_lip_sync_from_text.json @@ -170,8 +170,7 @@ "Node name for S&R": "Comfyui-Kling-Wrapper Preview Video" }, "widgets_values": [ - "Comfyui-Kling-Wrapper", - true + "Comfyui-Kling-Wrapper" ] } ], diff --git a/examples/14_comfyui_kling_wrapper_effects_single_image.json b/examples/14_comfyui_kling_wrapper_effects_single_image.json index e5b242b..23b09fb 100644 --- a/examples/14_comfyui_kling_wrapper_effects_single_image.json +++ b/examples/14_comfyui_kling_wrapper_effects_single_image.json @@ -128,8 +128,7 @@ "Node name for S&R": "Comfyui-Kling-Wrapper Preview Video" }, "widgets_values": [ - "Comfyui-Kling-Wrapper", - true + "Comfyui-Kling-Wrapper" ] } ], diff --git a/examples/generate_examples.py b/examples/generate_examples.py index 6dab18d..313aa1c 100644 --- a/examples/generate_examples.py +++ b/examples/generate_examples.py @@ -170,7 +170,7 @@ def preview_video_node(node_id, pos, order, link_id): pos, [430, 820], order, - [NODE_PREFIX, True], + [NODE_PREFIX], inputs=[input_slot("video_url", "STRING", link_id)], outputs=[output_slot("file_path", "STRING", slot_index=0)], ) diff --git a/py/nodes.py b/py/nodes.py index da2e987..113c20a 100644 --- a/py/nodes.py +++ b/py/nodes.py @@ -1523,7 +1523,6 @@ class PreviewVideo: "required": { "video_url": ("STRING", {"forceInput": True}), "filename_prefix": ("STRING", {"default": DEFAULT_FILENAME_PREFIX}), - "save_output": ("BOOLEAN", {"default": True}), } } @@ -1534,7 +1533,7 @@ class PreviewVideo: RETURN_TYPES = ("STRING",) RETURN_NAMES = ("file_path",) - def run(self, video_url, filename_prefix, save_output): + def run(self, video_url, filename_prefix, save_output=True): if not save_output: return {"ui": {"video_url": [video_url]}, "result": ('',)} diff --git a/tests/test_backend_config.py b/tests/test_backend_config.py index c9e2880..9be557d 100644 --- a/tests/test_backend_config.py +++ b/tests/test_backend_config.py @@ -142,7 +142,6 @@ class BackendConfigTests(unittest.TestCase): result = kling_nodes.PreviewVideo().run( "https://example.com/video.mp4", "Comfyui-Kling-Wrapper", - True, ) self.assertEqual( @@ -154,6 +153,11 @@ class BackendConfigTests(unittest.TestCase): "Comfyui-Kling-Wrapper_00001_.mp4", ) + def test_preview_video_save_output_is_not_user_toggleable(self): + required = kling_nodes.PreviewVideo.INPUT_TYPES()["required"] + + self.assertNotIn("save_output", required) + def test_preview_video_registers_saved_file_as_asset(self): with tempfile.TemporaryDirectory() as tmpdir: tmpdir_path = Path(tmpdir) @@ -169,7 +173,6 @@ class BackendConfigTests(unittest.TestCase): result = kling_nodes.PreviewVideo().run( "https://example.com/video.mp4", "Comfyui-Kling-Wrapper", - True, ) register_mock.assert_called_once_with(result["result"][0]) @@ -189,7 +192,6 @@ class BackendConfigTests(unittest.TestCase): result = kling_nodes.PreviewVideo().run( "https://example.com/video.mp4", "Comfyui-Kling-Wrapper", - True, ) self.assertTrue(Path(result["result"][0]).is_file()) @@ -199,7 +201,7 @@ class BackendConfigTests(unittest.TestCase): ValueError, "empty video_url", ): - kling_nodes.PreviewVideo().run("", "Comfyui-Kling-Wrapper", True) + kling_nodes.PreviewVideo().run("", "Comfyui-Kling-Wrapper") def test_upload_file_to_tmpfiles_retries_transient_ssl_error(self): with tempfile.TemporaryDirectory() as tmpdir: